UNPKG

@hotmeshio/hotmesh

Version:

Serverless Workflow

1 lines 4.24 kB
'use strict';const y=b;function a(){const L=['getRaw','updated','9jzSDhP','get','SerializerService','join','localeCompare','6502856qmtcGQ','appId','/output/metadata/ac','entries','66894lHtLFd','__esModule','defineProperty','getAllSymbols','sort','../serializer','split','resolveValue','logger','inflateKey','match','7ovBXSX','store','shift','/output/metadata/au','keyToObject','sortParts','139932aJYKKN','inflate','385767pmciYU','sortEntriesByCreated','../../modules/utils','has','restoreHierarchy','substring','1933008bMdrHA','export','values','startsWith','push','created','inflateTransition','$error','length','ExporterService','endsWith','1992138tWVggU','data','forEach','590RrLYZT','symbols','set','filterFields','2346615cqidAr','fromString'];a=function(){return L;};return a();}(function(c,d){const x=b,e=c();while(!![]){try{const f=parseInt(x(0x170))/0x1*(parseInt(x(0x141))/0x2)+-parseInt(x(0x165))/0x3+-parseInt(x(0x152))/0x4+-parseInt(x(0x16c))/0x5+-parseInt(x(0x15a))/0x6+parseInt(x(0x14c))/0x7*(-parseInt(x(0x13d))/0x8)+-parseInt(x(0x154))/0x9*(-parseInt(x(0x168))/0xa);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x808e3));function b(c,d){const e=a();return b=function(f,g){f=f-0x13c;let h=e[f];return h;},b(c,d);}Object[y(0x143)](exports,y(0x142),{'value':!0x0}),exports[y(0x163)]=void 0x0;const utils_1=require(y(0x156)),serializer_1=require(y(0x146));class ExporterService{constructor(c,d,f){const z=y;this['appId']=c,this[z(0x149)]=f,this[z(0x14d)]=d;}async[y(0x15b)](c,d={}){const A=y;if(!ExporterService[A(0x169)][A(0x157)](this['appId'])){const g=this[A(0x14d)][A(0x144)]();ExporterService[A(0x169)][A(0x16a)](this[A(0x13e)],await g);}const f=await this['store'][A(0x16e)](c);return this[A(0x153)](f,d);}[y(0x153)](c,d){const B=y,f=[],g={},h={},j={},k=/^([a-zA-Z]{3}),(\d+(?:,\d+)*)/;return Object[B(0x140)](c)[B(0x167)](([m,p])=>{const C=B,q=m[C(0x14b)](k);if(q)this[C(0x160)](q,p,j);else{if(m[C(0x15d)]('_'))h[m[C(0x159)](0x1)]=p;else{if(m[C(0x15d)]('-')){const u=this[C(0x150)](m);f[C(0x15e)]({...u,'key':m,'value':this[C(0x148)](p,d['values'])});}else 0x3===m[C(0x162)]&&(g[this[C(0x14a)](m)]=serializer_1[C(0x172)][C(0x16d)](p));}}}),this['filterFields']({'data':(0x0,utils_1[B(0x158)])(h),'state':Object[B(0x140)]((0x0,utils_1['restoreHierarchy'])(g))[0x0][0x1],'status':parseInt(c[':'],0xa),'timeline':this[B(0x151)](f),'transitions':this['sortEntriesByCreated'](j)},d['block'],d['allow']);}['resolveValue'](c,d){const D=y,f=serializer_1[D(0x172)][D(0x16d)](c);return!0x1!==d||f&&'object'==typeof f&&(D(0x166)in f&&(f[D(0x166)]={}),D(0x161)in f&&(f[D(0x161)]={})),f;}[y(0x14a)](c){const E=y,d=ExporterService['symbols'][E(0x171)](this[E(0x13e)]);if(c in d)return d[c]['split']('/')[E(0x173)]('/');return c;}[y(0x16b)](c,d=[],f=[]){const F=y;let g={};return f&&f[F(0x162)]>0x0?f[F(0x167)](h=>{h in c&&(g[h]=c[h]);}):g={...c},d&&d[F(0x162)]>0x0&&d['forEach'](h=>{h in g&&delete g[h];}),g;}[y(0x160)](c,f,g){const G=y,[h,j,k]=c,m=this['inflateKey'](j),p=m[G(0x147)]('/')[0x0],q=m[G(0x164)](G(0x13f)),u=m[G(0x164)](G(0x14f));if(q||u){const v=p+','+k,w=g[v];w?w[q?G(0x15f):G(0x16f)]=f:g[v]={'activity':p,'dimensions':k,'created':q?f:null,'updated':u?f:null};}}[y(0x155)](c){const H=y,d=Object[H(0x15c)](c);return d[H(0x145)]((f,g)=>(f[H(0x15f)]||f[H(0x16f)])[H(0x13c)](g[H(0x15f)]||g['updated'])),d;}[y(0x150)](c){const J=y;function d(g){const I=b,h=g[I(0x147)](',');if(h[I(0x162)]>0x1)return h[I(0x14e)](),h[I(0x173)](',');}const f=c['split']('-');return 0x4===f[J(0x162)]?{'index':parseInt(f[0x2],0xa),'dimension':d(f[0x1])}:{'index':parseInt(f[0x2],0xa),'secondary':parseInt(f[0x3],0xa),'dimension':d(f[0x1])};}[y(0x151)](c){const K=y;return c[K(0x145)]((d,f)=>{const {dimension:g,index:h,secondary:j}=d,{dimension:k,index:l,secondary:m}=f;if(void 0x0===g&&void 0x0!==k)return-0x1;if(void 0x0!==g&&void 0x0===k)return 0x1;if(void 0x0!==g&&void 0x0!==k){if(g<k)return-0x1;if(g>k)return 0x1;}if(h<l)return-0x1;if(h>l)return 0x1;if(void 0x0===j&&void 0x0!==m)return-0x1;if(void 0x0!==j&&void 0x0===m)return 0x1;if(void 0x0!==j&&void 0x0!==m){if(j<m)return-0x1;if(j>m)return 0x1;}return 0x0;});}}exports['ExporterService']=ExporterService,ExporterService[y(0x169)]=new Map();