
var msgTypeConstants=new Object();msgTypeConstants.TEXT=1;msgTypeConstants.VOICE=2;msgTypeConstants.PICTURE=3;msgTypeConstants.VEDIO=4;msgTypeConstants.LOCATION=5;var groupTypeConstants=new Object();groupTypeConstants.SINGLE_CHAT=1;groupTypeConstants.GROUP_CHAT=2;groupTypeConstants.SYSTEM_CHAT=3;groupTypeConstants.SECRETARY_CHAT=4;groupTypeConstants.CUSTOMER_CHAT=5;MsgJson=function(){this.head=null;this.msg=null;this.setHead=function(head){this.head=head;};this.setMsg=function(msg){this.msg=msg;};this.test=function(){if(!isNotEmpty(this.head,this,msg)){return false}
if(!(this.head instanceof Head)){var headTemp=new Head();copyAndOverWrite(headTemp,this.head)
this.head=headTemp;}
if(!this.head.test()){return false;}
var msgTemp=msgFactory.getProto(this.head.command,this.msg);return msgTemp.test();};}
Head=function(){this.length=0;this.command=0;this.uid=0;this.clientId=IMConf.OSTYPE;this.iVersion=1;this.clientType=0;this.result=0;this.stime=new Date().getTime();this.receiveId=0;this.rspIP=0;this.rspPort=0;this.traceId=getRandomNum(-2147483648,2147483647);this.ack=0;this.appId="";this.receiveType=0;this.senderType=0;this.sResv="";this.setCommand=function(command){this.command=command;return this;};this.setReceiveId=function(receiveId){this.receiveId=receiveId;return this;};this.setStime=function(stime){this.stime=stime;return this;};this.test=function(){return isNotEmpty(this.uid,this.command,this.traceId,this.appId,this.clientId);}}
Heartbeat=function(){this.uid=0;this.extra="";this.setUid=function(uid){this.uid=uid;return this;};this.setExtra=function(extra){this.extra=extra;return this;};this.test=function(){return isNotEmpty(this.uid);};}
UserLogin=function(){this.uid=0;this.token="";this.apnsToken="";this.extra="";this.deviceId=IMConstants.IM_DEVICE_ID;this.setUid=function(uid){this.uid=uid;return this;};this.setToken=function(token){this.token=token;return this;};this.setDeviceId=function(deviceId){this.deviceId=deviceId;return this;};this.setExtra=function(extra){this.extra=extra;return this;};this.test=function(){return isNotEmpty(this.uid,this.token,this.deviceId);}}
UserLogout=function(){this.uid=0;this.token="";this.extra="";this.deviceId=IMConstants.IM_DEVICE_ID;this.setUid=function(uid){this.uid=uid;return this;};this.setToken=function(token){this.token=token;return this;}
this.setDeviceId=function(deviceId){this.deviceId=deviceId;return this;};this.setExtra=function(extra){this.extra=extra;return this;};this.test=function(){return isNotEmpty(this.uid,this.token,this.deviceId);}}
KickUser=function(){this.uid="";this.appId="";this.token="";this.extra="";this.setUid=function(uid){this.uid=uid;return this;};this.setAppId=function(appId){this.appId=appId;return this;};this.setToken=function(token){this.token=token;return this;}
this.setExtra=function(extra){this.extra=extra;return this;};this.test=function(){return isNotEmpty(this.uid,this.appId,this.token);}}
CloseChannel=function(){this.uid=0;this.extra="";this.setUid=function(uid){this.uid=uid;return this;};this.setExtra=function(extra){this.extra=extra;return this;};this.test=function(){return isNotEmpty(this.uid);}}
ListGroupMsg=function(){this.uid=0;this.time=null;this.extra="";this.setUid=function(uid){this.uid=uid;return this;};this.setTime=function(time){this.time=time;return this;};this.setExtra=function(extra){this.extra=extra;return this;};this.test=function(){return isNotEmpty(this.uid);}}
ListSysGroupMsg=function(){this.uid=0;this.time=null;this.extra="";this.setUid=function(uid){this.uid=uid;return this;};this.setTime=function(time){this.time=time;return this;};this.setExtra=function(extra){this.extra=extra;return this;};this.test=function(){return isNotEmpty(this.uid);}}
ImMsgAttach=function(){this.attachId=Math.uuid();this.attachName="";this.attachType;this.attachUrl;this.attachSize=0;this.width=0;this.height=0;this.attachPlaytime=0;this.attachUploadtime=0;this.extra="";this.setAttachId=function(attachId){this.attachId=attachId;return this;};this.setAttachName=function(attachName){this.attachName=attachName;return this;};this.setAttachType=function(attachType){this.attachType=attachType;return this;};this.setAttachUrl=function(attachUrl){this.attachUrl=attachUrl;return this;};this.setAttachSize=function(attachSize){this.attachSize=attachSize;return this;};this.setWidth=function(width){this.width=width;return this;};this.setHeight=function(height){this.height=height;return this;};this.setAttachPlaytime=function(attachPlaytime){this.attachPlaytime=attachPlaytime;return this;};this.setAttachUploadtime=function(attachUploadtime){this.attachUploadtime=attachUploadtime;return this;};this.setExtra=function(extra){this.extra=extra;return this;};this.test=function(){if(!isNotEmpty(this.attachName,this.attachType,this.attachUrl)){return false;}
return true;};}
ImMsgLocation=function(){this.msgId=Math.uuid();this.longitude;this.latitude;this.imgUrl;this.content="";this.extra="";this.setMsgId=function(msgId){this.msgId=msgId;return this;};this.setContent=function(content){this.content=content;return this;};this.setImgUrl=function(imgUrl){this.imgUrl=imgUrl;return this;};this.setLatitude=function(latitude){this.latitude=latitude;return this;};this.setLongitude=function(longitude){this.longitude=longitude;return this;};this.setExtra=function(extra){this.extra=extra;return this;};this.test=function(){return isNotEmpty(this.latitude,this.longitude);}}
ImMsg=function(){this.msgId=Math.uuid();this.msgType=null;this.msgBody=null;this.senderId=null;this.senderName="";this.senderRemark="";this.groupId=null;this.groupType=null;this.groupName="";this.sendTime=new Date().getTime();this.msgSeqId=0;this.msgUrl="";this.location=null;this.origiImg=false;this.attach=JSON.stringify({});this.extra="";this.atUids=[];this.pushStatus;this.attch=null;this.test=function(){if(!isNotEmpty(this.msgId,this.msgType,this.senderId,this.groupId)){return false;}
switch(this.msgType){case msgTypeConstants.TEXT:return isNotEmpty(this.msgBody);case msgTypeConstants.VOICE:case msgTypeConstants.PICTURE:case msgTypeConstants.VEDIO:if(!isNotEmpty(this.attach)){return false;}
if(!(this.attach instanceof Array)){return false;}
for(var att in this.attach){if(!(att instanceof ImMsgAttach)){var imMsgAttach=new ImMsgAttach();copyAndOverWrite(imMsgAttach,att)
if(!imMsgAttach.test()){return false}}};return true;case msgTypeConstants.LOCATION:if(!isNotEmpty(this.attach)){return false;}
if(!(this.attach instanceof Array)){return false;}
for(var att in this.attach){if(!(att instanceof ImMsgLocation)){var imMsgLocation=new ImMsgLocation();copyAndOverWrite(imMsgLocation,att)
if(!imMsgLocation.test()){return false}}};return true;default:return false;}
return true;};this.setMsgId=function(msgId){this.msgId=msgId
return this;};this.setPushStatus=function(pushStatus){this.pushStatus=pushStatus
return this;};this.setSendTime=function(sendTime){this.sendTime=sendTime
return this;};this.setAttach=function(attach){this.attach=attach
return this;};this.setGroupId=function(groupId){this.groupId=groupId
return this;};this.setGroupType=function(groupType){this.groupType=groupType
return this;};this.setGroupName=function(groupName){this.groupName=groupName;return this;};this.setMsgSeqId=function(msgSeqId){this.msgSeqId=msgSeqId;return this;};this.setSenderId=function(senderId){this.senderId=senderId;return this;};this.setSenderName=function(senderName){this.senderName=senderName;return this;};this.setSenderRemark=function(senderRemark){this.senderRemark=senderRemark;return this;};this.setMsgType=function(msgType){this.msgType=msgType;return this;};this.setMsgBody=function(msgBody){this.msgBody=msgBody;return this;};this.setExtra=function(extra){this.extra=extra;return this;};this.setAtUids=function(atUids){this.atUids=atUids;return this;};this.setMsgUrl=function(msgUrl){this.msgUrl=msgUrl;return this;};this.setGroupChatType=function(groupChatType){this.groupChatType=groupChatType;return this;};this.setAttch=function(attch){this.attch=attch
return this;};}
ListOffileMsg=function(){this.groupId;this.msgSeqId;this.size;this.extra="";this.setExtra=function(extra){this.extra=extra;return this;};this.setMsgSeqId=function(msgSeqId){this.msgSeqId=msgSeqId;return this;};this.setGroupId=function(groupId){this.groupId=groupId;return this;};this.setSize=function(size){this.size=size;return this;};this.test=function(){return isNotEmpty(this.size,this.groupId,this.msgSeqId);};}
SubmitReadSeqMsg=function(){this.uid=0;this.group=[];this.extra="";this.setUid=function(uid){this.uid=uid;return this;};this.setExtra=function(extra){this.extra=extra;return this;};this.setGroup=function(group){this.group=group;return this;};this.test=function(){if(!isNotEmpty(this.uid,this.group)){return false;}
if(!(this.group instanceof Array)){return false;}
for(var groupTemp in this.group){if(!(groupTemp instanceof ImGroup2)){var imGroup=new ImGroup2();copyAndOverWrite(imGroup,groupTemp)
if(!imGroup.test()){return false;}}}
return true;}}
IssueReadSeqMsg=function(){this.uid=0;this.group=[];this.extra="";this.setUid=function(uid){this.uid=uid;return this;};this.setExtra=function(extra){this.extra=extra;return this;};this.setGroup=function(group){this.group=group;return this;};this.test=function(){if(!isNotEmpty(this.uid,this.group)){return false;}
if(!(this.group instanceof Array)){return false;}
for(var groupTemp in this.group){if(!(groupTemp instanceof ImGroup)){var imGroup=new ImGroup();copyAndOverWrite(imGroup,groupTemp)
if(!imGroup.test()){return false;}}}
return true;};}
ConsultImMsg=function(){this.customerId=IMConstants.IM_CUSTOMER_ID;this.imMsg=null;this.extra="";this.shopId="";this.setExtra=function(extra){this.extra=extra;return this;};this.setCustomerId=function(customerId){this.customerId=customerId;return this;};this.setImMsg=function(imMsg){this.imMsg=imMsg;return this;};this.setShopId=function(shopId){this.shopId=shopId;return this;};this.test=function(){if(!isNotEmpty(this.customerId,this.imMsg)){return false;}
if(!(this.imMsg instanceof ImMsg)){var imMsg=new ImMsg();copyAndOverWrite(imMsg,this.imMsg);this.imMsg=imMsg;}
return this.imMsg.test();};}
ReadReportMsg=function(){this.uid=IMConstants.IM_UID;this.groupId=null;this.msgId=null;this.extra="";this.setUid=function(uid){this.uid=uid;return this;};this.setExtra=function(extra){this.extra=extra;return this;};this.setMsgId=function(msgId){this.msgId=msgId;return this;};this.setGroupId=function(groupId){this.groupId=groupId;return this;};this.test=function(){return isNotEmpty(this.uid,this,groupId,this.msgId);};}
ReadReportSyncMsg=function(){this.uid=IMConstants.IM_UID;this.groupId=null;this.msgId=Math.uuid();this.extra="";this.setUid=function(uid){this.uid=uid;return this;};this.setGroupId=function(groupId){this.groupId=groupId;return this;};this.setMsgId=function(msgId){this,msgId=msgId;return this;};this.setExtra=function(extra){this.extra=extra;return this;};this.test=function(){return isNotEmpty(this.uid,this.groupId,this.msgId);};}
ImGroup=function(isConstantLastMsg){this.groupId;this.groupType;this.seqId;this.initSeqId;this.readSeqId;this.lastMsg=new ImMsg();this.isQuit;this.extra="";this.isMsgBlocked;this.setGroupId=function(groupId){this.groupId=groupId;return this;};this.setReadSeqId=function(readSeqId){this.readSeqId=readSeqId;return this;};this.setGroupType=function(groupType){this.groupType=groupType;return this;};this.setInitSeqId=function(initSeqId){this.initSeqId=initSeqId;return this;};this.test=function(){return isNotEmpty(this.groupId,this.groupType,this.initSeqId);}}
ImGroup2=function(){this.groupId;this.groupType;this.readSeqId;this.setGroupId=function(groupId){this.groupId=groupId;return this;};this.setReadSeqId=function(readSeqId){this.readSeqId=readSeqId;return this;};this.setGroupType=function(groupType){this.groupType=groupType;return this;};this.test=function(){return isNotEmpty(this.groupId,this.groupType,this.readSeqId);}}
ImGroup2=function(){this.groupId;this.groupType;this.seqId;this.initSeqId;this.readSeqId;this.isQuit;this.extra="";this.isMsgBlocked;this.setGroupId=function(groupId){this.groupId=groupId;return this;};this.setReadSeqId=function(readSeqId){this.readSeqId=readSeqId;return this;};this.setGroupType=function(groupType){this.groupType=groupType;return this;};this.setInitSeqId=function(initSeqId){this.initSeqId=initSeqId;return this;};this.test=function(){return isNotEmpty(this.groupId,this.groupType,this.initSeqId);}}
UserData=function(){this.group=new ImGroup();this.msg=new ImMsg();this.extra="";}
SubmitInitSeqMsg=function(){this.uid=IMConstants.IM_UID;this.group=[];this.extra="";this.setUid=function(uid){this.uid=uid;};this.setGroup=function(group){this.group=group;};this.setExtra=function(extra){this.extra=extra;};this.test=function(){if(!isNotEmpty(this.uid,this.group)){return false;}
if(!(this.group instanceof Array)){return false;}
for(var groupTemp in this.group){if(!(groupTemp instanceof ImGroup)){var imGroup=new ImGroup();copyAndOverWrite(imGroup,groupTemp)
if(!imGroup.test()){return false;}}}
return true;};}
IssueInitSeqMsg=function(){this.uid="";this.group=null;this.extra="";this.setUid=function(uid){this.uid=uid;return this;};this.setGroup=function(group){this.group=group;return this;}
this.setExtra=function(extra){this.extra=extra;return this;}
this.test=function(){if(!isNotEmpty(this.uid,this.group)){return false;}
for(var arg in this.group){if(arg instanceof ImGroup){if(!arg.test()){return false;}}else{var imGroup=new ImGroup();imGroup.setGroupId(arg.groupId).setGroupType(arg.groupType).setInitSeqId(arg.initSeqId);if(!imGroup.test()){return false;}}}
return true;}}
GetGroupByIdMsg=function(){this.uid=null;this.groupId="";this.extra="";this.setGroupId=function(groupIdArg){this.groupId=groupIdArg;return this;};this.setUid=function(uidArg){this.uid=uidArg;return this;};this.setExtra=function(extraArg){this.extra=extraArg;return this;};this.test=function(){return isNotEmpty(this,groupId,this.uid);};}
PushMsg=function(){this.msgId=Math.uuid();this.alert=new PushAlert();this.badge;this.sound;this.extra="";}
PushAlert=function(){this.title="";this.body="";this.extra="";this.setTitle=function(title){this.title=title;return this;};this.setBody=function(body){this.body=body;return this;};this.setExtra=function(extra){this.extra=extra;return this;};this.test=function(){return ieEmpty(this.title,this.body);}}
CleanPushCount=function(){this.msgId=Math.uuid();this.apnsToken="";this.uid=null;this.extra="";this.setMsgId=function(msgId){this.msgId=msgId;return this;};this.setUid=function(uid){this.uid=uid;return this;};this.setExtra=function(extra){this.extra=extra;return this;};this.setApnsToken=function(apnsToken){this.apnsToken=apnsToken;return this;};this.test=function(){return isNotEmpty(this.uid,this.msgId);}}
InitConsultation=function(){this.uid=null;this.groupId="";this.channelId="";this.platformId="";this.shopId="";this.entryType=null;this.extra="";this.setUid=function(uid){this.uid=uid;return this;};this.setGroupId=function(groupId){this.groupId=groupId;return this;};this.setChannelId=function(channelId){this.channelId=channelId;return this;};this.setPlatformId=function(platformId){this.platformId=platformId;return this;};this.setShopId=function(shopId){this.shopId=shopId;return this;};this.setEntryType=function(entryType){this.entryType=entryType;return this;};this.setExtra=function(extra){this.extra=extra;return this;}}
SelSkillConsultation=function(){this.uid=null;this.groupId="";this.channelId="";this.platformId="";this.shopId="";this.skillGroup=null;this.extra="";this.setUid=function(uid){this.uid=uid;return this;};this.setGroupId=function(groupId){this.groupId=groupId;return this;};this.setChannelId=function(channelId){this.channelId=channelId;return this;};this.setPlatformId=function(platformId){this.platformId=platformId;return this;};this.setShopId=function(shopId){this.shopId=shopId;return this;};this.setSkillGroup=function(skillGroup){this.skillGroup=skillGroup;return this;};this.setExtra=function(extra){this.extra=extra;return this;};this.test=function(){return isNotEmpty(this.uid,this.channelId);}}
CustomerMsg=function(){this.groupId="";this.channelId="";this.platformId="";this.shopId="";this.msgId="";this.msgType=null;this.msgBody="";this.senderId=null;this.senderName="";this.groupType=null;this.sendTime=null;this.msgSeqId=null;this.msgUrl="";this.attach=null;this.origiImg=null;this.location=null;this.whetherHide=null;this.receiveUids=null;this.msgStatus=null;this.groupChatType=null;this.sourceType=null;this.extra="";this.setGroupId=function(groupId){this.groupId=groupId;return this;};this.setChannelId=function(channelId){this.channelId=channelId;return this;};this.setPlatformId=function(platformId){this.platformId=platformId;return this;};this.setShopId=function(shopId){this.shopId=shopId;return this;};this.setMsgId=function(msgId){this.msgId=msgId;return this;};this.setMsgType=function(msgType){this.msgType=msgType;return this;};this.setMsgBody=function(msgBody){this.msgBody=msgBody;return this;};this.setSenderId=function(senderId){this.senderId=senderId;return this;};this.setSenderName=function(senderName){this.senderName=senderName;return this;};this.setGroupType=function(groupType){this.groupType=groupType;return this;};this.setSendTime=function(sendTime){this.sendTime=sendTime;return this;};this.setMsgSeqId=function(msgSeqId){this.msgSeqId=msgSeqId;return this;};this.setMsgUrl=function(msgUrl){this.msgUrl=msgUrl;return this;};this.setAttach=function(attach){this.attach=attach;return this;};this.setOrigiImg=function(origiImg){this.origiImg=origiImg;return this;};this.setLocation=function(location){this.location=location;return this;};this.setWhetherHide=function(whetherHide){this.whetherHide=whetherHide;return this;};this.setReceiveUids=function(receiveUids){this.receiveUids=receiveUids;return this;};this.setMsgStatus=function(msgStatus){this.msgStatus=msgStatus;return this;};this.setGroupChatType=function(groupChatType){this.groupChatType=groupChatType;return this;};this.setSourceType=function(sourceType){this.sourceType=sourceType;return this;};this.setExtra=function(extra){this.extra=extra;return this;};}
ImCsAttach=function(){this.attachId="";this.attachName="";this.attachType=null;this.attachUrl="";this.attachSize=null;this.width=null;this.height=null;this.attachPlaytime=null;this.attachUploadtime=null;this.extra="";this.setAttachId=function(attachId){this.attachId=attachId;return this;};this.setAttachName=function(attachName){this.attachName=attachName;return this;};this.setAttachType=function(attachType){this.attachType=attachType;return this;};this.setAttachUrl=function(attachUrl){this.attachUrl=attachUrl;return this;};this.setAttachSize=function(attachSize){this.attachSize=attachSize;return this;};this.setWidth=function(width){this.width=width;return this;};this.setHeight=function(height){this.height=height;return this;};this.setAttachPlaytime=function(attachPlaytime){this.attachPlaytime=attachPlaytime;return this;};this.setAttachUploadtime=function(attachUploadtime){this.attachUploadtime=attachUploadtime;return this;};this.setExtra=function(extra){this.extra=extra;return this;};}
ImCsMsgLocation=function(){this.msgId="";this.longitude=null;this.latitude=null;this.imgUrl="";this.content="";this.extra=null;this.describe="";this.setMsgId=function(msgId){this.msgId=msgId;return this;};this.setLongitude=function(longitude){this.longitude=longitude;return this;};this.setLatitude=function(latitude){this.latitude=latitude;return this;};this.setImgUrl=function(imgUrl){this.imgUrl=imgUrl;return this;};this.setContent=function(content){this.content=content;return this;};this.setExtra=function(extra){this.extra=extra;return this;};this.setDescribe=function(describe){this.describe=describe;return this;};}
TransferReq=function(){this.reqUid=null;this.reqName="";this.receUid=null;this.groupId="";this.platformId="";this.extra="";this.setReqUid=function(reqUid){this.reqUid=reqUid;return this;};this.setReqName=function(reqName){this.reqName=reqName;return this;};this.setReceUid=function(receUid){this.receUid=receUid;return this;};this.setGroupId=function(groupId){this.groupId=groupId;return this;};this.setPlatformId=function(platformId){this.platformId=platformId;return this;};this.setExtra=function(extra){this.extra=extra;return this;};}
TransferNotice=function(){this.reqUid=null;this.reqName="";this.receUid=null;this.groupId="";this.platformId="";this.sendTime=null;this.extra="";this.setReqUid=function(reqUid){this.reqUid=reqUid;return this;};this.setReqName=function(reqName){this.reqName=reqName;return this;};this.setReceUid=function(receUid){this.receUid=receUid;return this;};this.setGroupId=function(groupId){this.groupId=groupId;return this;};this.setPlatformId=function(platformId){this.platformId=platformId;return this;};this.setSendTime=function(sendTime){this.sendTime=sendTime;return this;};this.setExtra=function(extra){this.extra=extra;return this;};}
TransferResp=function(){this.respUid=null;this.respName="";this.reqUid=null;this.groupId="";this.platformId="";this.sendTime=null;this.extra="";this.setRespUid=function(respUid){this.respUid=respUid;return this;};this.setRespName=function(respName){this.respName=respName;return this;};this.setReqUid=function(reqUid){this.reqUid=reqUid;return this;};this.setGroupId=function(groupId){this.groupId=groupId;return this;};this.setPlatformId=function(platformId){this.platformId=platformId;return this;};this.setSendTime=function(sendTime){this.sendTime=sendTime;return this;};this.setExtra=function(extra){this.extra=extra;return this;};}
JoinSidelines=function(){this.respUid=null;this.respName="";this.reqUid=null;this.groupId="";this.platformId="";this.sendTime=null;this.extra="";this.setRespUid=function(respUid){this.respUid=respUid;return this;};this.setRespName=function(respName){this.respName=respName;return this;};this.setReqUid=function(reqUid){this.reqUid=reqUid;return this;};this.setGroupId=function(groupId){this.groupId=groupId;return this;};this.setPlatformId=function(platformId){this.platformId=platformId;return this;};this.setSendTime=function(sendTime){this.sendTime=sendTime;return this;};this.setExtra=function(extra){this.extra=extra;return this;};}
SidelinesAnswer=function(){this.bystander=null;this.groupId="";this.platformId=3;this.extra=4;this.setBystander=function(bystander){this.bystander=bystander;return this;};this.setGroupId=function(groupId){this.groupId=groupId;return this;};this.setPlatformId=function(platformId){this.platformId=platformId;return this;};this.setExtra=function(extra){this.extra=extra;return this;};}
NoticeRobbed=function(){this.bystander=null;this.robbedUid=null;this.groupId="";this.platformId="";this.extra="";this.setBystander=function(bystander){this.bystander=bystander;return this;};this.setRobbedUid=function(robbedUid){this.robbedUid=robbedUid;return this;};this.setGroupId=function(groupId){this.groupId=groupId;return this;};this.setPlatformId=function(platformId){this.platformId=platformId;return this;};this.setExtra=function(extra){this.extra=extra;return this;};}
ChangeOnline=function(){this.uid=null;this.status=null;this.setUid=function(uid){this.uid=uid;return this;};this.setStatus=function(status){this.status=status;return this;};}
SyncEndConsultation=function(){this.groupId="";this.serviceType=null;this.extra="";this.setGroupId=function(groupId){this.groupId=groupId;return this;};this.setServiceType=function(serviceType){this.serviceType=serviceType;return this;};this.setExtra=function(extra){this.extra=extra;return this;}}
isNotEmpty=function(){if(arguments==null||arguments.length==0){return false;}
for(var arg in arguments){if(arg==null||arg==0||arg==""||arg==undefined||arg==[]||arg=={}||arg==new Object()){return false;}
if((typeof arg=="object"||typeof arg=="array")&&arg.length==0){return false;}}
return true;}
var CHARS='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');Math.uuid=function(len,radix){var chars=CHARS,uuid=[],i;radix=radix||chars.length;if(len){for(i=0;i<len;i++)uuid[i]=chars[0|Math.random()*radix];}else{var r;uuid[8]=uuid[13]=uuid[18]=uuid[23]='-';uuid[14]='4';for(i=0;i<36;i++){if(!uuid[i]){r=0|Math.random()*16;uuid[i]=chars[(i==19)?(r&0x3)|0x8:r];}}}
return uuid.join('');};Math.uuidFast=function(){var chars=CHARS,uuid=new Array(36),rnd=0,r;for(var i=0;i<36;i++){if(i==8||i==13||i==18||i==23){uuid[i]='-';}else if(i==14){uuid[i]='4';}else{if(rnd<=0x02)rnd=0x2000000+(Math.random()*0x1000000)|0;r=rnd&0xf;rnd=rnd>>4;uuid[i]=chars[(i==19)?(r&0x3)|0x8:r];}}
return uuid.join('');};Math.uuidCompact=function(){return'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(c){var r=Math.random()*16|0,v=c=='x'?r:(r&0x3|0x8);return v.toString(16);});};