@data-client/core 0.9.2 → 0.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/data_client_logo_and_text.png +0 -0
- package/dist/index.umd.min.js +1 -1
- package/package.json +3 -3
- package/data_client_logo_and_text.svg +0 -50
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# [](https://dataclient.io)
|
|
2
2
|
|
|
3
3
|
[](https://circleci.com/gh/reactive/data-client)
|
|
4
4
|
[](https://app.codecov.io/gh/reactive/data-client?branch=master)
|
|
Binary file
|
package/dist/index.umd.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@data-client/normalizr")):"function"==typeof define&&define.amd?define(["exports","@data-client/normalizr"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).dataClientCore={},e.normalizr)}(this,(function(e,t){"use strict";var s="function"==typeof requestIdleCallback?requestIdleCallback:e=>setTimeout(e,0);const i="rdc/fetch",r="rdc/set",n="rdc/optimistic",a="rdc/reset",o="rdc/subscribe",l="rdc/unsubscribe",c="rdc/invalidate",h="rdc/invalidateall",d="rdc/expireall",u="rdc/gc";var p=Object.freeze({__proto__:null,FETCH_TYPE:i,SET_TYPE:r,OPTIMISTIC_TYPE:n,RESET_TYPE:a,SUBSCRIBE_TYPE:o,UNSUBSCRIBE_TYPE:l,INVALIDATE_TYPE:c,INVALIDATEALL_TYPE:h,EXPIREALL_TYPE:d,GC_TYPE:u});function f(e,t){let s;return t.endpoint.getOptimisticResponse&&t.endpoint.sideEffect?(s=function(e,{args:t,fetchedAt:s}){var i;const r=null!=(i=e.dataExpiryLength)?i:6e4,a=Date.now(),o={args:t,fetchedAt:s,date:a,expiresAt:a+r,key:e.key(...t)};return{type:n,endpoint:e,meta:o}}(t.endpoint,{args:t.meta.args,fetchedAt:t.meta.createdAt}),Object.assign({},e,{optimistic:[...e.optimistic,s]})):e}function y(e,t,s){return"AbortError"===s.name?Object.assign({},e,{optimistic:m(e,t)}):Object.assign({},e,{meta:Object.assign({},e.meta,{[t.meta.key]:{date:t.meta.date,error:s,expiresAt:t.meta.expiresAt,errorPolicy:null==t.endpoint.errorPolicy?void 0:t.endpoint.errorPolicy(s)}}),optimistic:m(e,t)})}function m(e,t){return e.optimistic.filter((e=>e.meta.key!==t.meta.key||(e.type===n?e.meta.fetchedAt!==t.meta.fetchedAt:e.meta.date>t.meta.date)))}function g(e){return function(s,o){switch(s||(s=v),o.type){case u:return o.entities.forEach((([e,t])=>{var i,r;null==(i=s.entities[e])||delete i[t],null==(r=s.entityMeta[e])||delete r[t]})),o.results.forEach((e=>{delete s.results[e],delete s.meta[e]})),s;case i:return f(s,o);case n:case r:return function(e,s,i){if(s.error)return y(e,s,s.payload);try{var r;let o;if(s.type===n){if(!s.endpoint.getOptimisticResponse)return e;try{o=s.endpoint.getOptimisticResponse.call(s.endpoint,i.snapshot(e,s.meta.fetchedAt),...s.meta.args)}catch(t){var a;if("AbortOptimistic"===(null==(a=t.constructor)?void 0:a.name))return e;throw t}}else o=s.payload;const{result:l,entities:c,indexes:h,entityMeta:d}=t.normalize(o,s.endpoint.schema,s.meta.args,e.entities,e.indexes,e.entityMeta,s.meta),u=Object.assign({},e.results,{[s.meta.key]:l});try{if(s.endpoint.update){const e=s.endpoint.update(l,...s.meta.args);Object.keys(e).forEach((t=>{u[t]=e[t](u[t])}))}}catch(e){console.error(`The following error occured during Endpoint.update() for ${s.meta.key}`),console.error(e)}return{entities:c,indexes:h,results:u,entityMeta:d,meta:Object.assign({},e.meta,{[s.meta.key]:{date:s.meta.date,expiresAt:s.meta.expiresAt,prevExpiresAt:null==(r=e.meta[s.meta.key])?void 0:r.expiresAt}}),optimistic:m(e,s),lastReset:e.lastReset}}catch(t){return"object"==typeof t&&(t.message=`Error processing ${s.meta.key}\n\nFull Schema: ${JSON.stringify(s.endpoint.schema,void 0,2)}\n\nError:\n${t.message}`,"payload"in s&&(t.payload=s.payload),t.status=400),y(e,s,t)}}(s,o,e);case h:case c:return function(e,t){const s=Object.assign({},e.results),i=Object.assign({},e.meta),r=e=>{delete s[e];const t=Object.assign({},i[e],{expiresAt:0,invalidated:!0});delete t.error,i[e]=t};return t.type===c?r(t.meta.key):Object.keys(s).forEach((e=>{t.testKey(e)&&r(e)})),Object.assign({},e,{results:s,meta:i})}(s,o);case d:return function(e,t){const s=Object.assign({},e.meta);return Object.keys(s).forEach((e=>{t.testKey(e)&&(s[e]=Object.assign({},s[e],{expiresAt:1}))})),Object.assign({},e,{meta:s})}(s,o);case a:return Object.assign({},v,{lastReset:o.date});default:return s}}}const v={entities:{},indexes:{},results:{},meta:{},entityMeta:{},optimistic:[],lastReset:0};var b=Object.freeze({__proto__:null,inferResults:t.inferResults,INVALID:t.INVALID,RIC:s,initialState:v});function E(e,{args:t}){const s=e.key(...t);let r=0,n=0;const a=new Promise(((e,t)=>{[r,n]=[e,t]})),o={args:t,key:s,throttle:!e.sideEffect,resolve:r,reject:n,promise:a,createdAt:Date.now(),nm:!1};return{type:i,payload:()=>e(...t),meta:o,endpoint:e}}var L="undefined"!=typeof FormData?e=>e instanceof FormData?Object.fromEntries(e.entries()):e:e=>e;function O(e,{args:t,fetchedAt:s,response:i,error:n=!1}){var a,o;const l=n?null!=(a=e.errorExpiryLength)?a:1e3:null!=(o=e.dataExpiryLength)?o:6e4,c=Date.now(),h={args:t.map(L),fetchedAt:null!=s?s:c,date:c,expiresAt:c+l,key:e.key(...t)},d={type:r,payload:i,endpoint:e,meta:h};return n&&(d.error=!0),d}function I(e,t){return e.meta[t]}const S=e=>{throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},w=()=>v;class A{constructor({dispatch:e=S,getState:s=w,globalCache:i={entities:{},results:{}}}={}){this.fetch=(e,...s)=>{const i=E(e,{args:s});return this.dispatch(i),e.schema?i.meta.promise.then((i=>t.denormalize(i,e.schema,{},s))):i.meta.promise},this.fetchIfStale=(e,...s)=>{const{data:i,expiresAt:r,expiryStatus:n}=this.getResponse(e,...s,this.getState());return n!==t.ExpiryStatus.Invalid&&Date.now()<=r?i:this.fetch(e,...s)},this.invalidate=(e,...t)=>null!==t[0]?this.dispatch(function(e,{args:t}){return{type:c,meta:{key:e.key(...t)}}}(e,{args:t})):Promise.resolve(),this.invalidateAll=e=>this.dispatch({type:h,testKey:t=>e.testKey(t)}),this.expireAll=e=>this.dispatch({type:d,testKey:t=>e.testKey(t)}),this.resetEntireStore=()=>this.dispatch({type:a,date:Date.now()}),this.setResponse=(e,...t)=>{const s=t[t.length-1],i=O(e,{args:t.slice(0,t.length-1),response:s});return this.dispatch(i)},this.setError=(e,...t)=>{const s=t[t.length-1],i=O(e,{args:t.slice(0,t.length-1),response:s,error:!0});return this.dispatch(i)},this.resolve=(e,t)=>this.dispatch(O(e,t)),this.subscribe=(e,...t)=>null!==t[0]?this.dispatch(function(e,{args:t}){return{type:o,endpoint:e,meta:{args:t,key:e.key(...t)}}}(e,{args:t})):Promise.resolve(),this.unsubscribe=(e,...t)=>null!==t[0]?this.dispatch(function(e,{args:t}){return{type:l,endpoint:e,meta:{args:t,key:e.key(...t)}}}(e,{args:t})):Promise.resolve(),this.snapshot=(e,t)=>new x(this,e,t),this.getError=(e,...t)=>{if(null===t[0])return;const s=t[t.length-1],i=t.slice(0,t.length-1),r=e.key(...i),n=I(s,r);return void 0===s.results[r]||"soft"!==(null==n?void 0:n.errorPolicy)?null==n?void 0:n.error:void 0},this.getResponse=(e,...s)=>{const i=s[s.length-1],r=s.slice(0,s.length-1).map(L),n=1!==r.length||null!==r[0],a=n?e.key(...r):"",o=n?i.results[a]:void 0,l=e.schema,c=I(i,a);let h,d=null==c?void 0:c.expiresAt,u=!1;if(void 0===o&&void 0!==e.schema?(h=t.inferResults(e.schema,r,i.indexes,i.entities),u=!t.validateInference(h),!d&&u&&(d=1)):h=o,!n)return{data:h,expiryStatus:t.ExpiryStatus.Valid,expiresAt:1/0};if(!e.schema||!k(e.schema))return{data:h,expiryStatus:null!=c&&c.invalidated?t.ExpiryStatus.Invalid:o&&!e.invalidIfStale?t.ExpiryStatus.Valid:t.ExpiryStatus.InvalidIfStale,expiresAt:d||0};this.globalCache.results[a]||(this.globalCache.results[a]=new t.WeakEntityMap);const{data:p,paths:f}=t.denormalizeCached(h,l,i.entities,this.globalCache.entities,this.globalCache.results[a],r),y="symbol"==typeof p;d||(d=function(e,t){let s=1/0;for(const{pk:n,key:a}of e){var i,r;const e=null==(i=t[a])||null==(r=i[n])?void 0:r.expiresAt;e<s&&(s=e)}return s}(f,i.entityMeta));return{data:p,expiryStatus:null!=c&&c.invalidated||y&&(null==c||!c.error)?t.ExpiryStatus.Invalid:y||e.invalidIfStale||u?t.ExpiryStatus.InvalidIfStale:t.ExpiryStatus.Valid,expiresAt:d}},this.dispatch=e,this.getState=s,this.globalCache=i}}function k(e){if(t.isEntity(e))return!0;if(Array.isArray(e))return 0!==e.length&&k(e[0]);if(e&&("object"==typeof e||"function"==typeof e)){const t="schema"in e?e.schema:e;return"function"==typeof t?k(t):Object.values(t).some((e=>k(e)))}return!1}class x{constructor(e,t,s=0){this.state=void 0,this.controller=void 0,this.fetchedAt=void 0,this.getResponse=(e,...t)=>this.controller.getResponse(e,...t,this.state),this.getError=(e,...t)=>this.controller.getError(e,...t,this.state),this.state=t,this.controller=e,this.fetchedAt=s}}class j extends Error{constructor(){super("Aborted due to RESET"),this.name="ResetError"}}class T{isOnline(){return void 0===navigator.onLine||navigator.onLine}addOnlineListener(e){addEventListener("online",e)}removeOnlineListener(e){removeEventListener("online",e)}addOfflineListener(e){addEventListener("offline",e)}removeOfflineListener(e){removeEventListener("offline",e)}}class _{isOnline(){return!0}addOnlineListener(){}removeOnlineListener(){}addOfflineListener(){}removeOfflineListener(){}}let R;R="undefined"!=typeof navigator&&"function"==typeof addEventListener?T:_;var q=R;let P={};Object.hasOwn=Object.hasOwn||function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Object.defineProperty(e,"ExpiryStatus",{enumerable:!0,get:function(){return t.ExpiryStatus}}),e.Controller=A,e.DefaultConnectionListener=q,e.DevToolsManager=class{constructor(e,t){this.started=!1,this.actions=[],this.devTools="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__.connect(Object.assign({},P,{config:e})),this.devTools?this.middleware=e=>{this.controller=e;const s=g(e);let i=e.getState();return r=>n=>{const a=r(n);return i=this.started?s(i,n):e.getState(),a.then((()=>{null!=t&&t(n)||this.handleAction(n,i.optimistic.reduce(s,i))})),a}}:this.middleware=()=>e=>t=>e(t)}handleAction(e,t){this.started?this.devTools.send(e,t,void 0,"RDC"):this.actions.push([e,t])}init(e){this.devTools&&this.devTools.init(e)}cleanup(){}getMiddleware(){return this.middleware}},e.LogoutManager=class{constructor({handleLogout:e,shouldLogout:t}={}){e&&(this.handleLogout=e),t&&(this.shouldLogout=t),this.middleware=e=>t=>async s=>{await t(s),s.type===r&&s.error&&this.shouldLogout(s.payload)&&this.handleLogout(e)}}cleanup(){}getMiddleware(){return this.middleware}shouldLogout(e){return 401===e.status}handleLogout(e){e.resetEntireStore()}},e.NetworkManager=class{constructor(e=6e4,t=1e3){this.fetched=Object.create(null),this.resolvers={},this.rejectors={},this.fetchedAt={},this.controller=new A,this.dataExpiryLength=e,this.errorExpiryLength=t,this.middleware=e=>(this.controller=e,t=>s=>{switch(s.type){case i:return this.handleFetch(s),void 0!==s.endpoint.getOptimisticResponse&&s.endpoint.sideEffect?t(s):Promise.resolve();case r:return t(s).then((()=>{if(s.meta.key in this.fetched){var t;const i=null==(t=e.getState().meta[s.meta.key])?void 0:t.error;i?this.handleSet(O(s.endpoint,{args:s.meta.args,response:i,fetchedAt:s.meta.fetchedAt,error:!0})):this.handleSet(s)}}));case a:{const e=Object.assign({},this.rejectors);return this.clearAll(),t(s).then((()=>{for(const t in e)e[t](new j)}))}default:return t(s)}})}skipLogging(e){return e.type===i&&e.meta.key in this.fetched}init(){delete this.cleanupDate}cleanup(){this.cleanupDate=Date.now()}allSettled(){const e=Object.values(this.fetched);if(e.length)return Promise.allSettled(e)}clearAll(){for(const e in this.rejectors)this.clear(e)}clear(e){this.fetched[e].catch((()=>{})),delete this.resolvers[e],delete this.rejectors[e],delete this.fetched[e],delete this.fetchedAt[e]}getLastReset(){return this.cleanupDate?this.cleanupDate:this.controller.getState().lastReset}handleFetch(e){const t=e.payload,{key:s,throttle:i,resolve:r,reject:n,createdAt:a}=e.meta,o=()=>{let s=t();return i||(s=(e=>e.then((e=>(r(e),e))).catch((e=>{throw n(e),e})))(s)),s=s.then((t=>{let s=this.getLastReset();return a>=s&&this.controller.resolve(e.endpoint,{args:e.meta.args,response:t,fetchedAt:a}),t})).catch((t=>{const s=this.getLastReset();throw a>=s&&this.controller.resolve(e.endpoint,{args:e.meta.args,response:t,fetchedAt:a,error:!0}),t})),s};return i?this.throttle(s,o,a).then((e=>r(e))).catch((e=>n(e))):o().catch((()=>{}))}handleSet(e){if(e.meta.key in this.fetched){let t;t=e.error?this.rejectors[e.meta.key]:this.resolvers[e.meta.key],t(e.payload),this.clear(e.meta.key)}}getMiddleware(){return this.middleware}throttle(e,t,i){const r=this.getLastReset();return e in this.fetched&&this.fetchedAt[e]>r||(this.fetched[e]=new Promise(((t,s)=>{this.resolvers[e]=t,this.rejectors[e]=s})),this.fetchedAt[e]=i,s((()=>{t().catch((()=>null))}),{timeout:500})),this.fetched[e]}},e.PollingSubscription=class{constructor(e,t,s){if(this.frequencyHistogram=new Map,this.offlineListener=()=>{this.cleanup(),this.connectionListener.addOnlineListener(this.onlineListener)},this.onlineListener=()=>{this.connectionListener.removeOnlineListener(this.onlineListener);const e=Date.now();this.startId=setTimeout((()=>{this.startId&&(delete this.startId,this.update(),this.run())}),Math.max(0,this.lastFetchTime()-e+this.frequency)),this.connectionListener.addOfflineListener(this.offlineListener)},void 0===e.endpoint.pollFrequency)throw new Error("frequency needed for polling subscription");this.endpoint=e.endpoint,this.frequency=e.endpoint.pollFrequency,this.args=e.meta.args,this.key=e.meta.key,this.frequencyHistogram.set(this.frequency,1),this.controller=t,this.connectionListener=s||new q,this.connectionListener.isOnline()?this.onlineListener():this.offlineListener()}add(e){void 0!==e&&(this.frequencyHistogram.has(e)?this.frequencyHistogram.set(e,this.frequencyHistogram.get(e)+1):(this.frequencyHistogram.set(e,1),e<this.frequency&&(this.frequency=e,this.run())))}remove(e){if(void 0===e)return!1;if(this.frequencyHistogram.has(e)&&(this.frequencyHistogram.set(e,this.frequencyHistogram.get(e)-1),this.frequencyHistogram.get(e)<1)){if(this.frequencyHistogram.delete(e),0===this.frequencyHistogram.size)return this.cleanup(),!0;e<=this.frequency&&(this.frequency=Math.min(...this.frequencyHistogram.keys()),this.run())}return!1}cleanup(){this.intervalId&&(clearInterval(this.intervalId),delete this.intervalId),this.lastIntervalId&&(clearInterval(this.lastIntervalId),delete this.lastIntervalId),this.startId&&(clearTimeout(this.startId),delete this.startId),this.connectionListener.removeOnlineListener(this.onlineListener),this.connectionListener.removeOfflineListener(this.offlineListener)}update(){const e=this.endpoint,t=function(...t){return e.call(this,...t)};Object.assign(t,this.endpoint),t.dataExpiryLength=this.frequency/2,t.errorExpiryLength=this.frequency/10,t.errorPolicy=()=>"soft",t.key=()=>this.key,this.controller.fetch(t,...this.args).catch((()=>null))}run(){this.startId||(this.intervalId&&(this.lastIntervalId=this.intervalId),this.intervalId=setInterval((()=>{this.lastIntervalId&&(clearInterval(this.lastIntervalId),delete this.lastIntervalId),this.intervalId&&this.update()}),this.frequency))}lastFetchTime(){var e,t;return null!=(e=null==(t=this.controller.getState().meta[this.key])?void 0:t.date)?e:0}},e.ResetError=j,e.SubscriptionManager=class{constructor(e){this.subscriptions={},this.controller=new A,this.Subscription=e,this.middleware=e=>(this.controller=e,e=>t=>{switch(t.type){case o:try{this.handleSubscribe(t)}catch(e){console.error(e)}return Promise.resolve();case l:return this.handleUnsubscribe(t),Promise.resolve();default:return e(t)}})}cleanup(){for(const e in this.subscriptions)this.subscriptions[e].cleanup()}handleSubscribe(e){const t=e.meta.key;if(t in this.subscriptions){const s=e.endpoint.pollFrequency;this.subscriptions[t].add(s)}else this.subscriptions[t]=new this.Subscription(e,this.controller)}handleUnsubscribe(e){const t=e.meta.key;if(t in this.subscriptions){const s=e.endpoint.pollFrequency;this.subscriptions[t].remove(s)&&delete this.subscriptions[t]}}getMiddleware(){return this.middleware}},e.__INTERNAL__=b,e.actionTypes=p,e.applyManager=function(e,t){return e.map((e=>{const s=e.getMiddleware();return({dispatch:e,getState:i})=>(t.dispatch=e,t.getState=i,s(t))}))},e.createFetch=E,e.createReducer=g,e.createSet=O,e.initialState=v,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@data-client/normalizr")):"function"==typeof define&&define.amd?define(["exports","@data-client/normalizr"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).RDC=e.RDC||{},e.RDC.Core={}),e.normalizr)}(this,(function(e,t){"use strict";var s="function"==typeof requestIdleCallback?requestIdleCallback:e=>setTimeout(e,0);const i="rdc/fetch",r="rdc/set",n="rdc/optimistic",a="rdc/reset",o="rdc/subscribe",l="rdc/unsubscribe",c="rdc/invalidate",h="rdc/invalidateall",d="rdc/expireall",u="rdc/gc";var p=Object.freeze({__proto__:null,FETCH_TYPE:i,SET_TYPE:r,OPTIMISTIC_TYPE:n,RESET_TYPE:a,SUBSCRIBE_TYPE:o,UNSUBSCRIBE_TYPE:l,INVALIDATE_TYPE:c,INVALIDATEALL_TYPE:h,EXPIREALL_TYPE:d,GC_TYPE:u});function f(e,t){let s;return t.endpoint.getOptimisticResponse&&t.endpoint.sideEffect?(s=function(e,{args:t,fetchedAt:s}){var i;const r=null!=(i=e.dataExpiryLength)?i:6e4,a=Date.now(),o={args:t,fetchedAt:s,date:a,expiresAt:a+r,key:e.key(...t)};return{type:n,endpoint:e,meta:o}}(t.endpoint,{args:t.meta.args,fetchedAt:t.meta.createdAt}),Object.assign({},e,{optimistic:[...e.optimistic,s]})):e}function y(e,t,s){return"AbortError"===s.name?Object.assign({},e,{optimistic:m(e,t)}):Object.assign({},e,{meta:Object.assign({},e.meta,{[t.meta.key]:{date:t.meta.date,error:s,expiresAt:t.meta.expiresAt,errorPolicy:null==t.endpoint.errorPolicy?void 0:t.endpoint.errorPolicy(s)}}),optimistic:m(e,t)})}function m(e,t){return e.optimistic.filter((e=>e.meta.key!==t.meta.key||(e.type===n?e.meta.fetchedAt!==t.meta.fetchedAt:e.meta.date>t.meta.date)))}function g(e){return function(s,o){switch(s||(s=v),o.type){case u:return o.entities.forEach((([e,t])=>{var i,r;null==(i=s.entities[e])||delete i[t],null==(r=s.entityMeta[e])||delete r[t]})),o.results.forEach((e=>{delete s.results[e],delete s.meta[e]})),s;case i:return f(s,o);case n:case r:return function(e,s,i){if(s.error)return y(e,s,s.payload);try{var r;let o;if(s.type===n){if(!s.endpoint.getOptimisticResponse)return e;try{o=s.endpoint.getOptimisticResponse.call(s.endpoint,i.snapshot(e,s.meta.fetchedAt),...s.meta.args)}catch(t){var a;if("AbortOptimistic"===(null==(a=t.constructor)?void 0:a.name))return e;throw t}}else o=s.payload;const{result:l,entities:c,indexes:h,entityMeta:d}=t.normalize(o,s.endpoint.schema,s.meta.args,e.entities,e.indexes,e.entityMeta,s.meta),u=Object.assign({},e.results,{[s.meta.key]:l});try{if(s.endpoint.update){const e=s.endpoint.update(l,...s.meta.args);Object.keys(e).forEach((t=>{u[t]=e[t](u[t])}))}}catch(e){console.error(`The following error occured during Endpoint.update() for ${s.meta.key}`),console.error(e)}return{entities:c,indexes:h,results:u,entityMeta:d,meta:Object.assign({},e.meta,{[s.meta.key]:{date:s.meta.date,expiresAt:s.meta.expiresAt,prevExpiresAt:null==(r=e.meta[s.meta.key])?void 0:r.expiresAt}}),optimistic:m(e,s),lastReset:e.lastReset}}catch(t){return"object"==typeof t&&(t.message=`Error processing ${s.meta.key}\n\nFull Schema: ${JSON.stringify(s.endpoint.schema,void 0,2)}\n\nError:\n${t.message}`,"payload"in s&&(t.payload=s.payload),t.status=400),y(e,s,t)}}(s,o,e);case h:case c:return function(e,t){const s=Object.assign({},e.results),i=Object.assign({},e.meta),r=e=>{delete s[e];const t=Object.assign({},i[e],{expiresAt:0,invalidated:!0});delete t.error,i[e]=t};return t.type===c?r(t.meta.key):Object.keys(s).forEach((e=>{t.testKey(e)&&r(e)})),Object.assign({},e,{results:s,meta:i})}(s,o);case d:return function(e,t){const s=Object.assign({},e.meta);return Object.keys(s).forEach((e=>{t.testKey(e)&&(s[e]=Object.assign({},s[e],{expiresAt:1}))})),Object.assign({},e,{meta:s})}(s,o);case a:return Object.assign({},v,{lastReset:o.date});default:return s}}}const v={entities:{},indexes:{},results:{},meta:{},entityMeta:{},optimistic:[],lastReset:0};var b=Object.freeze({__proto__:null,inferResults:t.inferResults,INVALID:t.INVALID,RIC:s,initialState:v});function E(e,{args:t}){const s=e.key(...t);let r=0,n=0;const a=new Promise(((e,t)=>{[r,n]=[e,t]})),o={args:t,key:s,throttle:!e.sideEffect,resolve:r,reject:n,promise:a,createdAt:Date.now(),nm:!1};return{type:i,payload:()=>e(...t),meta:o,endpoint:e}}var L="undefined"!=typeof FormData?e=>e instanceof FormData?Object.fromEntries(e.entries()):e:e=>e;function O(e,{args:t,fetchedAt:s,response:i,error:n=!1}){var a,o;const l=n?null!=(a=e.errorExpiryLength)?a:1e3:null!=(o=e.dataExpiryLength)?o:6e4,c=Date.now(),h={args:t.map(L),fetchedAt:null!=s?s:c,date:c,expiresAt:c+l,key:e.key(...t)},d={type:r,payload:i,endpoint:e,meta:h};return n&&(d.error=!0),d}function I(e,t){return e.meta[t]}const S=e=>{throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},w=()=>v;class A{constructor({dispatch:e=S,getState:s=w,globalCache:i={entities:{},results:{}}}={}){this.fetch=(e,...s)=>{const i=E(e,{args:s});return this.dispatch(i),e.schema?i.meta.promise.then((i=>t.denormalize(i,e.schema,{},s))):i.meta.promise},this.fetchIfStale=(e,...s)=>{const{data:i,expiresAt:r,expiryStatus:n}=this.getResponse(e,...s,this.getState());return n!==t.ExpiryStatus.Invalid&&Date.now()<=r?i:this.fetch(e,...s)},this.invalidate=(e,...t)=>null!==t[0]?this.dispatch(function(e,{args:t}){return{type:c,meta:{key:e.key(...t)}}}(e,{args:t})):Promise.resolve(),this.invalidateAll=e=>this.dispatch({type:h,testKey:t=>e.testKey(t)}),this.expireAll=e=>this.dispatch({type:d,testKey:t=>e.testKey(t)}),this.resetEntireStore=()=>this.dispatch({type:a,date:Date.now()}),this.setResponse=(e,...t)=>{const s=t[t.length-1],i=O(e,{args:t.slice(0,t.length-1),response:s});return this.dispatch(i)},this.setError=(e,...t)=>{const s=t[t.length-1],i=O(e,{args:t.slice(0,t.length-1),response:s,error:!0});return this.dispatch(i)},this.resolve=(e,t)=>this.dispatch(O(e,t)),this.subscribe=(e,...t)=>null!==t[0]?this.dispatch(function(e,{args:t}){return{type:o,endpoint:e,meta:{args:t,key:e.key(...t)}}}(e,{args:t})):Promise.resolve(),this.unsubscribe=(e,...t)=>null!==t[0]?this.dispatch(function(e,{args:t}){return{type:l,endpoint:e,meta:{args:t,key:e.key(...t)}}}(e,{args:t})):Promise.resolve(),this.snapshot=(e,t)=>new x(this,e,t),this.getError=(e,...t)=>{if(null===t[0])return;const s=t[t.length-1],i=t.slice(0,t.length-1),r=e.key(...i),n=I(s,r);return void 0===s.results[r]||"soft"!==(null==n?void 0:n.errorPolicy)?null==n?void 0:n.error:void 0},this.getResponse=(e,...s)=>{const i=s[s.length-1],r=s.slice(0,s.length-1).map(L),n=1!==r.length||null!==r[0],a=n?e.key(...r):"",o=n?i.results[a]:void 0,l=e.schema,c=I(i,a);let h,d=null==c?void 0:c.expiresAt,u=!1;if(void 0===o&&void 0!==e.schema?(h=t.inferResults(e.schema,r,i.indexes,i.entities),u=!t.validateInference(h),!d&&u&&(d=1)):h=o,!n)return{data:h,expiryStatus:t.ExpiryStatus.Valid,expiresAt:1/0};if(!e.schema||!k(e.schema))return{data:h,expiryStatus:null!=c&&c.invalidated?t.ExpiryStatus.Invalid:o&&!e.invalidIfStale?t.ExpiryStatus.Valid:t.ExpiryStatus.InvalidIfStale,expiresAt:d||0};this.globalCache.results[a]||(this.globalCache.results[a]=new t.WeakEntityMap);const{data:p,paths:f}=t.denormalizeCached(h,l,i.entities,this.globalCache.entities,this.globalCache.results[a],r),y="symbol"==typeof p;d||(d=function(e,t){let s=1/0;for(const{pk:n,key:a}of e){var i,r;const e=null==(i=t[a])||null==(r=i[n])?void 0:r.expiresAt;e<s&&(s=e)}return s}(f,i.entityMeta));return{data:p,expiryStatus:null!=c&&c.invalidated||y&&(null==c||!c.error)?t.ExpiryStatus.Invalid:y||e.invalidIfStale||u?t.ExpiryStatus.InvalidIfStale:t.ExpiryStatus.Valid,expiresAt:d}},this.dispatch=e,this.getState=s,this.globalCache=i}}function k(e){if(t.isEntity(e))return!0;if(Array.isArray(e))return 0!==e.length&&k(e[0]);if(e&&("object"==typeof e||"function"==typeof e)){const t="schema"in e?e.schema:e;return"function"==typeof t?k(t):Object.values(t).some((e=>k(e)))}return!1}class x{constructor(e,t,s=0){this.state=void 0,this.controller=void 0,this.fetchedAt=void 0,this.getResponse=(e,...t)=>this.controller.getResponse(e,...t,this.state),this.getError=(e,...t)=>this.controller.getError(e,...t,this.state),this.state=t,this.controller=e,this.fetchedAt=s}}class j extends Error{constructor(){super("Aborted due to RESET"),this.name="ResetError"}}class T{isOnline(){return void 0===navigator.onLine||navigator.onLine}addOnlineListener(e){addEventListener("online",e)}removeOnlineListener(e){removeEventListener("online",e)}addOfflineListener(e){addEventListener("offline",e)}removeOfflineListener(e){removeEventListener("offline",e)}}class R{isOnline(){return!0}addOnlineListener(){}removeOnlineListener(){}addOfflineListener(){}removeOfflineListener(){}}let _;_="undefined"!=typeof navigator&&"function"==typeof addEventListener?T:R;var q=_;let P={};Object.hasOwn=Object.hasOwn||function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Object.defineProperty(e,"ExpiryStatus",{enumerable:!0,get:function(){return t.ExpiryStatus}}),e.Controller=A,e.DefaultConnectionListener=q,e.DevToolsManager=class{constructor(e,t){this.started=!1,this.actions=[],this.devTools="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__.connect(Object.assign({},P,{config:e})),this.devTools?this.middleware=e=>{this.controller=e;const s=g(e);let i=e.getState();return r=>n=>{const a=r(n);return i=this.started?s(i,n):e.getState(),a.then((()=>{null!=t&&t(n)||this.handleAction(n,i.optimistic.reduce(s,i))})),a}}:this.middleware=()=>e=>t=>e(t)}handleAction(e,t){this.started?this.devTools.send(e,t,void 0,"RDC"):this.actions.push([e,t])}init(e){this.devTools&&this.devTools.init(e)}cleanup(){}getMiddleware(){return this.middleware}},e.LogoutManager=class{constructor({handleLogout:e,shouldLogout:t}={}){e&&(this.handleLogout=e),t&&(this.shouldLogout=t),this.middleware=e=>t=>async s=>{await t(s),s.type===r&&s.error&&this.shouldLogout(s.payload)&&this.handleLogout(e)}}cleanup(){}getMiddleware(){return this.middleware}shouldLogout(e){return 401===e.status}handleLogout(e){e.resetEntireStore()}},e.NetworkManager=class{constructor(e=6e4,t=1e3){this.fetched=Object.create(null),this.resolvers={},this.rejectors={},this.fetchedAt={},this.controller=new A,this.dataExpiryLength=e,this.errorExpiryLength=t,this.middleware=e=>(this.controller=e,t=>s=>{switch(s.type){case i:return this.handleFetch(s),void 0!==s.endpoint.getOptimisticResponse&&s.endpoint.sideEffect?t(s):Promise.resolve();case r:return t(s).then((()=>{if(s.meta.key in this.fetched){var t;const i=null==(t=e.getState().meta[s.meta.key])?void 0:t.error;i?this.handleSet(O(s.endpoint,{args:s.meta.args,response:i,fetchedAt:s.meta.fetchedAt,error:!0})):this.handleSet(s)}}));case a:{const e=Object.assign({},this.rejectors);return this.clearAll(),t(s).then((()=>{for(const t in e)e[t](new j)}))}default:return t(s)}})}skipLogging(e){return e.type===i&&e.meta.key in this.fetched}init(){delete this.cleanupDate}cleanup(){this.cleanupDate=Date.now()}allSettled(){const e=Object.values(this.fetched);if(e.length)return Promise.allSettled(e)}clearAll(){for(const e in this.rejectors)this.clear(e)}clear(e){this.fetched[e].catch((()=>{})),delete this.resolvers[e],delete this.rejectors[e],delete this.fetched[e],delete this.fetchedAt[e]}getLastReset(){return this.cleanupDate?this.cleanupDate:this.controller.getState().lastReset}handleFetch(e){const t=e.payload,{key:s,throttle:i,resolve:r,reject:n,createdAt:a}=e.meta,o=()=>{let s=t();return i||(s=(e=>e.then((e=>(r(e),e))).catch((e=>{throw n(e),e})))(s)),s=s.then((t=>{let s=this.getLastReset();return a>=s&&this.controller.resolve(e.endpoint,{args:e.meta.args,response:t,fetchedAt:a}),t})).catch((t=>{const s=this.getLastReset();throw a>=s&&this.controller.resolve(e.endpoint,{args:e.meta.args,response:t,fetchedAt:a,error:!0}),t})),s};return i?this.throttle(s,o,a).then((e=>r(e))).catch((e=>n(e))):o().catch((()=>{}))}handleSet(e){if(e.meta.key in this.fetched){let t;t=e.error?this.rejectors[e.meta.key]:this.resolvers[e.meta.key],t(e.payload),this.clear(e.meta.key)}}getMiddleware(){return this.middleware}throttle(e,t,i){const r=this.getLastReset();return e in this.fetched&&this.fetchedAt[e]>r||(this.fetched[e]=new Promise(((t,s)=>{this.resolvers[e]=t,this.rejectors[e]=s})),this.fetchedAt[e]=i,s((()=>{t().catch((()=>null))}),{timeout:500})),this.fetched[e]}},e.PollingSubscription=class{constructor(e,t,s){if(this.frequencyHistogram=new Map,this.offlineListener=()=>{this.cleanup(),this.connectionListener.addOnlineListener(this.onlineListener)},this.onlineListener=()=>{this.connectionListener.removeOnlineListener(this.onlineListener);const e=Date.now();this.startId=setTimeout((()=>{this.startId&&(delete this.startId,this.update(),this.run())}),Math.max(0,this.lastFetchTime()-e+this.frequency)),this.connectionListener.addOfflineListener(this.offlineListener)},void 0===e.endpoint.pollFrequency)throw new Error("frequency needed for polling subscription");this.endpoint=e.endpoint,this.frequency=e.endpoint.pollFrequency,this.args=e.meta.args,this.key=e.meta.key,this.frequencyHistogram.set(this.frequency,1),this.controller=t,this.connectionListener=s||new q,this.connectionListener.isOnline()?this.onlineListener():this.offlineListener()}add(e){void 0!==e&&(this.frequencyHistogram.has(e)?this.frequencyHistogram.set(e,this.frequencyHistogram.get(e)+1):(this.frequencyHistogram.set(e,1),e<this.frequency&&(this.frequency=e,this.run())))}remove(e){if(void 0===e)return!1;if(this.frequencyHistogram.has(e)&&(this.frequencyHistogram.set(e,this.frequencyHistogram.get(e)-1),this.frequencyHistogram.get(e)<1)){if(this.frequencyHistogram.delete(e),0===this.frequencyHistogram.size)return this.cleanup(),!0;e<=this.frequency&&(this.frequency=Math.min(...this.frequencyHistogram.keys()),this.run())}return!1}cleanup(){this.intervalId&&(clearInterval(this.intervalId),delete this.intervalId),this.lastIntervalId&&(clearInterval(this.lastIntervalId),delete this.lastIntervalId),this.startId&&(clearTimeout(this.startId),delete this.startId),this.connectionListener.removeOnlineListener(this.onlineListener),this.connectionListener.removeOfflineListener(this.offlineListener)}update(){const e=this.endpoint,t=function(...t){return e.call(this,...t)};Object.assign(t,this.endpoint),t.dataExpiryLength=this.frequency/2,t.errorExpiryLength=this.frequency/10,t.errorPolicy=()=>"soft",t.key=()=>this.key,this.controller.fetch(t,...this.args).catch((()=>null))}run(){this.startId||(this.intervalId&&(this.lastIntervalId=this.intervalId),this.intervalId=setInterval((()=>{this.lastIntervalId&&(clearInterval(this.lastIntervalId),delete this.lastIntervalId),this.intervalId&&this.update()}),this.frequency))}lastFetchTime(){var e,t;return null!=(e=null==(t=this.controller.getState().meta[this.key])?void 0:t.date)?e:0}},e.ResetError=j,e.SubscriptionManager=class{constructor(e){this.subscriptions={},this.controller=new A,this.Subscription=e,this.middleware=e=>(this.controller=e,e=>t=>{switch(t.type){case o:try{this.handleSubscribe(t)}catch(e){console.error(e)}return Promise.resolve();case l:return this.handleUnsubscribe(t),Promise.resolve();default:return e(t)}})}cleanup(){for(const e in this.subscriptions)this.subscriptions[e].cleanup()}handleSubscribe(e){const t=e.meta.key;if(t in this.subscriptions){const s=e.endpoint.pollFrequency;this.subscriptions[t].add(s)}else this.subscriptions[t]=new this.Subscription(e,this.controller)}handleUnsubscribe(e){const t=e.meta.key;if(t in this.subscriptions){const s=e.endpoint.pollFrequency;this.subscriptions[t].remove(s)&&delete this.subscriptions[t]}}getMiddleware(){return this.middleware}},e.__INTERNAL__=b,e.actionTypes=p,e.applyManager=function(e,t){return e.map((e=>{const s=e.getMiddleware();return({dispatch:e,getState:i})=>(t.dispatch=e,t.getState=i,s(t))}))},e.createFetch=E,e.createReducer=g,e.createSet=O,e.initialState=v,Object.defineProperty(e,"__esModule",{value:!0})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@data-client/core",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.4",
|
|
4
4
|
"description": "High performance reactive framework for async data.",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"LICENSE",
|
|
61
61
|
"README.md",
|
|
62
62
|
"./typescript.svg",
|
|
63
|
-
"./data_client_logo_and_text.
|
|
63
|
+
"./data_client_logo_and_text.png"
|
|
64
64
|
],
|
|
65
65
|
"scripts": {
|
|
66
66
|
"build:lib": "NODE_ENV=production BROWSERSLIST_ENV='2020' yarn g:babel --out-dir lib",
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
},
|
|
121
121
|
"dependencies": {
|
|
122
122
|
"@babel/runtime": "^7.17.0",
|
|
123
|
-
"@data-client/normalizr": "^0.9.
|
|
123
|
+
"@data-client/normalizr": "^0.9.4",
|
|
124
124
|
"flux-standard-action": "^2.1.1"
|
|
125
125
|
},
|
|
126
126
|
"devDependencies": {
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<!-- Generator: Adobe Illustrator 23.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
-
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
4
|
-
width="419.02px" height="90px" viewBox="0 0 419.02 90" enable-background="new 0 0 419.02 90" xml:space="preserve">
|
|
5
|
-
<g>
|
|
6
|
-
<g>
|
|
7
|
-
<polygon fill="#00F2E6" points="31.4,58.6 23.1,68.85 31.1,82.85 47.1,85.79 47.1,70.85 35.1,66.85 "/>
|
|
8
|
-
<polygon fill="#00F2E6" points="62.79,58.6 75.1,56.85 82.1,43.85 78.49,31.41 67.1,31.85 66.1,51.85 "/>
|
|
9
|
-
<polygon fill="#00F2E6" points="47.1,31.41 45.1,13.85 22.1,23.85 15.7,31.41 22.1,40.85 38.1,31.85 "/>
|
|
10
|
-
<path fill="#00F2E6" d="M31.4,58.6c0-11.62,6.32-21.76,15.7-27.19c-4.62-2.67-9.98-4.21-15.7-4.21C14.06,27.2,0,41.26,0,58.6
|
|
11
|
-
S14.06,90,31.4,90c5.72,0,11.08-1.54,15.7-4.21C37.72,80.36,31.4,70.22,31.4,58.6z"/>
|
|
12
|
-
<path fill="#633EFF" d="M62.79,58.6c-10.06,5.81-22,5.41-31.39,0c-0.01,5.34,1.34,10.75,4.2,15.7
|
|
13
|
-
c8.67,15.02,27.87,20.16,42.89,11.49S98.65,57.91,89.98,42.9c-2.86-4.95-6.87-8.83-11.5-11.49C78.48,42.25,72.86,52.79,62.79,58.6
|
|
14
|
-
z"/>
|
|
15
|
-
<path fill="#F93AEB" d="M47.09,31.4c10.06,5.81,15.68,16.35,15.7,27.19c4.62-2.66,8.64-6.54,11.5-11.49
|
|
16
|
-
c8.67-15.02,3.53-34.22-11.49-42.89S28.57,0.69,19.9,15.7c-2.86,4.95-4.21,10.36-4.2,15.7C25.09,26,37.03,25.59,47.09,31.4z"/>
|
|
17
|
-
<path d="M167.92,38.77c0,4.8-3.38,8.18-7.95,8.18h-1.75c0.06,0.45,0.4,1.07,0.62,1.52L167.7,65h-4.68l-7.73-14.5
|
|
18
|
-
c-0.68-1.24-1.13-2.37-1.35-3.55h-8.41V65h-4.23V25h18.67c4.57,0,7.95,3.44,7.95,8.24V38.77z M163.69,33.24
|
|
19
|
-
c0-2.6-1.52-4.34-3.61-4.34h-14.56v14.16h14.5c2.14,0,3.67-1.69,3.67-4.29V33.24z"/>
|
|
20
|
-
<path d="M196.86,47.79c0,2.82-1.75,4.51-4.29,4.51h-14.5v4.63c0,2.65,1.52,4.4,3.72,4.4h12.92V65h-12.81
|
|
21
|
-
c-4.46,0-7.79-3.33-7.79-8.07V45.08c0-4.74,3.27-8.07,7.73-8.07h7.17c4.46,0,7.84,3.33,7.84,8.07V47.79z M192.86,45.14
|
|
22
|
-
c0-2.65-1.52-4.46-3.72-4.46h-7.28c-2.2,0-3.78,1.75-3.78,4.4v3.55h14.78V45.14z"/>
|
|
23
|
-
<path d="M222.08,60.15l-0.79,1.52c-1.3,2.54-2.82,3.33-5.36,3.33h-11.9v-3.67h11.51c1.24,0,1.75-0.45,2.31-1.47l0.73-1.35
|
|
24
|
-
c0.34-0.62,0.57-1.35,0.57-2.14l-13.37-7.39c-1.81-1.01-2.71-2.09-2.71-4.06c0-0.9,0.34-1.75,1.07-3.16l0.79-1.52
|
|
25
|
-
c1.3-2.48,2.82-3.22,5.36-3.22h11.57v3.67h-11.17c-1.24,0-1.75,0.28-2.31,1.35l-0.73,1.41c-0.4,0.73-0.56,1.24-0.56,1.98
|
|
26
|
-
l13.26,7.39c1.92,1.07,2.82,2.09,2.82,4.06C223.15,57.78,222.81,58.74,222.08,60.15z"/>
|
|
27
|
-
<path d="M238.67,65c-1.92,0-3.5-0.96-4.57-2.99l-0.73-1.41c-0.51-0.96-0.62-1.69-0.62-3.16V40.68h-5.92v-3.67h5.92v-6.38h3.95
|
|
28
|
-
v6.38h8.91v3.67h-8.91v16.76c0,0.79,0.17,1.41,0.45,1.97l0.45,0.85c0.39,0.68,1.02,1.07,1.8,1.07h6.21V65H238.67z"/>
|
|
29
|
-
<path d="M291.81,65V46.89h-18.84V65h-4.23V25h4.23v18h18.84V25h4.23v40H291.81z"/>
|
|
30
|
-
<path d="M315.16,65c-3.22,0-5.3-1.41-6.77-4.12l-3.1-5.81c-0.73-1.35-1.07-2.59-1.07-4.06c0-1.41,0.4-2.71,1.13-4.06l3.1-5.87
|
|
31
|
-
c1.47-2.82,3.84-4.06,6.83-4.06h4.63c2.99,0,5.36,1.24,6.83,4.06l3.1,5.87c0.73,1.35,1.13,2.65,1.13,4.06
|
|
32
|
-
c0,1.47-0.34,2.71-1.07,4.06l-3.1,5.81c-1.47,2.71-3.55,4.12-6.77,4.12H315.16z M320.01,61.33c1.64,0,2.54-0.73,3.38-2.31
|
|
33
|
-
l3.05-5.87c0.4-0.79,0.56-1.35,0.56-2.14c0-0.73-0.17-1.47-0.56-2.2l-3.1-5.81c-0.79-1.47-1.8-2.31-3.55-2.31h-4.4
|
|
34
|
-
c-1.75,0-2.76,0.85-3.55,2.31l-3.1,5.81c-0.39,0.73-0.56,1.47-0.56,2.2c0,0.79,0.17,1.35,0.56,2.14l3.05,5.87
|
|
35
|
-
c0.85,1.58,1.75,2.31,3.39,2.31H320.01z"/>
|
|
36
|
-
<path d="M346.98,65c-3.22,0-5.3-1.41-6.77-4.12l-3.1-5.81c-0.73-1.35-1.07-2.59-1.07-4.06c0-1.41,0.4-2.71,1.13-4.06l3.1-5.87
|
|
37
|
-
c1.47-2.82,3.84-4.06,6.83-4.06h4.63c2.99,0,5.36,1.24,6.83,4.06l3.1,5.87c0.73,1.35,1.13,2.65,1.13,4.06
|
|
38
|
-
c0,1.47-0.34,2.71-1.07,4.06l-3.1,5.81c-1.47,2.71-3.55,4.12-6.77,4.12H346.98z M351.83,61.33c1.64,0,2.54-0.73,3.38-2.31
|
|
39
|
-
l3.05-5.87c0.4-0.79,0.56-1.35,0.56-2.14c0-0.73-0.17-1.47-0.56-2.2l-3.1-5.81c-0.79-1.47-1.81-2.31-3.55-2.31h-4.4
|
|
40
|
-
c-1.75,0-2.76,0.85-3.55,2.31l-3.1,5.81c-0.39,0.73-0.56,1.47-0.56,2.2c0,0.79,0.17,1.35,0.56,2.14l3.05,5.87
|
|
41
|
-
c0.85,1.58,1.75,2.31,3.39,2.31H351.83z"/>
|
|
42
|
-
<path d="M386.69,48.92c3.22,0.85,5.25,3.67,5.25,7.45V65h-3.95v-8.63c0-2.48-1.3-4.06-3.5-4.06h-10.16V65h-3.95V25h3.95v23.64
|
|
43
|
-
h8.12l6.26-11.62h4.29L386.69,48.92z"/>
|
|
44
|
-
<path d="M417.95,60.15l-0.79,1.52c-1.3,2.54-2.82,3.33-5.36,3.33h-11.9v-3.67h11.51c1.24,0,1.75-0.45,2.31-1.47l0.73-1.35
|
|
45
|
-
c0.34-0.62,0.56-1.35,0.56-2.14l-13.37-7.39c-1.81-1.01-2.71-2.09-2.71-4.06c0-0.9,0.34-1.75,1.07-3.16l0.79-1.52
|
|
46
|
-
c1.3-2.48,2.82-3.22,5.36-3.22h11.57v3.67h-11.17c-1.24,0-1.75,0.28-2.31,1.35l-0.73,1.41c-0.4,0.73-0.56,1.24-0.56,1.98
|
|
47
|
-
l13.26,7.39c1.92,1.07,2.82,2.09,2.82,4.06C419.02,57.78,418.68,58.74,417.95,60.15z"/>
|
|
48
|
-
</g>
|
|
49
|
-
</g>
|
|
50
|
-
</svg>
|