forked from vijay-singh-purohit/roslibjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroslib.min.js
1 lines (1 loc) · 62.4 KB
/
roslib.min.js
1
!function n(s,r,o){function a(t,e){if(!r[t]){if(!s[t]){var i="function"==typeof require&&require;if(!e&&i)return i(t,!0);if(c)return c(t,!0);throw(i=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",i}i=r[t]={exports:{}},s[t][0].call(i.exports,function(e){return a(s[t][1][e]||e)},i,i.exports,n,s,r,o)}return r[t].exports}for(var c="function"==typeof require&&require,e=0;e<o.length;e++)a(o[e]);return a}({1:[function(e,i,t){!function(e,k){"use strict";var S=Math.pow(2,-24),s=Math.pow(2,32),v=Math.pow(2,53);var t={encode:function(e){var o,a=new ArrayBuffer(256),c=new DataView(a),l=0;function u(e){for(var t=a.byteLength,i=l+e;t<i;)t*=2;if(t!==a.byteLength){var n=c;a=new ArrayBuffer(t),c=new DataView(a);for(var s=l+3>>2,r=0;r<s;++r)c.setUint32(4*r,n.getUint32(4*r))}return o=e,c}function h(){l+=o}function f(e){h(u(1).setUint8(l,e))}function p(e){for(var t=u(e.length),i=0;i<e.length;++i)t.setUint8(l+i,e[i]);h()}function m(e,t){var i,n;t<24?f(e<<5|t):t<256?(f(e<<5|24),f(t)):t<65536?(f(e<<5|25),n=t,h(u(2).setUint16(l,n))):t<4294967296?(f(e<<5|26),i=t,h(u(4).setUint32(l,i))):(f(e<<5|27),t=((i=t)-(e=i%s))/s,(i=u(8)).setUint32(l,t),i.setUint32(l+4,e),h())}if(!function e(t){var i;if(!1===t)return f(244),0;if(!0===t)return f(245),0;if(null===t)return f(246),0;if(t===k)return f(247),0;switch(typeof t){case"number":if(Math.floor(t)===t){if(0<=t&&t<=v)return m(0,t),0;if(-v<=t&&t<0)return m(1,-(t+1)),0}return f(251),i=t,h(u(8).setFloat64(l,i)),0;case"string":for(var n=[],s=0;s<t.length;++s){var r=t.charCodeAt(s);r<128?n.push(r):(r<2048?n.push(192|r>>6):(r<55296?n.push(224|r>>12):(r=(1023&r)<<10,r|=1023&t.charCodeAt(++s),r+=65536,n.push(240|r>>18),n.push(128|r>>12&63)),n.push(128|r>>6&63)),n.push(128|63&r))}return m(3,n.length),p(n),0;default:if(Array.isArray(t))for(m(4,o=t.length),s=0;s<o;++s)e(t[s]);else if(t instanceof Uint8Array)m(2,t.length),p(t);else{var o,a=Object.keys(t);for(m(5,o=a.length),s=0;s<o;++s){var c=a[s];e(c),e(t[c])}}}}(e),"slice"in a)return a.slice(0,l);for(var e=new ArrayBuffer(l),t=new DataView(e),i=0;i<l;++i)t.setUint8(i,c.getUint8(i));return e},decode:function(t,f,p){var m=new DataView(t),v=0;function d(e,t){return v+=t,e}function y(e){return d(new Uint8Array(t,v,e),e)}function g(){return d(m.getUint8(v),1)}function b(){return d(m.getUint16(v),2)}function i(){return d(m.getUint32(v),4)}function w(){return 255===m.getUint8(v)&&(v+=1,1)}function _(e){if(e<24)return e;if(24===e)return g();if(25===e)return b();if(26===e)return i();if(27===e)return i()*s+i();if(31===e)return-1;throw"Invalid length encoding"}function T(e){var t=g();if(255===t)return-1;var i=_(31&t);if(i<0||t>>5!==e)throw"Invalid indefinite length element";return i}function x(e,t){for(var i=0;i<t;++i){var n=g();128&n&&(n<224?(n=(31&n)<<6|63&g(),--t):n<240?(n=(15&n)<<12|(63&g())<<6|63&g(),t-=2):(n=(15&n)<<18|(63&g())<<12|(63&g())<<6|63&g(),t-=3)),n<65536?e.push(n):(n-=65536,e.push(55296|n>>10),e.push(56320|1023&n))}}"function"!=typeof f&&(f=function(e){return e}),"function"!=typeof p&&(p=function(){return k});var e=function e(){var t,i,n=g(),s=n>>5,n=31&n;if(7==s)switch(n){case 25:return function(){var e=new ArrayBuffer(4),t=new DataView(e),i=b(),n=31744&i,e=1023&i;if(31744===n)n=261120;else if(0!==n)n+=114688;else if(0!=e)return e*S;return t.setUint32(0,(32768&i)<<16|n<<13|e<<13),t.getFloat32(0)}();case 26:return d(m.getFloat32(v),4);case 27:return d(m.getFloat64(v),8)}if((t=_(n))<0&&(s<2||6<s))throw"Invalid length";switch(s){case 0:return t;case 1:return-1-t;case 2:if(t<0){for(var r=[],o=0;0<=(t=T(s));)o+=t,r.push(y(t));for(var a=new Uint8Array(o),c=0,l=0;l<r.length;++l)a.set(r[l],c),c+=r[l].length;return a}return y(t);case 3:var u=[];if(t<0)for(;0<=(t=T(s));)x(u,t);else x(u,t);return String.fromCharCode.apply(null,u);case 4:if(t<0)for(i=[];!w();)i.push(e());else for(i=new Array(t),l=0;l<t;++l)i[l]=e();return i;case 5:var h={};for(l=0;l<t||t<0&&!w();++l)h[e()]=e();return h;case 6:return f(e(),t);case 7:switch(t){case 20:return!1;case 21:return!0;case 22:return null;case 23:return k;default:return p(t)}}}();if(v!==t.byteLength)throw"Remaining bytes";return e}};"function"==typeof define&&define.amd?define("cbor/cbor",t):void 0!==i&&i.exports?i.exports=t:e.CBOR||(e.CBOR=t)}(this)},{}],2:[function(e,U,E){!function(M,A){!function(){!function(f){var p=Object.hasOwnProperty,m=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},c="object"==typeof M&&"function"==typeof M.nextTick,h="function"==typeof Symbol,e="object"==typeof Reflect,l="function"==typeof A?A:setTimeout,_=h?e&&"function"==typeof Reflect.ownKeys?Reflect.ownKeys:function(e){var t=Object.getOwnPropertyNames(e);return t.push.apply(t,Object.getOwnPropertySymbols(e)),t}:Object.keys;function v(){this._events={},this._conf&&t.call(this,this._conf)}function t(e){e&&((this._conf=e).delimiter&&(this.delimiter=e.delimiter),e.maxListeners!==f&&(this._maxListeners=e.maxListeners),e.wildcard&&(this.wildcard=e.wildcard),e.newListener&&(this._newListener=e.newListener),e.removeListener&&(this._removeListener=e.removeListener),e.verboseMemoryLeak&&(this.verboseMemoryLeak=e.verboseMemoryLeak),e.ignoreErrors&&(this.ignoreErrors=e.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function d(e,t){var i="(node) warning: possible EventEmitter memory leak detected. "+e+" listeners added. Use emitter.setMaxListeners() to increase limit.";this.verboseMemoryLeak&&(i+=" Event name: "+t+"."),void 0!==M&&M.emitWarning?((t=new Error(i)).name="MaxListenersExceededWarning",t.emitter=this,t.count=e,M.emitWarning(t)):(console.error(i),console.trace&&console.trace())}function u(e,t,i){var n=arguments.length;switch(n){case 0:return[];case 1:return[e];case 2:return[e,t];case 3:return[e,t,i];default:for(var s=new Array(n);n--;)s[n]=arguments[n];return s}}function i(e,t){for(var i={},n=e.length,s=t?value.length:0,r=0;r<n;r++)i[e[r]]=r<s?t[r]:f;return i}function y(e,t,i){var n;if(this._emitter=e,this._target=t,this._listeners={},this._listenersCount=0,(i.on||i.off)&&(n=i.on,s=i.off),t.addEventListener?(n=t.addEventListener,s=t.removeEventListener):t.addListener?(n=t.addListener,s=t.removeListener):t.on&&(n=t.on,s=t.off),!n&&!s)throw Error("target does not implement any known event API");if("function"!=typeof n)throw TypeError("on method must be a function");if("function"!=typeof s)throw TypeError("off method must be a function");this._on=n,this._off=s;var s=e._observers;s?s.push(this):e._observers=[this]}function g(e,t,i,n){var s=Object.assign({},t);if(!e)return s;if("object"!=typeof e)throw TypeError("options must be an object");var r,o,a,c=Object.keys(e),l=c.length;function u(e){throw Error('Invalid "'+r+'" option value'+(e?". Reason: "+e:""))}for(var h=0;h<l;h++){if(r=c[h],!n&&!p.call(t,r))throw Error('Unknown "'+r+'" option');(o=e[r])!==f&&(a=i[r],s[r]=a?a(o,u):o)}return s}function n(e,t){return"function"==typeof e&&e.hasOwnProperty("prototype")||t("value must be a constructor"),e}function s(s){var r="value must be type of "+s.join("|"),o=s.length,n=s[0],a=s[1];return 1===o?function(e,t){if(typeof e===n)return e;t(r)}:2===o?function(e,t){var i=typeof e;if(i===n||i===a)return e;t(r)}:function(e,t){for(var i=typeof e,n=o;0<n--;)if(i===s[n])return e;t(r)}}Object.assign(y.prototype,{subscribe:function(i,n,s){function t(){var e=u.apply(null,arguments),t={data:e,name:n,original:i};s?!1!==s.call(o,t)&&a.emit.apply(a,[t.name].concat(e)):a.emit.apply(a,[n].concat(e))}var r=this,o=this._target,a=this._emitter,c=this._listeners;if(c[i])throw Error("Event '"+i+"' is already listening");this._listenersCount++,a._newListener&&a._removeListener&&!r._onNewListener?(this._onNewListener=function(e){e===n&&null===c[i]&&(c[i]=t,r._on.call(o,i,t))},a.on("newListener",this._onNewListener),this._onRemoveListener=function(e){e===n&&!a.hasListeners(e)&&c[i]&&(c[i]=null,r._off.call(o,i,t))},c[i]=null,a.on("removeListener",this._onRemoveListener)):(c[i]=t,r._on.call(o,i,t))},unsubscribe:function(e){var t,i,n,s=this,r=this._listeners,o=this._emitter,a=this._off,c=this._target;if(e&&"string"!=typeof e)throw TypeError("event must be a string");function l(){s._onNewListener&&(o.off("newListener",s._onNewListener),o.off("removeListener",s._onRemoveListener),s._onNewListener=null,s._onRemoveListener=null);var e=w.call(o,s);o._observers.splice(e,1)}if(e)(t=r[e])&&(a.call(c,e,t),delete r[e],--this._listenersCount||l());else{for(n=(i=_(r)).length;0<n--;)e=i[n],a.call(c,e,r[e]);this._listeners={},this._listenersCount=0,l()}}});var a=s(["function"]),r=s(["object","function"]);function b(o,a,c){var l,u,h,f=0,p=new o(function(t,i,e){function n(){u=u&&null,f&&(clearTimeout(f),f=0)}c=g(c,{timeout:0,overload:!1},{timeout:function(e,t){return("number"!=typeof(e*=1)||e<0||!Number.isFinite(e))&&t("timeout must be a positive number"),e}}),l=!c.overload&&"function"==typeof o.prototype.cancel&&"function"==typeof e;function s(e){n(),t(e)}function r(e){n(),i(e)}l?a(s,r,e):(u=[function(e){r(e||Error("canceled"))}],a(s,r,function(e){if(h)throw Error("Unable to subscribe on cancel event asynchronously");if("function"!=typeof e)throw TypeError("onCancel callback must be a function");u.push(e)}),h=!0),0<c.timeout&&(f=setTimeout(function(){var e=Error("timeout");e.code="ETIMEDOUT",f=0,p.cancel(e),i(e)},c.timeout))});return l||(p.cancel=function(e){if(u){for(var t=u.length,i=1;i<t;i++)u[i](e);u[0](e),u=null}}),p}function w(e){var t=this._observers;if(!t)return-1;for(var i=t.length,n=0;n<i;n++)if(t[n]._target===e)return n;return-1}function T(e,t,i,n,s){if(!i)return null;if(0===n){var r=typeof t;if("string"==r){var o,a,c=0,l=0,u=this.delimiter,h=u.length;if(-1!==(a=t.indexOf(u))){for(o=new Array(5);o[c++]=t.slice(l,a),-1!==(a=t.indexOf(u,l=a+h)););o[c++]=t.slice(l),t=o,s=c}else t=[t],s=1}else s="object"==r?t.length:(t=[t],1)}var f,p,m,v,d,y,g=null,b=t[n],w=t[n+1];if(n===s&&i._listeners)return"function"==typeof i._listeners?e&&e.push(i._listeners):e&&e.push.apply(e,i._listeners),[i];if("*"===b){for(a=(d=_(i)).length;0<a--;)"_listeners"!==(f=d[a])&&(y=T(e,t,i[f],n+1,s))&&(g?g.push.apply(g,y):g=y);return g}if("**"===b){for((v=n+1===s||n+2===s&&"*"===w)&&i._listeners&&(g=T(e,t,i,s,s)),a=(d=_(i)).length;0<a--;)"_listeners"!==(f=d[a])&&(y="*"===f||"**"===f?(i[f]._listeners&&!v&&(y=T(e,t,i[f],s,s))&&(g?g.push.apply(g,y):g=y),T(e,t,i[f],n,s)):T(e,t,i[f],f===w?n+2:n,s))&&(g?g.push.apply(g,y):g=y);return g}if(i[b]&&(g=T(e,t,i[b],n+1,s)),(r=i["*"])&&T(e,t,r,n+1,s),p=i["**"])if(n<s)for(p._listeners&&T(e,t,p,s,s),a=(d=_(p)).length;0<a--;)"_listeners"!==(f=d[a])&&(f===w?T(e,t,p[f],n+2,s):f===b?T(e,t,p[f],n+1,s):((m={})[f]=p[f],T(e,t,{"**":m},n+1,s)));else p._listeners?T(e,t,p,s,s):p["*"]&&p["*"]._listeners&&T(e,t,p["*"],s,s);return g}function x(e,t,i,n){for(var s,r,o,a=_(e),c=a.length,l=e._listeners;0<c--;)s=e[o=a[c]],r="_listeners"===o?i:i?i.concat(o):[o],o=n||"symbol"==typeof o,l&&t.push(o?r:r.join(this.delimiter)),"object"==typeof s&&x.call(this,s,t,r,o);return t}function k(e){for(var t,i,n,s=_(e),r=s.length;0<r--;)(t=e[i=s[r]])&&(n=!0,"_listeners"===i||k(t)||delete e[i]);return n}function S(e,t,i){this.emitter=e,this.event=t,this.listener=i}function o(e){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,t.call(this,e)}S.prototype.off=function(){return this.emitter.off(this.event,this.listener),this},(o.EventEmitter2=o).prototype.listenTo=function(l,e,u){if("object"!=typeof l)throw TypeError("target musts be an object");var h=this;function t(e){if("object"!=typeof e)throw TypeError("events must be an object");for(var t,i=u.reducers,n=w.call(h,l),s=-1===n?new y(h,l,u):h._observers[n],r=_(e),o=r.length,a="function"==typeof i,c=0;c<o;c++)t=r[c],s.subscribe(t,e[t]||t,a?i:i&&i[t])}return u=g(u,{on:f,off:f,reducers:f},{on:a,off:a,reducers:r}),m(e)?t(i(e)):t("string"==typeof e?i(e.split(/\s+/)):e),this},o.prototype.stopListeningTo=function(e,t){var i=this._observers;if(!i)return!1;var n,s=i.length,r=!1;if(e&&"object"!=typeof e)throw TypeError("target should be an object");for(;0<s--;)n=i[s],e&&n._target!==e||(n.unsubscribe(t),r=!0);return r},o.prototype.delimiter=".",o.prototype.setMaxListeners=function(e){e!==f&&(this._maxListeners=e,this._conf||(this._conf={}),this._conf.maxListeners=e)},o.prototype.getMaxListeners=function(){return this._maxListeners},o.prototype.event="",o.prototype.once=function(e,t,i){return this._once(e,t,!1,i)},o.prototype.prependOnceListener=function(e,t,i){return this._once(e,t,!0,i)},o.prototype._once=function(e,t,i,n){return this._many(e,1,t,i,n)},o.prototype.many=function(e,t,i,n){return this._many(e,t,i,!1,n)},o.prototype.prependMany=function(e,t,i,n){return this._many(e,t,i,!0,n)},o.prototype._many=function(e,t,i,n,s){var r=this;if("function"!=typeof i)throw new Error("many only accepts instances of Function");function o(){return 0==--t&&r.off(e,o),i.apply(this,arguments)}return o._origin=i,this._on(e,o,n,s)},o.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||v.call(this);var e,t,i,n,s,r,o=arguments[0],a=this.wildcard;if("newListener"===o&&!this._newListener&&!this._events.newListener)return!1;if(a&&"newListener"!==(e=o)&&"removeListener"!==o&&"object"==typeof o){if(i=o.length,h)for(n=0;n<i;n++)if("symbol"==typeof o[n]){r=!0;break}r||(o=o.join(this.delimiter))}var c,l=arguments.length;if(this._all&&this._all.length)for(n=0,i=(c=this._all.slice()).length;n<i;n++)switch(this.event=o,l){case 1:c[n].call(this,o);break;case 2:c[n].call(this,o,arguments[1]);break;case 3:c[n].call(this,o,arguments[1],arguments[2]);break;default:c[n].apply(this,arguments)}if(a)T.call(this,c=[],e,this.listenerTree,0,i);else{if("function"==typeof(c=this._events[o])){switch(this.event=o,l){case 1:c.call(this);break;case 2:c.call(this,arguments[1]);break;case 3:c.call(this,arguments[1],arguments[2]);break;default:for(t=new Array(l-1),s=1;s<l;s++)t[s-1]=arguments[s];c.apply(this,t)}return!0}c=c&&c.slice()}if(c&&c.length){if(3<l)for(t=new Array(l-1),s=1;s<l;s++)t[s-1]=arguments[s];for(n=0,i=c.length;n<i;n++)switch(this.event=o,l){case 1:c[n].call(this);break;case 2:c[n].call(this,arguments[1]);break;case 3:c[n].call(this,arguments[1],arguments[2]);break;default:c[n].apply(this,t)}return!0}if(!this.ignoreErrors&&!this._all&&"error"===o)throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");return!!this._all},o.prototype.emitAsync=function(){if(!this._events&&!this._all)return!1;this._events||v.call(this);var e,t,i,n,s,r,o=arguments[0],a=this.wildcard;if("newListener"===o&&!this._newListener&&!this._events.newListener)return Promise.resolve([!1]);if(a&&"newListener"!==(e=o)&&"removeListener"!==o&&"object"==typeof o){if(n=o.length,h)for(s=0;s<n;s++)if("symbol"==typeof o[s]){t=!0;break}t||(o=o.join(this.delimiter))}var c,l=[],u=arguments.length;if(this._all)for(s=0,n=this._all.length;s<n;s++)switch(this.event=o,u){case 1:l.push(this._all[s].call(this,o));break;case 2:l.push(this._all[s].call(this,o,arguments[1]));break;case 3:l.push(this._all[s].call(this,o,arguments[1],arguments[2]));break;default:l.push(this._all[s].apply(this,arguments))}if(a?T.call(this,c=[],e,this.listenerTree,0):c=this._events[o],"function"==typeof c)switch(this.event=o,u){case 1:l.push(c.call(this));break;case 2:l.push(c.call(this,arguments[1]));break;case 3:l.push(c.call(this,arguments[1],arguments[2]));break;default:for(i=new Array(u-1),r=1;r<u;r++)i[r-1]=arguments[r];l.push(c.apply(this,i))}else if(c&&c.length){if(c=c.slice(),3<u)for(i=new Array(u-1),r=1;r<u;r++)i[r-1]=arguments[r];for(s=0,n=c.length;s<n;s++)switch(this.event=o,u){case 1:l.push(c[s].call(this));break;case 2:l.push(c[s].call(this,arguments[1]));break;case 3:l.push(c[s].call(this,arguments[1],arguments[2]));break;default:l.push(c[s].apply(this,i))}}else if(!this.ignoreErrors&&!this._all&&"error"===o)return arguments[1]instanceof Error?Promise.reject(arguments[1]):Promise.reject("Uncaught, unspecified 'error' event.");return Promise.all(l)},o.prototype.on=function(e,t,i){return this._on(e,t,!1,i)},o.prototype.prependListener=function(e,t,i){return this._on(e,t,!0,i)},o.prototype.onAny=function(e){return this._onAny(e,!1)},o.prototype.prependAny=function(e){return this._onAny(e,!0)},o.prototype.addListener=o.prototype.on,o.prototype._onAny=function(e,t){if("function"!=typeof e)throw new Error("onAny only accepts instances of Function");return this._all||(this._all=[]),t?this._all.unshift(e):this._all.push(e),this},o.prototype._on=function(e,t,i,n){if("function"==typeof e)return this._onAny(e,t),this;if("function"!=typeof t)throw new Error("on only accepts instances of Function");this._events||v.call(this);var s=this;return n!==f&&(t=(n=function(e,t,i){if(!0===i)s=!0;else if(!1===i)n=!0;else{if(!i||"object"!=typeof i)throw TypeError("options should be an object or true");var n=i.async,s=i.promisify,r=i.nextTick,o=i.objectify}if(n||r||s){var a=t,n=t._origin||t;if(r&&!c)throw Error("process.nextTick is not supported");s===f&&(s="AsyncFunction"===t.constructor.name),(t=function(){var e=arguments,t=this,i=this.event;return s?r?Promise.resolve():new Promise(function(e){l(e)}).then(function(){return t.event=i,a.apply(t,e)}):(r?M.nextTick:l)(function(){t.event=i,a.apply(t,e)})})._async=!0,t._origin=n}return[t,o?new S(this,e,t):this]}.call(this,e,t,n))[0],s=n[1]),this._newListener&&this.emit("newListener",e,t),this.wildcard?function(e,t,i){var n,s=0,r=0,o=this.delimiter,a=o.length;if("string"==typeof e)if(-1!==(u=e.indexOf(o))){for(n=new Array(5);n[s++]=e.slice(r,u),-1!==(u=e.indexOf(o,r=u+a)););n[s++]=e.slice(r)}else n=[e],s=1;else s=(n=e).length;if(1<s)for(u=0;u+1<s;u++)if("**"===n[u]&&"**"===n[u+1])return;for(var c,l=this.listenerTree,u=0;u<s;u++)if(l=l[c=n[u]]||(l[c]={}),u===s-1)return l._listeners?("function"==typeof l._listeners&&(l._listeners=[l._listeners]),i?l._listeners.unshift(t):l._listeners.push(t),!l._listeners.warned&&0<this._maxListeners&&l._listeners.length>this._maxListeners&&(l._listeners.warned=!0,d.call(this,l._listeners.length,c))):l._listeners=t,!0;return!0}.call(this,e,t,i):this._events[e]?("function"==typeof this._events[e]&&(this._events[e]=[this._events[e]]),i?this._events[e].unshift(t):this._events[e].push(t),!this._events[e].warned&&0<this._maxListeners&&this._events[e].length>this._maxListeners&&(this._events[e].warned=!0,d.call(this,this._events[e].length,e))):this._events[e]=t,s},o.prototype.off=function(e,t){if("function"!=typeof t)throw new Error("removeListener only takes instances of Function");var i=[];if(this.wildcard){var n="string"==typeof e?e.split(this.delimiter):e.slice();if(!(i=T.call(this,null,n,this.listenerTree,0)))return this}else{if(!this._events[e])return this;o=this._events[e],i.push({_listeners:o})}for(var s=0;s<i.length;s++){var r=i[s],o=r._listeners;if(m(o)){for(var a=-1,c=0,l=o.length;c<l;c++)if(o[c]===t||o[c].listener&&o[c].listener===t||o[c]._origin&&o[c]._origin===t){a=c;break}if(!(a<0))return(this.wildcard?r._listeners:this._events[e]).splice(a,1),0===o.length&&(this.wildcard?delete r._listeners:delete this._events[e]),this._removeListener&&this.emit("removeListener",e,t),this}else(o===t||o.listener&&o.listener===t||o._origin&&o._origin===t)&&(this.wildcard?delete r._listeners:delete this._events[e],this._removeListener&&this.emit("removeListener",e,t))}return this.listenerTree&&k(this.listenerTree),this},o.prototype.offAny=function(e){var t,i=0,n=0;if(e&&this._all&&0<this._all.length){for(i=0,n=(t=this._all).length;i<n;i++)if(e===t[i])return t.splice(i,1),this._removeListener&&this.emit("removeListenerAny",e),this}else{if(t=this._all,this._removeListener)for(i=0,n=t.length;i<n;i++)this.emit("removeListenerAny",t[i]);this._all=[]}return this},o.prototype.removeListener=o.prototype.off,o.prototype.removeAllListeners=function(e){if(e===f)return this._events&&v.call(this),this;if(this.wildcard){var t,i=T.call(this,null,e,this.listenerTree,0);if(!i)return this;for(t=0;t<i.length;t++)i[t]._listeners=null;this.listenerTree&&k(this.listenerTree)}else this._events&&(this._events[e]=null);return this},o.prototype.listeners=function(e){var t,i,n,s,r,o=this._events;if(e===f){if(this.wildcard)throw Error("event name required for wildcard emitter");if(!o)return[];for(s=(t=_(o)).length,n=[];0<s--;)"function"==typeof(i=o[t[s]])?n.push(i):n.push.apply(n,i);return n}if(this.wildcard){if(!(r=this.listenerTree))return[];var a=[],c="string"==typeof e?e.split(this.delimiter):e.slice();return T.call(this,a,c,r,0),a}return o&&(i=o[e])?"function"==typeof i?[i]:i:[]},o.prototype.eventNames=function(e){var t=this._events;return this.wildcard?x.call(this,this.listenerTree,[],null,e):t?_(t):[]},o.prototype.listenerCount=function(e){return this.listeners(e).length},o.prototype.hasListeners=function(e){if(this.wildcard){var t=[],i="string"==typeof e?e.split(this.delimiter):e.slice();return T.call(this,t,i,this.listenerTree,0),0<t.length}i=this._events,t=this._all;return!!(t&&t.length||i&&(e===f?_(i).length:i[e]))},o.prototype.listenersAny=function(){return this._all||[]},o.prototype.waitFor=function(s,r){var o=this,e=typeof r;return"number"==e?r={timeout:r}:"function"==e&&(r={filter:r}),b((r=g(r,{timeout:0,filter:f,handleError:!1,Promise:Promise,overload:!1},{filter:a,Promise:n})).Promise,function(t,i,e){function n(){var e=r.filter;e&&!e.apply(o,arguments)||(o.off(s,n),r.handleError?(e=arguments[0])?i(e):t(u.apply(null,arguments).slice(1)):t(u.apply(null,arguments)))}e(function(){o.off(s,n)}),o._on(s,n,!1)},{timeout:r.timeout,overload:r.overload})};var L=o.prototype;Object.defineProperties(o,{defaultMaxListeners:{get:function(){return L._maxListeners},set:function(e){if("number"!=typeof e||e<0||Number.isNaN(e))throw TypeError("n must be a non-negative number");L._maxListeners=e},enumerable:!0},once:{value:function(o,a,e){return b((e=g(e,{Promise:Promise,timeout:0,overload:!1},{Promise:n})).Promise,function(e,t,i){var n;if("function"==typeof o.addEventListener)return n=function(){e(u.apply(null,arguments))},i(function(){o.removeEventListener(a,n)}),void o.addEventListener(a,n,{once:!0});function s(){r&&o.removeListener("error",r),e(u.apply(null,arguments))}var r;"error"!==a&&(r=function(e){o.removeListener(a,s),t(e)},o.once("error",r)),i(function(){r&&o.removeListener("error",r),o.removeListener(a,s)}),o.once(a,s)},{timeout:e.timeout,overload:e.overload})},writable:!0,configurable:!0}}),Object.defineProperties(L,{_maxListeners:{value:10,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),"function"==typeof define&&define.amd?define(function(){return o}):"object"==typeof E?U.exports=o:new Function("","return this")().EventEmitter2=o}()}.call(this)}.call(this,e("_process"),e("timers").setImmediate)},{_process:4,timers:5}],3:[function(e,t,i){"use strict";var c=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return;for(var t={},i=0;i<10;i++)t["_"+String.fromCharCode(i)]=i;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},n)).join("")?void 0:1}catch(e){return}}()?Object.assign:function(e,t){for(var i,n=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),s=1;s<arguments.length;s++){for(var r in i=Object(arguments[s]))l.call(i,r)&&(n[r]=i[r]);if(c)for(var o=c(i),a=0;a<o.length;a++)u.call(i,o[a])&&(n[o[a]]=i[o[a]])}return n}},{}],4:[function(e,t,i){var n,s,t=t.exports={};function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===r||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:r}catch(e){n=r}try{s="function"==typeof clearTimeout?clearTimeout:o}catch(e){s=o}}();var c,l=[],u=!1,h=-1;function f(){u&&c&&(u=!1,c.length?l=c.concat(l):h=-1,l.length&&p())}function p(){if(!u){var e=a(f);u=!0;for(var t=l.length;t;){for(c=l,l=[];++h<t;)c&&c[h].run();h=-1,t=l.length}c=null,u=!1,function(t){if(s===clearTimeout)return clearTimeout(t);if((s===o||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(t);try{s(t)}catch(e){try{return s.call(null,t)}catch(e){return s.call(this,t)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function v(){}t.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var i=1;i<arguments.length;i++)t[i-1]=arguments[i];l.push(new m(e,t)),1!==l.length||u||a(p)},m.prototype.run=function(){this.fun.apply(null,this.array)},t.title="browser",t.browser=!0,t.env={},t.argv=[],t.version="",t.versions={},t.on=v,t.addListener=v,t.once=v,t.off=v,t.removeListener=v,t.removeAllListeners=v,t.emit=v,t.prependListener=v,t.prependOnceListener=v,t.listeners=function(e){return[]},t.binding=function(e){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(e){throw new Error("process.chdir is not supported")},t.umask=function(){return 0}},{}],5:[function(c,e,l){!function(i,a){!function(){var n=c("process/browser.js").nextTick,e=Function.prototype.apply,s=Array.prototype.slice,r={},o=0;function t(e,t){this._id=e,this._clearFn=t}l.setTimeout=function(){return new t(e.call(setTimeout,window,arguments),clearTimeout)},l.setInterval=function(){return new t(e.call(setInterval,window,arguments),clearInterval)},l.clearTimeout=l.clearInterval=function(e){e.close()},t.prototype.unref=t.prototype.ref=function(){},t.prototype.close=function(){this._clearFn.call(window,this._id)},l.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},l.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},l._unrefActive=l.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;0<=t&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},l.setImmediate="function"==typeof i?i:function(e){var t=o++,i=!(arguments.length<2)&&s.call(arguments,1);return r[t]=!0,n(function(){r[t]&&(i?e.apply(null,i):e.call(null),l.clearImmediate(t))}),t},l.clearImmediate="function"==typeof a?a:function(e){delete r[e]}}.call(this)}.call(this,c("timers").setImmediate,c("timers").clearImmediate)},{"process/browser.js":4,timers:5}],6:[function(e,t,i){var f=arguments[3],p=arguments[4],m=arguments[5],v=JSON.stringify;t.exports=function(e,t){for(var i=Object.keys(m),n=0,s=i.length;n<s;n++){var r=i[n],o=m[r].exports;if(o===e||o&&o.default===e){a=r;break}}if(!a){for(var a=Math.floor(Math.pow(16,8)*Math.random()).toString(16),c={},n=0,s=i.length;n<s;n++)c[r=i[n]]=r;p[a]=["function(require,module,exports){"+e+"(self); }",c]}var l=Math.floor(Math.pow(16,8)*Math.random()).toString(16),u={};u[a]=a,p[l]=["function(require,module,exports){var f = require("+v(a)+");(f.default ? f.default : f)(self);}",u];var h={};!function e(t){h[t]=!0;for(var i in p[t][1]){var i=p[t][1][i];h[i]||e(i)}}(l);u="("+f+")({"+Object.keys(h).map(function(e){return v(e)+":["+p[e][0]+","+v(p[e][1])+"]"}).join(",")+"},{},["+v(l)+"])",l=window.URL||window.webkitURL||window.mozURL||window.msURL,u=new Blob([u],{type:"text/javascript"});if(t&&t.bare)return u;l=l.createObjectURL(u),u=new Worker(l);return u.objectURL=l,u}},{}],7:[function(e,t,i){var n=this.ROSLIB||{REVISION:"1.1.0"},s=e("object-assign");s(n,e("./core")),s(n,e("./actionlib")),s(n,e("./math")),s(n,e("./tf")),s(n,e("./urdf")),t.exports=n},{"./actionlib":13,"./core":22,"./math":27,"./tf":30,"./urdf":42,"object-assign":3}],8:[function(t,e,i){!function(e){!function(){e.ROSLIB=t("./RosLib")}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./RosLib":7}],9:[function(e,t,i){var n=e("../core/Topic"),s=e("../core/Message"),e=e("eventemitter2").EventEmitter2;function r(e){var i=this;this.ros=(e=e||{}).ros,this.serverName=e.serverName,this.actionName=e.actionName,this.timeout=e.timeout,this.omitFeedback=e.omitFeedback,this.omitStatus=e.omitStatus,this.omitResult=e.omitResult;var t=!(this.goals={});this.feedbackListener=new n({ros:this.ros,name:this.serverName+"/feedback",messageType:this.actionName+"Feedback"}),this.statusListener=new n({ros:this.ros,name:this.serverName+"/status",messageType:"actionlib_msgs/GoalStatusArray"}),this.resultListener=new n({ros:this.ros,name:this.serverName+"/result",messageType:this.actionName+"Result"}),this.goalTopic=new n({ros:this.ros,name:this.serverName+"/goal",messageType:this.actionName+"Goal"}),this.cancelTopic=new n({ros:this.ros,name:this.serverName+"/cancel",messageType:"actionlib_msgs/GoalID"}),this.goalTopic.advertise(),this.cancelTopic.advertise(),this.omitStatus||this.statusListener.subscribe(function(e){t=!0,e.status_list.forEach(function(e){var t=i.goals[e.goal_id.id];t&&t.emit("status",e)})}),this.omitFeedback||this.feedbackListener.subscribe(function(e){var t=i.goals[e.status.goal_id.id];t&&(t.emit("status",e.status),t.emit("feedback",e.feedback))}),this.omitResult||this.resultListener.subscribe(function(e){var t=i.goals[e.status.goal_id.id];t&&(t.emit("status",e.status),t.emit("result",e.result))}),this.timeout&&setTimeout(function(){t||i.emit("timeout")},this.timeout)}r.prototype.__proto__=e.prototype,r.prototype.cancel=function(){var e=new s;this.cancelTopic.publish(e)},r.prototype.dispose=function(){this.goalTopic.unadvertise(),this.cancelTopic.unadvertise(),this.omitStatus||this.statusListener.unsubscribe(),this.omitFeedback||this.feedbackListener.unsubscribe(),this.omitResult||this.resultListener.unsubscribe()},t.exports=r},{"../core/Message":14,"../core/Topic":21,eventemitter2:2}],10:[function(e,t,i){var r=e("../core/Topic"),e=(e("../core/Message"),e("eventemitter2").EventEmitter2);function n(e){var t=this;this.ros=(e=e||{}).ros,this.serverName=e.serverName,this.actionName=e.actionName,this.timeout=e.timeout,this.omitFeedback=e.omitFeedback,this.omitStatus=e.omitStatus,this.omitResult=e.omitResult;var i=new r({ros:this.ros,name:this.serverName+"/goal",messageType:this.actionName+"Goal"}),n=new r({ros:this.ros,name:this.serverName+"/feedback",messageType:this.actionName+"Feedback"}),s=new r({ros:this.ros,name:this.serverName+"/status",messageType:"actionlib_msgs/GoalStatusArray"}),e=new r({ros:this.ros,name:this.serverName+"/result",messageType:this.actionName+"Result"});i.subscribe(function(e){t.emit("goal",e)}),s.subscribe(function(e){e.status_list.forEach(function(e){t.emit("status",e)})}),n.subscribe(function(e){t.emit("status",e.status),t.emit("feedback",e.feedback)}),e.subscribe(function(e){t.emit("status",e.status),t.emit("result",e.result)})}n.prototype.__proto__=e.prototype,t.exports=n},{"../core/Message":14,"../core/Topic":21,eventemitter2:2}],11:[function(e,t,i){var n=e("../core/Message"),e=e("eventemitter2").EventEmitter2;function s(e){var t=this;this.actionClient=e.actionClient,this.goalMessage=e.goalMessage,this.isFinished=!1;e=new Date;this.goalID="goal_"+Math.random()+"_"+e.getTime(),this.goalMessage=new n({goal_id:{stamp:{secs:0,nsecs:0},id:this.goalID},goal:this.goalMessage}),this.on("status",function(e){t.status=e}),this.on("result",function(e){t.isFinished=!0,t.result=e}),this.on("feedback",function(e){t.feedback=e}),this.actionClient.goals[this.goalID]=this}s.prototype.__proto__=e.prototype,s.prototype.send=function(e){var t=this;t.actionClient.goalTopic.publish(t.goalMessage),e&&setTimeout(function(){t.isFinished||t.emit("timeout")},e)},s.prototype.cancel=function(){var e=new n({id:this.goalID});this.actionClient.cancelTopic.publish(e)},t.exports=s},{"../core/Message":14,eventemitter2:2}],12:[function(e,t,i){var r=e("../core/Topic"),o=e("../core/Message"),e=e("eventemitter2").EventEmitter2;function n(e){var i=this;this.ros=(e=e||{}).ros,this.serverName=e.serverName,this.actionName=e.actionName,this.feedbackPublisher=new r({ros:this.ros,name:this.serverName+"/feedback",messageType:this.actionName+"Feedback"}),this.feedbackPublisher.advertise();var n=new r({ros:this.ros,name:this.serverName+"/status",messageType:"actionlib_msgs/GoalStatusArray"});n.advertise(),this.resultPublisher=new r({ros:this.ros,name:this.serverName+"/result",messageType:this.actionName+"Result"}),this.resultPublisher.advertise();var t=new r({ros:this.ros,name:this.serverName+"/goal",messageType:this.actionName+"Goal"}),e=new r({ros:this.ros,name:this.serverName+"/cancel",messageType:"actionlib_msgs/GoalID"});this.statusMessage=new o({header:{stamp:{secs:0,nsecs:100},frame_id:""},status_list:[]}),this.currentGoal=null,this.nextGoal=null,t.subscribe(function(e){i.currentGoal?(i.nextGoal=e,i.emit("cancel")):(i.statusMessage.status_list=[{goal_id:e.goal_id,status:1}],i.currentGoal=e,i.emit("goal",e.goal))});function s(e,t){return!(e.secs>t.secs)&&(e.secs<t.secs||e.nsecs<t.nsecs)}e.subscribe(function(e){0===e.stamp.secs&&0===e.stamp.secs&&""===e.id?(i.nextGoal=null,i.currentGoal&&i.emit("cancel")):(i.currentGoal&&e.id===i.currentGoal.goal_id.id?i.emit("cancel"):i.nextGoal&&e.id===i.nextGoal.goal_id.id&&(i.nextGoal=null),i.nextGoal&&s(i.nextGoal.goal_id.stamp,e.stamp)&&(i.nextGoal=null),i.currentGoal&&s(i.currentGoal.goal_id.stamp,e.stamp)&&i.emit("cancel"))});setInterval(function(){var e=new Date,t=Math.floor(e.getTime()/1e3),e=Math.round(1e9*(e.getTime()/1e3-t));i.statusMessage.header.stamp.secs=t,i.statusMessage.header.stamp.nsecs=e,n.publish(i.statusMessage)},500)}n.prototype.__proto__=e.prototype,n.prototype.setSucceeded=function(e){e=new o({status:{goal_id:this.currentGoal.goal_id,status:3},result:e});this.resultPublisher.publish(e),this.statusMessage.status_list=[],this.nextGoal?(this.currentGoal=this.nextGoal,this.nextGoal=null,this.emit("goal",this.currentGoal.goal)):this.currentGoal=null},n.prototype.setAborted=function(e){e=new o({status:{goal_id:this.currentGoal.goal_id,status:4},result:e});this.resultPublisher.publish(e),this.statusMessage.status_list=[],this.nextGoal?(this.currentGoal=this.nextGoal,this.nextGoal=null,this.emit("goal",this.currentGoal.goal)):this.currentGoal=null},n.prototype.sendFeedback=function(e){e=new o({status:{goal_id:this.currentGoal.goal_id,status:1},feedback:e});this.feedbackPublisher.publish(e)},n.prototype.setPreempted=function(){this.statusMessage.status_list=[];var e=new o({status:{goal_id:this.currentGoal.goal_id,status:2}});this.resultPublisher.publish(e),this.nextGoal?(this.currentGoal=this.nextGoal,this.nextGoal=null,this.emit("goal",this.currentGoal.goal)):this.currentGoal=null},t.exports=n},{"../core/Message":14,"../core/Topic":21,eventemitter2:2}],13:[function(e,t,i){var n=e("../core/Ros");e("../mixin")(n,["ActionClient","SimpleActionServer"],t.exports={ActionClient:e("./ActionClient"),ActionListener:e("./ActionListener"),Goal:e("./Goal"),SimpleActionServer:e("./SimpleActionServer")})},{"../core/Ros":16,"../mixin":28,"./ActionClient":9,"./ActionListener":10,"./Goal":11,"./SimpleActionServer":12}],14:[function(e,t,i){var n=e("object-assign");t.exports=function(e){n(this,e)}},{"object-assign":3}],15:[function(e,t,i){var n=e("./Service"),s=e("./ServiceRequest");function r(e){this.ros=(e=e||{}).ros,this.name=e.name}r.prototype.get=function(t){var e=new n({ros:this.ros,name:"/rosapi/get_param",serviceType:"rosapi/GetParam"}),i=new s({name:this.name});e.callService(i,function(e){e=JSON.parse(e.value);t(e)})},r.prototype.set=function(e,t){var i=new n({ros:this.ros,name:"/rosapi/set_param",serviceType:"rosapi/SetParam"}),e=new s({name:this.name,value:JSON.stringify(e)});i.callService(e,t)},r.prototype.delete=function(e){var t=new n({ros:this.ros,name:"/rosapi/delete_param",serviceType:"rosapi/DeleteParam"}),i=new s({name:this.name});t.callService(i,e)},t.exports=r},{"./Service":17,"./ServiceRequest":18}],16:[function(e,t,i){var n=e("ws"),s=e("../util/workerSocket"),r=e("./SocketAdapter.js"),o=e("./Service"),a=e("./ServiceRequest"),c=e("object-assign"),e=e("eventemitter2").EventEmitter2;function l(e){e=e||{};var t=this;this.socket=null,this.idCounter=0,this.isConnected=!1,this.transportLibrary=e.transportLibrary||"websocket",this.transportOptions=e.transportOptions||{},this._sendFunc=function(e){t.sendEncodedMessage(e)},void 0===e.groovyCompatibility?this.groovyCompatibility=!0:this.groovyCompatibility=e.groovyCompatibility,this.setMaxListeners(0),e.url&&this.connect(e.url)}l.prototype.__proto__=e.prototype,l.prototype.connect=function(e){if("socket.io"===this.transportLibrary)this.socket=c(io(e,{"force new connection":!0}),r(this)),this.socket.on("connect",this.socket.onopen),this.socket.on("data",this.socket.onmessage),this.socket.on("close",this.socket.onclose),this.socket.on("error",this.socket.onerror);else if("RTCPeerConnection"===this.transportLibrary.constructor.name)this.socket=c(this.transportLibrary.createDataChannel(e,this.transportOptions),r(this));else if("websocket"===this.transportLibrary){var t;this.socket&&this.socket.readyState!==n.CLOSED||((t=new n(e)).binaryType="arraybuffer",this.socket=c(t,r(this)))}else{if("workersocket"!==this.transportLibrary)throw"Unknown transportLibrary: "+this.transportLibrary.toString();this.socket=c(new s(e),r(this))}},l.prototype.close=function(){this.socket&&this.socket.close()},l.prototype.authenticate=function(e,t,i,n,s,r,o){this.callOnConnection({op:"auth",mac:e,client:t,dest:i,rand:n,t:s,level:r,end:o})},l.prototype.sendEncodedMessage=function(e){var t=null,i=this,t="socket.io"===this.transportLibrary?function(e){i.socket.emit("operation",e)}:function(e){i.socket.send(e)};this.isConnected?t(e):i.once("connection",function(){t(e)})},l.prototype.callOnConnection=function(e){this.transportOptions.encoder?this.transportOptions.encoder(e,this._sendFunc):this._sendFunc(JSON.stringify(e))},l.prototype.setStatusLevel=function(e,t){this.callOnConnection({op:"set_level",level:e,id:t})},l.prototype.getActionServers=function(t,i){var e=new o({ros:this,name:"/rosapi/action_servers",serviceType:"rosapi/GetActionServers"}),n=new a({});"function"==typeof i?e.callService(n,function(e){t(e.action_servers)},function(e){i(e)}):e.callService(n,function(e){t(e.action_servers)})},l.prototype.getTopics=function(t,i){var e=new o({ros:this,name:"/rosapi/topics",serviceType:"rosapi/Topics"}),n=new a;"function"==typeof i?e.callService(n,function(e){t(e)},function(e){i(e)}):e.callService(n,function(e){t(e)})},l.prototype.getTopicsForType=function(e,t,i){var n=new o({ros:this,name:"/rosapi/topics_for_type",serviceType:"rosapi/TopicsForType"}),e=new a({type:e});"function"==typeof i?n.callService(e,function(e){t(e.topics)},function(e){i(e)}):n.callService(e,function(e){t(e.topics)})},l.prototype.getServices=function(t,i){var e=new o({ros:this,name:"/rosapi/services",serviceType:"rosapi/Services"}),n=new a;"function"==typeof i?e.callService(n,function(e){t(e.services)},function(e){i(e)}):e.callService(n,function(e){t(e.services)})},l.prototype.getServicesForType=function(e,t,i){var n=new o({ros:this,name:"/rosapi/services_for_type",serviceType:"rosapi/ServicesForType"}),e=new a({type:e});"function"==typeof i?n.callService(e,function(e){t(e.services)},function(e){i(e)}):n.callService(e,function(e){t(e.services)})},l.prototype.getServiceRequestDetails=function(e,t,i){var n=new o({ros:this,name:"/rosapi/service_request_details",serviceType:"rosapi/ServiceRequestDetails"}),e=new a({type:e});"function"==typeof i?n.callService(e,function(e){t(e)},function(e){i(e)}):n.callService(e,function(e){t(e)})},l.prototype.getServiceResponseDetails=function(e,t,i){var n=new o({ros:this,name:"/rosapi/service_response_details",serviceType:"rosapi/ServiceResponseDetails"}),e=new a({type:e});"function"==typeof i?n.callService(e,function(e){t(e)},function(e){i(e)}):n.callService(e,function(e){t(e)})},l.prototype.getNodes=function(t,i){var e=new o({ros:this,name:"/rosapi/nodes",serviceType:"rosapi/Nodes"}),n=new a;"function"==typeof i?e.callService(n,function(e){t(e.nodes)},function(e){i(e)}):e.callService(n,function(e){t(e.nodes)})},l.prototype.getNodeDetails=function(e,t,i){var n=new o({ros:this,name:"/rosapi/node_details",serviceType:"rosapi/NodeDetails"}),e=new a({node:e});"function"==typeof i?n.callService(e,function(e){t(e.subscribing,e.publishing,e.services)},function(e){i(e)}):n.callService(e,function(e){t(e)})},l.prototype.getParams=function(t,i){var e=new o({ros:this,name:"/rosapi/get_param_names",serviceType:"rosapi/GetParamNames"}),n=new a;"function"==typeof i?e.callService(n,function(e){t(e.names)},function(e){i(e)}):e.callService(n,function(e){t(e.names)})},l.prototype.getTopicType=function(e,t,i){var n=new o({ros:this,name:"/rosapi/topic_type",serviceType:"rosapi/TopicType"}),e=new a({topic:e});"function"==typeof i?n.callService(e,function(e){t(e.type)},function(e){i(e)}):n.callService(e,function(e){t(e.type)})},l.prototype.getServiceType=function(e,t,i){var n=new o({ros:this,name:"/rosapi/service_type",serviceType:"rosapi/ServiceType"}),e=new a({service:e});"function"==typeof i?n.callService(e,function(e){t(e.type)},function(e){i(e)}):n.callService(e,function(e){t(e.type)})},l.prototype.getMessageDetails=function(e,t,i){var n=new o({ros:this,name:"/rosapi/message_details",serviceType:"rosapi/MessageDetails"}),e=new a({type:e});"function"==typeof i?n.callService(e,function(e){t(e.typedefs)},function(e){i(e)}):n.callService(e,function(e){t(e.typedefs)})},l.prototype.decodeTypeDefs=function(e){var u=this,h=function(e,t){for(var i={},n=0;n<e.fieldnames.length;n++){var s=e.fieldarraylen[n],r=e.fieldnames[n],o=e.fieldtypes[n];if(-1===o.indexOf("/"))i[r]=-1===s?o:[o];else{for(var a,c=!1,l=0;l<t.length;l++)if(t[l].type.toString()===o.toString()){c=t[l];break}c?(a=h(c,t),-1===s||(i[r]=[a])):u.emit("error","Cannot find "+o+" in decodeTypeDefs")}}return i};return h(e[0],e)},l.prototype.getTopicsAndRawTypes=function(t,i){var e=new o({ros:this,name:"/rosapi/topics_and_raw_types",serviceType:"rosapi/TopicsAndRawTypes"}),n=new a;"function"==typeof i?e.callService(n,function(e){t(e)},function(e){i(e)}):e.callService(n,function(e){t(e)})},t.exports=l},{"../util/workerSocket":48,"./Service":17,"./ServiceRequest":18,"./SocketAdapter.js":20,eventemitter2:2,"object-assign":3,ws:44}],17:[function(e,t,i){var s=e("./ServiceResponse"),e=(e("./ServiceRequest"),e("eventemitter2").EventEmitter2);function n(e){this.ros=(e=e||{}).ros,this.name=e.name,this.serviceType=e.serviceType,this.isAdvertised=!1,this._serviceCallback=null}n.prototype.__proto__=e.prototype,n.prototype.callService=function(e,t,i){var n;this.isAdvertised||(n="call_service:"+this.name+":"+ ++this.ros.idCounter,(t||i)&&this.ros.once(n,function(e){void 0!==e.result&&!1===e.result?"function"==typeof i&&i(e.values):"function"==typeof t&&t(new s(e.values))}),e={op:"call_service",id:n,service:this.name,type:this.serviceType,args:e},this.ros.callOnConnection(e))},n.prototype.advertise=function(e){this.isAdvertised||"function"!=typeof e||(this._serviceCallback=e,this.ros.on(this.name,this._serviceResponse.bind(this)),this.ros.callOnConnection({op:"advertise_service",type:this.serviceType,service:this.name}),this.isAdvertised=!0)},n.prototype.unadvertise=function(){this.isAdvertised&&(this.ros.callOnConnection({op:"unadvertise_service",service:this.name}),this.isAdvertised=!1)},n.prototype._serviceResponse=function(e){var t={},i=this._serviceCallback(e.args,t),i={op:"service_response",service:this.name,values:new s(t),result:i};e.id&&(i.id=e.id),this.ros.callOnConnection(i)},t.exports=n},{"./ServiceRequest":18,"./ServiceResponse":19,eventemitter2:2}],18:[function(e,t,i){var n=e("object-assign");t.exports=function(e){n(this,e)}},{"object-assign":3}],19:[function(e,t,i){var n=e("object-assign");t.exports=function(e){n(this,e)}},{"object-assign":3}],20:[function(e,t,i){"use strict";var r=e("../util/decompressPng"),o=e("cbor-js"),a=e("../util/cborTypedArrayTags"),c=null;"undefined"!=typeof bson&&(c=bson().BSON),t.exports=function(t){var i=null;function n(e){"publish"===e.op?t.emit(e.topic,e.msg):"service_response"===e.op?t.emit(e.id,e):"call_service"===e.op?t.emit(e.service,e):"status"===e.op&&(e.id?t.emit("status:"+e.id,e):t.emit("status",e))}function s(e,t){"png"===e.op?r(e.data,t):t(e)}return t.transportOptions.decoder&&(i=t.transportOptions.decoder),{onopen:function(e){t.isConnected=!0,t.emit("connection",e)},onclose:function(e){t.isConnected=!1,t.emit("close",e)},onerror:function(e){t.emit("error",e)},onmessage:function(e){i?i(e.data,function(e){n(e)}):"undefined"!=typeof Blob&&e.data instanceof Blob?function(e,t){if(!c)throw"Cannot process BSON encoded message without BSON header.";var i=new FileReader;i.onload=function(){var e=new Uint8Array(this.result),e=c.deserialize(e);t(e)},i.readAsArrayBuffer(e)}(e.data,function(e){s(e,n)}):e.data instanceof ArrayBuffer?n(o.decode(e.data,a)):s(JSON.parse("string"==typeof e?e:e.data),n)}}}},{"../util/cborTypedArrayTags":43,"../util/decompressPng":46,"cbor-js":1}],21:[function(e,t,i){var n=e("eventemitter2").EventEmitter2,s=e("./Message");function r(e){this.ros=(e=e||{}).ros,this.name=e.name,this.messageType=e.messageType,this.isAdvertised=!1,this.compression=e.compression||"none",this.throttle_rate=e.throttle_rate||0,this.latch=e.latch||!1,this.queue_size=e.queue_size||100,this.queue_length=e.queue_length||0,this.reconnect_on_close=void 0===e.reconnect_on_close||e.reconnect_on_close,this.compression&&"png"!==this.compression&&"cbor"!==this.compression&&"cbor-raw"!==this.compression&&"none"!==this.compression&&(this.emit("warning",this.compression+" compression is not supported. No compression will be used."),this.compression="none"),this.throttle_rate<0&&(this.emit("warning",this.throttle_rate+" is not allowed. Set to 0"),this.throttle_rate=0);var t=this;this.reconnect_on_close?this.callForSubscribeAndAdvertise=function(e){t.ros.callOnConnection(e),t.waitForReconnect=!1,t.reconnectFunc=function(){t.waitForReconnect||(t.waitForReconnect=!0,t.ros.callOnConnection(e),t.ros.once("connection",function(){t.waitForReconnect=!1}))},t.ros.on("close",t.reconnectFunc)}:this.callForSubscribeAndAdvertise=this.ros.callOnConnection,this._messageCallback=function(e){t.emit("message",new s(e))}}r.prototype.__proto__=n.prototype,r.prototype.subscribe=function(e){"function"==typeof e&&this.on("message",e),this.subscribeId||(this.ros.on(this.name,this._messageCallback),this.subscribeId="subscribe:"+this.name+":"+ ++this.ros.idCounter,this.callForSubscribeAndAdvertise({op:"subscribe",id:this.subscribeId,type:this.messageType,topic:this.name,compression:this.compression,throttle_rate:this.throttle_rate,queue_length:this.queue_length}))},r.prototype.unsubscribe=function(e){e&&(this.off("message",e),this.listeners("message").length)||this.subscribeId&&(this.ros.off(this.name,this._messageCallback),this.reconnect_on_close&&this.ros.off("close",this.reconnectFunc),this.emit("unsubscribe"),this.ros.callOnConnection({op:"unsubscribe",id:this.subscribeId,topic:this.name}),this.subscribeId=null)},r.prototype.advertise=function(){var e;this.isAdvertised||(this.advertiseId="advertise:"+this.name+":"+ ++this.ros.idCounter,this.callForSubscribeAndAdvertise({op:"advertise",id:this.advertiseId,type:this.messageType,topic:this.name,latch:this.latch,queue_size:this.queue_size}),this.isAdvertised=!0,this.reconnect_on_close||(e=this).ros.on("close",function(){e.isAdvertised=!1}))},r.prototype.unadvertise=function(){this.isAdvertised&&(this.reconnect_on_close&&this.ros.off("close",this.reconnectFunc),this.emit("unadvertise"),this.ros.callOnConnection({op:"unadvertise",id:this.advertiseId,topic:this.name}),this.isAdvertised=!1)},r.prototype.publish=function(e){this.isAdvertised||this.advertise(),this.ros.idCounter++;e={op:"publish",id:"publish:"+this.name+":"+this.ros.idCounter,topic:this.name,msg:e,latch:this.latch};this.ros.callOnConnection(e)},t.exports=r},{"./Message":14,eventemitter2:2}],22:[function(e,t,i){var n=e("../mixin"),e=t.exports={Ros:e("./Ros"),Topic:e("./Topic"),Message:e("./Message"),Param:e("./Param"),Service:e("./Service"),ServiceRequest:e("./ServiceRequest"),ServiceResponse:e("./ServiceResponse")};n(e.Ros,["Param","Service","Topic"],e)},{"../mixin":28,"./Message":14,"./Param":15,"./Ros":16,"./Service":17,"./ServiceRequest":18,"./ServiceResponse":19,"./Topic":21}],23:[function(e,t,i){var n=e("./Vector3"),s=e("./Quaternion");function r(e){this.position=new n((e=e||{}).position),this.orientation=new s(e.orientation)}r.prototype.applyTransform=function(e){this.position.multiplyQuaternion(e.rotation),this.position.add(e.translation);e=e.rotation.clone();e.multiply(this.orientation),this.orientation=e},r.prototype.clone=function(){return new r(this)},r.prototype.multiply=function(e){e=e.clone();return e.applyTransform({rotation:this.orientation,translation:this.position}),e},r.prototype.getInverse=function(){var e=this.clone();return e.orientation.invert(),e.position.multiplyQuaternion(e.orientation),e.position.x*=-1,e.position.y*=-1,e.position.z*=-1,e},t.exports=r},{"./Quaternion":24,"./Vector3":26}],24:[function(e,t,i){function n(e){this.x=(e=e||{}).x||0,this.y=e.y||0,this.z=e.z||0,this.w="number"==typeof e.w?e.w:1}n.prototype.conjugate=function(){this.x*=-1,this.y*=-1,this.z*=-1},n.prototype.norm=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},n.prototype.normalize=function(){var e=Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w);0===e?(this.x=0,this.y=0,this.z=0,this.w=1):(this.x=this.x*(e=1/e),this.y=this.y*e,this.z=this.z*e,this.w=this.w*e)},n.prototype.invert=function(){this.conjugate(),this.normalize()},n.prototype.multiply=function(e){var t=this.x*e.w+this.y*e.z-this.z*e.y+this.w*e.x,i=-this.x*e.z+this.y*e.w+this.z*e.x+this.w*e.y,n=this.x*e.y-this.y*e.x+this.z*e.w+this.w*e.z,e=-this.x*e.x-this.y*e.y-this.z*e.z+this.w*e.w;this.x=t,this.y=i,this.z=n,this.w=e},n.prototype.clone=function(){return new n(this)},t.exports=n},{}],25:[function(e,t,i){var n=e("./Vector3"),s=e("./Quaternion");function r(e){this.translation=new n((e=e||{}).translation),this.rotation=new s(e.rotation)}r.prototype.clone=function(){return new r(this)},t.exports=r},{"./Quaternion":24,"./Vector3":26}],26:[function(e,t,i){function n(e){this.x=(e=e||{}).x||0,this.y=e.y||0,this.z=e.z||0}n.prototype.add=function(e){this.x+=e.x,this.y+=e.y,this.z+=e.z},n.prototype.subtract=function(e){this.x-=e.x,this.y-=e.y,this.z-=e.z},n.prototype.multiplyQuaternion=function(e){var t=e.w*this.x+e.y*this.z-e.z*this.y,i=e.w*this.y+e.z*this.x-e.x*this.z,n=e.w*this.z+e.x*this.y-e.y*this.x,s=-e.x*this.x-e.y*this.y-e.z*this.z;this.x=t*e.w+s*-e.x+i*-e.z-n*-e.y,this.y=i*e.w+s*-e.y+n*-e.x-t*-e.z,this.z=n*e.w+s*-e.z+t*-e.y-i*-e.x},n.prototype.clone=function(){return new n(this)},t.exports=n},{}],27:[function(e,t,i){t.exports={Pose:e("./Pose"),Quaternion:e("./Quaternion"),Transform:e("./Transform"),Vector3:e("./Vector3")}},{"./Pose":23,"./Quaternion":24,"./Transform":25,"./Vector3":26}],28:[function(e,t,i){t.exports=function(i,e,n){e.forEach(function(e){var t=n[e];i.prototype[e]=function(e){return e.ros=this,new t(e)}})}},{}],29:[function(e,t,i){var n=e("../actionlib/ActionClient"),s=e("../actionlib/Goal"),r=e("../core/Service.js"),o=e("../core/ServiceRequest.js"),a=e("../core/Topic.js"),c=e("../math/Transform");function l(e){this.ros=(e=e||{}).ros,this.fixedFrame=e.fixedFrame||"/base_link",this.angularThres=e.angularThres||2,this.transThres=e.transThres||.01,this.rate=e.rate||10,this.updateDelay=e.updateDelay||50;var t=e.topicTimeout||2,i=Math.floor(t),t=Math.floor(1e9*(t-i));this.topicTimeout={secs:i,nsecs:t},this.serverName=e.serverName||"/tf2_web_republisher",this.repubServiceName=e.repubServiceName||"/republish_tfs",this.currentGoal=!1,this.currentTopic=!1,this.frameInfos={},this.republisherUpdateRequested=!1,this._subscribeCB=null,this.actionClient=new n({ros:e.ros,serverName:this.serverName,actionName:"tf2_web_republisher/TFSubscriptionAction",omitStatus:!0,omitResult:!0}),this.serviceClient=new r({ros:e.ros,name:this.repubServiceName,serviceType:"tf2_web_republisher/RepublishTFs"})}l.prototype.processTFArray=function(e){e.transforms.forEach(function(e){var t=e.child_frame_id;"/"===t[0]&&(t=t.substring(1));var i=this.frameInfos[t];i&&(i.transform=new c({translation:e.transform.translation,rotation:e.transform.rotation}),i.cbs.forEach(function(e){e(i.transform)}))},this)},l.prototype.updateGoal=function(){var e={source_frames:Object.keys(this.frameInfos),target_frame:this.fixedFrame,angular_thres:this.angularThres,trans_thres:this.transThres,rate:this.rate};this.ros.groovyCompatibility?(this.currentGoal&&this.currentGoal.cancel(),this.currentGoal=new s({actionClient:this.actionClient,goalMessage:e}),this.currentGoal.on("feedback",this.processTFArray.bind(this)),this.currentGoal.send()):(e.timeout=this.topicTimeout,e=new o(e),this.serviceClient.callService(e,this.processResponse.bind(this))),this.republisherUpdateRequested=!1},l.prototype.processResponse=function(e){this.currentTopic&&this.currentTopic.unsubscribe(this._subscribeCB),this.currentTopic=new a({ros:this.ros,name:e.topic_name,messageType:"tf2_web_republisher/TFArray"}),this._subscribeCB=this.processTFArray.bind(this),this.currentTopic.subscribe(this._subscribeCB)},l.prototype.subscribe=function(e,t){"/"===e[0]&&(e=e.substring(1)),this.frameInfos[e]?this.frameInfos[e].transform&&t(this.frameInfos[e].transform):(this.frameInfos[e]={cbs:[]},this.republisherUpdateRequested||(setTimeout(this.updateGoal.bind(this),this.updateDelay),this.republisherUpdateRequested=!0)),this.frameInfos[e].cbs.push(t)},l.prototype.unsubscribe=function(e,t){"/"===e[0]&&(e=e.substring(1));for(var i=this.frameInfos[e],n=i&&i.cbs||[],s=n.length;s--;)n[s]===t&&n.splice(s,1);t&&0!==n.length||delete this.frameInfos[e]},l.prototype.dispose=function(){this.actionClient.dispose(),this.currentTopic&&this.currentTopic.unsubscribe(this._subscribeCB)},t.exports=l},{"../actionlib/ActionClient":9,"../actionlib/Goal":11,"../core/Service.js":17,"../core/ServiceRequest.js":18,"../core/Topic.js":21,"../math/Transform":25}],30:[function(e,t,i){var n=e("../core/Ros");e("../mixin")(n,["TFClient"],t.exports={TFClient:e("./TFClient")})},{"../core/Ros":16,"../mixin":28,"./TFClient":29}],31:[function(e,t,i){var n=e("../math/Vector3"),s=e("./UrdfTypes");t.exports=function(e){this.dimension=null,this.type=s.URDF_BOX,e=e.xml.getAttribute("size").split(" "),this.dimension=new n({x:parseFloat(e[0]),y:parseFloat(e[1]),z:parseFloat(e[2])})}},{"../math/Vector3":26,"./UrdfTypes":40}],32:[function(e,t,i){t.exports=function(e){e=e.xml.getAttribute("rgba").split(" "),this.r=parseFloat(e[0]),this.g=parseFloat(e[1]),this.b=parseFloat(e[2]),this.a=parseFloat(e[3])}},{}],33:[function(e,t,i){var n=e("./UrdfTypes");t.exports=function(e){this.type=n.URDF_CYLINDER,this.length=parseFloat(e.xml.getAttribute("length")),this.radius=parseFloat(e.xml.getAttribute("radius"))}},{"./UrdfTypes":40}],34:[function(e,t,i){var c=e("../math/Pose"),l=e("../math/Vector3"),u=e("../math/Quaternion");t.exports=function(e){this.name=e.xml.getAttribute("name"),this.type=e.xml.getAttribute("type");var t=e.xml.getElementsByTagName("parent");0<t.length&&(this.parent=t[0].getAttribute("link"));var i=e.xml.getElementsByTagName("child");0<i.length&&(this.child=i[0].getAttribute("link"));var n=e.xml.getElementsByTagName("limit");0<n.length&&(this.minval=parseFloat(n[0].getAttribute("lower")),this.maxval=parseFloat(n[0].getAttribute("upper")));var s,r,o,a=e.xml.getElementsByTagName("origin");0===a.length?this.origin=new c:(r=a[0].getAttribute("xyz"),s=new l,r&&(r=r.split(" "),s=new l({x:parseFloat(r[0]),y:parseFloat(r[1]),z:parseFloat(r[2])})),o=a[0].getAttribute("rpy"),t=new u,o&&(o=o.split(" "),i=parseFloat(o[0])/2,n=parseFloat(o[1])/2,e=parseFloat(o[2])/2,r=Math.sin(i)*Math.cos(n)*Math.cos(e)-Math.cos(i)*Math.sin(n)*Math.sin(e),a=Math.cos(i)*Math.sin(n)*Math.cos(e)+Math.sin(i)*Math.cos(n)*Math.sin(e),o=Math.cos(i)*Math.cos(n)*Math.sin(e)-Math.sin(i)*Math.sin(n)*Math.cos(e),e=Math.cos(i)*Math.cos(n)*Math.cos(e)+Math.sin(i)*Math.sin(n)*Math.sin(e),(t=new u({x:r,y:a,z:o,w:e})).normalize()),this.origin=new c({position:s,orientation:t}))}},{"../math/Pose":23,"../math/Quaternion":24,"../math/Vector3":26}],35:[function(e,t,i){var n=e("./UrdfVisual");t.exports=function(e){this.name=e.xml.getAttribute("name"),this.visuals=[];for(var t=e.xml.getElementsByTagName("visual"),i=0;i<t.length;i++)this.visuals.push(new n({xml:t[i]}))}},{"./UrdfVisual":41}],36:[function(e,t,i){var n=e("./UrdfColor");function s(e){this.textureFilename=null,this.color=null,this.name=e.xml.getAttribute("name");var t=e.xml.getElementsByTagName("texture");0<t.length&&(this.textureFilename=t[0].getAttribute("filename"));e=e.xml.getElementsByTagName("color");0<e.length&&(this.color=new n({xml:e[0]}))}s.prototype.isLink=function(){return null===this.color&&null===this.textureFilename};var r=e("object-assign");s.prototype.assign=function(e){return r(this,e)},t.exports=s},{"./UrdfColor":32,"object-assign":3}],37:[function(e,t,i){var n=e("../math/Vector3"),s=e("./UrdfTypes");t.exports=function(e){this.scale=null,this.type=s.URDF_MESH,this.filename=e.xml.getAttribute("filename"),(e=e.xml.getAttribute("scale"))&&(e=e.split(" "),this.scale=new n({x:parseFloat(e[0]),y:parseFloat(e[1]),z:parseFloat(e[2])}))}},{"../math/Vector3":26,"./UrdfTypes":40}],38:[function(e,t,i){var l=e("./UrdfMaterial"),u=e("./UrdfLink"),h=e("./UrdfJoint"),f=e("xmldom").DOMParser;t.exports=function(e){var t=(e=e||{}).xml,e=e.string;this.materials={},this.links={},this.joints={},t=(t=e?(new f).parseFromString(e,"text/xml"):t).documentElement,this.name=t.getAttribute("name");for(var i=t.childNodes,n=0;n<i.length;n++){var s=i[n];if("material"===s.tagName){var r=new l({xml:s});void 0!==this.materials[r.name]?this.materials[r.name].isLink()?this.materials[r.name].assign(r):console.warn("Material "+r.name+"is not unique."):this.materials[r.name]=r}else if("link"===s.tagName){var o=new u({xml:s});if(void 0!==this.links[o.name])console.warn("Link "+o.name+" is not unique.");else{for(var a=0;a<o.visuals.length;a++){var c=o.visuals[a].material;null!==c&&c.name&&(void 0!==this.materials[c.name]?o.visuals[a].material=this.materials[c.name]:this.materials[c.name]=c)}this.links[o.name]=o}}else"joint"===s.tagName&&(s=new h({xml:s}),this.joints[s.name]=s)}}},{"./UrdfJoint":34,"./UrdfLink":35,"./UrdfMaterial":36,xmldom:47}],39:[function(e,t,i){var n=e("./UrdfTypes");t.exports=function(e){this.type=n.URDF_SPHERE,this.radius=parseFloat(e.xml.getAttribute("radius"))}},{"./UrdfTypes":40}],40:[function(e,t,i){t.exports={URDF_SPHERE:0,URDF_BOX:1,URDF_CYLINDER:2,URDF_MESH:3}},{}],41:[function(e,t,i){var p=e("../math/Pose"),m=e("../math/Vector3"),v=e("../math/Quaternion"),d=e("./UrdfCylinder"),y=e("./UrdfBox"),g=e("./UrdfMaterial"),b=e("./UrdfMesh"),w=e("./UrdfSphere");t.exports=function(e){var t=e.xml;this.origin=null,this.geometry=null,this.material=null,this.name=e.xml.getAttribute("name");var i,n,s,r,o,a=t.getElementsByTagName("origin");0===a.length?this.origin=new p:(r=a[0].getAttribute("xyz"),i=new m,r&&(r=r.split(" "),i=new m({x:parseFloat(r[0]),y:parseFloat(r[1]),z:parseFloat(r[2])})),o=a[0].getAttribute("rpy"),c=new v,o&&(o=o.split(" "),n=parseFloat(o[0])/2,s=parseFloat(o[1])/2,e=parseFloat(o[2])/2,r=Math.sin(n)*Math.cos(s)*Math.cos(e)-Math.cos(n)*Math.sin(s)*Math.sin(e),a=Math.cos(n)*Math.sin(s)*Math.cos(e)+Math.sin(n)*Math.cos(s)*Math.sin(e),o=Math.cos(n)*Math.cos(s)*Math.sin(e)-Math.sin(n)*Math.sin(s)*Math.cos(e),e=Math.cos(n)*Math.cos(s)*Math.cos(e)+Math.sin(n)*Math.sin(s)*Math.sin(e),(c=new v({x:r,y:a,z:o,w:e})).normalize()),this.origin=new p({position:i,orientation:c}));var c=t.getElementsByTagName("geometry");if(0<c.length){for(var l=c[0],u=null,h=0;h<l.childNodes.length;h++){var f=l.childNodes[h];if(1===f.nodeType){u=f;break}}c=u.nodeName;"sphere"===c?this.geometry=new w({xml:u}):"box"===c?this.geometry=new y({xml:u}):"cylinder"===c?this.geometry=new d({xml:u}):"mesh"===c?this.geometry=new b({xml:u}):console.warn("Unknown geometry type "+c)}0<(t=t.getElementsByTagName("material")).length&&(this.material=new g({xml:t[0]}))}},{"../math/Pose":23,"../math/Quaternion":24,"../math/Vector3":26,"./UrdfBox":31,"./UrdfCylinder":33,"./UrdfMaterial":36,"./UrdfMesh":37,"./UrdfSphere":39}],42:[function(e,t,i){t.exports=e("object-assign")({UrdfBox:e("./UrdfBox"),UrdfColor:e("./UrdfColor"),UrdfCylinder:e("./UrdfCylinder"),UrdfLink:e("./UrdfLink"),UrdfMaterial:e("./UrdfMaterial"),UrdfMesh:e("./UrdfMesh"),UrdfModel:e("./UrdfModel"),UrdfSphere:e("./UrdfSphere"),UrdfVisual:e("./UrdfVisual")},e("./UrdfTypes"))},{"./UrdfBox":31,"./UrdfColor":32,"./UrdfCylinder":33,"./UrdfLink":35,"./UrdfMaterial":36,"./UrdfMesh":37,"./UrdfModel":38,"./UrdfSphere":39,"./UrdfTypes":40,"./UrdfVisual":41,"object-assign":3}],43:[function(e,t,i){"use strict";var u=Math.pow(2,32),n=!1;function h(){n||(n=!0,console.warn("CBOR 64-bit integer array values may lose precision. No further warnings."))}var o={64:Uint8Array,69:Uint16Array,70:Uint32Array,72:Int8Array,77:Int16Array,78:Int32Array,85:Float32Array,86:Float64Array},a={71:function(e){h();for(var t=e.byteLength,i=e.byteOffset,n=t/8,t=e.buffer.slice(i,i+t),s=new Uint32Array(t),r=new Array(n),o=0;o<n;o++){var a=2*o,c=s[a],a=s[1+a];r[o]=c+u*a}return r},79:function(e){h();for(var t=e.byteLength,i=e.byteOffset,n=t/8,t=e.buffer.slice(i,i+t),s=new Uint32Array(t),r=new Int32Array(t),o=new Array(n),a=0;a<n;a++){var c=2*a,l=s[c],c=r[1+c];o[a]=l+u*c}return o}};void 0!==t&&t.exports&&(t.exports=function(e,t){var i,n,s,r;return t in o?(n=o[t],s=(i=e).byteLength,r=i.byteOffset,new n(i.buffer.slice(r,r+s))):t in a?a[t](e):e})},{}],44:[function(e,t,i){t.exports="undefined"!=typeof window?window.WebSocket:WebSocket},{}],45:[function(e,t,i){t.exports=function(){return document.createElement("canvas")}},{}],46:[function(e,t,i){"use strict";var a=e("canvas"),n=a.Image||window.Image;t.exports=function(e,r){var o=new n;o.onload=function(){var e=new a,t=e.getContext("2d");e.width=o.width,e.height=o.height,t.imageSmoothingEnabled=!1,t.webkitImageSmoothingEnabled=!1,t.mozImageSmoothingEnabled=!1,t.drawImage(o,0,0);for(var i=t.getImageData(0,0,o.width,o.height).data,n="",s=0;s<i.length;s+=4)n+=String.fromCharCode(i[s],i[s+1],i[s+2]);r(JSON.parse(n))},o.src="data:image/png;base64,"+e}},{canvas:45}],47:[function(e,t,i){i.DOMImplementation=window.DOMImplementation,i.XMLSerializer=window.XMLSerializer,i.DOMParser=window.DOMParser},{}],48:[function(e,t,i){var n=e("webworkify"),s=e("./workerSocketImpl");function r(e){this.socket_=n(s),this.socket_.addEventListener("message",this.handleWorkerMessage_.bind(this)),this.socket_.postMessage({uri:e})}r.prototype.handleWorkerMessage_=function(e){var t=e.data;if(t instanceof ArrayBuffer||"string"==typeof t)this.onmessage(e);else{t=t.type;if("close"===t)this.onclose(null);else if("open"===t)this.onopen(null);else{if("error"!==t)throw"Unknown message from workersocket";this.onerror(null)}}},r.prototype.send=function(e){this.socket_.postMessage(e)},r.prototype.close=function(){this.socket_.postMessage({close:!0})},t.exports=r},{"./workerSocketImpl":49,webworkify:6}],49:[function(e,t,i){var r=r||e("ws");t.exports=function(t){var i=null;function n(e){e=e.data;e instanceof ArrayBuffer?t.postMessage(e,[e]):t.postMessage(e)}function s(e){t.postMessage({type:e.type})}t.addEventListener("message",function(e){e=e.data;if("string"==typeof e)i.send(e);else if(e.hasOwnProperty("close"))i.close(),i=null;else{if(!e.hasOwnProperty("uri"))throw"Unknown message to WorkerSocket";e=e.uri;(i=new r(e)).binaryType="arraybuffer",i.onmessage=n,i.onclose=s,i.onopen=s,i.onerror=s}})}},{ws:44}]},{},[8]);