From e1a784c9432c661abe09b952dc1b8f8f560cf7c8 Mon Sep 17 00:00:00 2001 From: Maik Hummel Date: Thu, 8 Mar 2018 08:43:40 +0100 Subject: [PATCH 1/4] Upgrade ng-feathers (close #57, close #36) --- .travis.yml | 2 +- Gruntfile.js | 2 +- bower.json | 4 ++-- dist/ng-feathers.min.js | 9 +-------- dist/ng-feathers.standalone.min.js | 13 +------------ package.json | 10 +++++----- src/ng-feathers.js | 3 +-- 7 files changed, 12 insertions(+), 31 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0246ae8..5133e0d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ language: node_js node_js: - - "4.1" + - "8" before_install: npm install -g grunt-cli \ No newline at end of file diff --git a/Gruntfile.js b/Gruntfile.js index a034bbf..ec9568f 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -10,7 +10,7 @@ module.exports = function (grunt) { files: { 'dist/ng-feathers.min.js': ['src/ng-feathers.js'], 'dist/ng-feathers.standalone.min.js': [ - 'bower_components/socket.io-client/socket.io.js', + 'bower_components/socket.io-client/dist/socket.io.js', 'bower_components/feathers-client/dist/feathers.js', 'src/ng-feathers.js' ] diff --git a/bower.json b/bower.json index 07bb9af..d2fd03e 100644 --- a/bower.json +++ b/bower.json @@ -16,7 +16,7 @@ "tests" ], "dependencies": { - "feathers-client": "1.9.0", - "socket.io-client": "1.7.4" + "feathers-client": "3.4.3", + "socket.io-client": "2.0.4" } } diff --git a/dist/ng-feathers.min.js b/dist/ng-feathers.min.js index f8b4936..9045b6c 100644 --- a/dist/ng-feathers.min.js +++ b/dist/ng-feathers.min.js @@ -1,8 +1 @@ -/** - * ngFeathers - * - * @version 1.7.2 - * @author Maik Hummel - * @license MIT - */ -angular.module("ngFeathers",[]).provider("$feathers",[function(){var a=null,b=null,c=!0,d=window.localStorage;return{setAuthStorage:function(a){d=a},setSocketOpts:function(a){b=a},useSocket:function(a){c=!!a},setEndpoint:function(b){a=b},$get:[function(){return this.app=feathers().configure(feathers.hooks()),c?(this.socket=io(a,b),this.app.configure(feathers.socketio(this.socket))):this.app.configure(feathers.rest(a).jquery(window.jQuery)),this.app.configure(feathers.authentication({storage:d})),this.app}]}}]); \ No newline at end of file +angular.module("ngFeathers",[]).provider("$feathers",[function(){var e=null,n=null,o=!0,i=window.localStorage;return{setAuthStorage:function(t){i=t},setSocketOpts:function(t){n=t},useSocket:function(t){o=!!t},setEndpoint:function(t){e=t},$get:[function(){return this.app=feathers(),o?(this.socket=io(e,n),this.app.configure(feathers.socketio(this.socket))):this.app.configure(feathers.rest(e).jquery(window.jQuery)),this.app.configure(feathers.authentication({storage:i})),this.app}]}}]); \ No newline at end of file diff --git a/dist/ng-feathers.standalone.min.js b/dist/ng-feathers.standalone.min.js index 132895a..24f2222 100644 --- a/dist/ng-feathers.standalone.min.js +++ b/dist/ng-feathers.standalone.min.js @@ -1,12 +1 @@ -!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b():"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?exports.io=b():a.io=b()}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";function d(a,b){"object"===("undefined"==typeof a?"undefined":f(a))&&(b=a,a=void 0),b=b||{};var c,d=g(a),h=d.source,l=d.id,m=d.path,n=k[l]&&m in k[l].nsps,o=b.forceNew||b["force new connection"]||!1===b.multiplex||n;return o?(j("ignoring socket cache for %s",h),c=i(h,b)):(k[l]||(j("new io instance for %s",h),k[l]=i(h,b)),c=k[l]),d.query&&!b.query?b.query=d.query:b&&"object"===f(b.query)&&(b.query=e(b.query)),c.socket(d.path,b)}function e(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(encodeURIComponent(c)+"="+encodeURIComponent(a[c]));return b.join("&")}var f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},g=c(1),h=c(6),i=c(13),j=c(3)("socket.io-client");a.exports=b=d;var k=b.managers={};b.protocol=h.protocol,b.connect=d,b.Manager=c(13),b.Socket=c(40)},function(a,b,c){(function(b){"use strict";function d(a,c){var d=a;c=c||b.location,null==a&&(a=c.protocol+"//"+c.host),"string"==typeof a&&("/"===a.charAt(0)&&(a="/"===a.charAt(1)?c.protocol+a:c.host+a),/^(https?|wss?):\/\//.test(a)||(f("protocol-less url %s",a),a="undefined"!=typeof c?c.protocol+"//"+a:"https://"+a),f("parse %s",a),d=e(a)),d.port||(/^(http|ws)$/.test(d.protocol)?d.port="80":/^(http|ws)s$/.test(d.protocol)&&(d.port="443")),d.path=d.path||"/";var g=d.host.indexOf(":")!==-1,h=g?"["+d.host+"]":d.host;return d.id=d.protocol+"://"+h+":"+d.port,d.href=d.protocol+"://"+h+(c&&c.port===d.port?"":":"+d.port),d}var e=c(2),f=c(3)("socket.io-client:url");a.exports=d}).call(b,function(){return this}())},function(a,b){var c=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,d=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];a.exports=function(a){var b=a,e=a.indexOf("["),f=a.indexOf("]");e!=-1&&f!=-1&&(a=a.substring(0,e)+a.substring(e,f).replace(/:/g,";")+a.substring(f,a.length));for(var g=c.exec(a||""),h={},i=14;i--;)h[d[i]]=g[i]||"";return e!=-1&&f!=-1&&(h.source=b,h.host=h.host.substring(1,h.host.length-1).replace(/;/g,":"),h.authority=h.authority.replace("[","").replace("]","").replace(/;/g,":"),h.ipv6uri=!0),h}},function(a,b,c){function d(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function e(){var a=arguments,c=this.useColors;if(a[0]=(c?"%c":"")+this.namespace+(c?" %c":" ")+a[0]+(c?"%c ":" ")+"+"+b.humanize(this.diff),!c)return a;var d="color: "+this.color;a=[a[0],d,"color: inherit"].concat(Array.prototype.slice.call(a,1));var e=0,f=0;return a[0].replace(/%[a-z%]/g,function(a){"%%"!==a&&(e++,"%c"===a&&(f=e))}),a.splice(f,0,d),a}function f(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function g(a){try{null==a?b.storage.removeItem("debug"):b.storage.debug=a}catch(a){}}function h(){var a;try{a=b.storage.debug}catch(a){}return a}function i(){try{return window.localStorage}catch(a){}}b=a.exports=c(4),b.log=f,b.formatArgs=e,b.save=g,b.load=h,b.useColors=d,b.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:i(),b.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],b.formatters.j=function(a){return JSON.stringify(a)},b.enable(h())},function(a,b,c){function d(){return b.colors[k++%b.colors.length]}function e(a){function c(){}function e(){var a=e,c=+new Date,f=c-(j||c);a.diff=f,a.prev=j,a.curr=c,j=c,null==a.useColors&&(a.useColors=b.useColors()),null==a.color&&a.useColors&&(a.color=d());var g=Array.prototype.slice.call(arguments);g[0]=b.coerce(g[0]),"string"!=typeof g[0]&&(g=["%o"].concat(g));var h=0;g[0]=g[0].replace(/%([a-z%])/g,function(c,d){if("%%"===c)return c;h++;var e=b.formatters[d];if("function"==typeof e){var f=g[h];c=e.call(a,f),g.splice(h,1),h--}return c}),"function"==typeof b.formatArgs&&(g=b.formatArgs.apply(a,g));var i=e.log||b.log||console.log.bind(console);i.apply(a,g)}c.enabled=!1,e.enabled=!0;var f=b.enabled(a)?e:c;return f.namespace=a,f}function f(a){b.save(a);for(var c=(a||"").split(/[\s,]+/),d=c.length,e=0;e1e4)){var b=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(a);if(b){var c=parseFloat(b[1]),d=(b[2]||"ms").toLowerCase();switch(d){case"years":case"year":case"yrs":case"yr":case"y":return c*k;case"days":case"day":case"d":return c*j;case"hours":case"hour":case"hrs":case"hr":case"h":return c*i;case"minutes":case"minute":case"mins":case"min":case"m":return c*h;case"seconds":case"second":case"secs":case"sec":case"s":return c*g;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c}}}}function d(a){return a>=j?Math.round(a/j)+"d":a>=i?Math.round(a/i)+"h":a>=h?Math.round(a/h)+"m":a>=g?Math.round(a/g)+"s":a+"ms"}function e(a){return f(a,j,"day")||f(a,i,"hour")||f(a,h,"minute")||f(a,g,"second")||a+" ms"}function f(a,b,c){if(!(a1)))/4)-B((a-1901+b)/100)+B((a-1601+b)/400)};if((o=r.hasOwnProperty)||(o=function(a){var b,c={};return(c.__proto__=null,c.__proto__={toString:1},c).toString!=s?o=function(a){var b=this.__proto__,c=a in(this.__proto__=null,this);return this.__proto__=b,c}:(b=c.constructor,o=function(a){var c=(this.constructor||b).prototype;return a in this&&!(a in c&&this[a]===c[a])}),c=null,o.call(this,a)}),p=function(a,b){var c,d,e,f=0;(c=function(){this.valueOf=0}).prototype.valueOf=0,d=new c;for(e in d)o.call(d,e)&&f++;return c=d=null,f?p=2==f?function(a,b){var c,d={},e=s.call(a)==u;for(c in a)e&&"prototype"==c||o.call(d,c)||!(d[c]=1)||!o.call(a,c)||b(c)}:function(a,b){var c,d,e=s.call(a)==u;for(c in a)e&&"prototype"==c||!o.call(a,c)||(d="constructor"===c)||b(c);(d||o.call(a,c="constructor"))&&b(c)}:(d=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],p=function(a,b){var c,e,f=s.call(a)==u,h=!f&&"function"!=typeof a.constructor&&g[typeof a.hasOwnProperty]&&a.hasOwnProperty||o;for(c in a)f&&"prototype"==c||!h.call(a,c)||b(c);for(e=d.length;c=d[--e];h.call(a,c)&&b(c));}),p(a,b)},!c("json-stringify")){var E={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},F="000000",G=function(a,b){return(F+(b||0)).slice(-a)},H="\\u00",I=function(a){for(var b='"',c=0,d=a.length,e=!A||d>10,f=e&&(A?a.split(""):a);c-1/0&&h<1/0){if(D){for(m=B(h/864e5),j=B(m/365.2425)+1970-1;D(j+1,0)<=m;j++);for(k=B((m-D(j,0))/30.42);D(j,k+1)<=m;k++);m=1+m-D(j,k),n=(h%864e5+864e5)%864e5,r=B(n/36e5)%24,t=B(n/6e4)%60,u=B(n/1e3)%60,A=n%1e3}else j=h.getUTCFullYear(),k=h.getUTCMonth(),m=h.getUTCDate(),r=h.getUTCHours(),t=h.getUTCMinutes(),u=h.getUTCSeconds(),A=h.getUTCMilliseconds();h=(j<=0||j>=1e4?(j<0?"-":"+")+G(6,j<0?-j:j):G(4,j))+"-"+G(2,k+1)+"-"+G(2,m)+"T"+G(2,r)+":"+G(2,t)+":"+G(2,u)+"."+G(3,A)+"Z"}else h=null;if(c&&(h=c.call(b,a,h)),null===h)return"null";if(i=s.call(h),i==z)return""+h;if(i==w)return h>-1/0&&h<1/0?""+h:"null";if(i==x)return I(""+h);if("object"==typeof h){for(H=g.length;H--;)if(g[H]===h)throw l();if(g.push(h),C=[],K=f,f+=e,i==y){for(F=0,H=h.length;F0)for(d="",c>10&&(c=10);d.length=48&&e<=57||e>=97&&e<=102||e>=65&&e<=70||O();a+=M("0x"+f.slice(b,K));break;default:O()}else{if(34==e)break;for(e=f.charCodeAt(K),b=K;e>=32&&92!=e&&34!=e;)e=f.charCodeAt(++K);a+=f.slice(b,K)}if(34==f.charCodeAt(K))return K++,a;O();default:if(b=K,45==e&&(d=!0,e=f.charCodeAt(++K)),e>=48&&e<=57){for(48==e&&(e=f.charCodeAt(K+1),e>=48&&e<=57)&&O(),d=!1;K=48&&e<=57);K++);if(46==f.charCodeAt(K)){for(c=++K;c=48&&e<=57);c++);c==K&&O(),K=c}if(e=f.charCodeAt(K),101==e||69==e){for(e=f.charCodeAt(++K),43!=e&&45!=e||K++,c=K;c=48&&e<=57);c++);c==K&&O(),K=c}return+f.slice(b,K)}if(d&&O(),"true"==f.slice(K,K+4))return K+=4,!0;if("false"==f.slice(K,K+5))return K+=5,!1;if("null"==f.slice(K,K+4))return K+=4,null;O()}return"$"},Q=function(a){var b,c;if("$"==a&&O(),"string"==typeof a){if("@"==(A?a.charAt(0):a[0]))return a.slice(1);if("["==a){for(b=[];a=P(),"]"!=a;c||(c=!0))c&&(","==a?(a=P(),"]"==a&&O()):O()),","==a&&O(),b.push(Q(a));return b}if("{"==a){for(b={};a=P(),"}"!=a;c||(c=!0))c&&(","==a?(a=P(),"}"==a&&O()):O()),","!=a&&"string"==typeof a&&"@"==(A?a.charAt(0):a[0])&&":"==P()||O(),b[a.slice(1)]=Q(P());return b}O()}return a},R=function(a,b,c){var d=S(a,b,c);d===q?delete a[b]:a[b]=d},S=function(a,b,c){var d,e=a[b];if("object"==typeof e&&e)if(s.call(e)==y)for(d=e.length;d--;)R(e,d,c);else p(e,function(a){R(e,a,c)});return c.call(a,b,e)};b.parse=function(a,b){var c,d;return K=0,L=""+a,c=Q(P()),"$"!=P()&&O(),K=L=null,b&&s.call(b)==u?S((d={},d[""]=c,d),"",b):c}}}return b.runInContext=e,b}var f="function"==typeof d&&d.amd,g={function:!0,object:!0},h=g[typeof b]&&b&&!b.nodeType&&b,i=g[typeof window]&&window||this,j=h&&g[typeof a]&&a&&!a.nodeType&&"object"==typeof c&&c;if(!j||j.global!==j&&j.window!==j&&j.self!==j||(i=j),h&&!f)e(i,h);else{var k=i.JSON,l=i.JSON3,m=!1,n=e(i,i.JSON3={noConflict:function(){return m||(m=!0,i.JSON=k,i.JSON3=l,k=l=null),n}});i.JSON={parse:n.parse,stringify:n.stringify}}f&&d(function(){return n})}).call(this)}).call(b,c(8)(a),function(){return this}())},function(a,b){a.exports=function(a){return a.webpackPolyfill||(a.deprecate=function(){},a.paths=[],a.children=[],a.webpackPolyfill=1),a}},function(a,b){a.exports=Array.isArray||function(a){return"[object Array]"==Object.prototype.toString.call(a)}},function(a,b){function c(a){if(a)return d(a)}function d(a){for(var b in c.prototype)a[b]=c.prototype[b];return a}a.exports=c,c.prototype.on=c.prototype.addEventListener=function(a,b){return this._callbacks=this._callbacks||{},(this._callbacks[a]=this._callbacks[a]||[]).push(b),this},c.prototype.once=function(a,b){function c(){d.off(a,c),b.apply(this,arguments)}var d=this;return this._callbacks=this._callbacks||{},c.fn=b,this.on(a,c),this},c.prototype.off=c.prototype.removeListener=c.prototype.removeAllListeners=c.prototype.removeEventListener=function(a,b){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var c=this._callbacks[a];if(!c)return this;if(1==arguments.length)return delete this._callbacks[a],this;for(var d,e=0;e0&&!this.encoding){var a=this.packetBuffer.shift();this.packet(a)}},d.prototype.cleanup=function(){l("cleanup");for(var a=this.subs.length,b=0;b=this._reconnectionAttempts)l("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var b=this.backoff.duration();l("will wait %dms before reconnect attempt",b),this.reconnecting=!0;var c=setTimeout(function(){a.skipReconnect||(l("attempting reconnect"),a.emitAll("reconnect_attempt",a.backoff.attempts),a.emitAll("reconnecting",a.backoff.attempts),a.skipReconnect||a.open(function(b){b?(l("reconnect attempt error"),a.reconnecting=!1,a.reconnect(),a.emitAll("reconnect_error",b.data)):(l("reconnect success"),a.onreconnect())}))},b);this.subs.push({destroy:function(){clearTimeout(c)}})}},d.prototype.onreconnect=function(){var a=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",a)}},function(a,b,c){a.exports=c(15)},function(a,b,c){a.exports=c(16),a.exports.parser=c(23)},function(a,b,c){(function(b){function d(a,c){if(!(this instanceof d))return new d(a,c);c=c||{},a&&"object"==typeof a&&(c=a,a=null),a?(a=k(a),c.hostname=a.host,c.secure="https"===a.protocol||"wss"===a.protocol,c.port=a.port,a.query&&(c.query=a.query)):c.host&&(c.hostname=k(c.host).host),this.secure=null!=c.secure?c.secure:b.location&&"https:"===location.protocol,c.hostname&&!c.port&&(c.port=this.secure?"443":"80"),this.agent=c.agent||!1,this.hostname=c.hostname||(b.location?location.hostname:"localhost"),this.port=c.port||(b.location&&location.port?location.port:this.secure?443:80),this.query=c.query||{},"string"==typeof this.query&&(this.query=m.decode(this.query)),this.upgrade=!1!==c.upgrade,this.path=(c.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!c.forceJSONP,this.jsonp=!1!==c.jsonp,this.forceBase64=!!c.forceBase64,this.enablesXDR=!!c.enablesXDR,this.timestampParam=c.timestampParam||"t",this.timestampRequests=c.timestampRequests,this.transports=c.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=c.policyPort||843,this.rememberUpgrade=c.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=c.onlyBinaryUpgrades,this.perMessageDeflate=!1!==c.perMessageDeflate&&(c.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=c.pfx||null,this.key=c.key||null,this.passphrase=c.passphrase||null,this.cert=c.cert||null,this.ca=c.ca||null,this.ciphers=c.ciphers||null,this.rejectUnauthorized=void 0===c.rejectUnauthorized?null:c.rejectUnauthorized;var e="object"==typeof b&&b;e.global===e&&c.extraHeaders&&Object.keys(c.extraHeaders).length>0&&(this.extraHeaders=c.extraHeaders),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}function e(a){var b={};for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b}var f=c(17),g=c(31),h=c(3)("engine.io-client:socket"),i=c(38),j=c(23),k=c(2),l=c(39),m=c(32);a.exports=d,d.priorWebsocketSuccess=!1,g(d.prototype),d.protocol=j.protocol,d.Socket=d,d.Transport=c(22),d.transports=c(17),d.parser=c(23),d.prototype.createTransport=function(a){h('creating transport "%s"',a);var b=e(this.query);b.EIO=j.protocol,b.transport=a,this.id&&(b.sid=this.id);var c=new f[a]({agent:this.agent,hostname:this.hostname,port:this.port,secure:this.secure,path:this.path,query:b,forceJSONP:this.forceJSONP,jsonp:this.jsonp,forceBase64:this.forceBase64,enablesXDR:this.enablesXDR,timestampRequests:this.timestampRequests,timestampParam:this.timestampParam,policyPort:this.policyPort,socket:this,pfx:this.pfx,key:this.key,passphrase:this.passphrase,cert:this.cert,ca:this.ca,ciphers:this.ciphers,rejectUnauthorized:this.rejectUnauthorized,perMessageDeflate:this.perMessageDeflate,extraHeaders:this.extraHeaders});return c},d.prototype.open=function(){var a;if(this.rememberUpgrade&&d.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)a="websocket";else{if(0===this.transports.length){var b=this;return void setTimeout(function(){b.emit("error","No transports available")},0)}a=this.transports[0]}this.readyState="opening";try{a=this.createTransport(a)}catch(a){return this.transports.shift(),void this.open()}a.open(),this.setTransport(a)},d.prototype.setTransport=function(a){h("setting transport %s",a.name);var b=this;this.transport&&(h("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=a,a.on("drain",function(){b.onDrain()}).on("packet",function(a){b.onPacket(a)}).on("error",function(a){b.onError(a)}).on("close",function(){b.onClose("transport close")})},d.prototype.probe=function(a){function b(){if(m.onlyBinaryUpgrades){var b=!this.supportsBinary&&m.transport.supportsBinary;l=l||b}l||(h('probe transport "%s" opened',a),k.send([{type:"ping",data:"probe"}]),k.once("packet",function(b){if(!l)if("pong"===b.type&&"probe"===b.data){if(h('probe transport "%s" pong',a),m.upgrading=!0,m.emit("upgrading",k),!k)return;d.priorWebsocketSuccess="websocket"===k.name,h('pausing current transport "%s"',m.transport.name),m.transport.pause(function(){l||"closed"!==m.readyState&&(h("changing transport and sending upgrade packet"),j(),m.setTransport(k),k.send([{type:"upgrade"}]),m.emit("upgrade",k),k=null,m.upgrading=!1,m.flush())})}else{h('probe transport "%s" failed',a);var c=new Error("probe error");c.transport=k.name,m.emit("upgradeError",c)}}))}function c(){l||(l=!0,j(),k.close(),k=null)}function e(b){var d=new Error("probe error: "+b);d.transport=k.name,c(),h('probe transport "%s" failed because of error: %s',a,b),m.emit("upgradeError",d)}function f(){e("transport closed")}function g(){e("socket closed")}function i(a){k&&a.name!==k.name&&(h('"%s" works - aborting "%s"',a.name,k.name),c())}function j(){k.removeListener("open",b),k.removeListener("error",e),k.removeListener("close",f),m.removeListener("close",g),m.removeListener("upgrading",i)}h('probing transport "%s"',a);var k=this.createTransport(a,{probe:1}),l=!1,m=this;d.priorWebsocketSuccess=!1,k.once("open",b),k.once("error",e),k.once("close",f),this.once("close",g),this.once("upgrading",i),k.open()},d.prototype.onOpen=function(){if(h("socket open"),this.readyState="open",d.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){h("starting upgrade probes");for(var a=0,b=this.upgrades.length;a1?{type:t[e],data:a.substring(1)}:{type:t[e]}:u}var f=new Uint8Array(a),e=f[0],g=m(a,1);return v&&"blob"===c&&(g=new v([g])),{type:t[e],data:g}},b.decodeBase64Packet=function(a,b){var c=t[a.charAt(0)];if(!j)return{type:c,data:{base64:!0,data:a.substr(1)}};var d=j.decode(a.substr(1));return"blob"===b&&v&&(d=new v([d])),{type:c,data:d}},b.encodePayload=function(a,c,d){function e(a){return a.length+":"+a}function f(a,d){b.encodePacket(a,!!g&&c,!0,function(a){d(null,e(a))})}"function"==typeof c&&(d=c,c=null);var g=l(a);return c&&g?v&&!r?b.encodePayloadAsBlob(a,d):b.encodePayloadAsArrayBuffer(a,d):a.length?void i(a,f,function(a,b){return d(b.join(""))}):d("0:")},b.decodePayload=function(a,c,d){if("string"!=typeof a)return b.decodePayloadAsBinary(a,c,d);"function"==typeof c&&(d=c,c=null);var e;if(""==a)return d(u,0,1);for(var f,g,h="",i=0,j=a.length;i0;){for(var h=new Uint8Array(e),i=0===h[0],j="",k=1;255!=h[k];k++){if(j.length>310){g=!0;break}j+=h[k]}if(g)return d(u,0,1);e=m(e,2+j.length),j=parseInt(j);var l=m(e,0,j);if(i)try{l=String.fromCharCode.apply(null,new Uint8Array(l))}catch(a){var n=new Uint8Array(l);l="";for(var k=0;kd&&(c=d),b>=d||b>=c||0===d)return new ArrayBuffer(0);for(var e=new Uint8Array(a),f=new Uint8Array(c-b),g=b,h=0;g=55296&&b<=56319&&e65535&&(b-=65536,e+=t(b>>>10&1023|55296),b=56320|1023&b),e+=t(b);return e}function i(a,b){return t(a>>b&63|128)}function j(a){if(0==(4294967168&a))return t(a);var b="";return 0==(4294965248&a)?b=t(a>>6&31|192):0==(4294901760&a)?(b=t(a>>12&15|224),b+=i(a,6)):0==(4292870144&a)&&(b=t(a>>18&7|240),b+=i(a,12),b+=i(a,6)),b+=t(63&a|128)}function k(a){for(var b,c=g(a),d=c.length,e=-1,f="";++e=r)throw Error("Invalid byte index");var a=255&q[s];if(s++,128==(192&a))return 63&a;throw Error("Invalid continuation byte")}function m(){var a,b,c,d,e;if(s>r)throw Error("Invalid byte index");if(s==r)return!1;if(a=255&q[s],s++,0==(128&a))return a;if(192==(224&a)){var b=l();if(e=(31&a)<<6|b,e>=128)return e;throw Error("Invalid continuation byte")}if(224==(240&a)){if(b=l(),c=l(),e=(15&a)<<12|b<<6|c,e>=2048)return e;throw Error("Invalid continuation byte")}if(240==(248&a)&&(b=l(),c=l(),d=l(),e=(15&a)<<18|b<<12|c<<6|d,e>=65536&&e<=1114111))return e;throw Error("Invalid WTF-8 detected")}function n(a){q=g(a),r=q.length,s=0;for(var b,c=[];(b=m())!==!1;)c.push(b);return h(c)}var o="object"==typeof b&&b,p=("object"==typeof a&&a&&a.exports==o&&a,"object"==typeof e&&e);p.global!==p&&p.window!==p||(f=p);var q,r,s,t=String.fromCharCode,u={version:"1.0.0",encode:k,decode:n};d=function(){return u}.call(b,c,b,a),!(void 0!==d&&(a.exports=d))}(this)}).call(b,c(8)(a),function(){return this}())},function(a,b){!function(){"use strict";for(var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=new Uint8Array(256),d=0;d>2],f+=a[(3&d[c])<<4|d[c+1]>>4],f+=a[(15&d[c+1])<<2|d[c+2]>>6],f+=a[63&d[c+2]];return e%3===2?f=f.substring(0,f.length-1)+"=":e%3===1&&(f=f.substring(0,f.length-2)+"=="),f},b.decode=function(a){var b,d,e,f,g,h=.75*a.length,i=a.length,j=0;"="===a[a.length-1]&&(h--,"="===a[a.length-2]&&h--);var k=new ArrayBuffer(h),l=new Uint8Array(k);for(b=0;b>4,l[j++]=(15&e)<<4|f>>2,l[j++]=(3&f)<<6|63&g;return k}}()},function(a,b){(function(b){function c(a){for(var b=0;b0);return b}function d(a){var b=0;for(k=0;k';f=document.createElement(a)}catch(a){f=document.createElement("iframe"),f.name=e.iframeId,f.src="javascript:0"}f.id=e.iframeId,e.form.appendChild(f),e.iframe=f}var e=this;if(!this.form){var f,g=document.createElement("form"),h=document.createElement("textarea"),k=this.iframeId="eio_iframe_"+this.index;g.className="socketio",g.style.position="absolute",g.style.top="-1000px",g.style.left="-1000px",g.target=k,g.method="POST",g.setAttribute("accept-charset","utf-8"),h.name="d",g.appendChild(h),document.body.appendChild(g),this.form=g,this.area=h}this.form.action=this.uri(),d(),a=a.replace(j,"\\\n"),this.area.value=a.replace(i,"\\n");try{this.form.submit()}catch(a){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===e.iframe.readyState&&c()}:this.iframe.onload=c}}).call(b,function(){return this}())},function(a,b,c){(function(b){function d(a){var b=a&&a.forceBase64;b&&(this.supportsBinary=!1),this.perMessageDeflate=a.perMessageDeflate,e.call(this,a)}var e=c(22),f=c(23),g=c(32),h=c(33),i=c(34),j=c(3)("engine.io-client:websocket"),k=b.WebSocket||b.MozWebSocket,l=k;if(!l&&"undefined"==typeof window)try{l=c(37)}catch(a){}a.exports=d,h(d,e),d.prototype.name="websocket",d.prototype.supportsBinary=!0,d.prototype.doOpen=function(){if(this.check()){var a=this.uri(),b=void 0,c={agent:this.agent,perMessageDeflate:this.perMessageDeflate};c.pfx=this.pfx,c.key=this.key,c.passphrase=this.passphrase,c.cert=this.cert,c.ca=this.ca,c.ciphers=this.ciphers,c.rejectUnauthorized=this.rejectUnauthorized,this.extraHeaders&&(c.headers=this.extraHeaders);try{this.ws=k?new l(a):new l(a,b,c)}catch(a){return this.emit("error",a)}void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},d.prototype.addEventListeners=function(){var a=this;this.ws.onopen=function(){a.onOpen()},this.ws.onclose=function(){a.onClose()},this.ws.onmessage=function(b){a.onData(b.data)},this.ws.onerror=function(b){a.onError("websocket error",b)}},"undefined"!=typeof navigator&&/iPad|iPhone|iPod/i.test(navigator.userAgent)&&(d.prototype.onData=function(a){var b=this;setTimeout(function(){e.prototype.onData.call(b,a)},0)}),d.prototype.write=function(a){function c(){d.emit("flush"),setTimeout(function(){d.writable=!0,d.emit("drain")},0)}var d=this;this.writable=!1;for(var e=a.length,g=0,h=e;g0&&a.jitter<=1?a.jitter:0,this.attempts=0}a.exports=c,c.prototype.duration=function(){var a=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var b=Math.random(),c=Math.floor(b*this.jitter*a);a=0==(1&Math.floor(10*b))?a-c:a+c}return 0|Math.min(a,this.max)},c.prototype.reset=function(){this.attempts=0},c.prototype.setMin=function(a){this.ms=a},c.prototype.setMax=function(a){this.max=a},c.prototype.setJitter=function(a){this.jitter=a}}])}),function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.feathers=a()}}(function(){var define,module,exports;return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g=31}function e(){var a=arguments,b=this.useColors;if(a[0]=(b?"%c":"")+this.namespace+(b?" %c":" ")+a[0]+(b?"%c ":" ")+"+"+c.humanize(this.diff),!b)return a;var d="color: "+this.color;a=[a[0],d,"color: inherit"].concat(Array.prototype.slice.call(a,1));var e=0,f=0;return a[0].replace(/%[a-z%]/g,function(a){"%%"!==a&&(e++,"%c"===a&&(f=e))}),a.splice(f,0,d),a}function f(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function g(a){try{null==a?c.storage.removeItem("debug"):c.storage.debug=a}catch(a){}}function h(){var a;try{a=c.storage.debug}catch(a){}return a}function i(){try{return window.localStorage}catch(a){}}c=b.exports=a("./debug"),c.log=f,c.formatArgs=e,c.save=g,c.load=h,c.useColors=d,c.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:i(),c.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],c.formatters.j=function(a){return JSON.stringify(a)},c.enable(h())},{"./debug":2}],2:[function(a,b,c){function d(){return c.colors[k++%c.colors.length]}function e(a){function b(){}function e(){var a=e,b=+new Date,f=b-(j||b);a.diff=f,a.prev=j,a.curr=b,j=b,null==a.useColors&&(a.useColors=c.useColors()),null==a.color&&a.useColors&&(a.color=d());var g=Array.prototype.slice.call(arguments);g[0]=c.coerce(g[0]),"string"!=typeof g[0]&&(g=["%o"].concat(g));var h=0;g[0]=g[0].replace(/%([a-z%])/g,function(b,d){if("%%"===b)return b;h++;var e=c.formatters[d];if("function"==typeof e){var f=g[h];b=e.call(a,f),g.splice(h,1),h--}return b}),"function"==typeof c.formatArgs&&(g=c.formatArgs.apply(a,g));var i=e.log||c.log||console.log.bind(console);i.apply(a,g)}b.enabled=!1,e.enabled=!0;var f=c.enabled(a)?e:b;return f.namespace=a,f}function f(a){c.save(a);for(var b=(a||"").split(/[\s,]+/),d=b.length,e=0;e0&&this._events[a].length>c&&(this._events[a].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[a].length),"function"==typeof console.trace&&console.trace())),this},d.prototype.on=d.prototype.addListener,d.prototype.once=function(a,b){function c(){this.removeListener(a,c),d||(d=!0,b.apply(this,arguments))}if(!e(b))throw TypeError("listener must be a function");var d=!1;return c.listener=b,this.on(a,c),this},d.prototype.removeListener=function(a,b){var c,d,f,h;if(!e(b))throw TypeError("listener must be a function");if(!this._events||!this._events[a])return this;if(c=this._events[a],f=c.length,d=-1,c===b||e(c.listener)&&c.listener===b)delete this._events[a],this._events.removeListener&&this.emit("removeListener",a,b);else if(g(c)){for(h=f;h-- >0;)if(c[h]===b||c[h].listener&&c[h].listener===b){d=h;break}if(d<0)return this;1===c.length?(c.length=0,delete this._events[a]):c.splice(d,1),this._events.removeListener&&this.emit("removeListener",a,b)}return this},d.prototype.removeAllListeners=function(a){var b,c;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[a]&&delete this._events[a],this;if(0===arguments.length){for(b in this._events)"removeListener"!==b&&this.removeAllListeners(b);return this.removeAllListeners("removeListener"),this._events={},this}if(c=this._events[a],e(c))this.removeListener(a,c);else if(c)for(;c.length;)this.removeListener(a,c[c.length-1]);return delete this._events[a],this},d.prototype.listeners=function(a){var b;return b=this._events&&this._events[a]?e(this._events[a])?[this._events[a]]:this._events[a].slice():[]},d.prototype.listenerCount=function(a){if(this._events){var b=this._events[a];if(e(b))return 1;if(b)return b.length}return 0},d.listenerCount=function(a,b){return a.listenerCount(b)}},{}],4:[function(a,b,c){b.exports=a("./lib/client/index")},{"./lib/client/index":6}],5:[function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(){return function(a){var b=a.app;Object.assign(a.params,{user:b.get("user"),token:b.get("token")})}}function f(){var a=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return function(b){b.params.token&&(b.params.headers=Object.assign({},d({},a.header||"authorization",b.params.token),b.params.headers))}}Object.defineProperty(c,"__esModule",{value:!0}),c.populateParams=e,c.populateHeader=f},{}],6:[function(a,b,c){"use strict";function d(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b.default=a,b}function e(a){return a&&a.__esModule?a:{default:a}}Object.defineProperty(c,"__esModule",{value:!0}),c.default=function(){var a=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],b=Object.assign({},k,a);return function(){var a=this;a.get("storage")||a.set("storage",(0,j.getStorage)(b.storage)),a.authenticate=function(){var c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],d=this.get("storage"),e=Promise.resolve(c);c.type||(e=(0,j.getJWT)(b.tokenKey,b.cookie,this.get("storage")).then(function(a){return a?{type:"token",token:a}:Promise.reject(new g.default.NotAuthenticated("Could not find stored JWT and no authentication type was given"))}));var f=function(c){return a.set("token",c.token),a.set("user",c.data),Promise.resolve(d.setItem(b.tokenKey,c.token)).then(function(){return c})};return e.then(function(c){var d=void 0;if(c.endpoint)d=c.endpoint;else if("local"===c.type)d=b.localEndpoint;else{if("token"!==c.type)throw new Error("Unsupported authentication 'type': "+c.type);d=b.tokenEndpoint}return(0,j.connected)(a).then(function(b){if(a.rest)return a.service(d).create(c).then(f);var e=a.io?"emit":"send";return(0,j.authenticateSocket)(c,b,e).then(f)})})},a.logout=function(){return a.set("user",null),a.set("token",null),(0,j.clearCookie)(b.cookie),Promise.resolve(a.get("storage").removeItem(b.tokenKey)).then(function(){if(a.io||a.primus){var b=a.io?"emit":"send",c=a.io?a.io:a.primus;return(0,j.logoutSocket)(c,b)}})},a.mixins.push(function(a){if("function"!=typeof a.before||"function"!=typeof a.after)throw new Error("It looks like feathers-hooks isn't configured. It is required before running feathers-authentication.");a.before(i.populateParams(b))}),a.rest&&a.mixins.push(function(a){a.before(i.populateHeader(b))})}};var f=a("feathers-errors"),g=e(f),h=a("./hooks"),i=d(h),j=a("./utils"),k={cookie:"feathers-jwt",tokenKey:"feathers-jwt",localEndpoint:"/auth/local",tokenEndpoint:"/auth/token"};b.exports=c.default},{"./hooks":5,"./utils":7,"feathers-errors":12}],7:[function(a,b,c){"use strict";function d(a){return new Promise(function(b,c){if(a.rest)return b();var d=a.io||a.primus;if(!d)return c(new Error("It looks like no client connection has been configured."));if(d.once("disconnect",c),d.once("close",c),a.io&&!d.connected||a.primus&&3!==d.readyState){var e=a.primus?"open":"connect";d.once(e,function(){return b(d)})}else b(d)})}function e(a,b,c){return new Promise(function(d,e){b.once("unauthorized",e),b.once("authenticated",d),b[c]("authenticate",a)})}function f(a,b){return new Promise(function(c,d){a[b]("logout",function(a){a&&d(a),c()})})}function g(a){if("undefined"!=typeof document){var b="; "+document.cookie,c=b.split("; "+a+"=");if(2===c.length)return c.pop().split(";").shift()}return null}function h(a){return"undefined"!=typeof document&&(document.cookie=a+"=;expires=Thu, 01 Jan 1970 00:00:01 GMT;"),null}function i(a,b,c){return Promise.resolve(c.getItem(a)).then(function(a){var c=g(b);return c?c:a})}function j(a){return a?a:{store:{},getItem:function(a){return this.store[a]},setItem:function(a,b){return this.store[a]=b},removeItem:function(a){return delete this.store[a],this}}}Object.defineProperty(c,"__esModule",{value:!0}),c.connected=d,c.authenticateSocket=e,c.logoutSocket=f,c.getCookie=g,c.clearCookie=h,c.getJWT=i,c.getStorage=j},{}],8:[function(a,b,c){"use strict";function d(a,b){return k[a](b)}Object.defineProperty(c,"__esModule",{value:!0});var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};c.default=d;var f=c.noop=function(){},g=function(a){var b=a[a.length-1];return"function"==typeof b?b:f},h=function(a,b){return"object"===e(a[b])?a[b]:{}},i=function(a){return function(b){var c=b[0],d=b[1],f=g(b),i=h(b,2);if("function"==typeof c)throw new Error("First parameter for '"+a+"' can not be a function");if("object"!==("undefined"==typeof d?"undefined":e(d)))throw new Error("No data provided for '"+a+"'");if(b.length>4)throw new Error("Too many arguments for '"+a+"' service method");return[c,d,i,f]}},j=function(a){return function(b){var c=b[0],d=h(b,1),e=g(b);if(b.length>3)throw new Error("Too many arguments for '"+a+"' service method");if("function"==typeof c)throw new Error("First parameter for '"+a+"' can not be a function");return[c,d,e]}},k=c.converters={find:function(a){var b=g(a),c=h(a,0);if(a.length>2)throw new Error("Too many arguments for 'find' service method");return[c,b]},create:function(a){var b=a[0],c=h(a,1),d=g(a);if("object"!==("undefined"==typeof b?"undefined":e(b)))throw new Error("First parameter for 'create' must be an object");if(a.length>3)throw new Error("Too many arguments for 'create' service method");return[b,c,d]},update:i("update"),patch:i("patch"),get:j("get"),remove:j("remove")}},{}],9:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}Object.defineProperty(c,"__esModule",{value:!0});var e=a("./arguments"),f=d(e),g=a("./utils"),h=a("./hooks"),i=d(h);c.default={getArguments:f.default,stripSlashes:g.stripSlashes,each:g.each,hooks:i.default,matcher:g.matcher,sorter:g.sorter},b.exports=c.default},{"./arguments":8,"./hooks":10,"./utils":11}],10:[function(a,b,c){"use strict";function d(a){return{id:a[0],params:a[1],callback:a[2]}}function e(a){return{id:a[0],data:a[1],params:a[2],callback:a[3]}}function f(a,b,c,d){var e=l[a](c);return e.method=a,e.type=b,d&&(e.app=d),e}function g(a){var b=[];return"undefined"!=typeof a.id&&b.push(a.id),a.data&&b.push(a.data),b.push(a.params||{}),b.push(a.callback),b}function h(a){return"find"===a.method?[a.params,a.callback]:"get"===a.method||"remove"===a.method?[a.id,a.params,a.callback]:"update"===a.method||"patch"===a.method?[a.id,a.data,a.params,a.callback]:"create"===a.method?[a.data,a.params,a.callback]:g(a)}function i(a){var b={};return Array.isArray(a)?b={all:a}:"object"!==("undefined"==typeof a?"undefined":j(a))?b={all:[a]}:(0,k.each)(a,function(a,c){b[c]=Array.isArray(a)?a:[a]}),b}Object.defineProperty(c,"__esModule",{value:!0});var j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},k=a("./utils"),l={find:function(a){return{params:a[0],callback:a[1]}},create:function(a){return{data:a[0],params:a[1],callback:a[2]}},get:d,remove:d,update:e,patch:e};c.default={hookObject:f,hook:f,converters:l,defaultMakeArguments:g,makeArguments:h,convertHookData:i},b.exports=c.default},{"./utils":11}],11:[function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);bc[e]&&(d+=1*a)}),d}}Object.defineProperty(c,"__esModule",{value:!0});var i=Object.assign||function(a){for(var b=1;b1?c-1:0),e=1;eb}},$gte:function(a,b){return function(c){return c[a]>=b}},$ne:function(a,b){return function(c){return c[a]!==b}}}},{}],12:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function g(a){function b(){var b=Reflect.construct(a,Array.from(arguments));return Object.setPrototypeOf(b,Object.getPrototypeOf(this)),b}return b.prototype=Object.create(a.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(b,a):b.__proto__=a,b}function h(a){if(!a)return a;var b=D[a.name],c=b?new b(a.message,a.data):new Error(a.message||a);return"object"===("undefined"==typeof a?"undefined":j(a))&&i(c,a),c}Object.defineProperty(c,"__esModule",{value:!0});var i=Object.assign||function(a){for(var b=1;b1?b-1:0),d=1;d1&&void 0!==arguments[1]?arguments[1]:null,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"anonymous";if(b&&a.type!==b)throw new Error("The '"+d+"' hook can only be used as a '"+b+"' hook.");if(c){var e=Array.isArray(c)?c:[c];if(e.length>0&&e.indexOf(a.method)===-1){var f=JSON.stringify(e);throw new Error("The '"+d+"' hook can only be used on the '"+f+"' service method(s).")}}}function f(a){var b="before"===a.type?a.data:a.result;return b&&"find"===a.method?b.data||b:b}function g(a,b){"before"===a.type?a.data=b:"find"===a.method&&a.result&&a.result.data?Array.isArray(b)?(a.result.data=b, -a.result.total=b.length):(a.result.data=[b],a.result.total=1):a.result=b}Object.defineProperty(c,"__esModule",{value:!0});var h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};c.setByDot=d,c.checkContext=e,c.getItems=f,c.replaceItems=g;c.getByDot=function(a,b){return b.split(".").reduce(function(a,b){return"object"===("undefined"==typeof a?"undefined":h(a))?a[b]:void 0},a)}},{}],15:[function(a,b,c){"use strict";function d(a){return"object"===("undefined"==typeof a?"undefined":i(a))&&"string"==typeof a.method&&"string"==typeof a.type}function e(a,b){var c=this,e=b,f=function(a){if(a){if(!d(a))throw new Error(e.type+" hook for '"+e.method+"' method returned invalid hook object");e=a}return e},g=Promise.resolve(e);return a.forEach(function(a){var b=a.bind(c);g=2===b.length?g.then(function(a){return new Promise(function(c,d){b(a,function(a,b){return a?d(a):c(b)})})}):g.then(b),g=g.then(f)}),g.catch(function(a){throw a.hook=e,a})}function f(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["before","after","error"];Object.defineProperty(a,"__hooks",{value:{}}),b.forEach(function(b){a.__hooks[b]={}})}function g(a,b,c,d){var e=arguments.length>4&&void 0!==arguments[4]&&arguments[4],f=a.__hooks[c][d]||[],g=b.__hooks[c][d]||[];return e?g.concat(f):f.concat(g)}function h(a){for(var b={hooks:function(b){var c=this;return(0,j.each)(b,function(b,d){if(!c.__hooks[d])throw new Error("'"+d+"' is not a valid hook type");var e=j.hooks.convertHookData(b);(0,j.each)(e,function(b,c){if("all"!==c&&a.indexOf(c)===-1)throw new Error("'"+c+"' is not a valid hook method")}),a.forEach(function(a){if(e[a]||e.all){var b=c.__hooks[d][a]||(c.__hooks[d][a]=[]);e.all&&b.push.apply(b,e.all),e[a]&&b.push.apply(b,e[a])}})}),this}},c=arguments.length,d=Array(c>1?c-1:0),e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return this.request({url:this.makeUrl(a.query),method:"GET",headers:g({},a.headers)}).catch(f)}},{key:"get",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request({url:this.makeUrl(b.query,a),method:"GET",headers:g({},b.headers)}).catch(f)}},{key:"create",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request({url:this.makeUrl(b.query),body:a,method:"POST",headers:g({"Content-Type":"application/json"},b.headers)}).catch(f)}},{key:"update",value:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return"undefined"==typeof a?Promise.reject(new Error("id for 'update' can not be undefined, only 'null' when updating multiple entries")):this.request({url:this.makeUrl(c.query,a),body:b,method:"PUT",headers:g({"Content-Type":"application/json"},c.headers)}).catch(f)}},{key:"patch",value:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return"undefined"==typeof a?Promise.reject(new Error("id for 'patch' can not be undefined, only 'null' when updating multiple entries")):this.request({url:this.makeUrl(c.query,a),body:b,method:"PATCH",headers:g({"Content-Type":"application/json"},c.headers)}).catch(f)}},{key:"remove",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"undefined"==typeof a?Promise.reject(new Error("id for 'remove' can not be undefined, only 'null' when removing multiple entries")):this.request({url:this.makeUrl(b.query,a),method:"DELETE",headers:g({},b.headers)}).catch(f)}}]),a}();c.default=m,b.exports=c.default},{"feathers-commons":9,"feathers-errors":12,qs:42}],21:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var h=Object.assign||function(a){for(var b=1;b0&&void 0!==arguments[0]?arguments[0]:"",b={};return Object.keys(m).forEach(function(c){var d=m[c];b[c]=function(b){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!b)throw new Error(c+" has to be provided to feathers-rest");var f=function(c){return new d({base:a,name:c,connection:b,options:e})},g=function(){if("function"==typeof this.defaultService)throw new Error("Only one default client provider can be configured");this.rest=b,this.defaultService=f};return g.Service=d,g.service=f,g}}),b};var e=a("./jquery"),f=d(e),g=a("./superagent"),h=d(g),i=a("./request"),j=d(i),k=a("./fetch"),l=d(k),m={jquery:f.default,superagent:h.default,request:j.default,fetch:l.default};b.exports=c.default},{"./fetch":21,"./jquery":23,"./request":24,"./superagent":25}],23:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var h=Object.assign||function(a){for(var b=1;b=400?"string"==typeof e?d(new Error(e)):(e.response=b,d(h(new Error(e.message),e))):void c(e)})})}}]),b}(k.default);c.default=l,b.exports=c.default},{"./base":20}],25:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var h=function(){function a(a,b){for(var c=0;c1?e-1:0),g=1;g1?c-1:0),e=1;e1?b-1:0),d=1;d2?c-2:0),e=2;e1e4)){var b=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(a);if(b){var c=parseFloat(b[1]),d=(b[2]||"ms").toLowerCase();switch(d){case"years":case"year":case"yrs":case"yr":case"y":return c*l;case"days":case"day":case"d":return c*k;case"hours":case"hour":case"hrs":case"hr":case"h":return c*j;case"minutes":case"minute":case"mins":case"min":case"m":return c*i;case"seconds":case"second":case"secs":case"sec":case"s":return c*h;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}}}function e(a){return a>=k?Math.round(a/k)+"d":a>=j?Math.round(a/j)+"h":a>=i?Math.round(a/i)+"m":a>=h?Math.round(a/h)+"s":a+"ms"}function f(a){return g(a,k,"day")||g(a,j,"hour")||g(a,i,"minute")||g(a,h,"second")||a+" ms"}function g(a,b,c){if(!(a0)return d(a);if("number"===c&&isNaN(a)===!1)return b.long?f(a):e(a);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))}},{}],41:[function(a,b,c){function d(){throw new Error("setTimeout has not been defined")}function e(){throw new Error("clearTimeout has not been defined")}function f(a){if(l===setTimeout)return setTimeout(a,0);if((l===d||!l)&&setTimeout)return l=setTimeout,setTimeout(a,0);try{return l(a,0)}catch(b){try{return l.call(null,a,0)}catch(b){return l.call(this,a,0)}}}function g(a){if(m===clearTimeout)return clearTimeout(a);if((m===e||!m)&&clearTimeout)return m=clearTimeout,clearTimeout(a);try{return m(a)}catch(b){try{return m.call(null,a)}catch(b){return m.call(this,a)}}}function h(){q&&o&&(q=!1,o.length?p=o.concat(p):r=-1,p.length&&i())}function i(){if(!q){var a=f(h);q=!0;for(var b=p.length;b;){for(o=p,p=[];++r1)for(var c=1;c=0&&d.parseArrays&&h<=d.arrayLimit?(e=[],e[h]=a(b,c,d)):e[g]=a(b,c,d)}return e},h=function(a,b,c){if(a){var d=c.allowDots?a.replace(/\.([^\.\[]+)/g,"[$1]"):a,e=/^([^\[\]]*)/,f=/(\[[^\[\]]*\])/g,h=e.exec(d),i=[];if(h[1]){if(!c.plainObjects&&Object.prototype.hasOwnProperty(h[1])&&!c.allowPrototypes)return;i.push(h[1])}for(var j=0;null!==(h=f.exec(d))&&j=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122?c+=b.charAt(e):f<128?c+=d[f]:f<2048?c+=d[192|f>>6]+d[128|63&f]:f<55296||f>=57344?c+=d[224|f>>12]+d[128|f>>6&63]+d[128|63&f]:(e+=1,f=65536+((1023&f)<<10|1023&b.charCodeAt(e)),c+=d[240|f>>18]+d[128|f>>12&63]+d[128|f>>6&63]+d[128|63&f])}return c},c.compact=function(a,b){if("object"!=typeof a||null===a)return a;var d=b||[],e=d.indexOf(a);if(e!==-1)return d[e];if(d.push(a),Array.isArray(a)){for(var f=[],g=0;g25;){var d=a%26;b=c.charAt(d)+b,a=Math.floor(a/26)-1}return b=c.charAt(a)+b},c.makeFakeArgs=function(a){for(var b=[],d=0;d - * @license MIT - */ -angular.module("ngFeathers",[]).provider("$feathers",[function(){var a=null,b=null,c=!0,d=window.localStorage;return{setAuthStorage:function(a){d=a},setSocketOpts:function(a){b=a},useSocket:function(a){c=!!a},setEndpoint:function(b){a=b},$get:[function(){return this.app=feathers().configure(feathers.hooks()),c?(this.socket=io(a,b),this.app.configure(feathers.socketio(this.socket))):this.app.configure(feathers.rest(a).jquery(window.jQuery)),this.app.configure(feathers.authentication({storage:d})),this.app}]}}]); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.io=t():e.io=t()}(this,function(){return function(n){function r(e){if(o[e])return o[e].exports;var t=o[e]={exports:{},id:e,loaded:!1};return n[e].call(t.exports,t,t.exports,r),t.loaded=!0,t.exports}var o={};return r.m=n,r.c=o,r.p="",r(0)}([function(e,t,n){"use strict";function r(e,t){"object"===(void 0===e?"undefined":c(e))&&(t=e,e=void 0),t=t||{};var n,r=u(e),o=r.source,i=r.id,s=r.path,a=h[i]&&s in h[i].nsps;return t.forceNew||t["force new connection"]||!1===t.multiplex||a?(f("ignoring socket cache for %s",o),n=p(o,t)):(h[i]||(f("new io instance for %s",o),h[i]=p(o,t)),n=h[i]),r.query&&!t.query&&(t.query=r.query),n.socket(r.path,t)}var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u=n(1),o=n(7),p=n(13),f=n(3)("socket.io-client");e.exports=t=r;var h=t.managers={};t.protocol=o.protocol,t.connect=r,t.Manager=n(13),t.Socket=n(37)},function(e,t,n){(function(o){"use strict";var i=n(2),s=n(3)("socket.io-client:url");e.exports=function(e,t){var n=e;t=t||o.location,null==e&&(e=t.protocol+"//"+t.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?t.protocol+e:t.host+e),/^(https?|wss?):\/\//.test(e)||(s("protocol-less url %s",e),e=void 0!==t?t.protocol+"//"+e:"https://"+e),s("parse %s",e),n=i(e)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";var r=-1!==n.host.indexOf(":")?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+r+":"+n.port,n.href=n.protocol+"://"+r+(t&&t.port===n.port?"":":"+n.port),n}}).call(t,function(){return this}())},function(e,t){var a=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,c=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];e.exports=function(e){var t=e,n=e.indexOf("["),r=e.indexOf("]");-1!=n&&-1!=r&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));for(var o=a.exec(e||""),i={},s=14;s--;)i[c[s]]=o[s]||"";return-1!=n&&-1!=r&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i}},function(n,i,r){(function(t){function e(){var e;try{e=i.storage.debug}catch(e){}return!e&&void 0!==t&&"env"in t&&(e=t.env.DEBUG),e}(i=n.exports=r(5)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},i.formatArgs=function(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+i.humanize(this.diff),t){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var r=0,o=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(r++,"%c"===e&&(o=r))}),e.splice(o,0,n)}},i.save=function(e){try{null==e?i.storage.removeItem("debug"):i.storage.debug=e}catch(e){}},i.load=e,i.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&31<=parseInt(RegExp.$1,10)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},i.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),i.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],i.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},i.enable(e())}).call(i,r(4))},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(t){if(u===setTimeout)return setTimeout(t,0);if((u===n||!u)&&setTimeout)return u=setTimeout,setTimeout(t,0);try{return u(t,0)}catch(e){try{return u.call(null,t,0)}catch(e){return u.call(this,t,0)}}}function i(){d&&h&&(d=!1,h.length?l=h.concat(l):y=-1,l.length&&s())}function s(){if(!d){var e=o(i);d=!0;for(var t=l.length;t;){for(h=l,l=[];++y=this._reconnectionAttempts)f("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var e=this.backoff.duration();f("will wait %dms before reconnect attempt",e),this.reconnecting=!0;var n=setTimeout(function(){t.skipReconnect||(f("attempting reconnect"),t.emitAll("reconnect_attempt",t.backoff.attempts),t.emitAll("reconnecting",t.backoff.attempts),t.skipReconnect||t.open(function(e){e?(f("reconnect attempt error"),t.reconnecting=!1,t.reconnect(),t.emitAll("reconnect_error",e.data)):(f("reconnect success"),t.onreconnect())}))},e);this.subs.push({destroy:function(){clearTimeout(n)}})}},r.prototype.onreconnect=function(){var e=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",e)}},function(e,t,n){e.exports=n(15),e.exports.parser=n(22)},function(t,e,n){(function(r){function f(e,t){if(!(this instanceof f))return new f(e,t);t=t||{},e&&"object"==typeof e&&(t=e,e=null),e?(e=a(e),t.hostname=e.host,t.secure="https"===e.protocol||"wss"===e.protocol,t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=a(t.host).host),this.secure=null!=t.secure?t.secure:r.location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.agent=t.agent||!1,this.hostname=t.hostname||(r.location?location.hostname:"localhost"),this.port=t.port||(r.location&&location.port?location.port:this.secure?443:80),this.query=t.query||{},"string"==typeof this.query&&(this.query=c.decode(this.query)),this.upgrade=!1!==t.upgrade,this.path=(t.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!t.forceJSONP,this.jsonp=!1!==t.jsonp,this.forceBase64=!!t.forceBase64,this.enablesXDR=!!t.enablesXDR,this.timestampParam=t.timestampParam||"t",this.timestampRequests=t.timestampRequests,this.transports=t.transports||["polling","websocket"],this.transportOptions=t.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=t.policyPort||843,this.rememberUpgrade=t.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=t.onlyBinaryUpgrades,this.perMessageDeflate=!1!==t.perMessageDeflate&&(t.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=t.pfx||null,this.key=t.key||null,this.passphrase=t.passphrase||null,this.cert=t.cert||null,this.ca=t.ca||null,this.ciphers=t.ciphers||null,this.rejectUnauthorized=void 0===t.rejectUnauthorized||t.rejectUnauthorized,this.forceNode=!!t.forceNode;var n="object"==typeof r&&r;n.global===n&&(t.extraHeaders&&0>t&63|128)}function c(e,t){if(0==(4294967168&e))return h(e);var n="";return 0==(4294965248&e)?n=h(e>>6&31|192):0==(4294901760&e)?(r(e,t)||(e=65533),n=h(e>>12&15|224),n+=o(e,6)):0==(4292870144&e)&&(n=h(e>>18&7|240),n+=o(e,12),n+=o(e,6)),n+h(63&e|128)}function i(){if(p<=f)throw Error("Invalid byte index");var e=255&u[f];if(f++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function s(e){var t,n;if(p>>10&1023|55296),t=56320|1023&t),o+=h(t);return o}(o)}};void 0===(v=function(){return n}.call(y,m,y,l))||(l.exports=v)}()}).call(y,m(27)(e),function(){return this}())},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t){!function(){"use strict";for(var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=new Uint8Array(256),e=0;e>2],o+=i[(3&n[t])<<4|n[t+1]>>4],o+=i[(15&n[t+1])<<2|n[t+2]>>6],o+=i[63&n[t+2]];return r%3==2?o=o.substring(0,o.length-1)+"=":r%3==1&&(o=o.substring(0,o.length-2)+"=="),o},t.decode=function(e){var t,n,r,o,i,s=.75*e.length,a=e.length,c=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);var u=new ArrayBuffer(s),p=new Uint8Array(u);for(t=0;t>4,p[c++]=(15&r)<<4|o>>2,p[c++]=(3&o)<<6|63&i;return u}}()},function(c,e){(function(e){function o(e){for(var t=0;t';i=document.createElement(e)}catch(e){(i=document.createElement("iframe")).name=o.iframeId,i.src="javascript:0"}i.id=o.iframeId,o.form.appendChild(i),o.iframe=i}var o=this;if(!this.form){var i,s=document.createElement("form"),a=document.createElement("textarea"),c=this.iframeId="eio_iframe_"+this.index;s.className="socketio",s.style.position="absolute",s.style.top="-1000px",s.style.left="-1000px",s.target=c,s.method="POST",s.setAttribute("accept-charset","utf-8"),a.name="d",s.appendChild(a),document.body.appendChild(s),this.form=s,this.area=a}this.form.action=this.uri(),r(),e=e.replace(p,"\\\n"),this.area.value=e.replace(u,"\\n");try{this.form.submit()}catch(e){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===o.iframe.readyState&&n()}:this.iframe.onload=n}}).call(e,function(){return this}())},function(f,e,h){(function(i){function e(e){e&&e.forceBase64&&(this.supportsBinary=!1),this.perMessageDeflate=e.perMessageDeflate,this.usingBrowserWebSocket=u&&!e.forceNode,this.protocols=e.protocols,this.usingBrowserWebSocket||(p=t),n.call(this,e)}var t,n=h(21),s=h(22),r=h(30),o=h(31),a=h(32),c=h(3)("engine.io-client:websocket"),u=i.WebSocket||i.MozWebSocket;if("undefined"==typeof window)try{t=h(35)}catch(e){}var p=u;p||"undefined"!=typeof window||(p=t),o(f.exports=e,n),e.prototype.name="websocket",e.prototype.supportsBinary=!0,e.prototype.doOpen=function(){if(this.check()){var e=this.uri(),t=this.protocols,n={agent:this.agent,perMessageDeflate:this.perMessageDeflate};n.pfx=this.pfx,n.key=this.key,n.passphrase=this.passphrase,n.cert=this.cert,n.ca=this.ca,n.ciphers=this.ciphers,n.rejectUnauthorized=this.rejectUnauthorized,this.extraHeaders&&(n.headers=this.extraHeaders),this.localAddress&&(n.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket?t?new p(e,t):new p(e):new p(e,t,n)}catch(e){return this.emit("error",e)}void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},e.prototype.addEventListeners=function(){var t=this;this.ws.onopen=function(){t.onOpen()},this.ws.onclose=function(){t.onClose()},this.ws.onmessage=function(e){t.onData(e.data)},this.ws.onerror=function(e){t.onError("websocket error",e)}},e.prototype.write=function(e){var r=this;this.writable=!1;for(var o=e.length,t=0,n=o;t(new Date).getTime())},t.getCookie=function(e){if("undefined"!=typeof document){var t=("; "+document.cookie).split("; "+e+"=");if(2===t.length)return t.pop().split(";").shift()}return null},t.clearCookie=function(e){return"undefined"!=typeof document&&(document.cookie=e+"=;expires=Thu, 01 Jan 1970 00:00:01 GMT;"),null}},"./node_modules/@feathersjs/commons/lib/arguments.js":function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o={find:1,get:2,create:2,update:3,patch:3,remove:2};function i(e){return"object"===(void 0===e?"undefined":r(e))&&null!==e}t.validateArguments=function(e,t){if("function"==typeof t[t.length-1])throw new Error("Callbacks are no longer supported. Use Promises or async/await instead.");var n=o[e];if(n&&t.length>n)throw new Error("Too many arguments for '"+e+"' method");var r=t[n-1];if(void 0!==r&&!i(r))throw new Error("Params for '"+e+"' method must be an object");switch(e){case"create":if(!i(t[0]))throw new Error("A data object must be provided to the 'create' method");break;case"get":case"remove":case"update":case"patch":if(void 0===t[0])throw new Error("An id must be provided to the '"+e+"' method");if(("update"===e||"patch"===e)&&!i(t[1]))throw new Error("A data object must be provided to the '"+e+"' method")}return!0}},"./node_modules/@feathersjs/commons/lib/commons.js":function(e,t,n){"use strict";var r=n("./node_modules/@feathersjs/commons/lib/utils.js"),o=n("./node_modules/@feathersjs/commons/lib/hooks.js"),i=n("./node_modules/@feathersjs/commons/lib/arguments.js"),s=n("./node_modules/@feathersjs/commons/lib/filter-query.js");e.exports=Object.assign({},r,i,{hooks:o,filterQuery:s})},"./node_modules/@feathersjs/commons/lib/filter-query.js":function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=n("./node_modules/@feathersjs/commons/lib/utils.js")._,i=["$sort","$limit","$skip","$select","$populate"];function s(e){if(void 0!==e)return Math.abs(parseInt(e,10))}e.exports=function(e,t){return{filters:{$sort:function(t){if("object"!==(void 0===t?"undefined":r(t))||Array.isArray(t))return t;var n={};return Object.keys(t).forEach(function(e){n[e]="object"===r(t[e])?t[e]:parseInt(t[e],10)}),n}(e.$sort),$limit:function(e,t){if(t&&t.default){var n="number"==typeof e?e:t.default,r="number"==typeof t.max?t.max:Number.MAX_VALUE;return Math.min(n,r)}return e}(s(e.$limit),t),$skip:s(e.$skip),$select:e.$select,$populate:e.$populate},query:o.omit.apply(o,[e].concat(i))}}},"./node_modules/@feathersjs/commons/lib/hooks.js":function(e,s,t){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n=t("./node_modules/@feathersjs/commons/lib/utils.js")._,a=n.each,o=n.pick;function i(e){var t=e[0],n=e[1];return{id:t,params:void 0===n?{}:n}}function c(e){var t=e[0],n=e[1],r=e[2];return{id:t,data:n,params:void 0===r?{}:r}}var u=s.SKIP="undefined"!=typeof Symbol?Symbol("__feathersSkipHooks"):"__feathersSkipHooks";s.converters={find:function(e){var t=e[0];return{params:void 0===t?{}:t}},create:function(e){var t=e[0],n=e[1];return{data:t,params:void 0===n?{}:n}},get:i,remove:i,update:c,patch:c},s.createHookObject=function(e,t){var r=2r[t]&&(o+=1*e)}),o}},c.isPromise=function(e){return s.isObject(e)&&"function"==typeof e.then},c.makeUrl=function(e){var t=1>(-2*o&6)):0)r=a.indexOf(r);return s}},"./node_modules/jwt-decode/lib/base64_url_decode.js":function(e,t,n){var r=n("./node_modules/jwt-decode/lib/atob.js");e.exports=function(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return decodeURIComponent(r(t).replace(/(.)/g,function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}catch(e){return r(t)}}},"./node_modules/jwt-decode/lib/index.js":function(e,t,n){"use strict";var r=n("./node_modules/jwt-decode/lib/base64_url_decode.js");function o(e){this.message=e}(o.prototype=new Error).name="InvalidTokenError",e.exports=function(e,t){if("string"!=typeof e)throw new o("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(r(e.split(".")[n]))}catch(e){throw new o("Invalid token specified: "+e.message)}},e.exports.InvalidTokenError=o},"./node_modules/ms/index.js":function(e,t){var o=1e3,i=60*o,s=60*i,a=24*s,c=365.25*a;function u(e,t,n){if(!(en&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.once=function(e,t){if(!c(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},r.prototype.removeListener=function(e,t){var n,r,o,i;if(!c(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(o=(n=this._events[e]).length,r=-1,n===t||c(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(u(n)){for(i=o;0>6]+a[128|63&o]:o<55296||57344<=o?n+=a[224|o>>12]+a[128|o>>6&63]+a[128|63&o]:(r+=1,o=65536+((1023&o)<<10|1023&t.charCodeAt(r)),n+=a[240|o>>18]+a[128|o>>12&63]+a[128|o>>6&63]+a[128|63&o])}return n},i.compact=function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r * @license MIT */ @@ -34,7 +34,6 @@ angular $get: [ function () { this.app = feathers() - .configure(feathers.hooks()) if (useSocket) { this.socket = io(endpoint, socketOpts) From 481d0fd45253ec3666137487d86e42cd35a0d487 Mon Sep 17 00:00:00 2001 From: Maik Hummel Date: Thu, 8 Mar 2018 10:34:16 +0100 Subject: [PATCH 2/4] Update package and LICENSE --- LICENSE | 21 +++++++++++++++++++++ package.json | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..1fa9ff4 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017-2018 Maik Hummel + +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. diff --git a/package.json b/package.json index 84bb745..f2bf684 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "clean": "rm -r bower_components/ node_modules/", "init": "npm i && bower i" }, - "author": "Maik Hummel (https://beevelop.com)", + "author": "Maik Hummel (https://beevelop.com)", "license": "MIT", "dependencies": {}, "devDependencies": { From f4de57034316c7bb116cc8ddaa00a7a9a5d8cb46 Mon Sep 17 00:00:00 2001 From: Maik Hummel Date: Fri, 20 Apr 2018 10:57:26 +0200 Subject: [PATCH 3/4] Update Feathers v3.4.4 and Socket v2.1.0 (close #59, close #60) --- bower.json | 6 +++--- package.json | 2 +- src/ng-feathers.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bower.json b/bower.json index d2fd03e..23a09e2 100644 --- a/bower.json +++ b/bower.json @@ -3,7 +3,7 @@ "description": "Feathers client for AngularJS", "main": "src/ng-feathers.js", "authors": [ - "Maik Hummel (https://beevelop.com)" + "Maik Hummel (https://beevelop.com)" ], "license": "MIT", "moduleType": [], @@ -16,7 +16,7 @@ "tests" ], "dependencies": { - "feathers-client": "3.4.3", - "socket.io-client": "2.0.4" + "feathers-client": "3.4.4", + "socket.io-client": "2.1.0" } } diff --git a/package.json b/package.json index f2bf684..0c728b7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ng-feathers", - "version": "3.4.3", + "version": "3.4.4", "description": "Feathers client for AngularJS", "main": "src/ng-feathers.js", "scripts": { diff --git a/src/ng-feathers.js b/src/ng-feathers.js index 30fe83f..8245bcd 100644 --- a/src/ng-feathers.js +++ b/src/ng-feathers.js @@ -1,8 +1,8 @@ /** * ngFeathers * - * @version 3.4.3 - * @author Maik Hummel + * @version 3.4.4 + * @author Maik Hummel * @license MIT */ From 4e5b639c4daf8d125cbfc359694a9decaf0c54aa Mon Sep 17 00:00:00 2001 From: Maik Hummel Date: Fri, 20 Apr 2018 10:59:13 +0200 Subject: [PATCH 4/4] Update standalone file --- dist/ng-feathers.standalone.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/ng-feathers.standalone.min.js b/dist/ng-feathers.standalone.min.js index 24f2222..09be877 100644 --- a/dist/ng-feathers.standalone.min.js +++ b/dist/ng-feathers.standalone.min.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.io=t():e.io=t()}(this,function(){return function(n){function r(e){if(o[e])return o[e].exports;var t=o[e]={exports:{},id:e,loaded:!1};return n[e].call(t.exports,t,t.exports,r),t.loaded=!0,t.exports}var o={};return r.m=n,r.c=o,r.p="",r(0)}([function(e,t,n){"use strict";function r(e,t){"object"===(void 0===e?"undefined":c(e))&&(t=e,e=void 0),t=t||{};var n,r=u(e),o=r.source,i=r.id,s=r.path,a=h[i]&&s in h[i].nsps;return t.forceNew||t["force new connection"]||!1===t.multiplex||a?(f("ignoring socket cache for %s",o),n=p(o,t)):(h[i]||(f("new io instance for %s",o),h[i]=p(o,t)),n=h[i]),r.query&&!t.query&&(t.query=r.query),n.socket(r.path,t)}var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u=n(1),o=n(7),p=n(13),f=n(3)("socket.io-client");e.exports=t=r;var h=t.managers={};t.protocol=o.protocol,t.connect=r,t.Manager=n(13),t.Socket=n(37)},function(e,t,n){(function(o){"use strict";var i=n(2),s=n(3)("socket.io-client:url");e.exports=function(e,t){var n=e;t=t||o.location,null==e&&(e=t.protocol+"//"+t.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?t.protocol+e:t.host+e),/^(https?|wss?):\/\//.test(e)||(s("protocol-less url %s",e),e=void 0!==t?t.protocol+"//"+e:"https://"+e),s("parse %s",e),n=i(e)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";var r=-1!==n.host.indexOf(":")?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+r+":"+n.port,n.href=n.protocol+"://"+r+(t&&t.port===n.port?"":":"+n.port),n}}).call(t,function(){return this}())},function(e,t){var a=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,c=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];e.exports=function(e){var t=e,n=e.indexOf("["),r=e.indexOf("]");-1!=n&&-1!=r&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));for(var o=a.exec(e||""),i={},s=14;s--;)i[c[s]]=o[s]||"";return-1!=n&&-1!=r&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i}},function(n,i,r){(function(t){function e(){var e;try{e=i.storage.debug}catch(e){}return!e&&void 0!==t&&"env"in t&&(e=t.env.DEBUG),e}(i=n.exports=r(5)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},i.formatArgs=function(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+i.humanize(this.diff),t){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var r=0,o=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(r++,"%c"===e&&(o=r))}),e.splice(o,0,n)}},i.save=function(e){try{null==e?i.storage.removeItem("debug"):i.storage.debug=e}catch(e){}},i.load=e,i.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&31<=parseInt(RegExp.$1,10)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},i.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),i.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],i.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},i.enable(e())}).call(i,r(4))},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(t){if(u===setTimeout)return setTimeout(t,0);if((u===n||!u)&&setTimeout)return u=setTimeout,setTimeout(t,0);try{return u(t,0)}catch(e){try{return u.call(null,t,0)}catch(e){return u.call(this,t,0)}}}function i(){d&&h&&(d=!1,h.length?l=h.concat(l):y=-1,l.length&&s())}function s(){if(!d){var e=o(i);d=!0;for(var t=l.length;t;){for(h=l,l=[];++y=this._reconnectionAttempts)f("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var e=this.backoff.duration();f("will wait %dms before reconnect attempt",e),this.reconnecting=!0;var n=setTimeout(function(){t.skipReconnect||(f("attempting reconnect"),t.emitAll("reconnect_attempt",t.backoff.attempts),t.emitAll("reconnecting",t.backoff.attempts),t.skipReconnect||t.open(function(e){e?(f("reconnect attempt error"),t.reconnecting=!1,t.reconnect(),t.emitAll("reconnect_error",e.data)):(f("reconnect success"),t.onreconnect())}))},e);this.subs.push({destroy:function(){clearTimeout(n)}})}},r.prototype.onreconnect=function(){var e=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",e)}},function(e,t,n){e.exports=n(15),e.exports.parser=n(22)},function(t,e,n){(function(r){function f(e,t){if(!(this instanceof f))return new f(e,t);t=t||{},e&&"object"==typeof e&&(t=e,e=null),e?(e=a(e),t.hostname=e.host,t.secure="https"===e.protocol||"wss"===e.protocol,t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=a(t.host).host),this.secure=null!=t.secure?t.secure:r.location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.agent=t.agent||!1,this.hostname=t.hostname||(r.location?location.hostname:"localhost"),this.port=t.port||(r.location&&location.port?location.port:this.secure?443:80),this.query=t.query||{},"string"==typeof this.query&&(this.query=c.decode(this.query)),this.upgrade=!1!==t.upgrade,this.path=(t.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!t.forceJSONP,this.jsonp=!1!==t.jsonp,this.forceBase64=!!t.forceBase64,this.enablesXDR=!!t.enablesXDR,this.timestampParam=t.timestampParam||"t",this.timestampRequests=t.timestampRequests,this.transports=t.transports||["polling","websocket"],this.transportOptions=t.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=t.policyPort||843,this.rememberUpgrade=t.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=t.onlyBinaryUpgrades,this.perMessageDeflate=!1!==t.perMessageDeflate&&(t.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=t.pfx||null,this.key=t.key||null,this.passphrase=t.passphrase||null,this.cert=t.cert||null,this.ca=t.ca||null,this.ciphers=t.ciphers||null,this.rejectUnauthorized=void 0===t.rejectUnauthorized||t.rejectUnauthorized,this.forceNode=!!t.forceNode;var n="object"==typeof r&&r;n.global===n&&(t.extraHeaders&&0>t&63|128)}function c(e,t){if(0==(4294967168&e))return h(e);var n="";return 0==(4294965248&e)?n=h(e>>6&31|192):0==(4294901760&e)?(r(e,t)||(e=65533),n=h(e>>12&15|224),n+=o(e,6)):0==(4292870144&e)&&(n=h(e>>18&7|240),n+=o(e,12),n+=o(e,6)),n+h(63&e|128)}function i(){if(p<=f)throw Error("Invalid byte index");var e=255&u[f];if(f++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function s(e){var t,n;if(p>>10&1023|55296),t=56320|1023&t),o+=h(t);return o}(o)}};void 0===(v=function(){return n}.call(y,m,y,l))||(l.exports=v)}()}).call(y,m(27)(e),function(){return this}())},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t){!function(){"use strict";for(var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=new Uint8Array(256),e=0;e>2],o+=i[(3&n[t])<<4|n[t+1]>>4],o+=i[(15&n[t+1])<<2|n[t+2]>>6],o+=i[63&n[t+2]];return r%3==2?o=o.substring(0,o.length-1)+"=":r%3==1&&(o=o.substring(0,o.length-2)+"=="),o},t.decode=function(e){var t,n,r,o,i,s=.75*e.length,a=e.length,c=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);var u=new ArrayBuffer(s),p=new Uint8Array(u);for(t=0;t>4,p[c++]=(15&r)<<4|o>>2,p[c++]=(3&o)<<6|63&i;return u}}()},function(c,e){(function(e){function o(e){for(var t=0;t';i=document.createElement(e)}catch(e){(i=document.createElement("iframe")).name=o.iframeId,i.src="javascript:0"}i.id=o.iframeId,o.form.appendChild(i),o.iframe=i}var o=this;if(!this.form){var i,s=document.createElement("form"),a=document.createElement("textarea"),c=this.iframeId="eio_iframe_"+this.index;s.className="socketio",s.style.position="absolute",s.style.top="-1000px",s.style.left="-1000px",s.target=c,s.method="POST",s.setAttribute("accept-charset","utf-8"),a.name="d",s.appendChild(a),document.body.appendChild(s),this.form=s,this.area=a}this.form.action=this.uri(),r(),e=e.replace(p,"\\\n"),this.area.value=e.replace(u,"\\n");try{this.form.submit()}catch(e){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===o.iframe.readyState&&n()}:this.iframe.onload=n}}).call(e,function(){return this}())},function(f,e,h){(function(i){function e(e){e&&e.forceBase64&&(this.supportsBinary=!1),this.perMessageDeflate=e.perMessageDeflate,this.usingBrowserWebSocket=u&&!e.forceNode,this.protocols=e.protocols,this.usingBrowserWebSocket||(p=t),n.call(this,e)}var t,n=h(21),s=h(22),r=h(30),o=h(31),a=h(32),c=h(3)("engine.io-client:websocket"),u=i.WebSocket||i.MozWebSocket;if("undefined"==typeof window)try{t=h(35)}catch(e){}var p=u;p||"undefined"!=typeof window||(p=t),o(f.exports=e,n),e.prototype.name="websocket",e.prototype.supportsBinary=!0,e.prototype.doOpen=function(){if(this.check()){var e=this.uri(),t=this.protocols,n={agent:this.agent,perMessageDeflate:this.perMessageDeflate};n.pfx=this.pfx,n.key=this.key,n.passphrase=this.passphrase,n.cert=this.cert,n.ca=this.ca,n.ciphers=this.ciphers,n.rejectUnauthorized=this.rejectUnauthorized,this.extraHeaders&&(n.headers=this.extraHeaders),this.localAddress&&(n.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket?t?new p(e,t):new p(e):new p(e,t,n)}catch(e){return this.emit("error",e)}void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},e.prototype.addEventListeners=function(){var t=this;this.ws.onopen=function(){t.onOpen()},this.ws.onclose=function(){t.onClose()},this.ws.onmessage=function(e){t.onData(e.data)},this.ws.onerror=function(e){t.onError("websocket error",e)}},e.prototype.write=function(e){var r=this;this.writable=!1;for(var o=e.length,t=0,n=o;t(new Date).getTime())},t.getCookie=function(e){if("undefined"!=typeof document){var t=("; "+document.cookie).split("; "+e+"=");if(2===t.length)return t.pop().split(";").shift()}return null},t.clearCookie=function(e){return"undefined"!=typeof document&&(document.cookie=e+"=;expires=Thu, 01 Jan 1970 00:00:01 GMT;"),null}},"./node_modules/@feathersjs/commons/lib/arguments.js":function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o={find:1,get:2,create:2,update:3,patch:3,remove:2};function i(e){return"object"===(void 0===e?"undefined":r(e))&&null!==e}t.validateArguments=function(e,t){if("function"==typeof t[t.length-1])throw new Error("Callbacks are no longer supported. Use Promises or async/await instead.");var n=o[e];if(n&&t.length>n)throw new Error("Too many arguments for '"+e+"' method");var r=t[n-1];if(void 0!==r&&!i(r))throw new Error("Params for '"+e+"' method must be an object");switch(e){case"create":if(!i(t[0]))throw new Error("A data object must be provided to the 'create' method");break;case"get":case"remove":case"update":case"patch":if(void 0===t[0])throw new Error("An id must be provided to the '"+e+"' method");if(("update"===e||"patch"===e)&&!i(t[1]))throw new Error("A data object must be provided to the '"+e+"' method")}return!0}},"./node_modules/@feathersjs/commons/lib/commons.js":function(e,t,n){"use strict";var r=n("./node_modules/@feathersjs/commons/lib/utils.js"),o=n("./node_modules/@feathersjs/commons/lib/hooks.js"),i=n("./node_modules/@feathersjs/commons/lib/arguments.js"),s=n("./node_modules/@feathersjs/commons/lib/filter-query.js");e.exports=Object.assign({},r,i,{hooks:o,filterQuery:s})},"./node_modules/@feathersjs/commons/lib/filter-query.js":function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=n("./node_modules/@feathersjs/commons/lib/utils.js")._,i=["$sort","$limit","$skip","$select","$populate"];function s(e){if(void 0!==e)return Math.abs(parseInt(e,10))}e.exports=function(e,t){return{filters:{$sort:function(t){if("object"!==(void 0===t?"undefined":r(t))||Array.isArray(t))return t;var n={};return Object.keys(t).forEach(function(e){n[e]="object"===r(t[e])?t[e]:parseInt(t[e],10)}),n}(e.$sort),$limit:function(e,t){if(t&&t.default){var n="number"==typeof e?e:t.default,r="number"==typeof t.max?t.max:Number.MAX_VALUE;return Math.min(n,r)}return e}(s(e.$limit),t),$skip:s(e.$skip),$select:e.$select,$populate:e.$populate},query:o.omit.apply(o,[e].concat(i))}}},"./node_modules/@feathersjs/commons/lib/hooks.js":function(e,s,t){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n=t("./node_modules/@feathersjs/commons/lib/utils.js")._,a=n.each,o=n.pick;function i(e){var t=e[0],n=e[1];return{id:t,params:void 0===n?{}:n}}function c(e){var t=e[0],n=e[1],r=e[2];return{id:t,data:n,params:void 0===r?{}:r}}var u=s.SKIP="undefined"!=typeof Symbol?Symbol("__feathersSkipHooks"):"__feathersSkipHooks";s.converters={find:function(e){var t=e[0];return{params:void 0===t?{}:t}},create:function(e){var t=e[0],n=e[1];return{data:t,params:void 0===n?{}:n}},get:i,remove:i,update:c,patch:c},s.createHookObject=function(e,t){var r=2r[t]&&(o+=1*e)}),o}},c.isPromise=function(e){return s.isObject(e)&&"function"==typeof e.then},c.makeUrl=function(e){var t=1>(-2*o&6)):0)r=a.indexOf(r);return s}},"./node_modules/jwt-decode/lib/base64_url_decode.js":function(e,t,n){var r=n("./node_modules/jwt-decode/lib/atob.js");e.exports=function(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return decodeURIComponent(r(t).replace(/(.)/g,function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}catch(e){return r(t)}}},"./node_modules/jwt-decode/lib/index.js":function(e,t,n){"use strict";var r=n("./node_modules/jwt-decode/lib/base64_url_decode.js");function o(e){this.message=e}(o.prototype=new Error).name="InvalidTokenError",e.exports=function(e,t){if("string"!=typeof e)throw new o("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(r(e.split(".")[n]))}catch(e){throw new o("Invalid token specified: "+e.message)}},e.exports.InvalidTokenError=o},"./node_modules/ms/index.js":function(e,t){var o=1e3,i=60*o,s=60*i,a=24*s,c=365.25*a;function u(e,t,n){if(!(en&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.once=function(e,t){if(!c(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},r.prototype.removeListener=function(e,t){var n,r,o,i;if(!c(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(o=(n=this._events[e]).length,r=-1,n===t||c(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(u(n)){for(i=o;0>6]+a[128|63&o]:o<55296||57344<=o?n+=a[224|o>>12]+a[128|o>>6&63]+a[128|63&o]:(r+=1,o=65536+((1023&o)<<10|1023&t.charCodeAt(r)),n+=a[240|o>>18]+a[128|o>>12&63]+a[128|o>>6&63]+a[128|63&o])}return n},i.compact=function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r=this._reconnectionAttempts)f("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var e=this.backoff.duration();f("will wait %dms before reconnect attempt",e),this.reconnecting=!0;var n=setTimeout(function(){t.skipReconnect||(f("attempting reconnect"),t.emitAll("reconnect_attempt",t.backoff.attempts),t.emitAll("reconnecting",t.backoff.attempts),t.skipReconnect||t.open(function(e){e?(f("reconnect attempt error"),t.reconnecting=!1,t.reconnect(),t.emitAll("reconnect_error",e.data)):(f("reconnect success"),t.onreconnect())}))},e);this.subs.push({destroy:function(){clearTimeout(n)}})}},r.prototype.onreconnect=function(){var e=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",e)}},function(e,t,n){e.exports=n(14),e.exports.parser=n(21)},function(t,e,n){(function(r){function f(e,t){if(!(this instanceof f))return new f(e,t);t=t||{},e&&"object"==typeof e&&(t=e,e=null),e?(e=a(e),t.hostname=e.host,t.secure="https"===e.protocol||"wss"===e.protocol,t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=a(t.host).host),this.secure=null!=t.secure?t.secure:r.location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.agent=t.agent||!1,this.hostname=t.hostname||(r.location?location.hostname:"localhost"),this.port=t.port||(r.location&&location.port?location.port:this.secure?443:80),this.query=t.query||{},"string"==typeof this.query&&(this.query=c.decode(this.query)),this.upgrade=!1!==t.upgrade,this.path=(t.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!t.forceJSONP,this.jsonp=!1!==t.jsonp,this.forceBase64=!!t.forceBase64,this.enablesXDR=!!t.enablesXDR,this.timestampParam=t.timestampParam||"t",this.timestampRequests=t.timestampRequests,this.transports=t.transports||["polling","websocket"],this.transportOptions=t.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=t.policyPort||843,this.rememberUpgrade=t.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=t.onlyBinaryUpgrades,this.perMessageDeflate=!1!==t.perMessageDeflate&&(t.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=t.pfx||null,this.key=t.key||null,this.passphrase=t.passphrase||null,this.cert=t.cert||null,this.ca=t.ca||null,this.ciphers=t.ciphers||null,this.rejectUnauthorized=void 0===t.rejectUnauthorized||t.rejectUnauthorized,this.forceNode=!!t.forceNode;var n="object"==typeof r&&r;n.global===n&&(t.extraHeaders&&0>t&63|128)}function c(e,t){if(0==(4294967168&e))return h(e);var n="";return 0==(4294965248&e)?n=h(e>>6&31|192):0==(4294901760&e)?(r(e,t)||(e=65533),n=h(e>>12&15|224),n+=o(e,6)):0==(4292870144&e)&&(n=h(e>>18&7|240),n+=o(e,12),n+=o(e,6)),n+h(63&e|128)}function i(){if(p<=f)throw Error("Invalid byte index");var e=255&u[f];if(f++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function s(e){var t,n;if(p>>10&1023|55296),t=56320|1023&t),o+=h(t);return o}(o)}};void 0===(v=function(){return n}.call(y,m,y,l))||(l.exports=v)}()}).call(y,m(27)(e),function(){return this}())},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t){!function(){"use strict";for(var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=new Uint8Array(256),e=0;e>2],o+=i[(3&n[t])<<4|n[t+1]>>4],o+=i[(15&n[t+1])<<2|n[t+2]>>6],o+=i[63&n[t+2]];return r%3==2?o=o.substring(0,o.length-1)+"=":r%3==1&&(o=o.substring(0,o.length-2)+"=="),o},t.decode=function(e){var t,n,r,o,i,s=.75*e.length,a=e.length,c=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);var u=new ArrayBuffer(s),p=new Uint8Array(u);for(t=0;t>4,p[c++]=(15&r)<<4|o>>2,p[c++]=(3&o)<<6|63&i;return u}}()},function(c,e){(function(e){function o(e){for(var t=0;t';i=document.createElement(e)}catch(e){(i=document.createElement("iframe")).name=o.iframeId,i.src="javascript:0"}i.id=o.iframeId,o.form.appendChild(i),o.iframe=i}var o=this;if(!this.form){var i,s=document.createElement("form"),a=document.createElement("textarea"),c=this.iframeId="eio_iframe_"+this.index;s.className="socketio",s.style.position="absolute",s.style.top="-1000px",s.style.left="-1000px",s.target=c,s.method="POST",s.setAttribute("accept-charset","utf-8"),a.name="d",s.appendChild(a),document.body.appendChild(s),this.form=s,this.area=a}this.form.action=this.uri(),r(),e=e.replace(p,"\\\n"),this.area.value=e.replace(u,"\\n");try{this.form.submit()}catch(e){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===o.iframe.readyState&&n()}:this.iframe.onload=n}}).call(e,function(){return this}())},function(f,e,h){(function(i){function e(e){e&&e.forceBase64&&(this.supportsBinary=!1),this.perMessageDeflate=e.perMessageDeflate,this.usingBrowserWebSocket=u&&!e.forceNode,this.protocols=e.protocols,this.usingBrowserWebSocket||(p=t),n.call(this,e)}var t,n=h(20),s=h(21),r=h(30),o=h(31),a=h(32),c=h(3)("engine.io-client:websocket"),u=i.WebSocket||i.MozWebSocket;if("undefined"==typeof window)try{t=h(35)}catch(e){}var p=u;p||"undefined"!=typeof window||(p=t),o(f.exports=e,n),e.prototype.name="websocket",e.prototype.supportsBinary=!0,e.prototype.doOpen=function(){if(this.check()){var e=this.uri(),t=this.protocols,n={agent:this.agent,perMessageDeflate:this.perMessageDeflate};n.pfx=this.pfx,n.key=this.key,n.passphrase=this.passphrase,n.cert=this.cert,n.ca=this.ca,n.ciphers=this.ciphers,n.rejectUnauthorized=this.rejectUnauthorized,this.extraHeaders&&(n.headers=this.extraHeaders),this.localAddress&&(n.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket?t?new p(e,t):new p(e):new p(e,t,n)}catch(e){return this.emit("error",e)}void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},e.prototype.addEventListeners=function(){var t=this;this.ws.onopen=function(){t.onOpen()},this.ws.onclose=function(){t.onClose()},this.ws.onmessage=function(e){t.onData(e.data)},this.ws.onerror=function(e){t.onError("websocket error",e)}},e.prototype.write=function(e){var r=this;this.writable=!1;for(var o=e.length,t=0,n=o;t(new Date).getTime())},t.getCookie=function(e){if("undefined"!=typeof document){var t=("; "+document.cookie).split("; "+e+"=");if(2===t.length)return t.pop().split(";").shift()}return null},t.clearCookie=function(e){return"undefined"!=typeof document&&(document.cookie=e+"=;expires=Thu, 01 Jan 1970 00:00:01 GMT;"),null}},"./node_modules/@feathersjs/commons/lib/arguments.js":function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o={find:1,get:2,create:2,update:3,patch:3,remove:2};function i(e){return"object"===(void 0===e?"undefined":r(e))&&null!==e}t.validateArguments=function(e,t){if("function"==typeof t[t.length-1])throw new Error("Callbacks are no longer supported. Use Promises or async/await instead.");var n=o[e];if(n&&t.length>n)throw new Error("Too many arguments for '"+e+"' method");var r=t[n-1];if(void 0!==r&&!i(r))throw new Error("Params for '"+e+"' method must be an object");switch(e){case"create":if(!i(t[0]))throw new Error("A data object must be provided to the 'create' method");break;case"get":case"remove":case"update":case"patch":if(void 0===t[0])throw new Error("An id must be provided to the '"+e+"' method");if(("update"===e||"patch"===e)&&!i(t[1]))throw new Error("A data object must be provided to the '"+e+"' method")}return!0}},"./node_modules/@feathersjs/commons/lib/commons.js":function(e,t,n){"use strict";var r=n("./node_modules/@feathersjs/commons/lib/utils.js"),o=n("./node_modules/@feathersjs/commons/lib/hooks.js"),i=n("./node_modules/@feathersjs/commons/lib/arguments.js"),s=n("./node_modules/@feathersjs/commons/lib/filter-query.js");e.exports=Object.assign({},r,i,{hooks:o,filterQuery:s})},"./node_modules/@feathersjs/commons/lib/filter-query.js":function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=n("./node_modules/@feathersjs/commons/lib/utils.js")._,i=["$sort","$limit","$skip","$select","$populate"];function s(e){if(void 0!==e)return Math.abs(parseInt(e,10))}e.exports=function(e,t){return{filters:{$sort:function(t){if("object"!==(void 0===t?"undefined":r(t))||Array.isArray(t))return t;var n={};return Object.keys(t).forEach(function(e){n[e]="object"===r(t[e])?t[e]:parseInt(t[e],10)}),n}(e.$sort),$limit:function(e,t){if(t&&t.default){var n="number"==typeof e?e:t.default,r="number"==typeof t.max?t.max:Number.MAX_VALUE;return Math.min(n,r)}return e}(s(e.$limit),t),$skip:s(e.$skip),$select:e.$select,$populate:e.$populate},query:o.omit.apply(o,[e].concat(i))}}},"./node_modules/@feathersjs/commons/lib/hooks.js":function(e,s,t){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n=t("./node_modules/@feathersjs/commons/lib/utils.js")._,a=n.each,o=n.pick;function i(e){var t=e[0],n=e[1];return{id:t,params:void 0===n?{}:n}}function c(e){var t=e[0],n=e[1],r=e[2];return{id:t,data:n,params:void 0===r?{}:r}}var u=s.SKIP="undefined"!=typeof Symbol?Symbol("__feathersSkipHooks"):"__feathersSkipHooks";s.converters={find:function(e){var t=e[0];return{params:void 0===t?{}:t}},create:function(e){var t=e[0],n=e[1];return{data:t,params:void 0===n?{}:n}},get:i,remove:i,update:c,patch:c},s.createHookObject=function(e,t){var r=2r[t]&&(o+=1*e)}),o}},c.isPromise=function(e){return s.isObject(e)&&"function"==typeof e.then},c.makeUrl=function(e){var t=1>(-2*o&6)):0)r=a.indexOf(r);return s}},"./node_modules/jwt-decode/lib/base64_url_decode.js":function(e,t,n){var r=n("./node_modules/jwt-decode/lib/atob.js");e.exports=function(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return decodeURIComponent(r(t).replace(/(.)/g,function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}catch(e){return r(t)}}},"./node_modules/jwt-decode/lib/index.js":function(e,t,n){"use strict";var r=n("./node_modules/jwt-decode/lib/base64_url_decode.js");function o(e){this.message=e}(o.prototype=new Error).name="InvalidTokenError",e.exports=function(e,t){if("string"!=typeof e)throw new o("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(r(e.split(".")[n]))}catch(e){throw new o("Invalid token specified: "+e.message)}},e.exports.InvalidTokenError=o},"./node_modules/ms/index.js":function(e,t){var o=1e3,i=60*o,s=60*i,a=24*s,c=365.25*a;function u(e,t,n){if(!(en&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.once=function(e,t){if(!c(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},r.prototype.removeListener=function(e,t){var n,r,o,i;if(!c(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(o=(n=this._events[e]).length,r=-1,n===t||c(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(u(n)){for(i=o;0>6]+a[128|63&o]:o<55296||57344<=o?n+=a[224|o>>12]+a[128|o>>6&63]+a[128|63&o]:(r+=1,o=65536+((1023&o)<<10|1023&t.charCodeAt(r)),n+=a[240|o>>18]+a[128|o>>12&63]+a[128|o>>6&63]+a[128|63&o])}return n},i.compact=function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r