@olympeio/runtime-node 8.7.1 → 8.7.2
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/index.js
CHANGED
|
@@ -206,16 +206,16 @@ function da(a,b){if(b)a:{var c=ca;a=a.split('.');for(var d=0;d<a.length-1;d++){v
|
|
|
206
206
|
da('Array.prototype.values',function(a){return a?a:function(){return ea(this,function(b,c){return c})}});da('Array.prototype.includes',function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(0>c&&(c=Math.max(c+e,0));c<e;c++){var f=d[c];if(f===b||Object.is(f,b))return!0}return!1}});function fa(a){if(null==a)throw new TypeError("The 'this' value for String.prototype.padStart must not be null or undefined");return a+''}
|
|
207
207
|
function ha(a,b){a=void 0!==a?String(a):' ';return 0<b&&a?a.repeat(Math.ceil(b/a.length)).substring(0,b):''}da('String.prototype.padStart',function(a){return a?a:function(b,c){var d=fa(this);return ha(c,b-d.length)+d}});da('String.prototype.padEnd',function(a){return a?a:function(b,c){var d=fa(this);return d+ha(c,b-d.length)}});da('Object.entries',function(a){return a?a:function(b){var c=[],d;for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&c.push([d,b[d]]);return c}});
|
|
208
208
|
da('Object.values',function(a){return a?a:function(b){var c=[],d;for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&c.push(b[d]);return c}});da('Promise.prototype.finally',function(a){return a?a:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}});var ia=this||self;
|
|
209
|
-
function v(a,b){a=a.split('.');let c=ia;a[0]in c||'undefined'==typeof c.execScript||c.execScript('var '+a[0]);for(let d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};const olympe={Ii:()=>'object'===typeof window?window:'object'===typeof global?global:self};olympe.Ii().olympe=olympe;olympe.
|
|
210
|
-
!0;for(;void 0!==(e=d());)b(e,[])}};olympe.U.
|
|
211
|
-
olympe.U.
|
|
209
|
+
function v(a,b){a=a.split('.');let c=ia;a[0]in c||'undefined'==typeof c.execScript||c.execScript('var '+a[0]);for(let d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};const olympe={Ii:()=>'object'===typeof window?window:'object'===typeof global?global:self};olympe.Ii().olympe=olympe;olympe.XB=(a,...b)=>{b.forEach(c=>{Object.getOwnPropertyNames(c.prototype).forEach(d=>{'constructor'!==d&&void 0===a.prototype[d]&&(a.prototype[d]=c.prototype[d])})})};olympe.eb={};olympe.eb.node={};'function'!==typeof require||global.Blob||(global.Blob=require('cross-blob'));olympe.U={};olympe.U.ef={};olympe.U.ef.wn=class{D(a){const b=Object.keys(a.ee);let c,d;c=0;for(d=b.length;c<d;c++)if(a.Bd(b[c]).Mi())throw Error('Service "'+b[c]+'" is defined as abstract and needs to be overridden');}};olympe.U.ef.wn.ja=[olympe.U.ef.qp];olympe.U.ef.xn=class{D(a){function b(g,h){if(0<=h.indexOf(g))throw Error('Circular dependency detected: '+h.join(' > ')+' > '+g);h=h.concat(g);if(f[g]&&(delete f[g],g=a.Bd(g),c(g.Fi(),h),g=g.di,null!==g))for(let k=0,m=g.length;k<m;k++)c(g[k].Fi(),h)}function c(g,h){for(let k=0,m=g.length,n;k<m;k++)n=g[k],n instanceof olympe.U.vc&&b(n.ba(),h)}function d(){for(const g in f)if(Object.prototype.hasOwnProperty.call(f,g))return g}var e=Object.keys(a.ee);const f={};for(let g=0,h=e.length;g<h;g++)f[e[g]]=
|
|
210
|
+
!0;for(;void 0!==(e=d());)b(e,[])}};olympe.U.ef.xn.ja=[olympe.U.ef.qp];olympe.U.ef.qp=class{D(){}};const ja=[],ka=[];olympe.U.An=class{constructor(){}static D(a,b){ja.push(new olympe.U.Ok(a,b))}static F(a,b,c){a.forEach(d=>{if(null===d||void 0===d)throw Error('Cannot proceed - DI configuration error. '+(c?`Run callback "${c}"`:'A run callback')+' cannot have a null or undefined dependency');});a.push(olympe.U.T.Oe);ka.push(new olympe.U.Ok(b,c,a))}};olympe.U.config=olympe.U.An.D;olympe.U.run=olympe.U.An.F;olympe.U.Fk=class{constructor(){}D(){}};olympe.U.Ok=class{constructor(a,b,c){this.F=a;this.G=[];this.D=b;if(void 0!==c){this.G=c;for(let d=0,e=c.length;d<e;d++)'string'===typeof c[d]&&(c[d]=new olympe.U.vc(c[d]))}}Fi(){return this.G}};function la(a,b,c){let d=a.D[b];if(void 0===d){const e=a.F[b];if(void 0===e){if(c===olympe.U.Pe.D.sh)return null;throw Error('Service "'+b+'" not found');}try{d=e.instantiate(a)}catch(f){throw a.N.error('Error during instantiation of service '+b),f;}!e.F&&(a.D[b]=d)}return d}function ma(a,b){const c=b.length,d=Array(c);let e,f;for(e=0;e<c;e++)a.N.D++,f=b[e],d[e]=f instanceof olympe.U.Fk?f.D(a):f,na(a.N);return d}
|
|
211
|
+
olympe.U.Pe=class{constructor(a,b,c=2){this.F=a;this.parameters=b;this.D=Object.create(null);this.N=new olympe.U.To(c);a=olympe.U.T.Oe;if(void 0!==this.D[a])throw Error('Service "'+a+'" has already been instantiated');this.D[a]=this}vb(){return this.N}getParameter(a){return this.parameters[a.toLowerCase()]}};olympe.U.Pe.D={Tr:'exception',sh:'null'};function oa(a,b,c){function d(f,g){let h,k,m;for(h in f)Object.prototype.hasOwnProperty.call(f,h)&&(k=f[h],m=g.concat((h.startsWith('#')?h.substring(1):h).toLowerCase()),'object'!==typeof k||null===k||h.startsWith('#')?e[m.join('.')]=k:d(k,m))}const e=a.parameters;d(b,c?[c]:[])}function y(a,b,c,...d){z(a.N,'Defining service '+b);a.D(b,c,d,!1,!1)}function pa(a,b,c,...d){z(a.N,'Defining service '+b);a.D(b,c,d,!1,!0)}
|
|
212
212
|
function A(a,b,c,d,e=!1){z(a.N,'Defining service (as a factory) '+b);a.D(b,d,c,!0,e)}function B(a,b,c,d=!1){z(a.N,'Defining service alias '+b);a.D(b,e=>e,[c],!0,d)}function qa(a,b){z(a.N,'Defining abstract service '+b);a.D(b).vi=!0}function ra(a,b){a.parameters[olympe.H.Z.rn.toLowerCase()]=b}function C(a,b,c){b=b.toLowerCase();Object.prototype.hasOwnProperty.call(a.parameters,b)||(a.parameters[b]=c)}
|
|
213
|
-
olympe.U.Nr=class{constructor(a){var b=sa,c=ta;this.ee=Object.create(null);this.parameters=Object.create(null);this.L=[new olympe.U.
|
|
213
|
+
olympe.U.Nr=class{constructor(a){var b=sa,c=ta;this.ee=Object.create(null);this.parameters=Object.create(null);this.L=[new olympe.U.ef.wn,new olympe.U.ef.xn];this.F=[];b&&oa(this,b);c&&oa(this,c,'version');a&&oa(this,a);a=this.getParameter(olympe.U.Z.Ys);this.G=void 0!==a?a:3;this.N=new olympe.U.To(this.G)}vb(){return this.N}D(a,b,c,d,e){const f=a instanceof olympe.U.vc?a.ba():a;if(3<=arguments.length&&c){const h=c.indexOf(f);if(-1!==h){if(void 0===this.ee[f])throw Error(`ContainerBuilder.define: Service ${f} references itself and is not an override definition!`);
|
|
214
214
|
var g=this.ee[f];g.id=g.id+'!!'+ ++olympe.U.Vk.D;g.F=!0;g=g.id;c[h]=g;this.ee[g]=this.ee[f]}}this.ee[f]=new olympe.U.Vk(b,c,d||!1,f,e||!1);return this.ee[f]}Bd(a){a=this.ee[a];if(void 0===a)throw Error();return a}getParameter(a){return this.parameters[a.toLowerCase()]}compile(){var a=this.F;this.N.debug('Calling '+a.length+' configure callbacks');this.N.D++;for(let b=0,c=a.length;b<c;b++)z(this.N,'Calling callback'),this.N.D++,a[b].call(null,this),na(this.N);na(this.N);this.N.debug('Configuration summary: '+
|
|
215
|
-
Object.keys(this.ee).length+' definitions');this.N.debug('Compiling...');this.N.D++;a=this.L;for(let b=0,c=a.length;b<c;b++)this.N.debug('running compilation pass '+(b+1)+': '+a[b].constructor.name),a[b].D(this);na(this.N);this.N.debug('Compilation done, returning container');return new olympe.U.
|
|
216
|
-
olympe.C.$f().run(()=>e()):e(),g=this.di;let h,k,m;if(null!==g&&0<g.length){b.D++;z(b,'Calling configuration callbacks:');k=0;for(m=g.length;k<m;k++)b.D++,h=g[k],z(b,'Calling additional configuration callback '+h.D),d=ma(a,h.Fi()),d.push(f),h.F.apply(null,d),na(b);na(b)}z(b,'Done instantiating '+this.id);return f}Ni(){return this.P}Fi(){return this.D}Mi(){return this.vi}config(a,b,c){null===this.di&&(this.di=[]);this.di.push(new olympe.U.Ok(b,c,a))}};olympe.U.Vk.D=0;function na(a){0<a.D&&a.D--}function z(a,b){1>=a.F&&ua(a,'log','DI: '+b)}function ua(a,b,c){if(console&&console[b]){var d='';for(let e=0;e<a.D;e++)d+=' ';console[b](d+c)}}olympe.U.To=class{constructor(a){this.F=a;this.D=0}debug(a){2>=this.F&&ua(this,'log','DI: '+a)}info(a){3>=this.F&&ua(this,'info','DI: '+a)}warn(a){4>=this.F&&ua(this,'warn','DI: '+a)}error(a){5>=this.F&&ua(this,'error','DI: '+a)}};olympe.U.ha=class extends olympe.U.Fk{constructor(a){super();this.id=a}ba(){return this.id}D(a){return a.getParameter(this.id)}};olympe.U.vc=class extends olympe.U.Fk{constructor(a,b){super();this.id=a;this.F=b||olympe.U.
|
|
217
|
-
olympe.$.
|
|
218
|
-
olympe.$.Xf=function(){let a='';for(let b=0;19>b;b++)a+='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'.charAt(Math.floor(62*Math.random()));return'@'+a};olympe
|
|
215
|
+
Object.keys(this.ee).length+' definitions');this.N.debug('Compiling...');this.N.D++;a=this.L;for(let b=0,c=a.length;b<c;b++)this.N.debug('running compilation pass '+(b+1)+': '+a[b].constructor.name),a[b].D(this);na(this.N);this.N.debug('Compilation done, returning container');return new olympe.U.Pe(this.ee,this.parameters,this.G)}};olympe.U.Vk=class{constructor(a,b,c,d,e=!0){this.L=a||null;this.G=!!c;this.D=[];this.vi=!1;this.di=null;if(b){this.D=b;for(let f=0,g=b.length;f<g;f++)'string'===typeof b[f]&&(b[f]=new olympe.U.vc(b[f]))}this.id=d||'';this.P=e;this.F=!1}ba(){return this.id}instantiate(a){const b=a.vb();b.debug('Resolving arguments for '+this.id);const c=this.L;let d=ma(a,this.D);const e=()=>{if(this.G)return c.apply(null,d);d.unshift(null);return new (c.bind.apply(c,d))};z(b,'Instantiating '+this.id);const f=olympe.C?
|
|
216
|
+
olympe.C.$f().run(()=>e()):e(),g=this.di;let h,k,m;if(null!==g&&0<g.length){b.D++;z(b,'Calling configuration callbacks:');k=0;for(m=g.length;k<m;k++)b.D++,h=g[k],z(b,'Calling additional configuration callback '+h.D),d=ma(a,h.Fi()),d.push(f),h.F.apply(null,d),na(b);na(b)}z(b,'Done instantiating '+this.id);return f}Ni(){return this.P}Fi(){return this.D}Mi(){return this.vi}config(a,b,c){null===this.di&&(this.di=[]);this.di.push(new olympe.U.Ok(b,c,a))}};olympe.U.Vk.D=0;function na(a){0<a.D&&a.D--}function z(a,b){1>=a.F&&ua(a,'log','DI: '+b)}function ua(a,b,c){if(console&&console[b]){var d='';for(let e=0;e<a.D;e++)d+=' ';console[b](d+c)}}olympe.U.To=class{constructor(a){this.F=a;this.D=0}debug(a){2>=this.F&&ua(this,'log','DI: '+a)}info(a){3>=this.F&&ua(this,'info','DI: '+a)}warn(a){4>=this.F&&ua(this,'warn','DI: '+a)}error(a){5>=this.F&&ua(this,'error','DI: '+a)}};olympe.U.ha=class extends olympe.U.Fk{constructor(a){super();this.id=a}ba(){return this.id}D(a){return a.getParameter(this.id)}};olympe.U.vc=class extends olympe.U.Fk{constructor(a,b){super();this.id=a;this.F=b||olympe.U.Pe.D.Tr}ba(){return this.id}D(a){return la(a,this.id,this.F)}};olympe.U.T={Oe:'di.Container',Pz:'di.PublicContainer'};olympe.U.Z={Ys:'logging.di'};olympe.U.run([olympe.U.T.Oe],a=>{olympe.U.getParameter=b=>a.getParameter(b)});olympe.$={};function va(a){a='0'.repeat(12)+a.toString(16);return a.substring(a.length-12,a.length)}function wa(){var a=Math.random();return va((new Date).getTime())+(a.toString(16)+'0'.repeat(8)).substr(2,8)}let xa=Math.pow(2,32)-1;olympe.$.Sb=function(){return wa()};olympe.$.om=function(){return wa()};olympe.$.ym=function(a,b=1){const c=a.substr(12,a.length-12);return va(parseInt(a.substr(0,12),16)+b)+c};
|
|
217
|
+
olympe.$.lw=function(a){return va(parseInt(a.substr(0,12),16)+1)+(Math.random().toString(16)+'00000000').substr(2,8)};let ya=0,za=0;olympe.$.kv=function(){var a=(new Date).getTime();a<=ya?4294967295===za?(za=Math.floor(Math.random()/4*xa),ya+=1):za=Math.floor(za+(4294967295-za)/2):(za=Math.floor(Math.random()/4*xa),ya=a);a='00000000'+za.toString(16);return va(ya)+a.substr(a.length-8,8)};olympe.$.zC=function(){for(let a=0;1E4>a;a++)console.log(olympe.$.kv())};
|
|
218
|
+
olympe.$.Xf=function(){let a='';for(let b=0;19>b;b++)a+='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'.charAt(Math.floor(62*Math.random()));return'@'+a};olympe.$.bC=function(a){let b='';for(let c=0;5>c;c++)b+='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'.charAt(Math.floor(62*Math.random()));return(a?a:'UI')+'-'+b};olympe.$.ZB=function(a,b){return(b?b:'UI')+'-'+a};olympe.$.Go=class{constructor(a){this.id=a||olympe.$.Go.D++}tb(a){return a?this.id===a.id:!1}toJSON(){return this.id.toString()}toString(){return this.id.toString()}};olympe.$.Go.D=0;olympe.$.Dz=class{constructor(a,b,c,d,e,f){this.D=[a||0,b||0,0,c||0,d||0,0,e||0,f||0,1]}set(a,b,c){this.D[3*a+b]=c}get(a,b){return this.D[3*a+b]}};olympe.$.qh=function(a,b,c,d,e,f,g,h,k,m,n,p,q){this.values=[a,b,c,0,0,d,e,f,0,0,g,h,k,0,0,m,n,p,q,0]};olympe.$.qh.F=function(a){return new olympe.$.qh(.213+.787*a,.715-.715*a,.072-.072*a,.213-.213*a,.715+.285*a,.072-.072*a,.213-.213*a,.715-.715*a,.072+.928*a,0,0,0,1)};olympe.$.qh.D=function(){return new olympe.$.qh(0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0)};olympe.$.qh.prototype.set=function(a,b,c){this.values[5*a+b]=c};olympe.$.qh.prototype.get=function(a,b){return this.values[5*a+b]};function Aa(a){return(new TextEncoder).encode(a).buffer}function Ba(a){return(new TextDecoder('utf8')).decode(a)}olympe.$.Lk=class{P(){}D(){}G(){}L(){}F(){}W(){}};olympe.$.sq=a=>a.replace('+','-').replace('/','_');olympe.$.Eu=a=>a.replace('-','+').replace('_','/');function Ca(a,b){return a+b&4294967295}
|
|
219
219
|
function Da(a,b){let c=a[0],d=a[1],e=a[2],f=a[3];c=D(c,d,e,f,b[0],7,-680876936);f=D(f,c,d,e,b[1],12,-389564586);e=D(e,f,c,d,b[2],17,606105819);d=D(d,e,f,c,b[3],22,-1044525330);c=D(c,d,e,f,b[4],7,-176418897);f=D(f,c,d,e,b[5],12,1200080426);e=D(e,f,c,d,b[6],17,-1473231341);d=D(d,e,f,c,b[7],22,-45705983);c=D(c,d,e,f,b[8],7,1770035416);f=D(f,c,d,e,b[9],12,-1958414417);e=D(e,f,c,d,b[10],17,-42063);d=D(d,e,f,c,b[11],22,-1990404162);c=D(c,d,e,f,b[12],7,1804603682);f=D(f,c,d,e,b[13],12,-40341101);e=D(e,f,
|
|
220
220
|
c,d,b[14],17,-1502002290);d=D(d,e,f,c,b[15],22,1236535329);c=E(c,d,e,f,b[1],5,-165796510);f=E(f,c,d,e,b[6],9,-1069501632);e=E(e,f,c,d,b[11],14,643717713);d=E(d,e,f,c,b[0],20,-373897302);c=E(c,d,e,f,b[5],5,-701558691);f=E(f,c,d,e,b[10],9,38016083);e=E(e,f,c,d,b[15],14,-660478335);d=E(d,e,f,c,b[4],20,-405537848);c=E(c,d,e,f,b[9],5,568446438);f=E(f,c,d,e,b[14],9,-1019803690);e=E(e,f,c,d,b[3],14,-187363961);d=E(d,e,f,c,b[8],20,1163531501);c=E(c,d,e,f,b[13],5,-1444681467);f=E(f,c,d,e,b[2],9,-51403784);
|
|
221
221
|
e=E(e,f,c,d,b[7],14,1735328473);d=E(d,e,f,c,b[12],20,-1926607734);c=I(d^e^f,c,d,b[5],4,-378558);f=I(c^d^e,f,c,b[8],11,-2022574463);e=I(f^c^d,e,f,b[11],16,1839030562);d=I(e^f^c,d,e,b[14],23,-35309556);c=I(d^e^f,c,d,b[1],4,-1530992060);f=I(c^d^e,f,c,b[4],11,1272893353);e=I(f^c^d,e,f,b[7],16,-155497632);d=I(e^f^c,d,e,b[10],23,-1094730640);c=I(d^e^f,c,d,b[13],4,681279174);f=I(c^d^e,f,c,b[0],11,-358537222);e=I(f^c^d,e,f,b[3],16,-722521979);d=I(e^f^c,d,e,b[6],23,76029189);c=I(d^e^f,c,d,b[9],4,-640364487);
|
|
@@ -223,246 +223,246 @@ f=I(c^d^e,f,c,b[12],11,-421815835);e=I(f^c^d,e,f,b[15],16,530742520);d=I(e^f^c,d
|
|
|
223
223
|
b[4],6,-145523070);f=J(f,c,d,e,b[11],10,-1120210379);e=J(e,f,c,d,b[2],15,718787259);d=J(d,e,f,c,b[9],21,-343485551);a[0]=Ca(c,a[0]);a[1]=Ca(d,a[1]);a[2]=Ca(e,a[2]);a[3]=Ca(f,a[3])}function I(a,b,c,d,e,f){b=Ca(Ca(b,a),Ca(d,f));return Ca(b<<e|b>>>32-e,c)}function D(a,b,c,d,e,f,g){return I(b&c|~b&d,a,b,e,f,g)}function E(a,b,c,d,e,f,g){return I(b&d|c&~d,a,b,e,f,g)}function J(a,b,c,d,e,f,g){return I(c^(b|~d),a,b,e,f,g)}
|
|
224
224
|
function Ea(a,b=32){const c='0123456789abcdef'.split('');var d=a,e=d.length;a=[1732584193,-271733879,-1732584194,271733878];var f;for(f=64;f<=d.length;f+=64){var g=d.substring(f-64,f),h=[];for(let k=0;64>k;k+=4)h[k>>2]=g.charCodeAt(k)+(g.charCodeAt(k+1)<<8)+(g.charCodeAt(k+2)<<16)+(g.charCodeAt(k+3)<<24);Da(a,h)}d=d.substring(f-64);g=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(f=0;f<d.length;f++)g[f>>2]|=d.charCodeAt(f)<<(f%4<<3);g[f>>2]|=128<<(f%4<<3);if(55<f)for(Da(a,g),f=0;16>f;f++)g[f]=0;g[14]=8*e;
|
|
225
225
|
Da(a,g);d='';e=0;b=0<=b?b:32;for(f=0;4>f;f++)for(h=a[f],g=0;4>g;g++){if(++e>b)return d;d+=c[h>>8*g+4&15];if(++e>b)return d;d+=c[h>>8*g&15]}return d}'5d41402abc4b2a76b9719d911017c592'!==Ea('hello')&&(Ca=(a,b)=>{const c=(a&65535)+(b&65535);return(a>>16)+(b>>16)+(c>>16)<<16|c&65535});olympe.$.Ec=Ea;olympe.$.dr=function(a){var b=/^(?:(\S*)@)?([^:]+)(?::(\d{2,5}))?$/;const c=/([^&=]+)=([^&=]+)/g,d=/^true|false$/i,e=/^\d+(\.\d+)?$/;var f=a.match(/^(?:([^:/?#]+):)?(?:\/\/([^/?#]*))?\/?([^?#]*)(?:\?([^#]*))?(?:#(.*))?$/);a=f[1];const g=f[2],h=f[3],k=f[4];f=f[5];let m=null,n=null;var p=null;g&&(p=g.match(b),m=p[1],n=p[2],p=p[3]);b={};let q;for(;q=c.exec(k);){let r=q[2];void 0===r?r=!0:d.test(r)?r='true'===r.toLowerCase():e.test(r)?r=parseFloat(r):r=decodeURIComponent(r);b[q[1]]=r}return{scheme:a||
|
|
226
|
-
null,
|
|
227
|
-
olympe.$.Lm=(a,b)=>{if(b instanceof Object)for(const c of Object.keys(b)){const d=b[c];d instanceof Object&&void 0!==a[c]?olympe.$.Lm(a[c],d):a[c]=d}};olympe.$.pm=(a,b,c)=>{const d=Object.create(null);b(a,e=>{olympe.$.Lm(d,e);b(`conf.d/${a}`,f=>{olympe.$.Lm(d,f);c(d)})})};olympe.$.
|
|
228
|
-
olympe.$.Ah=class{constructor(a,b,c,d){this.D=a;this.F=b;this.G=c;this.L=d||null}tb(a){return this.D===a.D&&this.F===a.F&&this.G===a.G}toString(){return`${this.D}.${this.F}.${this.G}`+(null!==this.L?`-${this.L}`:'')}};olympe.$.Ah.D=new olympe.$.Ah(Number.NaN,Number.NaN,Number.NaN);olympe.$.T={$g:'utils.binaryConverter',vr:'utils.base64Converter'};olympe.U.config(a=>{qa(a,olympe.$.T.$g);B(a,olympe.$.T.vr,olympe.$.T.$g,!0)},'Utils services');olympe.U.run([olympe.$.T.$g],a=>{olympe.$.Jh=()=>a});olympe.
|
|
229
|
-
olympe.ua.Eb.D={bu:0,Af:1,Xs:2,Bo:3,iu:4,zc:5,Wr:6,vl:7};olympe.ua.Eb.F={0:'TRACE',1:'DEBUG',2:'LOG',3:'INFO',4:'WARN',5:'ERROR',6:'FATAL',7:'NOTHING'};olympe.ua.qa=class{Ic(){}};olympe.ua.Uc={};function Ja(a,b,c,d,e,f){var g=new Date;g=('00'+g.getHours()).substr(-2)+':'+('00'+g.getMinutes()).substr(-2)+':'+('00'+g.getSeconds()).substr(-2)+'.'+('00'+g.getMilliseconds()).substr(-3);f=a.
|
|
230
|
-
olympe.ua.Uc.Eb=class{constructor(a,b,c){this.name=a;this.D=b;this.
|
|
226
|
+
null,OB:g||null,pr:m||null,host:n||null,port:p&&parseInt(p,10)||null,path:h&&'/'!==h?h:null,query:k||null,$B:f||null,parameters:b}};olympe.$.uC=function(a){a=a.substring(1);return''===a?new Map:new Map(a.split('&').map(b=>b.split('=')))};olympe.$.xC=function(a){let b='';for(let c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b+=(b?'&':'?')+c+'='+encodeURIComponent(a[c]));return b};olympe.$.Lq=(a,b)=>{const c=Object.keys(a).find(d=>a[d]===b);return void 0===c?null:c};
|
|
227
|
+
olympe.$.Lm=(a,b)=>{if(b instanceof Object)for(const c of Object.keys(b)){const d=b[c];d instanceof Object&&void 0!==a[c]?olympe.$.Lm(a[c],d):a[c]=d}};olympe.$.pm=(a,b,c)=>{const d=Object.create(null);b(a,e=>{olympe.$.Lm(d,e);b(`conf.d/${a}`,f=>{olympe.$.Lm(d,f);c(d)})})};olympe.$.MB=class a{constructor(b,c){this.x=b;this.y=c}add(b){return new a(this.x+b.x,this.y+b.y)}clone(){return new a(this.x,this.y)}um(){return Math.sqrt(this.x*this.x+this.y*this.y)}toString(){return`Vector(${this.x}, ${this.y})`}};olympe.$.ny=class{constructor(a,b,c,d){this.from=a;this.target=b;this.D=c;this.F=d}toString(){return`(${this.from.toString()}, ${this.target.toString()}, ${this.D.toString()}, ${this.F.toString()})`}};olympe.$.at=class{constructor(a,b){this.start=a;this.end=b}};olympe.$.at.D={oh:'left',uh:'right',ly:'bottom',hB:'top'};function Fa(a){a=/([0-9]*)\.([0-9]*)\.([0-9]*)-?([A-z\-_0-9]*)/.exec(a);if(null===a||4>a.length)return olympe.$.Ah.D;const b=Number.parseInt(a[1],10),c=Number.parseInt(a[2],10),d=Number.parseInt(a[3],10);return isNaN(b)||isNaN(c)||isNaN(d)?olympe.$.Ah.D:new olympe.$.Ah(b,c,d,a[4])}function Ha(a){return`${a.D}.${a.F}.${a.G}`}
|
|
228
|
+
olympe.$.Ah=class{constructor(a,b,c,d){this.D=a;this.F=b;this.G=c;this.L=d||null}tb(a){return this.D===a.D&&this.F===a.F&&this.G===a.G}toString(){return`${this.D}.${this.F}.${this.G}`+(null!==this.L?`-${this.L}`:'')}};olympe.$.Ah.D=new olympe.$.Ah(Number.NaN,Number.NaN,Number.NaN);olympe.$.T={$g:'utils.binaryConverter',vr:'utils.base64Converter'};olympe.U.config(a=>{qa(a,olympe.$.T.$g);B(a,olympe.$.T.vr,olympe.$.T.$g,!0)},'Utils services');olympe.U.run([olympe.$.T.$g],a=>{olympe.$.Jh=()=>a});olympe.eb.node.$={};const Ia=new Map;olympe.eb.node.$.Lk=class extends olympe.$.Lk{P(a){return(new Uint8Array(Buffer.from(a,'base64'))).buffer}D(a){return Buffer.from(a).toString('base64')}G(a,b){a.arrayBuffer().then(olympe.C.Ia().rb(b))}L(a){var b=()=>Math.random().toString(16).slice(-4);b=`blob://${`${b()}${b()}-${b()}-${b()}-${b()}-${b()}${b()}${b()}`}`;Ia.set(b,a);return b}F(a,b,c){Ia.has(a)?b(Ia.get(a)):c&&c('No object has been found for that url. Maybe the URL has already been revoked')}W(a){Ia.delete(a)}};olympe.U.config(function(a){pa(a,olympe.$.T.$g,olympe.eb.node.$.Lk)},'olympe.native.node.utils');olympe.ua={};olympe.ua.Eb=class{L(){}pa(){}G(){}ea(){}ka(){}Ga(){}P(){}W(){}trace(){}debug(){}log(){}info(){}warn(){}error(){}fatal(){}};olympe.ua.Eb.prototype.fatal=olympe.ua.Eb.prototype.fatal;olympe.ua.Eb.prototype.error=olympe.ua.Eb.prototype.error;olympe.ua.Eb.prototype.warn=olympe.ua.Eb.prototype.warn;olympe.ua.Eb.prototype.info=olympe.ua.Eb.prototype.info;olympe.ua.Eb.prototype.log=olympe.ua.Eb.prototype.log;olympe.ua.Eb.prototype.debug=olympe.ua.Eb.prototype.debug;olympe.ua.Eb.prototype.trace=olympe.ua.Eb.prototype.trace;
|
|
229
|
+
olympe.ua.Eb.D={bu:0,Af:1,Xs:2,Bo:3,iu:4,zc:5,Wr:6,vl:7};olympe.ua.Eb.F={0:'TRACE',1:'DEBUG',2:'LOG',3:'INFO',4:'WARN',5:'ERROR',6:'FATAL',7:'NOTHING'};olympe.ua.qa=class{Ic(){}};olympe.ua.Uc={};function Ja(a,b,c,d,e,f){var g=new Date;g=('00'+g.getHours()).substr(-2)+':'+('00'+g.getMinutes()).substr(-2)+':'+('00'+g.getSeconds()).substr(-2)+'.'+('00'+g.getMilliseconds()).substr(-3);f=a.Ta?`%c[${g}] [${f.toUpperCase()}] ${c}:%c`:`%c[${g}] ${c}:%c`;for(const h of d)f+=' '+h;a.La[b](f,'color: '+e,'color: #444');for(const h of a.wc.values())h(g,c,b,...d)}
|
|
230
|
+
olympe.ua.Uc.Eb=class{constructor(a,b,c){this.name=a;this.D=b;this.Ta=c;this.F=a.toUpperCase();this.wc=new Map;this.La=console}L(){return this.D}pa(){return this.D<=olympe.ua.Eb.D.bu}G(){return this.D<=olympe.ua.Eb.D.Af}ka(){return this.D<=olympe.ua.Eb.D.Xs}ea(){return this.D<=olympe.ua.Eb.D.Bo}Ga(){return this.D<=olympe.ua.Eb.D.iu}P(){return this.D<=olympe.ua.Eb.D.zc}W(){return this.D<=olympe.ua.Eb.D.Wr}trace(...a){this.pa()&&Ja(this,'log',this.F,a,'#99b','trace')}debug(...a){this.G()&&Ja(this,'log',
|
|
231
231
|
this.F,a,'#888','debug')}log(...a){this.ka()&&Ja(this,'log',this.F,a,'#000','log')}info(...a){this.ea()&&Ja(this,'info',this.F,a,'#00f','info')}warn(...a){this.Ga()&&Ja(this,'warn',this.F,a,'#684911','warn')}error(...a){this.P()&&Ja(this,'error',this.F,a,'#f00','error')}fatal(...a){this.W()&&Ja(this,'error',this.F,a,'#f00','fatal')}};olympe.ua.Uc.Eb.ja=[olympe.ua.Eb];olympe.ua.Uc.qa=class{constructor(a,b,c){this.D=a;this.F=parseInt(b,10);this.G=c;this.channels=new Map;this.N=this.Ic('logging');this.N.info('Logging initialized, global log level is '+olympe.ua.Eb.F[b])}Ic(a){var b=this.channels.get(a);if(!b){b=this.F;var c=`${olympe.ua.Z.Cr}.${a}`;Object.prototype.hasOwnProperty.call(this.D.parameters,c.toLowerCase())&&(b=parseInt(this.D.getParameter(c),10));let d=this.G;c=`${c}.${olympe.ua.Z.Qt}`;Object.prototype.hasOwnProperty.call(this.D.parameters,c.toLowerCase())&&
|
|
232
|
-
(d=!0===this.D.getParameter(c));b=new olympe.ua.Uc.Eb(a,b,d);this.channels.set(a,b)}return b}};olympe.ua.Uc.qa.ja=[olympe.ua.qa];olympe.ua.T={wa:'logging.Manager'};olympe.ua.Z={io:'logging',jo:'logging.showLogLevel',Cr:'logging',Qt:'showLogLevel'};olympe.U.config(function(a){C(a,olympe.ua.Z.io,olympe.ua.Eb.D.Bo);C(a,olympe.ua.Z.jo,!0);pa(a,olympe.ua.T.wa,olympe.ua.Uc.qa,olympe.U.T.
|
|
233
|
-
olympe.C.J.F=new olympe.C.J(()=>olympe.C.
|
|
232
|
+
(d=!0===this.D.getParameter(c));b=new olympe.ua.Uc.Eb(a,b,d);this.channels.set(a,b)}return b}};olympe.ua.Uc.qa.ja=[olympe.ua.qa];olympe.ua.T={wa:'logging.Manager'};olympe.ua.Z={io:'logging',jo:'logging.showLogLevel',Cr:'logging',Qt:'showLogLevel'};olympe.U.config(function(a){C(a,olympe.ua.Z.io,olympe.ua.Eb.D.Bo);C(a,olympe.ua.Z.jo,!0);pa(a,olympe.ua.T.wa,olympe.ua.Uc.qa,olympe.U.T.Oe,new olympe.U.ha(olympe.ua.Z.io),new olympe.U.ha(olympe.ua.Z.jo))},'olympe.logging');olympe.U.run([olympe.ua.T.wa],a=>{olympe.ua.vb=b=>a.Ic(b)},'Logging singleton getter initialization');olympe.C={};olympe.C.Z={Zo:'df.nodeCreationThreshold'};const Ka=[];function La(){}function Ma(){}olympe.C.J=class a{constructor(b,c,d){this.D=void 0===b?La:b;this.F=void 0===c?Ka:c;this.ea=d}static L(){var b=[];return void 0===b||0===b.length?olympe.C.J.ka:new a(Ma,b)}L(){return this.D?this.D():void 0}G(){return this.F?this.F:Ka}P(){return null===this.D&&null===this.F}W(){return this.D===Ma}};olympe.C.J.ea=new olympe.C.J;olympe.C.J.D=new olympe.C.J(null,null);olympe.C.J.ka=new olympe.C.J(Ma);olympe.C.J.G=new olympe.C.J(()=>olympe.C.da);
|
|
233
|
+
olympe.C.J.F=new olympe.C.J(()=>olympe.C.Ra);olympe.C.J.P=new olympe.C.J(()=>olympe.C.fa);olympe.C.J.W=new olympe.C.J(()=>olympe.C.$b);olympe.C.hh=class{ba(){return''}ck(){return''}destroy(){}Bb(){return!1}Yd(){return!1}run(a,...b){return a(...b)}rb(a){return a}getParent(){return null}jr(){}Gg(){}Tf(){}detach(){}Xj(){}Wf(){}onDestroy(){return''}re(){}Vc(){return''}cr(){}};olympe.C.hh.prototype.offDestroy=olympe.C.hh.prototype.re;olympe.C.hh.prototype.onDestroy=olympe.C.hh.prototype.onDestroy;let Na=0;olympe.U.run([new olympe.U.ha(olympe.C.Z.Zo)],()=>{});
|
|
234
234
|
olympe.C.ec=class{constructor(a='SimpleContext',b){++Na;this.children=new Map;this.ea=new Map;this.W=new Map;this.La=0;this.name=a;this.id=String(Na);this.Ga=this.ka=!1;(this.parent=void 0===b?olympe.C.Ia():b)&&this.parent.Tf(this);this.debug=!1}ba(){return this.id}ck(){return this.name}run(a,...b){if(!this.ka){var c=olympe.C.ir(this);a=a(...b);c&&olympe.C.ir(c);return a}}rb(a){return(...b)=>this.run(a,...b)}destroy(){if(!this.ka&&!this.Ga){this.Ga=!0;this.Wf();for(const a of this.ea.keys())this.ea.has(a)&&
|
|
235
|
-
this.ea.get(a)();this.ea.clear();this.W.clear();this.parent&&(this.parent.detach(this,!1),this.parent=null);this.ka=!0;this.Ga=!1;this.Wf()}}Bb(){return this.ka}Yd(){return this.Ga}Tf(a){if(!this.ka){var b;olympe.C.Za(a)?b=a.
|
|
235
|
+
this.ea.get(a)();this.ea.clear();this.W.clear();this.parent&&(this.parent.detach(this,!1),this.parent=null);this.ka=!0;this.Ga=!1;this.Wf()}}Bb(){return this.ka}Yd(){return this.Ga}Tf(a){if(!this.ka){var b;olympe.C.Za(a)?b=a.Ua:olympe.C.Em(a)&&(b=a);b&&this.children.set(b.ba(),b)}}detach(a,b=!0){let c;olympe.C.Za(a)?c=a.Ua:olympe.C.Em(a)&&(c=a);c&&this.children.has(c.ba())&&(b&&c.Xj(this),this.children.delete(c.ba()))}Xj(){this.parent=null;this.destroy()}Wf(){const a=this.children;for(const b of a.keys())a.has(b)&&
|
|
236
236
|
a.get(b).Xj(this);this.children.clear();for(const b of this.W.keys())this.W.has(b)&&this.W.get(b)();this.W.clear()}onDestroy(a,b){void 0===b&&(++this.La,b=String(this.La));this.ea.set(b,a);return b}re(a){this.ea.delete(a)}Vc(a,b){void 0===b&&(++this.La,b=String(this.La));this.W.set(b,a);return b}cr(a){this.W.delete(a)}jr(a){this.parent&&this.parent.detach(this,!1);(this.parent=a||null)&&this.parent.Tf(this)}getParent(){return this.parent}Gg(){return this.children}};
|
|
237
237
|
olympe.C.Bp=class extends olympe.C.ec{constructor(){super('Root',null)}destroy(){}onDestroy(){return''}re(){}};olympe.C.hh.ja=[olympe.C.hh];let Oa=0;
|
|
238
|
-
function Pa(a,b){a.L||(a.L=new Map);a.L.set(b.ba(),b);switch(b.D){case olympe.C.Node.D.rh:break;case olympe.C.Node.D.yh:break;case olympe.C.Node.D.Aj:case olympe.C.Node.D.Cf:olympe.C.N.warn('Not bad as such but should not happen!');break;case olympe.C.Node.D.ih:Qa(a,olympe.C.Node.D.ih);break;case olympe.C.Node.D.OBSOLETE:a.
|
|
238
|
+
function Pa(a,b){a.L||(a.L=new Map);a.L.set(b.ba(),b);switch(b.D){case olympe.C.Node.D.rh:break;case olympe.C.Node.D.yh:break;case olympe.C.Node.D.Aj:case olympe.C.Node.D.Cf:olympe.C.N.warn('Not bad as such but should not happen!');break;case olympe.C.Node.D.ih:Qa(a,olympe.C.Node.D.ih);break;case olympe.C.Node.D.OBSOLETE:a.hb=!0;a.D!==olympe.C.Node.D.ih&&Qa(a,olympe.C.Node.D.OBSOLETE);break;case olympe.C.Node.D.Bf:olympe.C.N.warn('Adding a destroyed node as upstream => should never happen!');break;
|
|
239
239
|
default:olympe.C.N.warn('Unknown state, investigate: ',b.D)}Ra(b,a)}
|
|
240
240
|
function Sa(a){if(a.sd){var b=[],c=[];if(a.vf)if(a.vf instanceof olympe.C.Node)if(Ta(a.vf))b=a.vf.Kc;else return;else b=a.vf;else b=null;if(null!==a.P){const e=a.Sf;for(let f=0,g=a.P.length;f<g;f++)if(null!==e&&-1<e.indexOf(f)){const h=a.P[f];if(Ta(h))c.push(h.Kc);else return}else c.push(a.P[f])}if(a.sd instanceof Function)var d=a.sd;else b&&(b[a.sd]||olympe.C.N.warn('looks like you forget a cast somewhere around '+a.sd),d=b[a.sd]);a.run(()=>{a.Wf();if(void 0!==d){const e=d.apply(b,c);e&&e.fq?Ua(a,
|
|
241
|
-
e.
|
|
242
|
-
function ab(a){if(a.D!==olympe.C.Node.D.OBSOLETE&&a.D!==olympe.C.Node.D.Aj&&a.D!==olympe.C.Node.D.rh&&a.D!==olympe.C.Node.D.ih){Qa(a,olympe.C.Node.D.Aj);var b=a.G;if(b)for(const c of b.values())b.has(c.ba())&&ab(c);Qa(a,olympe.C.Node.D.OBSOLETE)}}function bb(a,b,c){if(a.D!==olympe.C.Node.D.Cf)if(b===a.F)K(a,c,!0);else{if(a.D===olympe.C.Node.D.OBSOLETE||a.D===olympe.C.Node.D.Aj)a.
|
|
241
|
+
e.Ua):e instanceof olympe.C.Node?Ua(a,e):(K(a,e),void 0===e&&void 0===a.valueType&&Qa(a,olympe.C.Node.D.yh))}else Va(a)})}}function L(a){void 0===a.Ta&&(a.Ta=a.valueType===olympe.C.Proxy?Wa(void 0,a.Ya):Wa(a.valueType,a.Ya),a.Ta.Ua=a);return a.Ta}function Xa(a){void 0!==a.F&&(Ya(a.F,a),a.F=void 0)}function Za(a){if(a.D===olympe.C.Node.D.OBSOLETE&&(a.D=olympe.C.Node.D.yh,null!==a.G))for(const b of a.G.values())$a(b)}function Qa(a,b){b!==a.D&&(a.D=b)}
|
|
242
|
+
function ab(a){if(a.D!==olympe.C.Node.D.OBSOLETE&&a.D!==olympe.C.Node.D.Aj&&a.D!==olympe.C.Node.D.rh&&a.D!==olympe.C.Node.D.ih){Qa(a,olympe.C.Node.D.Aj);var b=a.G;if(b)for(const c of b.values())b.has(c.ba())&&ab(c);Qa(a,olympe.C.Node.D.OBSOLETE)}}function bb(a,b,c){if(a.D!==olympe.C.Node.D.Cf)if(b===a.F)K(a,c,!0);else{if(a.D===olympe.C.Node.D.OBSOLETE||a.D===olympe.C.Node.D.Aj)a.hb=!0;Sa(a)}}
|
|
243
243
|
function K(a,b,c){b instanceof olympe.C.Node&&(olympe.C.N.warn('We are setting the value of a node as a node, that should never happen?'),b=b.Kc);a.pa||c||void 0===a.F||Xa(a);if(void 0!==b){if((a.pa||a.D===olympe.C.Node.D.yh||a.D===olympe.C.Node.D.OBSOLETE)&&!olympe.C.Za(b)&&void 0!==a.Kc){if(null===b&&null===a.Kc){Za(a);return}if(null!==b&&null!==a.Kc&&(b.valueOf()===a.Kc.valueOf()||a.Kc.tb&&a.Kc.tb(b))){Za(a);return}}if(!0===a.pa)olympe.C.N.error("Circular dependency detected: updating a downstream node caused this node's (#"+
|
|
244
244
|
a.ba()+') value to get updated !');else{a.D===olympe.C.Node.D.Bf&&olympe.C.N.warn(`trying to set a value on a destroyed node (#${a.ba()} ${a.nd?', '+a.nd:''})`);a.D===olympe.C.Node.D.Cf&&olympe.C.N.warn(`trying to set a value on a node being destroyed (#${a.ba()} ${a.nd?', '+a.nd:''})`);a.pa=!0;c=b;var d=!1,e=(f,g)=>f instanceof g?!0:!1;void 0===a.valueType||null===c||e(c,a.valueType)||(e=a.valueType&&a.valueType.name?a.valueType.name:'undefined',b='object'===typeof c?b.constructor.name:typeof c,
|
|
245
|
-
c instanceof Object?d=!0:b.toLowerCase()!==e.toLowerCase()&&a.valueType!==Object&&(d=!0),d&&('string'===b.toLowerCase()&&a.valueType===olympe.C.
|
|
245
|
+
c instanceof Object?d=!0:b.toLowerCase()!==e.toLowerCase()&&a.valueType!==Object&&(d=!0),d&&('string'===b.toLowerCase()&&a.valueType===olympe.C.Ra?(c=olympe.C.pb(c),d=!1):'number'===b.toLowerCase()&&a.valueType===olympe.C.da?(c=olympe.C.ta(c),d=!1):'boolean'===b.toLowerCase()&&a.valueType===olympe.C.fa&&(c=olympe.C.rc(c),d=!1)));a.Kc=c;Qa(a,olympe.C.Node.D.yh);if(b=a.G){d=0;for(const f of b.values())0<d&&ab(f),d++;for(const f of b.values())bb(f,a,c)}a.pa=!1}}}
|
|
246
246
|
function db(a,b){if(a.D!==olympe.C.Node.D.Cf&&a.D!==olympe.C.Node.D.Bf&&(a.D!==olympe.C.Node.D.rh||a.sd)){var c=void 0!==a.defaultValue;a.sd&&b!==a.F&&a.Wf();if(c)K(a,a.defaultValue,!0);else if(a.Kc=void 0,Qa(a,olympe.C.Node.D.rh),b=a.G)for(const d of b.values())db(d,a)}}function Va(a){if(a.D!==olympe.C.Node.D.ih){Qa(a,olympe.C.Node.D.ih);var b=a.G;if(b)for(const c of b.values())Va(c);a.Wf();void 0!==a.F&&Xa(a);a.Kc=a.defaultValue}}function Ta(a){return a.D===olympe.C.Node.D.yh}
|
|
247
|
-
function Ua(a,b){b===a?olympe.C.N.error('Setting a node as provider of itself. Ignoring'):(a.F&&a.F!==b&&Xa(a),Ra(b,a),Ta(b)?K(a,b.Kc,!0):void 0!==a.defaultValue?K(a,a.defaultValue,!0):db(a),a.F=b)}function eb(a,b){a.sd&&(a.sd=void 0);a.nd='Repeater';Ua(a,b)}function $a(a){a.F?Za(a):null!==a.L&&0===Array.from(a.L.values()).filter(b=>!Ta(b)).length&&(a.
|
|
247
|
+
function Ua(a,b){b===a?olympe.C.N.error('Setting a node as provider of itself. Ignoring'):(a.F&&a.F!==b&&Xa(a),Ra(b,a),Ta(b)?K(a,b.Kc,!0):void 0!==a.defaultValue?K(a,a.defaultValue,!0):db(a),a.F=b)}function eb(a,b){a.sd&&(a.sd=void 0);a.nd='Repeater';Ua(a,b)}function $a(a){a.F?Za(a):null!==a.L&&0===Array.from(a.L.values()).filter(b=>!Ta(b)).length&&(a.hb&&(a.hb=!1,Sa(a)),Za(a))}
|
|
248
248
|
function Ra(a,b){a.G||(a.G=new Map);a.G.set(b.ba(),b);a.D===olympe.C.Node.D.Bf&&olympe.C.N.warn('adding a downstream node on a deleted one (#'+a.ba()+') !')}function Ya(a,b){a.G&&(b=b.ba(),a.G.has(b)&&(a.G.delete(b),fb(a)))}function fb(a){if(null===a.getParent()){var b=a.G;b&&0<b.size||a.destroy()}}
|
|
249
|
-
olympe.C.Node=class extends olympe.C.ec{constructor({valueType:a,sd:b,
|
|
250
|
-
Pa(this,d);if(g)for(b=0;b<g.length;b++)a=e[g[b]],Pa(this,a);c&&Sa(this)}
|
|
251
|
-
this);a=d.G();b=[];if(1===a.length&&-1===a[0])for(var g of e)olympe.C.Za(g)&&b.push(g.
|
|
249
|
+
olympe.C.Node=class extends olympe.C.ec{constructor({valueType:a,sd:b,ux:c=!0,vf:d,Am:e,debug:f=!1,Sf:g=null,nd:h='Node',xi:k}={}){++Oa;super(String(Oa));this.debug=!!f;this.nd=h;h&&'string'===typeof h||(b?this.nd=b.name?b.name:'anon()':this.nd='Node');this.P=e&&0<e.length?e:null;this.Sf=g&&0<g.length?g:null;this.valueType=a;this.Kc=void 0;this.pa=!1;this.D=olympe.C.Node.D.rh;this.hb=!1;this.G=this.L=null;this.sd=b;this.vf=d||null;this.defaultValue=this.Ta=this.F=void 0;this.xi=k;d&&d instanceof olympe.C.Node&&
|
|
250
|
+
Pa(this,d);if(g)for(b=0;b<g.length;b++)a=e[g[b]],Pa(this,a);c&&Sa(this)}Le(a){this.defaultValue=a;this.D===olympe.C.Node.D.rh&&K(this,a,!0);return this}Ob(){return this.valueType||Object}Bb(){return this.D===olympe.C.Node.D.Bf}Yd(){return this.D===olympe.C.Node.D.Cf}Ya(...a){if(this.xi instanceof Function)return this.xi(...a);var b=a.length;--b;const c=a[b];--b;const d=a[b],e=Array(b);for(var f=0;f<b;f++)e[f]=a[f];a=this.D;a!==olympe.C.Node.D.Cf&&a!==olympe.C.Node.D.Bf||olympe.C.N.warn('Calling a function on a destroyed node!!!',
|
|
251
|
+
this);a=d.G();b=[];if(1===a.length&&-1===a[0])for(var g of e)olympe.C.Za(g)&&b.push(g.Ua);else for(let h=0,k=a.length;h<k;h++)g=a[h],f=e[g],void 0!==f&&null!==f&&f.le&&(e[g]=f.Ua,b.push(g));return L(new olympe.C.Node({valueType:d.L(),sd:c,vf:this,Am:e,debug:!1,Sf:b,nd:'Proxy.'+c+'()'}))}Xj(a){if(null===this.getParent())olympe.C.N.warn('context is undefined, investigate');else if(this.getParent()!==a){olympe.C.N.warn('Investigate a potential issue in creator-createe link: create node mismatch',a,this.getParent());
|
|
252
252
|
return}this.jr(null);fb(this)}destroy(){var a=this.D;if(a!==olympe.C.Node.D.Cf&&a!==olympe.C.Node.D.Bf){Qa(this,olympe.C.Node.D.Cf);if(a=this.G){for(const c of a.values())if(a.has(c.ba())){var b=c;b.L&&b.L.delete(this.ba());b.F&&b.F.ba()===this.ba()?b.F=void 0:b.destroy()}a.clear()}this.G=null;super.destroy();if(this.L){for(const c of this.L.values())this.L.has(c.ba())&&Ya(c,this);this.L.clear()}this.L=null;this.F&&(Ya(this.F,this),this.F=void 0);this.Kc=void 0;this.P&&(this.P.length=0,this.P=null);
|
|
253
|
-
this.Sf&&(this.Sf.length=0,this.Sf=null);this.xi=this.sd=void 0;this.defaultValue=this.vf=null;this.nd=`** Destroyed ** ${this.nd}`;Qa(this,olympe.C.Node.D.Bf)}}ck(){return this.nd}};olympe.C.Node.F='rootNode';olympe.C.Node.D={rh:0,yh:1,ih:3,Aj:4,OBSOLETE:5,Cf:6,Bf:7};function Wa(a,b){if('function'!==typeof a)return new olympe.C.Proxy(a,b);var c=olympe.C.Proxy.prototype;void 0===a.prototype&&olympe.C.N.error('investigate');c=Object.create(gb(c,a.prototype));c.Sj=a;c.gq=b;return c}function M(a){return a.
|
|
254
|
-
function ib(a,b){if(a.Sj!==b){a.Sj=b;b.prototype||olympe.C.N.error('Cast not possible, provided type is not a valid type!');var c=gb(a,b.prototype);Object.setPrototypeOf?Object.setPrototypeOf(a,c):a.__proto__=c;a.
|
|
255
|
-
function hb(a,b){let c={};if(b.prototype)olympe.C.N.error('first level of prototyping, investigate');else if(b.__proto__)c=Object.create(gb(a,b.__proto__));else return olympe.C.Proxy.prototype;Object.getOwnPropertyNames(b).forEach(d=>{if('function'===typeof b[d]&&'__getReplacementFunction'!==d){var e=b[d].K;null===e||e&&e.P()?c[d]=function(...f){var g=this.
|
|
256
|
-
...f,e,d);const g=e.ea;if(g){const h=this.
|
|
257
|
-
olympe.C.Proxy=class{constructor(a,b){this.
|
|
253
|
+
this.Sf&&(this.Sf.length=0,this.Sf=null);this.xi=this.sd=void 0;this.defaultValue=this.vf=null;this.nd=`** Destroyed ** ${this.nd}`;Qa(this,olympe.C.Node.D.Bf)}}ck(){return this.nd}};olympe.C.Node.F='rootNode';olympe.C.Node.D={rh:0,yh:1,ih:3,Aj:4,OBSOLETE:5,Cf:6,Bf:7};function Wa(a,b){if('function'!==typeof a)return new olympe.C.Proxy(a,b);var c=olympe.C.Proxy.prototype;void 0===a.prototype&&olympe.C.N.error('investigate');c=Object.create(gb(c,a.prototype));c.Sj=a;c.gq=b;return c}function M(a){return a.Ua.Kc}function gb(a,b){Object.prototype.hasOwnProperty.call(b,olympe.C.Proxy.Dl)||Object.defineProperty(b,olympe.C.Proxy.Dl,{enumerable:!1,configurable:!1,writable:!1,value:hb(a,b)});return b[olympe.C.Proxy.Dl]}
|
|
254
|
+
function ib(a,b){if(a.Sj!==b){a.Sj=b;b.prototype||olympe.C.N.error('Cast not possible, provided type is not a valid type!');var c=gb(a,b.prototype);Object.setPrototypeOf?Object.setPrototypeOf(a,c):a.__proto__=c;a.Ua&&(a.Ua.valueType=b)}}
|
|
255
|
+
function hb(a,b){let c={};if(b.prototype)olympe.C.N.error('first level of prototyping, investigate');else if(b.__proto__)c=Object.create(gb(a,b.__proto__));else return olympe.C.Proxy.prototype;Object.getOwnPropertyNames(b).forEach(d=>{if('function'===typeof b[d]&&'__getReplacementFunction'!==d){var e=b[d].K;null===e||e&&e.P()?c[d]=function(...f){var g=this.Ua;if(g&&Ta(g)&&(g=g.Kc)&&g[d]&&'function'===typeof g[d])return g[d].apply(g,f)}:(e=e||b[d].__oSig__||olympe.C.J.ea,c[d]=function(...f){f=this.gq.call(this.Ua,
|
|
256
|
+
...f,e,d);const g=e.ea;if(g){const h=this.Ua.Kc;h&&h[g]&&ib(f,h[g])}return e.W()?this:f})}});return c}function jb(a,b){K(a.Ua,b)}function kb(a){db(a.Ua)}function lb(a){olympe.C.tc([olympe.C.fa.D],b=>{a.Ua.Le(b)},'setDefaultValue');return a}function mb(a,b){eb(a.Ua,olympe.C.rf(b)?b:b.Ua)}function nb(a,b){olympe.C.Za(b)||olympe.C.rf(b)?mb(a,b):jb(a,b)}
|
|
257
|
+
olympe.C.Proxy=class{constructor(a,b){this.Ua=null;this.Sj=a;this.gq=b}static Za(a){return!(!a||!a.le)}tb(a){return olympe.C.va([this,a],(b,c)=>b===c,Boolean)}Dd(a){return olympe.C.va([this,a],(b,c)=>null===b||null===c?b===c?olympe.C.fa.F:olympe.C.fa.D:b.valueOf()===c.valueOf()?olympe.C.fa.F:olympe.C.fa.D,olympe.C.fa)}fq(){return this.Ua}};olympe.C.Proxy.Dl='__opp__';olympe.C.Proxy.prototype.le=!0;function ob(a,b){a.node.Le(b);return a}olympe.C.mj=class{constructor(a,b='FlowSource'){this.node=olympe.C.createNode(a,void 0,void 0,void 0,void 0,b)}update(a){olympe.C.Za(a)?K(this.node,olympe.C.Sa(a)):K(this.node,a);return this}repeat(a){eb(this.node,olympe.C.Za(a)?a.Ua:a);return this}clear(){db(this.node);return this}ub(){return L(this.node)}};function pb(a,b,c=1E3,d,e){const f=olympe.C.Jc(olympe.C.da),g=d||olympe.C.da.Nn.Po;let h,k,m,n;f.update(olympe.C.ta(a));const p=window.performance.now(),q=b.valueOf();m=q-a.valueOf();if(0!==m&&void 0===n){const r=()=>{f.node.Bb()||(m=q-a.valueOf(),k=(window.performance.now()-p)/c,1<=k&&(k=1,n=void 0),h=a.valueOf()+m*g(k,0,1,1),f.update(olympe.C.ta(h)),1===k&&void 0!==e&&e(h),1>k&&(n=window.requestAnimationFrame(r)))};n=window.requestAnimationFrame(r)}return f.ub()}
|
|
258
258
|
olympe.C.da=class{constructor(a){this.value=void 0===a||null===a?0:a}toJSON(){return'{ "type": "number", "value": '+JSON.stringify(this.value)+' }'}static ac(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return olympe.C.ta(b.value)}Um(){return'number'===typeof this.value&&!isNaN(this.value)}isNaN(){return olympe.C.rc(!this.Um())}Wc(){return null===this.value||void 0===this.value||void 0===this.value.toString||isNaN(this.value)?olympe.C.pb(''):olympe.C.pb(this.value.toString())}toString(a,b){return void 0!==
|
|
259
259
|
this.value&&null!==this.value?'number'===typeof a?this.value.toString(a):'number'===typeof b?this.value.toFixed(b):this.value.toString():'-'}toFixed(a){return this.Um()?this.valueOf().toFixed(a):''}static max(a){const b=new Map;let c=-Infinity;const d=olympe.C.Jc(olympe.C.da,'ONumber.max result'),e=()=>{c=-Infinity;for(const f of b.values())f>c&&(c=f);d.update(olympe.C.ta(c))};a.forEach((f,g)=>{olympe.C.tc([f],h=>{b.set(g,h.valueOf());e()})},f=>{if(!d.node.Bb()){var g=b.get(f);b.delete(f);g===c&&
|
|
260
260
|
e()}});return d.ub()}Ld(a){return olympe.C.va([this,a],(b,c)=>olympe.C.ta(b.valueOf()+c.valueOf()),olympe.C.da,'ONumber.plus')}Ug(a){return olympe.C.va([this,a],(b,c)=>olympe.C.ta(b.valueOf()-c.valueOf()),olympe.C.da,'ONumber.minus')}round(){return olympe.C.ta(Math.round(this.valueOf()))}Zi(){return olympe.C.ta(-this.valueOf())}mk(a){return olympe.C.va([this,a],(b,c)=>olympe.C.ta(b.valueOf()*c.valueOf()),olympe.C.da,'ONumber.mul')}Ai(a){return olympe.C.va([this,a],(b,c)=>olympe.C.ta(b.valueOf()/c.valueOf()),
|
|
261
|
-
olympe.C.da,'ONumber.div')}
|
|
262
|
-
a],(b,c)=>olympe.C.rc(b.tb(c)),olympe.C.fa,'ONumber.oEquals')}tb(a){return this.valueOf()===(void 0!==a&&null!==a?a.valueOf():void 0)}valueOf(){return void 0!==this.value?this.value.valueOf():void 0}
|
|
263
|
-
a],(b,c)=>b.valueOf()<=c.valueOf()?b:olympe.C.ta(c),olympe.C.da,'ONumber.returnsSmallest')}
|
|
261
|
+
olympe.C.da,'ONumber.div')}Yw(a){return olympe.C.va([this,a],(b,c)=>olympe.C.ta(b.valueOf()%c.valueOf()),olympe.C.da,'ONumber.div')}floor(){return olympe.C.ta(Math.floor(this.valueOf()))}ceil(){return olympe.C.ta(Math.ceil(this.valueOf()))}trunc(){return olympe.C.ta(Math.trunc(this.valueOf()))}log(){return olympe.C.ta(Math.log(this.valueOf()))}pow(a){return olympe.C.va([this,a],(b,c)=>olympe.C.ta(Math.pow(b.valueOf(),c.valueOf())),olympe.C.da,'ONumber.pow')}exp(){return olympe.C.ta(Math.exp(this.valueOf()))}Dd(a){return olympe.C.va([this,
|
|
262
|
+
a],(b,c)=>olympe.C.rc(b.tb(c)),olympe.C.fa,'ONumber.oEquals')}tb(a){return this.valueOf()===(void 0!==a&&null!==a?a.valueOf():void 0)}valueOf(){return void 0!==this.value?this.value.valueOf():void 0}Yv(){return this.valueOf()}Cm(a){return olympe.C.va([this,a],(b,c)=>b.valueOf()>c.valueOf()?olympe.C.fa.F:olympe.C.fa.D,olympe.C.fa,'ONumber.isBiggerThan')}xx(a){return olympe.C.va([this,a],(b,c)=>b.valueOf()>=c.valueOf()?b:olympe.C.ta(c),olympe.C.da,'ONumber.returnsBiggest')}gr(a){return olympe.C.va([this,
|
|
263
|
+
a],(b,c)=>b.valueOf()<=c.valueOf()?b:olympe.C.ta(c),olympe.C.da,'ONumber.returnsSmallest')}Lw(a){return olympe.C.va([this,a],(b,c)=>b.valueOf()<c.valueOf()?olympe.C.fa.F:olympe.C.fa.D,olympe.C.fa,'ONumber.isSmallerThan')}sin(){return olympe.C.ta(Math.sin(this.valueOf()))}cos(){return olympe.C.ta(Math.cos(this.valueOf()))}atan2(a){return olympe.C.Za(a)?olympe.C.Md([a],b=>olympe.C.ta(Math.atan2(this.valueOf(),b.valueOf())),olympe.C.da):olympe.C.ta(Math.atan2(this.valueOf(),a.valueOf()))}abs(){return olympe.C.ta(Math.abs(this.valueOf()))}Pi(a,
|
|
264
264
|
b){return olympe.C.Za(a)||olympe.C.Za(b)?olympe.C.Md([a,b],(c,d)=>olympe.C.ta(this.valueOf()*d.valueOf()+c.valueOf()*(1-d.valueOf())),olympe.C.da):olympe.C.ta(this.valueOf()*b.valueOf()+a.valueOf()*(1-b.valueOf()))}static lu(a,b,c,d){'number'===typeof a&&(a=olympe.C.Kd(a));'number'===typeof b&&(b=olympe.C.Kd(b));'number'===typeof c&&(c=olympe.C.Kd(c));let e=0;const f=olympe.C.Kd(0);let g,h;void 0!==b&&void 0!==c&&olympe.C.ik(b.Cm(c),()=>{olympe.ua.vb('df').warn('You have a min bigger than max, cap your inputs')});
|
|
265
|
-
const k=(m,n)=>{n=olympe.C.Kd(n);const p=olympe.C.da.animate(n,500);mb(f,p);jb(n,olympe.C.ta(m));e=m};olympe.C.Md([a],m=>{e+=m.valueOf();e>h?k(h,e):e<g?k(g,e):mb(f,olympe.C.Kd(e))},olympe.C.da);void 0!==b&&olympe.C.rk(b.valueOf(),m=>{if(g!==m&&(g=m,g>e)){const n=olympe.C.Kd(e),p=olympe.C.da.animate(n,400,d);m=olympe.C.ta(g);K(n.
|
|
266
|
-
p)}});return f}static offset(a){let b;return olympe.C.Md([a],c=>{void 0===b&&(b=c);return olympe.C.ta(c-b)},olympe.C.da,'offset')}static Bq(a){let b,c,d;return olympe.C.va([a],e=>{if(void 0===b)return b=e,c=window.performance.now(),olympe.C.ta(0);d=window.performance.now();const f=olympe.C.ta((e.valueOf()-b.valueOf())/(d-c));b=e;c=d;return f},olympe.C.da,'derivative')}static
|
|
265
|
+
const k=(m,n)=>{n=olympe.C.Kd(n);const p=olympe.C.da.animate(n,500);mb(f,p);jb(n,olympe.C.ta(m));e=m};olympe.C.Md([a],m=>{e+=m.valueOf();e>h?k(h,e):e<g?k(g,e):mb(f,olympe.C.Kd(e))},olympe.C.da);void 0!==b&&olympe.C.rk(b.valueOf(),m=>{if(g!==m&&(g=m,g>e)){const n=olympe.C.Kd(e),p=olympe.C.da.animate(n,400,d);m=olympe.C.ta(g);K(n.Ua,m);e=g;mb(f,p)}});void 0!==c&&olympe.C.rk(c.valueOf(),m=>{if(h!==m&&(h=m,h<e)){const n=olympe.C.Kd(e),p=olympe.C.da.animate(n,400,d);m=olympe.C.ta(h);K(n.Ua,m);e=h;mb(f,
|
|
266
|
+
p)}});return f}static offset(a){let b;return olympe.C.Md([a],c=>{void 0===b&&(b=c);return olympe.C.ta(c-b)},olympe.C.da,'offset')}static Bq(a){let b,c,d;return olympe.C.va([a],e=>{if(void 0===b)return b=e,c=window.performance.now(),olympe.C.ta(0);d=window.performance.now();const f=olympe.C.ta((e.valueOf()-b.valueOf())/(d-c));b=e;c=d;return f},olympe.C.da,'derivative')}static Fw(a){let b=olympe.C.ta(0),c,d,e;return olympe.C.va([a],f=>{if(void 0===c)return c=f,d=window.performance.now(),olympe.C.ta(0);
|
|
267
267
|
e=window.performance.now();b=b.Ld((f.valueOf()+c.valueOf())/2*(e-d));c=f;d=e;return b},olympe.C.da,'integrate')}static Tu(a){let b;return olympe.C.va([a],c=>{void 0===b&&(b=c.valueOf());const d=olympe.C.ta(c.valueOf()-b.valueOf());b=c;return d},olympe.C.da,'diff')}static Lu(a,b,c){return olympe.C.Md([a,b,c],(d,e,f)=>{d='number'===typeof d?d:d.valueOf();e='number'===typeof e?e:e.valueOf();f='number'===typeof f?f:f.valueOf();return olympe.C.ta(d>=e?d<=f?d:f:e)},olympe.C.da)}static animate(a,b,c,d){let e;
|
|
268
|
-
return e=olympe.C.va([a],f=>{const g=olympe.C.
|
|
269
|
-
olympe.C.va([a],b=>olympe.C.pb(b.valueOf().toString()),olympe.C.
|
|
270
|
-
'minus'):olympe.C.ta(a.valueOf()-b.valueOf())}static Ai(a,b){return olympe.C.Za(a)||olympe.C.Za(b)?olympe.C.Md([a,b],(c,d)=>olympe.C.ta(c.valueOf()/d.valueOf()),olympe.C.da,'div'):olympe.C.ta(a.valueOf()/b.valueOf())}static
|
|
271
|
-
olympe.C.da.ns=new olympe.C.da(Infinity);olympe.C.da.it=new olympe.C.da(-Infinity);olympe.C.da.Yo=new olympe.C.da(NaN);olympe.C.da.
|
|
272
|
-
olympe.C.da.
|
|
273
|
-
olympe.C.da.Nn={Po:function(a,b,c,d){return c*a/d+b},
|
|
274
|
-
|
|
275
|
-
10*(a/d-1))+b},
|
|
276
|
-
c*(2*d*d+2*d*a+-3*d)},
|
|
277
|
-
b,c,d){return(a/=d)<1/2.75?7.5625*c*a*a+b:a<2/2.75?c*(7.5625*(a-=1.5/2.75)*a+.75)+b:a<2.5/2.75?c*(7.5625*(a-=2.25/2.75)*a+.9375)+b:c*(7.5625*(a-=2.625/2.75)*a+.984375)+b},
|
|
278
|
-
l.toString.K=new olympe.C.J(()=>String,[]);l.toFixed.K=new olympe.C.J(()=>String,[]);l.Ld.K=new olympe.C.J(()=>olympe.C.da,[0]);l.Ug.K=new olympe.C.J(()=>olympe.C.da,[0]);l.round.K=olympe.C.J.G;l.Zi.K=olympe.C.J.G;l.mk.K=new olympe.C.J(()=>olympe.C.da,[0]);l.Ai.K=new olympe.C.J(()=>olympe.C.da,[0]);l.
|
|
279
|
-
l.Dd.K=new olympe.C.J(()=>olympe.C.fa,[0]);l.tb.K=olympe.C.J.D;l.valueOf.K=olympe.C.J.D;l.
|
|
280
|
-
a))}mr(){return olympe.C.ta(parseFloat(this.value))}toString(){return this.value}valueOf(){return this.value.valueOf()}tb(a){return this.value===(void 0===a||null===a?void 0:a.valueOf())}Dd(a){return olympe.C.va([this,a],(b,c)=>olympe.C.rc(c&&b.valueOf()===c.valueOf()),olympe.C.fa,'OString.oEquals')}qf(){return olympe.C.rc(!this.value||0===this.value.length)}contains(a){return olympe.C.va([this,a],(b,c)=>olympe.C.rc((c instanceof olympe.C.
|
|
268
|
+
return e=olympe.C.va([a],f=>{const g=olympe.C.Sa(b,1E3),h=olympe.C.Sa(e);return void 0===h?olympe.C.ta(f):pb(h,f,g,c,k=>{d&&d(k)})},olympe.C.da)}static zu(a,b,c){let d,e,f,g,h,k,m=olympe.C.Kd(),n;olympe.C.tc([a],p=>{void 0===d?g=d=p.valueOf():d=g;f=window.performance.now();e=p.valueOf();k=e-d;0!==k&&void 0===n&&(n=setInterval(()=>{k=e-d;h=(window.performance.now()-f)/b;1<=h&&(h=1);g=d+k*c(h,0,1,1);jb(m,olympe.C.ta(g));1===h&&(clearTimeout(n),n=void 0)},0))});return m}static Wc(a){return olympe.C.Za(a)?
|
|
269
|
+
olympe.C.va([a],b=>olympe.C.pb(b.valueOf().toString()),olympe.C.Ra):olympe.C.pb(a)}static Zi(a){return olympe.C.Za(a)?olympe.C.va([a],b=>olympe.C.ta(-b.valueOf()),olympe.C.da):olympe.C.ta(-a.valueOf())}static Ld(a,b){return olympe.C.Za(a)||olympe.C.Za(b)?olympe.C.va([a,b],(c,d)=>olympe.C.ta(c.valueOf()+d.valueOf()),olympe.C.da,'plus'):olympe.C.ta(a.valueOf()+b.valueOf())}static Ug(a,b){return olympe.C.Za(a)||olympe.C.Za(b)?olympe.C.Md([a,b],(c,d)=>olympe.C.ta(c.valueOf()-d.valueOf()),olympe.C.da,
|
|
270
|
+
'minus'):olympe.C.ta(a.valueOf()-b.valueOf())}static Ai(a,b){return olympe.C.Za(a)||olympe.C.Za(b)?olympe.C.Md([a,b],(c,d)=>olympe.C.ta(c.valueOf()/d.valueOf()),olympe.C.da,'div'):olympe.C.ta(a.valueOf()/b.valueOf())}static tx(a,b){if(void 0===b)return a;olympe.C.tc([b],c=>{c=olympe.C.ta(M(a).valueOf()+c.valueOf());K(a.Ua,c)},'plusEqual');return a}};olympe.C.da.ZERO=new olympe.C.da(0);olympe.C.da.ONE=new olympe.C.da(1);olympe.C.da.eu=new olympe.C.da(2);olympe.C.da.PI=new olympe.C.da(Math.PI);
|
|
271
|
+
olympe.C.da.ns=new olympe.C.da(Infinity);olympe.C.da.it=new olympe.C.da(-Infinity);olympe.C.da.Yo=new olympe.C.da(NaN);olympe.C.da.Rz=olympe.C.da.tx;olympe.C.da.by=olympe.C.da.lu;olympe.C.da.Jz=olympe.C.da.offset;olympe.C.da.Ay=olympe.C.da.Bq;olympe.C.da.UB=olympe.C.da.Bq;olympe.C.da.sz=olympe.C.da.Fw;olympe.C.da.By=olympe.C.da.Tu;olympe.C.da.qy=olympe.C.da.Lu;olympe.C.da.cy=olympe.C.da.animate;olympe.C.da.dy=olympe.C.da.zu;olympe.C.da.iB=olympe.C.da.Wc;olympe.C.da.jB=olympe.C.da.Zi;
|
|
272
|
+
olympe.C.da.Qz=olympe.C.da.Ld;olympe.C.da.Ez=olympe.C.da.Ug;olympe.C.da.Cy=olympe.C.da.Ai;
|
|
273
|
+
olympe.C.da.Nn={Po:function(a,b,c,d){return c*a/d+b},Xy:function(a,b,c,d){a/=d;return c*a*a+b},gz:function(a,b,c,d){a/=d;return-c*a*(a-2)+b},Ty:function(a,b,c,d){a/=d/2;if(1>a)return c/2*a*a+b;a--;return-c/2*(a*(a-2)-1)+b},My:function(a,b,c,d){a/=d;return c*a*a*a+b},cz:function(a,b,c,d){a/=d;a--;return c*(a*a*a+1)+b},Ry:function(a,b,c,d){a/=d/2;if(1>a)return c/2*a*a*a+b;a-=2;return c/2*(a*a*a+2)+b},Yy:function(a,b,c,d){a/=d;return c*a*a*a*a+b},hz:function(a,b,c,d){a/=d;a--;return-c*(a*a*a*a-1)+b},
|
|
274
|
+
Uy:function(a,b,c,d){a/=d/2;if(1>a)return c/2*a*a*a*a+b;a-=2;return-c/2*(a*a*a*a-2)+b},Zy:function(a,b,c,d){a/=d;return c*a*a*a*a*a+b},iz:function(a,b,c,d){a/=d;a--;return c*(a*a*a*a*a+1)+b},Vy:function(a,b,c,d){a/=d/2;if(1>a)return c/2*a*a*a*a*a+b;a-=2;return c/2*(a*a*a*a*a+2)+b},$y:function(a,b,c,d){return-c*Math.cos(a/d*(Math.PI/2))+c+b},jz:function(a,b,c,d){return c*Math.sin(a/d*(Math.PI/2))+b},Wy:function(a,b,c,d){return-c/2*(Math.cos(Math.PI*a/d)-1)+b},Py:function(a,b,c,d){return c*Math.pow(2,
|
|
275
|
+
10*(a/d-1))+b},fz:function(a,b,c,d){return c*(-Math.pow(2,-10*a/d)+1)+b},Sy:function(a,b,c,d){a/=d/2;if(1>a)return c/2*Math.pow(2,10*(a-1))+b;a--;return c/2*(-Math.pow(2,-10*a)+2)+b},Ly:function(a,b,c,d){a/=d;return-c*(Math.sqrt(1-a*a)-1)+b},bz:function(a,b,c,d){a/=d;a--;return c*Math.sqrt(1-a*a)+b},Qy:function(a,b,c,d){a/=d/2;if(1>a)return-c/2*(Math.sqrt(1-a*a)-1)+b;a-=2;return c/2*(Math.sqrt(1-a*a)+1)+b},Gy:function(a,b,c,d){d=(a/=d)*a;return b+c*(4*d*a+-3*d)},Hy:function(a,b,c,d){d=(a/=d)*a;return b+
|
|
276
|
+
c*(2*d*d+2*d*a+-3*d)},Iy:function(a,b,c,d){d=(a/=d)*a;return b+c*(4*d*a+-9*d+6*a)},Jy:function(a,b,c,d){d=(a/=d)*a;return b+c*(-2*d*d+10*d*a+-15*d+8*a)},ez:function(a,b,c,d){d=(a/=d)*a;const e=d*a;return b+c*(33*e*d+-106*d*d+126*e+-67*d+15*a)},dz:function(a,b,c,d){d=(a/=d)*a;const e=d*a;return b+c*(56*e*d+-175*d*d+200*e+-100*d+20*a)},Oy:function(a,b,c,d){d=(a/=d)*a;a*=d;return b+c*(33*a*d+-59*d*d+32*a+-5*d)},Ny:function(a,b,c,d){d=(a/=d)*a;a*=d;return b+c*(56*a*d+-105*d*d+60*a+-10*d)},az:function(a,
|
|
277
|
+
b,c,d){return(a/=d)<1/2.75?7.5625*c*a*a+b:a<2/2.75?c*(7.5625*(a-=1.5/2.75)*a+.75)+b:a<2.5/2.75?c*(7.5625*(a-=2.25/2.75)*a+.9375)+b:c*(7.5625*(a-=2.625/2.75)*a+.984375)+b},Ky:function(a,b,c,d){a=d-a;d=(a/=d)<1/2.75?7.5625*c*a*a:a<2/2.75?c*(7.5625*(a-=1.5/2.75)*a+.75):a<2.5/2.75?c*(7.5625*(a-=2.25/2.75)*a+.9375):c*(7.5625*(a-=2.625/2.75)*a+.984375);return c-d+b}};l=olympe.C.da.prototype;l.toJSON.K=olympe.C.J.D;l.Um.K=olympe.C.J.D;l.isNaN.K=olympe.C.J.P;l.Wc.K=olympe.C.J.F;
|
|
278
|
+
l.toString.K=new olympe.C.J(()=>String,[]);l.toFixed.K=new olympe.C.J(()=>String,[]);l.Ld.K=new olympe.C.J(()=>olympe.C.da,[0]);l.Ug.K=new olympe.C.J(()=>olympe.C.da,[0]);l.round.K=olympe.C.J.G;l.Zi.K=olympe.C.J.G;l.mk.K=new olympe.C.J(()=>olympe.C.da,[0]);l.Ai.K=new olympe.C.J(()=>olympe.C.da,[0]);l.Yw.K=new olympe.C.J(()=>olympe.C.da,[0]);l.floor.K=olympe.C.J.G;l.ceil.K=olympe.C.J.G;l.trunc.K=olympe.C.J.G;l.log.K=olympe.C.J.G;l.pow.K=new olympe.C.J(()=>olympe.C.da,[0]);l.exp.K=olympe.C.J.G;
|
|
279
|
+
l.Dd.K=new olympe.C.J(()=>olympe.C.fa,[0]);l.tb.K=olympe.C.J.D;l.valueOf.K=olympe.C.J.D;l.Yv.K=olympe.C.J.D;l.Cm.K=new olympe.C.J(()=>olympe.C.fa,[0]);l.xx.K=new olympe.C.J(()=>olympe.C.da,[0]);l.gr.K=new olympe.C.J(()=>olympe.C.da,[0]);l.Lw.K=new olympe.C.J(()=>olympe.C.fa,[0]);l.sin.K=olympe.C.J.G;l.cos.K=olympe.C.J.G;l.atan2.K=new olympe.C.J(()=>olympe.C.da,[0]);l.abs.K=olympe.C.J.G;l.Pi.K=new olympe.C.J(()=>olympe.C.da,[0,1]);olympe.C.Ra=class{constructor(a){this.value=a}toJSON(){return'{ "type": "string", "value": '+JSON.stringify(this.value)+' }'}static ac(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return olympe.C.pb(b.value)}xq(a){return olympe.C.Ra.concat(this,'.',a)}concat(...a){let b;Array.isArray(a[0])?b=a[0]:b=a;return olympe.C.va([this,...b],(...c)=>{let d='';for(let e=0,f=c.length;e<f;e++)d=c[e]?d+c[e].valueOf():d+c[e];return olympe.C.pb(d)},olympe.C.Ra,'OString.concat')}Wc(){return this}Vx(a){return olympe.C.ta(parseInt(this.value,
|
|
280
|
+
a))}mr(){return olympe.C.ta(parseFloat(this.value))}toString(){return this.value}valueOf(){return this.value.valueOf()}tb(a){return this.value===(void 0===a||null===a?void 0:a.valueOf())}Dd(a){return olympe.C.va([this,a],(b,c)=>olympe.C.rc(c&&b.valueOf()===c.valueOf()),olympe.C.fa,'OString.oEquals')}qf(){return olympe.C.rc(!this.value||0===this.value.length)}contains(a){return olympe.C.va([this,a],(b,c)=>olympe.C.rc((c instanceof olympe.C.Ra||'string'===typeof c)&&b.valueOf().includes(c.valueOf())),
|
|
281
281
|
olympe.C.fa,'OString.contains')}startsWith(a,b){return olympe.C.va([this,a,b||0],(c,d,e)=>olympe.C.rc(c.valueOf().startsWith(d.valueOf(),e.valueOf())),olympe.C.fa,'OString.startsWith')}endsWith(a,b){return olympe.C.va([this,a,b||-1],(c,d,e)=>{e=0<=e.valueOf()?e.valueOf():this.um().valueOf()+e.valueOf()+1;return olympe.C.rc(c.valueOf().endsWith(d.valueOf(),e))},olympe.C.fa,'OString.endsWith')}indexOf(a,b){return olympe.C.va([this,a,b||0],(c,d,e)=>olympe.C.ta(c.valueOf().indexOf(d.valueOf(),e.valueOf())),
|
|
282
|
-
olympe.C.da,'OString.indexOf')}lastIndexOf(a,b){return olympe.C.va([this,a,b||Infinity],(c,d,e)=>olympe.C.ta(c.valueOf().lastIndexOf(d.valueOf(),e.valueOf())),olympe.C.da,'OString.lastIndexOf')}slice(a,b){return olympe.C.va([this,a,b],(c,d,e)=>olympe.C.pb(c.valueOf().slice(d.valueOf(),e?e.valueOf():void 0)),olympe.C.
|
|
283
|
-
b){return olympe.C.va([this,a,b],(c,d,e)=>olympe.C.pb(c.valueOf().padStart(d.valueOf(),e.valueOf())),olympe.C.
|
|
284
|
-
e.valueOf())),olympe.C.
|
|
285
|
-
l.contains.K=new olympe.C.J(()=>olympe.C.fa,[0]);l.startsWith.K=new olympe.C.J(()=>olympe.C.fa,[0,1]);l.endsWith.K=new olympe.C.J(()=>olympe.C.fa,[0,1]);l.indexOf.K=new olympe.C.J(()=>olympe.C.da,[0,1]);l.lastIndexOf.K=new olympe.C.J(()=>olympe.C.da,[0,1]);l.slice.K=new olympe.C.J(()=>olympe.C.
|
|
286
|
-
l.replace.K=olympe.C.J.F;l.
|
|
282
|
+
olympe.C.da,'OString.indexOf')}lastIndexOf(a,b){return olympe.C.va([this,a,b||Infinity],(c,d,e)=>olympe.C.ta(c.valueOf().lastIndexOf(d.valueOf(),e.valueOf())),olympe.C.da,'OString.lastIndexOf')}slice(a,b){return olympe.C.va([this,a,b],(c,d,e)=>olympe.C.pb(c.valueOf().slice(d.valueOf(),e?e.valueOf():void 0)),olympe.C.Ra,'OString.slice')}um(){return olympe.C.ta(this.value.length)}threshold(a){return olympe.C.va([this,a],(b,c)=>b.valueOf().length>=c.valueOf()?b:olympe.C.Ra.EMPTY,olympe.C.Ra,'OString.threshold')}toLowerCase(){return olympe.C.pb(this.value.toLowerCase())}toUpperCase(){return olympe.C.pb(this.value.toUpperCase())}trim(){return olympe.C.pb(this.value.trim())}padStart(a,
|
|
283
|
+
b){return olympe.C.va([this,a,b],(c,d,e)=>olympe.C.pb(c.valueOf().padStart(d.valueOf(),e.valueOf())),olympe.C.Ra,'OString.padStart')}padEnd(a,b){return olympe.C.va([this,a,b],(c,d,e)=>olympe.C.pb(c.valueOf().padEnd(d.valueOf(),e.valueOf())),olympe.C.Ra,'OString.padEnd')}replace(a,b){return olympe.C.va([this,a,b],(c,d,e)=>olympe.C.pb(c.valueOf().replace(d.valueOf(),e.valueOf())),olympe.C.Ra,'OString.replace')}Sx(a,b){return olympe.C.va([this,a,b],(c,d,e)=>olympe.C.pb(c.valueOf().substr(d.valueOf(),
|
|
284
|
+
e.valueOf())),olympe.C.Ra,'OString.subOStr')}static concat(...a){return olympe.C.pb('').concat(...a)}};olympe.C.Ra.EMPTY=new olympe.C.Ra('');olympe.C.Ra.Rt=new olympe.C.Ra(' ');l=olympe.C.Ra.prototype;l.toJSON.K=olympe.C.J.D;l.xq.K=new olympe.C.J(()=>olympe.C.Ra,[0,1]);l.concat.K=olympe.C.J.F;l.Wc.K=olympe.C.J.F;l.Vx.K=olympe.C.J.G;l.mr.K=olympe.C.J.G;l.toString.K=olympe.C.J.D;l.valueOf.K=olympe.C.J.D;l.tb.K=olympe.C.J.D;l.Dd.K=new olympe.C.J(()=>olympe.C.fa,[0]);l.qf.K=olympe.C.J.P;
|
|
285
|
+
l.contains.K=new olympe.C.J(()=>olympe.C.fa,[0]);l.startsWith.K=new olympe.C.J(()=>olympe.C.fa,[0,1]);l.endsWith.K=new olympe.C.J(()=>olympe.C.fa,[0,1]);l.indexOf.K=new olympe.C.J(()=>olympe.C.da,[0,1]);l.lastIndexOf.K=new olympe.C.J(()=>olympe.C.da,[0,1]);l.slice.K=new olympe.C.J(()=>olympe.C.Ra,[0,1]);l.um.K=olympe.C.J.G;l.threshold.K=new olympe.C.J(()=>olympe.C.Ra,[0]);l.toLowerCase.K=olympe.C.J.F;l.toUpperCase.K=olympe.C.J.F;l.trim.K=olympe.C.J.F;l.padStart.K=olympe.C.J.F;l.padEnd.K=olympe.C.J.F;
|
|
286
|
+
l.replace.K=olympe.C.J.F;l.Sx.K=olympe.C.J.F;olympe.C.fa=class{constructor(a){this.value=a}toJSON(){return`{ "type": "boolean", "value": ${this.value.valueOf()}}`}static ac(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return b.value?olympe.C.fa.F:olympe.C.fa.D}and(a){if(void 0!==a)return olympe.C.Za(a)?olympe.C.Md([a],b=>new olympe.C.fa(this.valueOf()&&b.valueOf()),olympe.C.fa,'and'):this.value&&a.valueOf()?olympe.C.fa.F:olympe.C.fa.D}tb(a){return this.valueOf()===(void 0!==a?a.valueOf():void 0)}Dd(a){if(void 0!==a)return olympe.C.Za(a)?
|
|
287
287
|
olympe.C.Md([a],b=>new olympe.C.fa(this.valueOf()===b.valueOf()),olympe.C.fa,'oEquals'):this.tb(a)?olympe.C.fa.F:olympe.C.fa.D}Wg(){return this.value?olympe.C.fa.D:olympe.C.fa.F}yu(a){if(void 0!==a)return olympe.C.Za(a)?olympe.C.Md([a],b=>new olympe.C.fa(!(this.valueOf()&&b.valueOf())),olympe.C.fa,'andNot'):this.value&&!a.valueOf()?olympe.C.fa.F:olympe.C.fa.D}or(a){if(void 0!==a)return olympe.C.Za(a)?olympe.C.Md([a],b=>new olympe.C.fa(this.valueOf()||b.valueOf()),olympe.C.fa,'or'):this.value||a.valueOf()?
|
|
288
288
|
olympe.C.fa.F:olympe.C.fa.D}xor(a){return olympe.C.va([this,a],(b,c)=>{b=b.valueOf();c=c.valueOf();return olympe.C.rc(b&&!c||!b&&c)},olympe.C.fa,'OBoolean.xor')}mv(){return this.value}Mq(){return!0===this.value?olympe.C.da.ONE:olympe.C.da.ZERO}Wc(){return olympe.C.pb(this.toString())}toString(){return this.value?'true':'false'}valueOf(){return this.value}};olympe.C.fa.F=new olympe.C.fa(!0);olympe.C.fa.D=new olympe.C.fa(!1);l=olympe.C.fa.prototype;l.toJSON.K=olympe.C.J.D;
|
|
289
|
-
l.and.K=new olympe.C.J(()=>olympe.C.fa,[0]);l.tb.K=olympe.C.J.D;l.Dd.K=new olympe.C.J(()=>olympe.C.fa,[0]);l.Wg.K=olympe.C.J.P;l.yu.K=new olympe.C.J(()=>olympe.C.fa,[0]);l.or.K=new olympe.C.J(()=>olympe.C.fa,[0]);l.xor.K=new olympe.C.J(()=>olympe.C.fa,[0]);l.mv.K=new olympe.C.J(()=>Boolean,[]);l.Mq.K=olympe.C.J.G;l.Wc.K=olympe.C.J.F;l.toString.K=olympe.C.J.D;l.valueOf.K=olympe.C.J.D;function qb(a){return new olympe.C.
|
|
290
|
-
olympe.C.
|
|
291
|
-
olympe.C,b=a.pb;var c=this.lb.getDate();c=10>c?'0'+c:c;var d=this.lb.getMonth()+1;return b.call(a,`${c}.${10>d?'0'+d:d}.${this.lb.getFullYear()}`)}toLocaleString(a){return void 0===a||'string'===typeof a?olympe.C.pb(this.lb.toLocaleString(a)):olympe.C.va([this,a],(b,c)=>olympe.C.pb(b.lb.toLocaleString(c.valueOf())),olympe.C.
|
|
292
|
-
olympe.C.
|
|
293
|
-
a)}uu(a){return this.Gf('Seconds',a)}qu(a){return this.Gf('Minutes',a)}ou(a){return this.Gf('Hours',a)}Xl(a){return this.Gf('Date',a)}vu(a){return'number'===typeof a?this.Xl(7*a):this.Xl(a.mk(7))}ru(a){return this.Gf('Month',a)}wu(a){return this.Gf('FullYear',a)}
|
|
294
|
-
b=>olympe.C.rc(this.tb(b)),olympe.C.fa)}tb(a){return a instanceof olympe.C.
|
|
295
|
-
void 0===d&&(olympe.ua.vb('df').warn("[getDiff] '_unit' is not a valid unit! Defaulting to milliseconds"),d=1),c=Math.trunc((this.lb.getTime()-c.lb.getTime())/d));return olympe.C.ta(c)},olympe.C.da)}
|
|
296
|
-
new Date(this.getTime()):(olympe.ua.vb('df').warn('Invalid datetime, returns Date(0).'),new Date(0))}};olympe.C.
|
|
297
|
-
l.toLocaleTimeString.K=olympe.C.J.F;l.Wc.K=olympe.C.J.F;l.lr.K=olympe.C.J.D;l.
|
|
298
|
-
l.wu.K=new olympe.C.J(()=>olympe.C.
|
|
289
|
+
l.and.K=new olympe.C.J(()=>olympe.C.fa,[0]);l.tb.K=olympe.C.J.D;l.Dd.K=new olympe.C.J(()=>olympe.C.fa,[0]);l.Wg.K=olympe.C.J.P;l.yu.K=new olympe.C.J(()=>olympe.C.fa,[0]);l.or.K=new olympe.C.J(()=>olympe.C.fa,[0]);l.xor.K=new olympe.C.J(()=>olympe.C.fa,[0]);l.mv.K=new olympe.C.J(()=>Boolean,[]);l.Mq.K=olympe.C.J.G;l.Wc.K=olympe.C.J.F;l.toString.K=olympe.C.J.D;l.valueOf.K=olympe.C.J.D;function qb(a){return new olympe.C.bb(new Date(a))}
|
|
290
|
+
olympe.C.bb=class{constructor(a){this.lb=a}toJSON(){return'{ "type": "dateTime", "value": "'+this.lb.toJSON()+'" }'}static ac(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return new olympe.C.bb(new Date(b.value.valueOf()))}static now(){return new olympe.C.bb(new Date)}Wq(){return this.lb&&!isNaN(this.lb.getTime())?olympe.C.fa.F:olympe.C.fa.D}vs(){return olympe.C.ta(this.lb.getMilliseconds())}xs(){return olympe.C.ta(this.lb.getSeconds())}ws(){return olympe.C.ta(this.lb.getMinutes())}us(){return olympe.C.ta(this.lb.getHours())}yv(){return olympe.C.ta(this.lb.getDate())}getMonth(){return olympe.C.ta(this.lb.getMonth()+1)}ys(){return olympe.C.ta(this.lb.getFullYear())}getTime(){return this.lb.getTime()}Ox(){var a=
|
|
291
|
+
olympe.C,b=a.pb;var c=this.lb.getDate();c=10>c?'0'+c:c;var d=this.lb.getMonth()+1;return b.call(a,`${c}.${10>d?'0'+d:d}.${this.lb.getFullYear()}`)}toLocaleString(a){return void 0===a||'string'===typeof a?olympe.C.pb(this.lb.toLocaleString(a)):olympe.C.va([this,a],(b,c)=>olympe.C.pb(b.lb.toLocaleString(c.valueOf())),olympe.C.Ra)}toLocaleDateString(a){return void 0===a||'string'===typeof a?olympe.C.pb(this.lb.toLocaleDateString(a)):olympe.C.va([this,a],(b,c)=>olympe.C.pb(b.lb.toLocaleDateString(c.valueOf())),
|
|
292
|
+
olympe.C.Ra)}toLocaleTimeString(a){return void 0===a||'string'===typeof a?olympe.C.pb(this.lb.toLocaleTimeString(a)):olympe.C.va([this,a],(b,c)=>olympe.C.pb(b.lb.toLocaleTimeString(c.valueOf())),olympe.C.Ra)}Wc(){return olympe.C.pb(this.lb.toISOString())}lr(){return new Date(this.getTime())}Ux(){return this}Wx(){return this}clone(){return new olympe.C.bb(new Date(this.lb.getTime()))}Gf(a,b){return olympe.C.va([b],c=>{const d=this.clone();d.lb['set'+a](this.lb['get'+a]()+c.valueOf());return d},olympe.C.bb)}pu(a){return this.Gf('Milliseconds',
|
|
293
|
+
a)}uu(a){return this.Gf('Seconds',a)}qu(a){return this.Gf('Minutes',a)}ou(a){return this.Gf('Hours',a)}Xl(a){return this.Gf('Date',a)}vu(a){return'number'===typeof a?this.Xl(7*a):this.Xl(a.mk(7))}ru(a){return this.Gf('Month',a)}wu(a){return this.Gf('FullYear',a)}Qx(){let a=this.lb.getDay();a=0===a?6:a-1;return new olympe.C.bb(new Date(this.lb.getFullYear(),this.lb.getMonth(),this.lb.getDate()-a))}Rx(){return new olympe.C.bb(new Date(this.lb.getFullYear(),this.lb.getMonth()))}Dd(a){return olympe.C.va([a],
|
|
294
|
+
b=>olympe.C.rc(this.tb(b)),olympe.C.fa)}tb(a){return a instanceof olympe.C.bb?this.getTime()===a.getTime()||isNaN(this.getTime())&&isNaN(a.getTime()):!1}Qv(){let a=this.lb.getDay();0===a&&(a=7);return olympe.C.ta(a)}Dv(a,b){return olympe.C.va([a,b],(c,d)=>{d=d.valueOf();'years'===d?c=this.lb.getFullYear()-c.lb.getFullYear():'months'===d?c=12*(this.lb.getFullYear()-c.lb.getFullYear())+(this.lb.getMonth()-c.lb.getMonth()):(d={milliseconds:1,seconds:1E3,minutes:6E4,hours:36E5,days:864E5,weeks:6048E5}[d],
|
|
295
|
+
void 0===d&&(olympe.ua.vb('df').warn("[getDiff] '_unit' is not a valid unit! Defaulting to milliseconds"),d=1),c=Math.trunc((this.lb.getTime()-c.lb.getTime())/d));return olympe.C.ta(c)},olympe.C.da)}Iw(a){return olympe.C.va([a],b=>olympe.C.rc(this.getTime()<b.getTime()),olympe.C.fa)}Gw(a){return olympe.C.va([a],b=>olympe.C.rc(this.getTime()>b.getTime()),olympe.C.fa)}Jw(a,b){return olympe.C.va([a,b],(c,d)=>olympe.C.rc(this.getTime()>c.getTime()&&this.getTime()<d.getTime()),olympe.C.fa)}valueOf(){return this.Wq().valueOf()?
|
|
296
|
+
new Date(this.getTime()):(olympe.ua.vb('df').warn('Invalid datetime, returns Date(0).'),new Date(0))}};olympe.C.bb.D=qb(0);olympe.C.bb.F=qb(Number.NaN);l=olympe.C.bb.prototype;l.Wq.K=olympe.C.J.P;l.vs.K=olympe.C.J.G;l.xs.K=olympe.C.J.G;l.ws.K=olympe.C.J.G;l.us.K=olympe.C.J.G;l.yv.K=olympe.C.J.G;l.getMonth.K=olympe.C.J.G;l.ys.K=olympe.C.J.G;l.getTime.K=olympe.C.J.D;l.Ox.K=new olympe.C.J(()=>olympe.C.Ra,[0]);l.toLocaleString.K=olympe.C.J.F;l.toLocaleDateString.K=olympe.C.J.F;
|
|
297
|
+
l.toLocaleTimeString.K=olympe.C.J.F;l.Wc.K=olympe.C.J.F;l.lr.K=olympe.C.J.D;l.Ux.K=new olympe.C.J(()=>olympe.C.bb,[]);l.Wx.K=new olympe.C.J(()=>olympe.C.bb,[]);l.Gf.K=new olympe.C.J(()=>olympe.C.bb,[]);l.pu.K=new olympe.C.J(()=>olympe.C.bb,[]);l.uu.K=new olympe.C.J(()=>olympe.C.bb,[]);l.qu.K=new olympe.C.J(()=>olympe.C.bb,[]);l.ou.K=new olympe.C.J(()=>olympe.C.bb,[]);l.Xl.K=new olympe.C.J(()=>olympe.C.bb,[0]);l.vu.K=new olympe.C.J(()=>olympe.C.bb,[]);l.ru.K=new olympe.C.J(()=>olympe.C.bb,[]);
|
|
298
|
+
l.wu.K=new olympe.C.J(()=>olympe.C.bb,[0]);l.Qx.K=new olympe.C.J(()=>olympe.C.bb,[]);l.Rx.K=new olympe.C.J(()=>olympe.C.bb,[]);l.Dd.K=olympe.C.J.P;l.tb.K=olympe.C.J.D;l.Qv.K=olympe.C.J.G;l.Dv.K=new olympe.C.J(()=>olympe.C.da,[0,1]);l.Iw.K=new olympe.C.J(()=>olympe.C.fa,[0]);l.Gw.K=new olympe.C.J(()=>olympe.C.fa,[0]);l.Jw.K=new olympe.C.J(()=>olympe.C.fa,[0,1]);l.valueOf.K=olympe.C.J.D;const rb=new Map,sb=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i,tb=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i;function ub(a){const b=c=>{let d;c=c.valueOf();6>c.length?(d=17,c=tb.exec(c)):(d=1,c=sb.exec(c));c=c?c.slice(1).map(e=>parseInt(e,16)*d):[0,0,0];return olympe.C.Color.create(c[0],c[1],c[2],isNaN(c[3])?1:c[3]/255)};return olympe.C.sf(a)?olympe.C.Md([a],b,olympe.C.Color):b(a)}
|
|
299
299
|
olympe.C.Color=class{constructor(a,b,c,d){this.D=olympe.C.ta(void 0!==a?Math.min(255,Math.max(0,Math.round(a))):0);this.F=olympe.C.ta(void 0!==b?Math.min(255,Math.max(0,Math.round(b))):0);this.b=olympe.C.ta(void 0!==c?Math.min(255,Math.max(0,Math.round(c))):0);this.a=olympe.C.ta(void 0!==d?Math.min(1,Math.max(0,d)):1)}toJSON(){return`{ "type": "color", "r": ${this.D.valueOf()}, "g": ${this.F.valueOf()}, "b": ${this.b.valueOf()}, "a": ${this.a.valueOf()} }`}static ac(a){let b;'string'===typeof a?b=
|
|
300
300
|
JSON.parse(a):b=a;return olympe.C.Color.create(b.r,b.g,b.b,b.a)}static create(a,b,c,d=1){return olympe.C.va([a,b,c,d],(e,f,g,h)=>{e=olympe.C.ta(void 0!==e?Math.min(255,Math.max(0,Math.round(e.valueOf()))):0);f=olympe.C.ta(void 0!==f?Math.min(255,Math.max(0,Math.round(f.valueOf()))):0);g=olympe.C.ta(void 0!==g?Math.min(255,Math.max(0,Math.round(g.valueOf()))):0);h=olympe.C.ta(void 0!==h?Math.min(1,Math.max(0,h.valueOf())):1);for(let k of rb.values())if(k&&k.D.tb(e)&&k.F.tb(f)&&k.b.tb(g)&&k.a.tb(h))return k;
|
|
301
301
|
return new olympe.C.Color(e,f,g,h)},olympe.C.Color)}Lg(){return this.D}Fg(){return this.b}Jg(){return this.F}Eg(){return this.a}Fu(a,b){return olympe.C.Color.create(this.D.Pi(a.Lg(),b),this.F.Pi(a.Jg(),b),this.b.Pi(a.Fg(),b),this.a.Pi(a.Eg(),b))}bv(a){return olympe.C.Color.create(this.D,this.F,this.b,a)}nr(){return`rgba(${this.D},${this.F},${this.b},${this.a})`}Tm(){const a=(16777216|this.b|this.F<<8|this.D<<16).toString(16).slice(1),b=1===this.a.valueOf()?'':(256|255*this.a).toString(16).slice(1);
|
|
302
302
|
return'#'+(a+b).toUpperCase()}toString(){return this.Tm()}tb(a){return a instanceof olympe.C.Color?this.D.valueOf()===a.D.valueOf()&&this.F.valueOf()===a.F.valueOf()&&this.b.valueOf()===a.b.valueOf()&&this.a.valueOf()===a.a.valueOf():!1}};olympe.C.Color.prototype.equals=olympe.C.Color.prototype.tb;olympe.C.Color.prototype.toHexString=olympe.C.Color.prototype.Tm;olympe.C.Color.prototype.toRGBString=olympe.C.Color.prototype.nr;olympe.C.Color.prototype.getAlpha=olympe.C.Color.prototype.Eg;
|
|
303
303
|
olympe.C.Color.prototype.getGreen=olympe.C.Color.prototype.Jg;olympe.C.Color.prototype.getBlue=olympe.C.Color.prototype.Fg;olympe.C.Color.prototype.getRed=olympe.C.Color.prototype.Lg;olympe.C.Color.create=olympe.C.Color.create;l=olympe.C.Color.prototype;l.toJSON.K=olympe.C.J.D;l.Lg.K=olympe.C.J.G;l.Fg.K=olympe.C.J.G;l.Jg.K=olympe.C.J.G;l.Eg.K=olympe.C.J.G;l.Fu.K=new olympe.C.J(()=>olympe.C.Color,[]);l.bv.K=new olympe.C.J(()=>olympe.C.Color,[]);l.nr.K=new olympe.C.J(()=>String,[]);
|
|
304
|
-
l.Tm.K=new olympe.C.J(()=>String,[]);l.tb.K=olympe.C.J.D;olympe.C.File=class{ia(){}Io(){}ml(){}wm(){}ak(){}qm(){}bk(){}rename(){}};olympe.C.$b=class{constructor(a,b){this.x=olympe.C.Kd(a);this.y=olympe.C.Kd(b)}toJSON(){return'{ "type": "vector2", "x": '+JSON.stringify(olympe.C.
|
|
305
|
-
olympe.C.$b,'Vector2.plus')}Ug(a){return olympe.C.va([this,a],(b,c)=>new olympe.C.$b(b.x.Ug(c.x),b.y.Ug(c.y)),olympe.C.$b,'Vector2.minus')}
|
|
304
|
+
l.Tm.K=new olympe.C.J(()=>String,[]);l.tb.K=olympe.C.J.D;olympe.C.File=class{ia(){}Io(){}ml(){}wm(){}ak(){}qm(){}bk(){}rename(){}};olympe.C.$b=class{constructor(a,b){this.x=olympe.C.Kd(a);this.y=olympe.C.Kd(b)}toJSON(){return'{ "type": "vector2", "x": '+JSON.stringify(olympe.C.Sa(this.x).valueOf())+', "y": '+JSON.stringify(olympe.C.Sa(this.y).valueOf())+' }'}static ac(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return new olympe.C.$b(b.x,b.y)}Dw(){return this.x}Mx(a){nb(this.x,a)}Ew(){return this.y}Nx(a){nb(this.y,a)}sw(){return this.x.gr(this.y)}Ld(a){return olympe.C.va([this,a],(b,c)=>new olympe.C.$b(b.x.Ld(c.x),b.y.Ld(c.y)),
|
|
305
|
+
olympe.C.$b,'Vector2.plus')}Ug(a){return olympe.C.va([this,a],(b,c)=>new olympe.C.$b(b.x.Ug(c.x),b.y.Ug(c.y)),olympe.C.$b,'Vector2.minus')}$w(a){return new olympe.C.$b(this.x.mk(a),this.y.mk(a))}Wu(a){return new olympe.C.$b(this.x.Ai(a),this.y.Ai(a))}bx(){return new olympe.C.$b(this.x.Zi(),this.y.Zi())}Xu(a){return olympe.C.va([this,a],(b,c)=>olympe.C.va([b.x,b.y,c.x,c.y],(d,e,f,g)=>olympe.C.ta(d*f+e*g),olympe.C.da),olympe.C.da)}length(){return olympe.C.va([this.x,this.y],(a,b)=>olympe.C.ta(Math.sqrt(a*
|
|
306
306
|
a+b*b)),olympe.C.da)}normalize(){return olympe.C.va([this.x,this.y],(a,b)=>{const c=Math.sqrt(a*a+b*b);return new olympe.C.$b(a/c,b/c)},olympe.C.$b)}floor(){return olympe.C.va([this.x,this.y],(a,b)=>new olympe.C.$b(Math.floor(a),Math.floor(b)),olympe.C.$b)}ceil(){return olympe.C.va([this.x,this.y],(a,b)=>new olympe.C.$b(Math.ceil(a),Math.ceil(b)),olympe.C.$b)}round(){return olympe.C.va([this.x,this.y],(a,b)=>new olympe.C.$b(Math.round(a),Math.round(b)),olympe.C.$b)}su(a){return new olympe.C.$b(this.x.Ld(a),
|
|
307
|
-
this.y.Ld(a))}tu(a,b){return new olympe.C.$b(this.x.Ld(a),this.y.Ld(b))}Wc(){return olympe.C.va([this.x,this.y],(a,b)=>olympe.C.pb(`Vector2[${a.valueOf()}, ${b.valueOf()}]`),olympe.C.
|
|
308
|
-
l.Ug.K=new olympe.C.J(()=>olympe.C.$b,[0]);l.
|
|
309
|
-
l.
|
|
310
|
-
c)&&ib(b[c],a)}get(a){let b=c=>{null===this.La&&(this.La={});return this.Gi(this.La,c,this.values[c],this.valueType,'Map.get('+c+')')};return olympe.C.va([a],c=>b(c),this.valueType)}Hg(a){a=this.values[a];return olympe.C.Za(a)?Ta(a.
|
|
311
|
-
{f=olympe.C.Ad(d,void 0,e);a[b]=f;f.
|
|
307
|
+
this.y.Ld(a))}tu(a,b){return new olympe.C.$b(this.x.Ld(a),this.y.Ld(b))}Wc(){return olympe.C.va([this.x,this.y],(a,b)=>olympe.C.pb(`Vector2[${a.valueOf()}, ${b.valueOf()}]`),olympe.C.Ra)}toString(){return`Vector2[${M(this.x)}, ${M(this.y)}]`}tb(a){return this===a?!0:!1}};l=olympe.C.$b.prototype;l.toJSON.K=olympe.C.J.D;l.Dw.K=olympe.C.J.G;l.Mx.K=olympe.C.J.D;l.Ew.K=olympe.C.J.G;l.Nx.K=olympe.C.J.D;l.sw.K=olympe.C.J.G;l.Ld.K=new olympe.C.J(()=>olympe.C.$b,[0]);
|
|
308
|
+
l.Ug.K=new olympe.C.J(()=>olympe.C.$b,[0]);l.$w.K=olympe.C.J.W;l.Wu.K=olympe.C.J.W;l.bx.K=olympe.C.J.W;l.Xu.K=new olympe.C.J(()=>olympe.C.da,[0]);l.length.K=olympe.C.J.G;l.normalize.K=olympe.C.J.W;l.floor.K=olympe.C.J.W;l.ceil.K=olympe.C.J.W;l.round.K=olympe.C.J.W;l.su.K=olympe.C.J.W;l.tu.K=olympe.C.J.W;l.Wc.K=olympe.C.J.F;l.toString.K=olympe.C.J.D;l.tb.K=olympe.C.J.D;olympe.C.og=class{constructor(){}Ob(){}kd(){}get(){}Hg(){}has(){}cg(){}qd(){}lf(){}Cc(){}Yf(){}forEach(){}od(){}};olympe.C.og.prototype.forEachCurrentValue=olympe.C.og.prototype.od;olympe.C.og.prototype.forEach=olympe.C.og.prototype.forEach;l=olympe.C.og.prototype;l.has.K=olympe.C.J.P;l.cg.K=olympe.C.J.D;l.qd.K=new olympe.C.J(()=>Object,[]);l.lf.K=new olympe.C.J(()=>String,[]);l.Cc.K=olympe.C.J.G;l.Yf.K=olympe.C.J.D;l.forEach.K=new olympe.C.J(()=>{},[]);l.od.K=olympe.C.J.D;olympe.C.dd=class extends olympe.C.og{constructor(){super()}Id(){}kf(){}Ie(){}jf(){}hf(){}qe(){}Di(){}Lh(){}};olympe.C.dd.prototype.getCurrentAt=olympe.C.dd.prototype.qe;olympe.C.dd.prototype.getAt=olympe.C.dd.prototype.hf;olympe.C.dd.prototype.getCurrentKeyAt=olympe.C.dd.prototype.jf;olympe.C.dd.prototype.getKeyAt=olympe.C.dd.prototype.Ie;olympe.C.dd.prototype.getCurrentRank=olympe.C.dd.prototype.kf;olympe.C.dd.prototype.getRank=olympe.C.dd.prototype.Id;l=olympe.C.dd.prototype;l.Id.K=olympe.C.J.G;
|
|
309
|
+
l.kf.K=olympe.C.J.D;l.Ie.K=new olympe.C.J(()=>String,[]);l.jf.K=olympe.C.J.D;l.hf.K=new olympe.C.J(()=>Object,[]);l.qe.K=olympe.C.J.D;l.Di.K=olympe.C.J.D;l.Lh.K=new olympe.C.J(()=>Array,[]);olympe.C.Vh=class{constructor(a,b){this.P=b||olympe.C.Ia();this.valueType=a||Object;this.values={};this.Ya=this.La=null;this.Qg=0;this.ea=Object.create(null);this.Ub=Object.create(null);this.size=0;this.L=null;this.P.onDestroy(()=>{const c=this.ea;if(c){const d=Object.keys(c),e=d.length;for(let f=0;f<e;f++){let g=c[d[f]],h=Object.keys(g);for(let k=h.length,m=0;m<k;m++)g[h[m]].destroy()}}})}mh(){return this.P}Ob(){return this.valueType}kd(a){this.valueType=a;let b=this.La;if(null!==b)for(let c in b)Object.prototype.hasOwnProperty.call(b,
|
|
310
|
+
c)&&ib(b[c],a)}get(a){let b=c=>{null===this.La&&(this.La={});return this.Gi(this.La,c,this.values[c],this.valueType,'Map.get('+c+')')};return olympe.C.va([a],c=>b(c),this.valueType)}Hg(a){a=this.values[a];return olympe.C.Za(a)?Ta(a.Ua)?M(a):void 0:a}has(a){let b=c=>{null===this.Ya&&(this.Ya={});return this.Gi(this.Ya,c,c in this.values?olympe.C.fa.F:olympe.C.fa.D,olympe.C.fa,'Map.has('+c+')')};return olympe.C.va([a],c=>b(c),olympe.C.fa)}cg(a){return a in this.values}Gi(a,b,c,d,e){let f=a[b];f||this.P.run(()=>
|
|
311
|
+
{f=olympe.C.Ad(d,void 0,e);a[b]=f;f.Ua.onDestroy(()=>delete a[b]);olympe.C.Za(c)?mb(f,c):jb(f,c)});return f}qd(){throw Error('Abstract method getFirstKey needs to be overridden');}lf(){throw Error('Abstract method getFirstKey needs to be overridden');}Cc(){null===this.L&&this.P.run(()=>{this.L=olympe.C.Ad(olympe.C.da,olympe.C.ta(this.size));this.L.Ua.onDestroy(()=>{this.L=null})});return this.L}Yf(){return this.size}forEach(a,b){let c=this.Tl();a=this.hq(c,a,b);this.Sl(c,a)}Tl(){return String(++this.Qg)}Sl(a,
|
|
312
312
|
b){this.Ub[a]=b;olympe.C.Ia().Vc(()=>{let c=this.ea;for(let d in c)Object.prototype.hasOwnProperty.call(c,d)&&delete c[d][a];delete this.Ub[a]});this.od(b)}hq(a,b,c){let d=olympe.C.Ia();return(e,f)=>{d.run(()=>{let g=olympe.C.createNode(void 0,b,null,[e,f,this],null,`forEach-${a}-${f}`);if(void 0!==c)g.onDestroy(()=>{c(f)});this.Wl(a,f,g)})}}Wl(a,b,c){void 0===this.ea[b]&&(this.ea[b]={});this.ea[b][a]=c}od(a){let b=this.values;for(let c in b)if(Object.prototype.hasOwnProperty.call(b,c)&&!1===a(b[c],
|
|
313
313
|
c,this))break}Uj(a,b){void 0!==this.values[a]&&this.ui(a,!0);this.values[a]=b;var c=this.La;null!==c&&void 0!==c[a]&&(b&&b instanceof olympe.C.Proxy?mb(c[a],b):jb(c[a],b));c=this.Ya;null!==c&&void 0!==c[a]&&nb(c[a],!0);this.size++;c=this.Ub;for(let d in c)if(Object.prototype.hasOwnProperty.call(c,d))c[d](b,a,this)}ui(a,b){let c=this.values;if(Object.prototype.hasOwnProperty.call(c,a)){var d=(d=c[a])&&d.le?M(d):d;var e=this.La;null!==e&&void 0!==e[a]&&kb(e[a]);e=this.Ya;null!==e&&void 0!==e[a]&&nb(e[a],
|
|
314
|
-
!1);delete c[a];this.size--;b||this.
|
|
314
|
+
!1);delete c[a];this.size--;b||this.cf()}a=this.ea[a];if(void 0!==a)for(let f in a)Object.prototype.hasOwnProperty.call(a,f)&&a[f].destroy();return d}cf(){null!==this.L&&nb(this.L,this.size)}Ch(){let a,b;var c=this.La;if(null!==c)for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&kb(c[a]);c=this.Ya;if(null!==c)for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&nb(c[a],!1);for(a in this.values)Object.prototype.hasOwnProperty.call(this.values,a)&&delete this.values[a];for(a in this.ea)if(Object.prototype.hasOwnProperty.call(this.ea,
|
|
315
315
|
a))for(b in c=this.ea[a],c)Object.prototype.hasOwnProperty.call(c,b)&&c[b].destroy();this.size=0;null!==this.L&&nb(this.L,this.size)}rg(){const a=this.values;let b='\n';for(let c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b+=a[c]+'\n');return b}};olympe.C.Vh.ja=[olympe.C.og];l=olympe.C.Vh.prototype;l.mh.K=olympe.C.J.D;l.Ob.K=olympe.C.J.D;l.kd.K=olympe.C.J.D;l.get.K=new olympe.C.J(()=>Object,[],'valueType');l.Hg.K=olympe.C.J.D;l.has.K=olympe.C.J.P;l.cg.K=olympe.C.J.D;l.Gi.K=olympe.C.J.D;
|
|
316
|
-
l.Cc.K=olympe.C.J.G;l.Yf.K=olympe.C.J.D;l.forEach.K=new olympe.C.J(()=>{},[]);l.Tl.K=olympe.C.J.D;l.Sl.K=olympe.C.J.D;l.hq.K=olympe.C.J.D;l.Wl.K=olympe.C.J.D;l.od.K=olympe.C.J.D;l.Uj.K=olympe.C.J.D;l.ui.K=olympe.C.J.D;l.
|
|
317
|
-
[a.
|
|
318
|
-
b||this.P.run(()=>{b=this.get(this.
|
|
319
|
-
this.pa.
|
|
320
|
-
c[a]&&jb(c[a],olympe.C.ta(f)));null!==d&&(void 0!==e&&null!==e&&void 0!==d[e]&&kb(d[e]),void 0!==d[b]&&jb(d[b],a))}}Ul(a){var b=this.
|
|
321
|
-
a=this.
|
|
322
|
-
l.
|
|
323
|
-
a){const b=this.values[a];b&&b instanceof olympe.C.Proxy?mb(this.F,b):jb(this.F,b);jb(this.D,a)}else void 0!==M(this.F)&&(kb(this.F),kb(this.D))}set(a,b){this.Uj(a,b);1===this.size&&null!==this.D&&this.Yi(a);this.
|
|
324
|
-
l.lm.K=olympe.C.J.D;l.Yi.K=olympe.C.J.D;l.set.K=olympe.C.J.D;l.remove.K=new olympe.C.J(()=>Object,[]);l.clear.K=olympe.C.J.D;olympe.C.ei=class extends olympe.C.bj{constructor(a){super(a)}set(a,b,c){this.Uj(a,b);void 0!==c&&olympe.C.tc([c],d=>{this.Vl(a,d)});this.
|
|
325
|
-
olympe.C.Ad=function(a,b,c){a=olympe.C.createNode(a,void 0,void 0,void 0,void 0,c);olympe.C.rf(b)?eb(a,b):olympe.C.Za(b)?eb(a,b.
|
|
326
|
-
olympe.C.rk=function(a,b){if(void 0!==a){olympe.C.Oh(a)&&(a=a.ub().
|
|
327
|
-
olympe.C.te=function(a,b,c,d){const e=a.length,f=Array(e),g=[];let h;for(let k=0;k<e;k++)h=a[k],void 0!==h&&null!==h&&(void 0!==h.fq?(h=h.
|
|
328
|
-
olympe.C.va=function(a,b,c,d,e){if(wb(a))return b(...a);const f=olympe.C.te(a,b,c,d||'TransformFlows');e&&olympe.C.tc([e],g=>{f.
|
|
329
|
-
olympe.C.Om=function(a,b,c){const d=a.length,e=Array(d),f=[];let g;for(let h=0;h<d;h++)g=a[h],void 0!==g&&null!==g&&(olympe.C.Za(g)?(g=g.
|
|
330
|
-
olympe.C.Jc=function(a,b='flowSource'){return new olympe.C.mj(a,b)};olympe.C.
|
|
316
|
+
l.Cc.K=olympe.C.J.G;l.Yf.K=olympe.C.J.D;l.forEach.K=new olympe.C.J(()=>{},[]);l.Tl.K=olympe.C.J.D;l.Sl.K=olympe.C.J.D;l.hq.K=olympe.C.J.D;l.Wl.K=olympe.C.J.D;l.od.K=olympe.C.J.D;l.Uj.K=olympe.C.J.D;l.ui.K=olympe.C.J.D;l.cf.K=olympe.C.J.D;l.Ch.K=olympe.C.J.D;l.rg.K=olympe.C.J.D;olympe.C.bj=class extends olympe.C.Vh{constructor(a,b){super(a,b);this.F=Object.create(null);this.D=[];this.Ga=this.Ta=this.hb=this.pa=null}kd(a){super.kd(a);if(null!==this.Ga)for(let b of this.Ga.values())ib(b,a)}qd(){return this.hf(0)}lf(){return this.Ie(0)}Id(a){const b=c=>{null===this.hb&&(this.hb=Object.create(null));let d=this.kf(a);d=void 0!==d?olympe.C.ta(d):void 0;return this.Gi(this.hb,c,d,olympe.C.da,`List.getRank(${c})`)};return olympe.C.Za(a)?L(olympe.C.createNode(olympe.C.da,b,null,
|
|
317
|
+
[a.Ua],[0],'onResolved('+(b.name||'')+')')):b(a)}kf(a){return this.F[a]}Ie(a){const b=c=>{const d=c.valueOf(),e=this.jf(d);null===this.Ta&&(this.Ta=Object.create(null));return this.Gi(this.Ta,String(d),e,String,'List.getKeyAt('+c+')')};return olympe.C.va([a],c=>b(c),String)}jf(a){return this.D[a.valueOf()]}hf(a){if(olympe.C.Za(a))return this.get(olympe.C.va([a],c=>{c=this.Ie(c);if(!Ta(c.Ua)){const d=olympe.C.Ia();olympe.C.rf(d)&&db(d)}return c},String));null===this.Ga&&(this.Ga=new Map);let b=this.Ga.get(a);
|
|
318
|
+
b||this.P.run(()=>{b=this.get(this.Ie(a));this.Ga.set(a,b);b.Ua.onDestroy(()=>this.Ga.delete(a))});return b}qe(a){return this.Hg(this.jf(a))}Di(a,b,c,d){let e=this.Tl();a=this.Zq(e,a,b,c,d);this.Sl(e,a)}Zq(a,b,c,d,e){return olympe.C.Ia().rb((f,g)=>{let h=!1,k=olympe.C.te([b,c,this.Id(g)],(m,n,p)=>{p>=m&&p<m+n?h||(d(f,g,this),h=!0):h&&(e(g),h=!1)});if(void 0!==e)k.onDestroy(e.bind(null,g));this.Wl(a,g,k)})}Lh(){null===this.pa&&this.P.run(()=>{this.pa=olympe.C.Ad(Array,this.D.filter(a=>void 0!==a));
|
|
319
|
+
this.pa.Ua.onDestroy(()=>{this.L=null})});return this.pa}od(a){if(this.D.length!==this.size)super.od(a);else{var b=this.values;for(let c of this.D.filter(d=>void 0!==d))if(Object.prototype.hasOwnProperty.call(b,c)&&!1===a(b[c],c,this))break}}Vl(a,b){const c=this.hb,d=this.Ta,e=this.F[a],f=b.valueOf();if(e!==f||this.D[e]!==a){var g=this.D[f];void 0!==g&&delete this.F[g];void 0!==e&&null!==e&&this.D[e]===a&&(this.D[e]=void 0);this.F[a]=f;this.D[f]=a;null!==c&&(void 0!==g&&void 0!==c[g]&&kb(c[g]),void 0!==
|
|
320
|
+
c[a]&&jb(c[a],olympe.C.ta(f)));null!==d&&(void 0!==e&&null!==e&&void 0!==d[e]&&kb(d[e]),void 0!==d[b]&&jb(d[b],a))}}Ul(a){var b=this.Ta,c=this.F[a];null!==c&&void 0!==c&&null!==b&&(b=b[c],void 0!==b&&M(b)===a&&kb(b));delete this.F[a];this.D.splice(c,1);c=this.hb;null!==c&&void 0!==c[a]&&kb(c[a])}iq(){if(null!==this.pa){const a=this.D,b=M(this.pa);b&&a.join(',')!==b.join(',')&&jb(this.pa,a)}}cf(){this.iq();super.cf()}Ch(){var a=this.F;for(b in a)delete a[b];this.D.length=0;a=this.hb;if(null!==a)for(b in a)kb(a[b]);
|
|
321
|
+
a=this.Ta;if(null!==a)for(b in a)kb(a[parseInt(b,10)]);var b=this.pa;null!==b&&(ab(b.Ua),jb(b,this.D));return olympe.C.Vh.prototype.Ch.call(this)}rg(){const a=this.values,b=this.F;let c='[\n';for(let d in a)Object.prototype.hasOwnProperty.call(a,d)&&(c+=`${b[d]}. ${a[d]}\n`);return c+']'}};olympe.C.bj.ja=[olympe.C.dd];l=olympe.C.bj.prototype;l.kd.K=olympe.C.J.D;l.qd.K=new olympe.C.J(()=>Object,[]);l.lf.K=new olympe.C.J(()=>String,[]);l.Id.K=olympe.C.J.G;l.kf.K=olympe.C.J.D;
|
|
322
|
+
l.Ie.K=new olympe.C.J(()=>String,[]);l.jf.K=olympe.C.J.D;l.hf.K=new olympe.C.J(()=>Object,[]);l.qe.K=olympe.C.J.D;l.Di.K=new olympe.C.J(()=>{},[]);l.Zq.K=olympe.C.J.D;l.Lh.K=new olympe.C.J(()=>Array,[]);l.od.K=olympe.C.J.D;l.Vl.K=olympe.C.J.D;l.Ul.K=olympe.C.J.D;l.iq.K=olympe.C.J.D;l.cf.K=olympe.C.J.D;l.Ch.K=olympe.C.J.D;l.rg.K=olympe.C.J.D;olympe.C.Map=class extends olympe.C.Vh{constructor(a){a===olympe.C.Proxy&&(a=Object);super(a);this.D=this.F=null}kd(a){a===olympe.C.Proxy&&(a=Object);null!==this.F&&ib(this.F,a);super.kd(a)}qd(){null===this.F&&this.hm();return this.F}lf(){null===this.D&&this.hm();return this.D}hm(){this.mh().run(()=>{this.F=olympe.C.Ad(this.Ob());this.D=olympe.C.Ad(String);this.Yi(this.lm())})}lm(){const a=this.values;let b,c;for(b in a)if(Object.prototype.hasOwnProperty.call(a,b)){c=b;break}return c}Yi(a){if(void 0!==
|
|
323
|
+
a){const b=this.values[a];b&&b instanceof olympe.C.Proxy?mb(this.F,b):jb(this.F,b);jb(this.D,a)}else void 0!==M(this.F)&&(kb(this.F),kb(this.D))}set(a,b){this.Uj(a,b);1===this.size&&null!==this.D&&this.Yi(a);this.cf()}remove(a){const b=this.ui(a);null!==this.D&&M(this.D)===a&&this.Yi(this.lm());return b}clear(){this.Ch();null!==this.D&&this.Yi(void 0)}};l=olympe.C.Map.prototype;l.kd.K=olympe.C.J.D;l.qd.K=new olympe.C.J(()=>Object,[]);l.lf.K=new olympe.C.J(()=>String,[]);l.hm.K=olympe.C.J.D;
|
|
324
|
+
l.lm.K=olympe.C.J.D;l.Yi.K=olympe.C.J.D;l.set.K=olympe.C.J.D;l.remove.K=new olympe.C.J(()=>Object,[]);l.clear.K=olympe.C.J.D;olympe.C.ei=class extends olympe.C.bj{constructor(a){super(a)}set(a,b,c){this.Uj(a,b);void 0!==c&&olympe.C.tc([c],d=>{this.Vl(a,d)});this.cf()}remove(a){this.Ul(a);return this.ui(a)}clear(){this.Ch()}};olympe.C.ei.prototype.remove.K=olympe.C.J.D;olympe.C.ei.prototype.clear.K=olympe.C.J.D;olympe.C.tr=class extends olympe.C.mj{constructor(a,b){super(olympe.C.da,'animatedFlowSource');this.duration=a;this.D=b||olympe.C.da.Nn.Po}ub(){return olympe.C.gx(this.node,this.duration,this.D,void 0)}};let vb=null;olympe.C.N=void 0;olympe.C.Pm=void 0;olympe.C.Gh=void 0;olympe.C.Bh=new Map;olympe.C.Bh.set(0,olympe.C.da.ZERO);olympe.C.Bh.set(1,olympe.C.da.ONE);olympe.C.Bh.set(2,olympe.C.da.eu);olympe.C.Tj=new Map;olympe.C.Tj.set('',olympe.C.Ra.EMPTY);olympe.C.Tj.set(' ',olympe.C.Ra.Rt);olympe.C.createNode=function(a,b,c,d,e,f,g,h){return new olympe.C.Node({valueType:a,sd:b,vf:c,Am:d,debug:g,Sf:e,nd:f,xi:h})};olympe.C.rf=function(a){return!!(a&&a instanceof olympe.C.Node)};
|
|
325
|
+
olympe.C.Ad=function(a,b,c){a=olympe.C.createNode(a,void 0,void 0,void 0,void 0,c);olympe.C.rf(b)?eb(a,b):olympe.C.Za(b)?eb(a,b.Ua):K(a,b);return L(a)};olympe.C.Za=function(a){return!(!a||!a.le)};olympe.C.sf=function(a){return!(!a||!(a instanceof olympe.C.Node||a.le))};olympe.C.Em=function(a){return olympe.C.rf(a)||a instanceof olympe.C.ec||a instanceof olympe.C.Bp};olympe.C.Oh=function(a){return a instanceof olympe.C.mj};
|
|
326
|
+
olympe.C.rk=function(a,b){if(void 0!==a){olympe.C.Oh(a)&&(a=a.ub().Ua);if(!olympe.C.sf(a))return b(a);var c=[];olympe.C.Za(a)?c.push(a.Ua):c.push(a);return olympe.C.createNode(void 0,b,null,c,[0],'onResolved')}};olympe.C.Sa=function(a,b){let c=a;olympe.C.Za(a)?c=M(a):olympe.C.rf(a)?c=a.Kc:olympe.C.Oh(a)&&(c=M(a.ub()));return void 0===c?b:c};olympe.C.Le=function(a,b){let c;olympe.C.Za(a)?c=a.Ua:olympe.C.rf(a)?c=a:olympe.C.Oh(a)&&(c=a.ub().Ua);c&&olympe.C.tc([b],d=>{c.Le(d)},'setDefaultValue');return a};
|
|
327
|
+
olympe.C.te=function(a,b,c,d){const e=a.length,f=Array(e),g=[];let h;for(let k=0;k<e;k++)h=a[k],void 0!==h&&null!==h&&(void 0!==h.fq?(h=h.Ua,g.push(k)):h instanceof olympe.C.Node?g.push(k):olympe.C.Oh(h)&&(h=h.ub().Ua,g.push(k))),f[k]=h;return olympe.C.createNode(c,b,null,f,g,d||'syncNodes')};olympe.C.Md=function(a,b,c,d){return L(olympe.C.te(a,b,c,d||'syncProxies'))};const wb=a=>{for(const b of a)if(olympe.C.sf(b)||olympe.C.Oh(b))return!1;return!0};
|
|
328
|
+
olympe.C.va=function(a,b,c,d,e){if(wb(a))return b(...a);const f=olympe.C.te(a,b,c,d||'TransformFlows');e&&olympe.C.tc([e],g=>{f.Le(g)},'setDefaultValue');return L(f)};olympe.C.tc=function(a,b,c){wb(a)?b(...a):olympe.C.te(a,b,void 0,c||'processFlows')};olympe.C.er=function(a,b){if(wb(a))b(...a);else{const c=olympe.C.Ia();olympe.C.te(a,(...d)=>{olympe.C.Ia().destroy();c.run(b,...d)},void 0,'processFlowsOnce')}};
|
|
329
|
+
olympe.C.Om=function(a,b,c){const d=a.length,e=Array(d),f=[];let g;for(let h=0;h<d;h++)g=a[h],void 0!==g&&null!==g&&(olympe.C.Za(g)?(g=g.Ua,f.push(h)):g instanceof olympe.C.Node?f.push(h):olympe.C.Oh(g)&&(g=g.ub().Ua,f.push(h))),e[h]=g;0!==f.length&&new olympe.C.Node({sd:b,Am:e,Sf:f,ux:!1,nd:c})};olympe.C.vC=function(a,b,c){const d=olympe.C.Ia();olympe.C.Om(a,(...e)=>{olympe.C.Ia().destroy();d.run(b,...e)},c||'processFutureFlowsOnce')};olympe.C.TB=function(a,b,c){a=new olympe.C.mj(a,c);b(a);return a.ub()};
|
|
330
|
+
olympe.C.Jc=function(a,b='flowSource'){return new olympe.C.mj(a,b)};olympe.C.yC=function(a,b,c,d){const e=olympe.C.Ia();olympe.C.te(a,(...f)=>{olympe.C.Ia().destroy();e.run(b,...f)},c,d||'syncProxiesOnce')};olympe.C.ik=function(a,b,c){olympe.C.va([a],d=>d.valueOf()?b.apply(null,void 0):c&&c.apply(null,void 0),Object,'If')};olympe.C.YB=function(a,b,...c){return a?a.run(b,...c):b(...c)};olympe.C.FC=function(a){return olympe.C.Ia().rb(a)};olympe.C.WB=function(a,b,c){olympe.C.Yu(a?a.Ua:a,b,c)};
|
|
331
331
|
olympe.C.Yu=function(a,b,c){if(a){var d=a.ba();null===vb&&(vb={});if(vb[d])olympe.C.N.log(`Already started node #${d} dump`+(b?`: ${b}`:''));else{vb[d]=!0;var e=`Starting node #${d} dump`+(b?`: ${b}`:'');c?olympe.C.N.warn(e):olympe.C.N.log(e);var f=`#${d}`+(b?`: ${b}`:'')+':';c=olympe.C.createNode(null,g=>{void 0===g?olympe.C.N.log(f,'undefined'):null===g?olympe.C.N.log(f,'null'):olympe.C.N.log(f,String(g))},null,[a],[0],'DataFlowDump');a.onDestroy(()=>{olympe.C.N.log(`Node #${d} destroyed`+(b?`: ${b}`:
|
|
332
|
-
''))});c.onDestroy(()=>{delete vb[d]})}}else olympe.C.N.log('NOT starting node dump, node is '+String(a))};olympe.C.
|
|
332
|
+
''))});c.onDestroy(()=>{delete vb[d]})}}else olympe.C.N.log('NOT starting node dump, node is '+String(a))};olympe.C.VB=function(){let a='',b=olympe.C.Ia();for(;null!==b;)a+=b.ck()+' --\x3e ',b=b.getParent();olympe.C.N.log(a)};
|
|
333
333
|
olympe.C.ta=function(a){if(void 0===a)return olympe.C.da.ZERO;if(a instanceof olympe.C.da)return a;a&&a.valueOf&&(a=a.valueOf());if('number'===typeof a){if(isNaN(a))return olympe.C.da.Yo;if(a===Math.PI)return olympe.C.da.PI;if(Infinity===a)return olympe.C.da.ns;if(-Infinity===a)return olympe.C.da.it;if(isNaN(a))var b=!1;else b=parseFloat(a),b=(b|0)===b;return b&&-1<=a&&100>=a?(olympe.C.Bh.has(a)||olympe.C.Bh.set(a,new olympe.C.da(a)),olympe.C.Bh.get(a)):new olympe.C.da(a)}return null};
|
|
334
|
-
olympe.C.Kd=function(a){return void 0===a?olympe.C.Ad(olympe.C.da):olympe.C.Ad(olympe.C.da,olympe.C.sf(a)?a:olympe.C.ta(a))};olympe.C.
|
|
335
|
-
olympe.C.
|
|
336
|
-
olympe.C.
|
|
334
|
+
olympe.C.Kd=function(a){return void 0===a?olympe.C.Ad(olympe.C.da):olympe.C.Ad(olympe.C.da,olympe.C.sf(a)?a:olympe.C.ta(a))};olympe.C.gx=olympe.C.da.animate;olympe.C.pC=function(a,b){return new olympe.C.tr(a,b)};olympe.C.pb=function(a){if(a instanceof olympe.C.Ra)return a;a instanceof Object&&(a=a.valueOf());const b=typeof a;if('string'===b||'number'===b||'boolean'===b)return a=String(a),olympe.C.Tj.has(a)?olympe.C.Tj.get(a):new olympe.C.Ra(a)};
|
|
335
|
+
olympe.C.sC=function(a){return void 0===a?olympe.C.Ad(olympe.C.Ra):olympe.C.Ad(olympe.C.Ra,olympe.C.sf(a)?a:olympe.C.pb(a))};olympe.C.rc=function(a){return a instanceof olympe.C.fa?a:void 0!==a&&null!==a&&a.valueOf()?olympe.C.fa.F:olympe.C.fa.D};olympe.C.rx=function(a){return void 0===a?olympe.C.Ad(olympe.C.fa):olympe.C.Ad(olympe.C.fa,olympe.C.sf(a)?a:olympe.C.rc(a))};olympe.C.hx=function(a){if(a instanceof Date)return new olympe.C.bb(a)};
|
|
336
|
+
olympe.C.rC=function(a){return olympe.C.Ad(olympe.C.bb,void 0!==a?new olympe.C.bb(a):null)};olympe.C.Vq=a=>a instanceof olympe.C.fa||a instanceof olympe.C.da||a instanceof olympe.C.Ra||a instanceof olympe.C.bb;olympe.C.tC=function(a,b){return olympe.C.Ad(olympe.C.$b,void 0===a&&void 0===b?void 0:new olympe.C.$b(a,b))};olympe.C.qx=function(a,b,c,d){let e;void 0!==a&&(a instanceof olympe.C.Color?e=a:e=olympe.C.Color.create(a,b,c,d));return olympe.C.Ad(olympe.C.Color,e)};olympe.C.qC=olympe.C.qx;
|
|
337
337
|
olympe.C.Pu=function(a){olympe.C.N=a;olympe.C.Gh=olympe.C.$f()};olympe.C.$f=function(){olympe.C.Pm||(olympe.C.Pm=new olympe.C.Bp);return olympe.C.Pm};olympe.C.Ia=function(){olympe.C.Gh||(olympe.C.Gh=olympe.C.$f());return olympe.C.Gh};olympe.C.ir=function(a){const b=olympe.C.Gh;olympe.C.Em(a)&&(olympe.C.Gh=a);return b||null};
|
|
338
|
-
olympe.C.ac=a=>{a='string'===typeof a?JSON.parse(a):a;if(a.type){let b=null;switch(a.type){case 'dateTime':b=olympe.C.
|
|
339
|
-
olympe.C.
|
|
340
|
-
class yb{constructor(a,b,c,d){this.id=a;this.Gb=new olympe.C.ec('Slot manager entry');this.G=c;this.L=d;this.Gb.run(()=>{const e=ob(olympe.C.Jc(olympe.C.da),olympe.C.da.ZERO);olympe.C.Za(b)?e.repeat(b):e.update(b);this.D=olympe.C.Jc(olympe.C.da);this.F=this.D.ub().Ld(e.ub())});this.next=null}ba(){return this.id}
|
|
341
|
-
this.next=null}destroy(){this.Gb.destroy();this.F=this.D=this.next=null}}l=yb.prototype;l.ba.K=olympe.C.J.D;l.
|
|
338
|
+
olympe.C.ac=a=>{a='string'===typeof a?JSON.parse(a):a;if(a.type){let b=null;switch(a.type){case 'dateTime':b=olympe.C.bb.ac(a);break;case 'number':b=olympe.C.da.ac(a);break;case 'string':b=olympe.C.Ra.ac(a);break;case 'vector2':b=olympe.C.$b.ac(a);break;case 'color':b=olympe.C.Color.ac(a);break;case 'boolean':b=olympe.C.fa.ac(a)}return b}return null};function xb(a){a.D.Bb()||(a.G.forEach(b=>{b.destroy()}),a.G.clear(),a.F.clear(),a.size.clear(),a.P.clear(),a.W.length=0,a.L.length=0)}
|
|
339
|
+
olympe.C.yA=class{constructor(){this.D=new olympe.C.ec('Slot Manager context');this.G=new Map;this.D.run(()=>{this.F=olympe.C.Jc(yb,'Last slot manager entry');this.size=ob(olympe.C.Jc(olympe.C.da,'SlotManager size').repeat(this.F.ub().sm()),olympe.C.da.ZERO);this.P=ob(olympe.C.Jc(olympe.C.da,'last valid slots'),olympe.C.ta(-1))});this.W=[];this.L=[];this.D.onDestroy(()=>{xb(this)})}Cc(){return this.size.ub()}};
|
|
340
|
+
class yb{constructor(a,b,c,d){this.id=a;this.Gb=new olympe.C.ec('Slot manager entry');this.G=c;this.L=d;this.Gb.run(()=>{const e=ob(olympe.C.Jc(olympe.C.da),olympe.C.da.ZERO);olympe.C.Za(b)?e.repeat(b):e.update(b);this.D=olympe.C.Jc(olympe.C.da);this.F=this.D.ub().Ld(e.ub())});this.next=null}ba(){return this.id}ww(){return this.D.ub()}sm(){return this.F}Id(){return this.G}Hw(){return this.L}Zx(a){this.G=a}Hx(a){null===a?this.D.update(olympe.C.da.ZERO):(this.D.repeat(a.sm()),a.next=this)}zs(){this.D.clear();
|
|
341
|
+
this.next=null}destroy(){this.Gb.destroy();this.F=this.D=this.next=null}}l=yb.prototype;l.ba.K=olympe.C.J.D;l.ww.K=new olympe.C.J(()=>olympe.C.da);l.sm.K=new olympe.C.J(()=>olympe.C.da);l.Id.K=olympe.C.J.D;l.Hw.K=olympe.C.J.D;l.Zx.K=olympe.C.J.D;l.Hx.K=olympe.C.J.D;l.zs.K=olympe.C.J.D;l.destroy.K=olympe.C.J.D;olympe.C.T={Fa:'df.Logger'};olympe.U.config(a=>{C(a,olympe.C.Z.Zo,Number.POSITIVE_INFINITY);A(a,olympe.C.T.Fa,[olympe.ua.T.wa],b=>b.Ic('df'))},'olympe.df');olympe.U.run([olympe.C.T.Fa],a=>{olympe.C.Pu(a)},'olympe.df');olympe.async={};function zb(a,b){0<=b&&(a.timeout=b)}function Ab(a,b){a.L||a.wc.push(a.G.rb(b))}
|
|
342
342
|
olympe.async.Vn=class{constructor(a,b=void 0===a){this.D=[];this.wc=[];this.G=a||new olympe.C.ec('Async executor context');this.pa=b;this.F=null;this.env=new Map;this.env.set('Executor',this);this.L=this.P=!1;this.N=null;this.W=this.timeout=0}vb(){return this.N}add(a){this.L||this.D.push(this.G.rb(a));return this}start(){this.P||(this.N&&this.N.log('Executor started.'),this.P=!0,0<this.timeout&&(this.W=setTimeout(()=>{this.F='Timeout expired.';this.W=0;this.complete(!1)},this.timeout)))}clear(){this.D=
|
|
343
343
|
[];this.wc=[];this.env.clear();this.pa&&this.G.destroy()}complete(a){if(!this.L){this.L=!0;this.W&&(clearTimeout(this.W),this.W=0);this.N&&this.N.log(a?'Executor completed successfully':`Executor completed with error: ${this.F}`);for(const b of this.wc)b(a,a?null:this.F,this.env);this.clear()}}};
|
|
344
344
|
function Bb(a){if(0<a.D.length){const b=a.D.shift();a.N&&a.N.log(`Executing next task. ${a.D.length} tasks left in the pipeline.`);a.G.run(()=>{b(()=>{Promise.resolve().then(()=>{Bb(a)})},c=>{c&&(a.F=c);a.complete(!1)},a.env)})}else a.complete(!0)}olympe.async.Jj=class extends olympe.async.Vn{static create(){return new olympe.async.Jj(new olympe.C.ec('SequencedExecutor'),!0)}start(){this.P||(super.start(),Bb(this))}};
|
|
345
345
|
olympe.async.Jf=class extends olympe.async.Vn{constructor(a,b){super(a,b);this.ea=0;this.ka=!0}static create(){return new olympe.async.Jf(new olympe.C.ec('ParallelExecutor'),!0)}run(a){this.N&&this.N.log('Starting a task');this.G.run(()=>{a(()=>{this.done()},b=>{this.ka=!1;b&&(this.F=this.F?`${this.F}. ${b}`:b);this.done()},this.env)})}add(a){super.add(a);this.P&&!this.L&&(this.ea++,this.run(a));return this}done(){this.ea--;0>=this.ea&&this.complete(this.ka)}start(){if(!this.P)if(super.start(),0<
|
|
346
|
-
this.D.length){this.ea=this.D.length;for(const a of this.D)this.run(a)}else this.complete(!0)}};olympe.Wb={};olympe.Wb.Vs=class{constructor(){}set(){}get(){}forEach(){}remove(){}clear(){}close(){}};olympe.Wb.Us=class{constructor(){}D(){}};olympe.Wb.Storage=class{open(){}F(){}P(){}write(){}G(){}L(){}D(){}close(){}};function Cb(a,b,c){a.storage.F(c)}function Db(a,b,c,d,e){a.storage.write(b,'transactions',c.toJSON(),'text/json',d,e)}function Eb(a,b){a.storage.G(b)}function Fb(a,b){a.storage.D(b)}function Gb(a,b,c,d,e,f){a.storage.write(b,'files',c,d,()=>{e('files/'+b)},f)}function Hb(a,b){a.storage.P(b)}olympe.Wb.Qr=class{constructor(a){this.storage=a}};olympe.Wb.T={uj:'localStorage.KeyValueManager',li:'localStorage.Storage',Dn:'localStorage.DatacloudStorage',Fa:'localStorage.Logger'};olympe.U.config(function(a){qa(a,olympe.Wb.T.uj);A(a,olympe.Wb.T.Fa,[olympe.ua.T.wa],function(b){return b.Ic('localstorage')});y(a,olympe.Wb.T.Dn,olympe.Wb.Qr,olympe.Wb.T.li)},'olympe.localstorage');olympe.auth={};olympe.auth.Xt=class{P(){}L(){}La(){}ea(){}Qh(){}Ng(){}Nq(){}};function Ib(a){a.N.info('Initializing AUTH layer');if(a.Ga&&a.storage&&a.P){const b=a.P.D(),c=olympe.$.dr(b).parameters;delete c[olympe.auth.Z.pi];Jb(a.storage,a.Ga,d=>{d?a.P.redirect(b.replace(/\?[^?#]+/,''),c,olympe.auth.ji.D.
|
|
347
|
-
new olympe.auth.Request;b.set('username',a.ea);b.Rm(a.
|
|
348
|
-
break;case olympe.auth.qa.D.Uh:a.N.warn('Disconnected from server - authentication aborted');break;case olympe.auth.qa.D.INIT:a.N.warn('Cannot open auth session - no server connection');break;default:a.N.error('Should not get there, investigate')}Nb(a,olympe.auth.qa.D.
|
|
346
|
+
this.D.length){this.ea=this.D.length;for(const a of this.D)this.run(a)}else this.complete(!0)}};olympe.Wb={};olympe.Wb.Vs=class{constructor(){}set(){}get(){}forEach(){}remove(){}clear(){}close(){}};olympe.Wb.Us=class{constructor(){}D(){}};olympe.Wb.Storage=class{open(){}F(){}P(){}write(){}G(){}L(){}D(){}close(){}};function Cb(a,b,c){a.storage.F(c)}function Db(a,b,c,d,e){a.storage.write(b,'transactions',c.toJSON(),'text/json',d,e)}function Eb(a,b){a.storage.G(b)}function Fb(a,b){a.storage.D(b)}function Gb(a,b,c,d,e,f){a.storage.write(b,'files',c,d,()=>{e('files/'+b)},f)}function Hb(a,b){a.storage.P(b)}olympe.Wb.Qr=class{constructor(a){this.storage=a}};olympe.Wb.T={uj:'localStorage.KeyValueManager',li:'localStorage.Storage',Dn:'localStorage.DatacloudStorage',Fa:'localStorage.Logger'};olympe.U.config(function(a){qa(a,olympe.Wb.T.uj);A(a,olympe.Wb.T.Fa,[olympe.ua.T.wa],function(b){return b.Ic('localstorage')});y(a,olympe.Wb.T.Dn,olympe.Wb.Qr,olympe.Wb.T.li)},'olympe.localstorage');olympe.auth={};olympe.auth.Xt=class{P(){}L(){}La(){}ea(){}Qh(){}Ng(){}Nq(){}};function Ib(a){a.N.info('Initializing AUTH layer');if(a.Ga&&a.storage&&a.P){const b=a.P.D(),c=olympe.$.dr(b).parameters;delete c[olympe.auth.Z.pi];Jb(a.storage,a.Ga,d=>{d?a.P.redirect(b.replace(/\?[^?#]+/,''),c,olympe.auth.ji.D.Re):a.N.error('Could not store auth.token')})}else a.N.debug('Asking to be notified when auth connector gets online'),a.F.P(()=>{if(a.Ta)if(a.L=olympe.auth.qa.G.rr,a.N.log('Connector online, parameter auth.autoLogin=true --\x3e attempting to log with parameters'),a.ea){const b=
|
|
347
|
+
new olympe.auth.Request;b.set('username',a.ea);b.Rm(a.hb);a.N.log('Autologin with user "'+a.ea+'"');Kb(a,b)}else a.N.error('autoLogin: auto user not specified.'),Lb(a);else a.L=olympe.auth.qa.G.pi,a.N.log('Connector online, attempting to log with token'),Mb(a)}),a.F.L(()=>{switch(olympe.C.Sa(a.G)){case olympe.auth.qa.D.kg:a.N.warn('Disconnected from server - session of user '+olympe.C.Sa(a.D.ub()).Oc()+' lost');break;case olympe.auth.qa.D.jh:a.N.warn('Disconnected from server - guest session lost');
|
|
348
|
+
break;case olympe.auth.qa.D.Uh:a.N.warn('Disconnected from server - authentication aborted');break;case olympe.auth.qa.D.INIT:a.N.warn('Cannot open auth session - no server connection');break;default:a.N.error('Should not get there, investigate')}Nb(a,olympe.auth.qa.D.Qe)});a.F.La((b,c)=>{if(b===olympe.auth.qa.F.$i)a.N.info('Authentication revoked'),Lb(a),a.storage&&Ob(a.storage),a.pa.forEach(d=>{d(b,c)});else if(b===olympe.auth.qa.F.vo)a.N.info('Redirection to IDP to invalidate token (SAML)'),a.storage&&
|
|
349
349
|
Ob(a.storage),a.P.F();else throw Error(`Unknown logout step coming from server : ${b}`);});a.N.log('DONE initializing AUTH layer (waiting for connector to be online)')}
|
|
350
350
|
function Mb(a){null!==a.storage?(a.N.debug('Retrieving token from local storage'),a.storage.Jd(b=>{if(b){const d=new olympe.auth.Request;var c=b.Oc();d.set('username',c);b=b.mf();d.set('nonce',b);a.N.debug('Token found, trying login with',d);Kb(a,d,a.qb)}else a.N.debug('No token found, cannot perform auto login. Falling back in GUEST state'),Lb(a)})):(a.N.error('Cannot retrieve token: no storage configured, cannot perform auto login. Falling back in GUEST state'),Lb(a))}
|
|
351
|
-
function Nb(a,b){a.N.log('State change: ',Pb(a),'--\x3e',b);a.G.update(b)}function Lb(a){a.D.update(a.La);Nb(a,olympe.auth.qa.D.jh);a.N.info('Authenticated as guest')}function Pb(a){return olympe.C.
|
|
351
|
+
function Nb(a,b){a.N.log('State change: ',Pb(a),'--\x3e',b);a.G.update(b)}function Lb(a){a.D.update(a.La);Nb(a,olympe.auth.qa.D.jh);a.N.info('Authenticated as guest')}function Pb(a){return olympe.C.Sa(a.G.ub())}function Qb(a){const b=olympe.auth.qa.D.kg,c=olympe.auth.qa.D.jh,d=olympe.auth.qa.D.Uh,e=olympe.C.Jc(olympe.C.fa,'auth.isOnline');olympe.C.tc([a.G],f=>{e.update(olympe.C.rc(f===b||f===c||f===d))},'Router is online');return e.ub()}
|
|
352
352
|
function Rb(a){var b=olympe.public.Ma.get(),c='logoutCallback';void 0===c&&(c=olympe.$.Xf());b.pa.set(c,a)}function Sb(a){return a.D.ub().mf()}function Tb(a,b,c,d=!1){b=b+c?':'+c.message:'';a.N.error(b);a.error.update(olympe.C.pb(b));Nb(a,olympe.auth.qa.D.zc);if(d)throw Error(b);}
|
|
353
|
-
function Kb(a,b,c,d){void 0===c&&(c=a.Ya);void 0===c&&Tb(a,'No authentication provider specified',null,!0);const e=a.zb.get(c);e||Tb(a,'Undefined authentication provider "'+c+'"',null,!0);d&&a.W.set('login',d);a.N.log('Sending authentication request using "'+c+'" for '+b);e.Jd(b,a.
|
|
354
|
-
olympe.auth.qa=class{constructor(a,b,c,d,e,f,g,h,k,m,n){this.N=a;this.F=b;this.storage=c;this.P=d;this.Ya=f;this.qb=g;this.
|
|
355
|
-
if(this.zb.has(q))throw Error('Provider "'+q+'" has already been registered !');this.zb.set(q,p)});Ib(this)}getState(){return this.G.ub()}ka(){return this.error.ub()}Oc(){return this.D.ub().Oc()}pf(){return this.D.ub().pf()}Kh(){return this.D.ub().Kh()}Ng(a,b){this.F.Ng(a,olympe.C.
|
|
356
|
-
{a&&this.N.error('Was not able to send the auth keep alive message:',a.message)})}
|
|
357
|
-
this.W.delete('login')}};olympe.auth.qa.D={INIT:'init',
|
|
358
|
-
l.rj.K=new olympe.C.J(()=>Object,[]);l.Kh.K=new olympe.C.J(()=>String,[]);l.ma.K=new olympe.C.J(()=>String,[]);olympe.auth.Bl=class extends olympe.auth
|
|
353
|
+
function Kb(a,b,c,d){void 0===c&&(c=a.Ya);void 0===c&&Tb(a,'No authentication provider specified',null,!0);const e=a.zb.get(c);e||Tb(a,'Undefined authentication provider "'+c+'"',null,!0);d&&a.W.set('login',d);a.N.log('Sending authentication request using "'+c+'" for '+b);e.Jd(b,a.Kb.bind(a));Nb(a,olympe.auth.qa.D.Uh)}function Ub(a,b,c){a.W.forEach(d=>{d(b,c)})}
|
|
354
|
+
olympe.auth.qa=class{constructor(a,b,c,d,e,f,g,h,k,m,n){this.N=a;this.F=b;this.storage=c;this.P=d;this.Ya=f;this.qb=g;this.Ta=void 0===h?!0:h;this.ea=k;this.hb=m;this.Ga=n;this.zb=new Map;this.G=olympe.C.Jc(String).update(olympe.auth.qa.D.INIT);this.error=olympe.C.Jc(olympe.C.Ra);this.L=null;this.La=new olympe.auth.$e('guest','0163d9653067b6237f62','e96e099c-55bb-4004-b0e8-bd76b6209218');this.D=olympe.C.Jc(olympe.auth.$e).update(this.La);this.W=new Map;this.pa=new Map;e.forEach(p=>{const q=p.ia();
|
|
355
|
+
if(this.zb.has(q))throw Error('Provider "'+q+'" has already been registered !');this.zb.set(q,p)});Ib(this)}getState(){return this.G.ub()}ka(){return this.error.ub()}Oc(){return this.D.ub().Oc()}pf(){return this.D.ub().pf()}Kh(){return this.D.ub().Kh()}Ng(a,b){this.F.Ng(a,olympe.C.Sa(Sb(this)),b)}Jm(){this.N.debug('Sending logout');Ob(this.storage);this.F.ea(a=>{a?Tb(this,'Logout request rejected:',a):this.N.debug('Logout request acknowledged')})}Qh(){Pb(this)===olympe.auth.qa.D.kg&&this.F.Qh(a=>
|
|
356
|
+
{a&&this.N.error('Was not able to send the auth keep alive message:',a.message)})}Kb(a,b){const c=null===this.L?olympe.auth.qa.G.dt:this.L;this.L=null;a?(this.N.warn('Authentication rejected: '+a.message+'. Falling back into GUEST state'),Ob(this.storage),this.error.update(olympe.C.pb(a.message)),Lb(this),Ub(this,a,c)):(this.N.info('User '+b.Oc()+' (#'+b.pf()+') successfully authenticated'),this.D.update(b),Nb(this,olympe.auth.qa.D.kg),Ub(this,a,c),this.storage&&Jb(this.storage,b));this.W.has('login')&&
|
|
357
|
+
this.W.delete('login')}};olympe.auth.qa.D={INIT:'init',Qe:'disconnected',jh:'guest',Uh:'authenticating',zc:'error',kg:'authenticated'};olympe.auth.qa.G={dt:'manual',rr:'auto',pi:'tokenOnFirstConnection'};olympe.auth.qa.F={$i:'accepted',vo:'redirect'};olympe.auth.ii=class{ia(){}Jd(){}};olympe.auth.Request=class{constructor(){this.D=new Map}set(a,b){olympe.C.tc([b],c=>{this.D.set(a.toLocaleLowerCase(),c.toString())})}get(a){(a=this.D.get(a.toLowerCase()))&&a.le&&(a=M(a));return a?a.valueOf():a}Oc(){return this.get('username')}Rm(a){this.set('password',a)}mf(){return this.get('nonce')}toString(){return this.Oc()+(this.mf()?' with nonce':'')+(this.get('password')?' with password':'')}};olympe.auth.$e=class{constructor(a,b,c,d={}){this.user=a;this.Me=b;this.F=c;this.G=d}Oc(){return this.user}pf(){return this.Me}mf(){return this.F}rj(){return this.G}Kh(){return null}ma(){var a=olympe.$,b=a.sq;var c=JSON.stringify({user:this.user,userTag:this.Me,nonce:this.F,payload:this.G});c=olympe.$.Jh().D(Aa(c));return b.call(a,c)}};l=olympe.auth.$e.prototype;l.Oc.K=new olympe.C.J(()=>String,[]);l.pf.K=new olympe.C.J(()=>String,[]);l.mf.K=new olympe.C.J(()=>String,[]);
|
|
358
|
+
l.rj.K=new olympe.C.J(()=>Object,[]);l.Kh.K=new olympe.C.J(()=>String,[]);l.ma.K=new olympe.C.J(()=>String,[]);olympe.auth.Bl=class extends olympe.auth.$e{constructor(a,b,c,d){super(a,b,c,d)}Kh(){return this.rj().access_token||null}};olympe.auth.Cp=class extends olympe.auth.$e{constructor(a,b,c,d){super(a,b,c,d);this.D=null}Kh(){return this.D}ma(){var a=olympe.$.Jh(),b={user:this.Oc(),userTag:this.pf(),nonce:this.mf(),payload:this.rj(),fullToken:this.D},c=olympe.$,d=c.sq;b=JSON.stringify(b);a=a.D(Aa(b));return d.call(c,a)}};function Jb(a,b,c){const d=a.D.D('AUTH');d.set(a.key,'string'===typeof b?b:b.ma(),e=>{d.close();c&&c(e)})}function Ob(a){const b=a.D.D('AUTH');b.remove(a.key,()=>b.close())}
|
|
359
359
|
olympe.auth.Rl=class{constructor(a,b,c){this.D=a;this.N=b;this.key='OlympeToken-'+c.D}Jd(a){const b=this.D.D('AUTH');this.N.debug(`olympe.auth.TokenStorage: retrieve token with key ${this.key}`);b.get(this.key,c=>{let d=null;if(c)try{this.N.debug('olympe.auth.TokenStorage: Token retrieved successfully');{var e=JSON,f=e.parse;var g=Ba(olympe.$.Jh().P(olympe.$.Eu(c)));const h=f.call(e,g);if(h.fullToken){const k=new olympe.auth.Cp(h.user,h.userTag,h.nonce,h.payload);k.D=h.fullToken;d=k}else d=h.payload&&
|
|
360
|
-
h.payload.id_token?new olympe.auth.Bl(h.user,h.userTag,h.nonce,h.payload):new olympe.auth
|
|
360
|
+
h.payload.id_token?new olympe.auth.Bl(h.user,h.userTag,h.nonce,h.payload):new olympe.auth.$e(h.user,h.userTag,h.nonce,h.payload)}}catch(h){this.N.error('Error while unserializing token: ',h.message)}else this.N.debug('olympe.auth.TokenStorage: No token found');b.close();a(d)})}};olympe.auth.Rl.F='OlympeToken';olympe.auth.Rl.D='AUTH';olympe.auth.ji=class{redirect(){}F(){}D(){}};olympe.auth.ji.D={Re:'GET',Cl:'POST'};olympe.auth.Ek=class{constructor(a){this.D=a||'default'}};olympe.auth.zb={};olympe.auth.zb.Vb={};olympe.auth.zb.Vb.fi=class{W(){}};olympe.auth.zb.Vb.Ae=class{ka(){}};olympe.auth.zb.Vb.je=class{pa(){}Ga(){}};function Vb(a,b){return olympe.$.Ec(b+'-olympe-'+a.D[b])}olympe.auth.zb.ph=class{constructor(a){this.D=a}ia(){return'local'}Jd(a,b){const c=a.Oc();if(c){const d=a.get('password'),e=a.mf();a.D.delete('password');if(void 0!==e&&Vb(this,c)===e){b(null,new olympe.auth.$e(c,'',Vb(this,c)));return}a=olympe.$.Ec(d||'');if(this.D[c]===a){b(null,new olympe.auth.$e(c,'',Vb(this,c)));return}}b(Error('Invalid login'))}};olympe.auth.zb.ph.D='local';olympe.auth.zb.ph.ja=[olympe.auth.ii];olympe.auth.zb.fi=class{constructor(a,b){this.D=a;this.storage=b}ia(){return'localToken'}Jd(a,b){this.storage.Jd(c=>{this.D.W(a,(d,e)=>{b(d,e||c)})})}};olympe.auth.zb.fi.D='localToken';olympe.auth.zb.fi.ja=[olympe.auth.ii];olympe.auth.zb.Al=class{constructor(a,b){this.D=a;this.F=b}ia(){return'openID'}Jd(){const a=this.D.D();this.D.redirect(`${this.F}/auth?url=${a}`,null,olympe.auth.ji.D.Re)}};olympe.auth.zb.Al.D='openID';olympe.auth.zb.Al.ja=[olympe.auth.ii];olympe.auth.zb.Ae=class{constructor(a,b){this.F=a;this.D=b}ia(){return'saml'}Jd(a,b){this.F.ka(c=>{c?b(c):this.D.F()})}};olympe.auth.zb.Ae.D='saml';olympe.auth.zb.Ae.ja=[olympe.auth.ii];olympe.auth.zb.je=class{static Ei(a,b){const c=new SRPClient,d=c.generateRandomSalt();return{username:a,login:a,salt:d,verifier:c.generateVerifier(d,a,b)}}constructor(a){this.D=a;this.N=olympe.ua.vb('auth')}ia(){return'srp'}Jd(a,b){const c=a.get('password');a.D.delete('password');this.N.debug('Sending SRP request');this.D.pa(a,(d,e,f)=>{this.N.debug('Received Salt+B message');if(d)b(d);else{try{const g=new SRPClient;g.step1(a.Oc(),c);const h=g.step2(e,f);a.set('a',h.A);a.set('m1',h.M1)}catch(g){b(g);
|
|
361
361
|
return}this.N.debug('Sending SRP A+M (proof) message');this.D.Ga(a,b)}})}};olympe.auth.zb.je.D='srp';olympe.auth.zb.je.ja=[olympe.auth.ii];olympe.auth.T={wa:'auth.Manager',Fa:'auth.Logger',li:'auth.Storage',aj:'auth.appNameToken',Ej:'auth.Redirector'};olympe.auth.hd={wa:'auth.ManagerConnector',No:'auth.LocalTokenConnector',je:'auth.SRPConnector',Ae:'auth.SAMLConnector'};olympe.auth.Z={Sk:'auth.defaultProvider',Oo:'auth.localTokenProvider',Zm:'auth.autoLogin',cn:'auth.autoUser',$m:'auth.autoPassword',pi:'auth.token',Xm:'auth.appToken'};
|
|
362
362
|
olympe.U.config(function(a){C(a,olympe.auth.Z.Sk,'srp');C(a,olympe.auth.Z.Oo,'localToken');C(a,olympe.auth.Z.Zm,!1);C(a,olympe.auth.Z.cn,'');C(a,olympe.auth.Z.$m,'');C(a,olympe.auth.Z.pi,'');C(a,olympe.auth.Z.Xm,'default');A(a,olympe.auth.T.Fa,[olympe.ua.T.wa],b=>b.Ic('auth'));y(a,olympe.auth.T.aj,olympe.auth.Ek,new olympe.U.ha(olympe.auth.Z.Xm));y(a,olympe.auth.T.li,olympe.auth.Rl,olympe.Wb.T.uj,olympe.auth.T.Fa,olympe.auth.T.aj);qa(a,olympe.auth.hd.wa);qa(a,olympe.auth.T.Ej);A(a,olympe.auth.T.wa,
|
|
363
|
-
[olympe.auth.T.Fa,olympe.auth.hd.wa,new olympe.U.vc(olympe.auth.T.li,olympe.U.
|
|
363
|
+
[olympe.auth.T.Fa,olympe.auth.hd.wa,new olympe.U.vc(olympe.auth.T.li,olympe.U.Pe.D.sh),new olympe.U.ha(olympe.auth.Z.Sk),new olympe.U.ha(olympe.auth.Z.Oo),new olympe.U.ha(olympe.auth.Z.Zm),new olympe.U.ha(olympe.auth.Z.cn),new olympe.U.ha(olympe.auth.Z.$m),new olympe.U.ha(olympe.auth.Z.pi),new olympe.U.vc(olympe.auth.T.Ej,olympe.U.Pe.D.sh),new olympe.U.vc(olympe.auth.hd.No,olympe.U.Pe.D.sh),new olympe.U.vc(olympe.auth.hd.je,olympe.U.Pe.D.sh),new olympe.U.vc(olympe.auth.hd.Ae,olympe.U.Pe.D.sh)],(b,
|
|
364
364
|
c,d,e,f,g,h,k,m,n,p,q,r)=>{const t=[];p&&t.push(new olympe.auth.zb.fi(p,d));q&&t.push(new olympe.auth.zb.je(q));r&&n&&t.push(new olympe.auth.zb.Ae(r,n));n&&c&&t.push(new olympe.auth.zb.Al(n,c.Nq()));if(0===t.length)throw Error('At least one provider is needed for auth to start');if(!t.map(w=>w.ia()).includes(e))throw Error('Default provider name'+e+'given by parameter'+olympe.auth.Z.Sk+'cannot be found');return new olympe.auth.qa(b,c,d,n,t,e,f,g,h,k,m)},!0)},'olympe.auth');
|
|
365
|
-
olympe.U.run([olympe.auth.T.wa],a=>{olympe.auth.nc=()=>a});olympe.
|
|
366
|
-
function $b(a){var b=olympe.host.me.Mc,c=olympe.host.me.ap.Zp;++a.G;const d=a.G;Yb(a,d,c);const e=olympe.C.createNode(b,void 0,void 0,void 0,void 0,'Native('+d+')',!1,function(){var f=arguments.length-2;const g=Array.from({length:f}),h=[],k=arguments[f+1],m=d+'_'+k;this.F.has(m)&&this.F.get(m).destroy();for(let n=0;n<f;n++){let p=arguments[n];olympe.C.Za(p)?(h.push(n),p=p.
|
|
367
|
-
{Zb(this,d,k,...n)})},void 0,g,h,'Native('+d+').'+k),this.F.set(m,f),f.onDestroy(()=>this.F.delete(m)));return null}.bind(a));e.Vc(a.P.bind(a,d));a=L(e);a.ku=d;K(e,a);return a}olympe.host.qa=class{constructor(a,b){this.N=a;this.L=b;this.G=0;this.D=new Map;this.F=new Map;a.debug('Starting host manager')}vb(){return this.N}P(a){this.N.debug('DESTROY #',a);const b=this.D.get(a);this.D.delete(a);b.destroy()}};olympe.host.xd=class{constructor(a){this.D=a;this.F=olympe.C.Ia()}G(){return this.D}Yd(){return this.D.
|
|
368
|
-
function dc(a){var b=olympe.host.se;a=a instanceof olympe.host.Mc.F?a.ba():a;b.D.F(a)}olympe.host.Mc=class{constructor(a){this.D=$b(a)}};olympe.host.Mc.D=class{constructor(a,b){this.se=a;this.id=b}ba(){return this.id}cancel(){}};olympe.host.Mc.L=class extends olympe.host.Mc.D{cancel(){this.se.P(this.id)}};olympe.host.Mc.G=class extends olympe.host.Mc.D{cancel(){this.se.G(this.id)}};olympe.host.Mc.F=class extends olympe.host.Mc.D{cancel(){this.se.F(this.id)}};olympe.host.me={};olympe.host.me.xd=class{destroy(){}};olympe.host.me.xd.prototype.destroy=olympe.host.me.xd.prototype.destroy;olympe.host.me.ap={
|
|
369
|
-
|
|
370
|
-
olympe.U.run([olympe.host.T.Dp],a=>a,'olympe.host.scheduler');olympe.U.run([olympe.host.T.wa],a=>a,'olympe.host');olympe.
|
|
365
|
+
olympe.U.run([olympe.auth.T.wa],a=>{olympe.auth.nc=()=>a});olympe.eb.node.auth={};olympe.eb.node.auth.ep=class{redirect(){console.warn('Redirection n/a in Node.JS')}F(){console.warn('Redirection n/a in Node.JS')}D(){console.warn('Redirection n/a in Node.JS')}};olympe.eb.node.auth.ep.ja=[olympe.auth.ji];olympe.U.config(a=>{y(a,olympe.auth.T.Ej,olympe.eb.node.auth.ep)},'olympe.native.node.auth');olympe.host={};const Wb=new Map,Xb=new Map;olympe.host.bp=class{static register(a,b,...c){Wb.set(a,b);0<c.length&&Xb.set(a,c)}static create(a,b,c,d){const e=Wb.get(a);if(void 0===e)throw Error('Undefined UI element type: '+a);a=Xb.get(a);return void 0!==a?new e(b,c,...a.map(f=>la(d,f))):new e(b,c)}};function Yb(a,b,c){a.N.debug('CREATE #',b,', type=',c);a.D.set(b,olympe.host.bp.create(c,b,a.N,a.L))}function Zb(a,b,c,...d){const e=a.D.get(b);if(void 0!==e){a.N.L()<=olympe.ua.Eb.D.Af&&a.N.debug('CALL #'+b+', '+c+'('+Array.prototype.slice.call(d,0)+')');b=[];for(const f of d)if(void 0===f||null===f)b.push(f);else if(olympe.C.Za(f))b.push(a.D.get(f.ku)||null);else if('function'===typeof f){const g=f,h=olympe.C.Ia();b.push((...k)=>{h.Bb()||g(...k)})}else b.push(f.valueOf());e[c].apply(e,b)}}
|
|
366
|
+
function $b(a){var b=olympe.host.me.Mc,c=olympe.host.me.ap.Zp;++a.G;const d=a.G;Yb(a,d,c);const e=olympe.C.createNode(b,void 0,void 0,void 0,void 0,'Native('+d+')',!1,function(){var f=arguments.length-2;const g=Array.from({length:f}),h=[],k=arguments[f+1],m=d+'_'+k;this.F.has(m)&&this.F.get(m).destroy();for(let n=0;n<f;n++){let p=arguments[n];olympe.C.Za(p)?(h.push(n),p=p.Ua):olympe.C.rf(p)&&h.push(n);g[n]=p}0===h.length?e.run(()=>{Zb(this,d,k,...g)}):(f=olympe.C.createNode(void 0,(...n)=>{e.run(()=>
|
|
367
|
+
{Zb(this,d,k,...n)})},void 0,g,h,'Native('+d+').'+k),this.F.set(m,f),f.onDestroy(()=>this.F.delete(m)));return null}.bind(a));e.Vc(a.P.bind(a,d));a=L(e);a.ku=d;K(e,a);return a}olympe.host.qa=class{constructor(a,b){this.N=a;this.L=b;this.G=0;this.D=new Map;this.F=new Map;a.debug('Starting host manager')}vb(){return this.N}P(a){this.N.debug('DESTROY #',a);const b=this.D.get(a);this.D.delete(a);b.destroy()}};olympe.host.xd=class{constructor(a){this.D=a;this.F=olympe.C.Ia()}G(){return this.D}Yd(){return this.D.Ua.Yd()||this.F.Yd()}Bb(){return this.D.Ua.Bb()}};olympe.host.xd.prototype.G.K=new olympe.C.J(()=>olympe.host.me.xd,[]);olympe.host.Lj=class{};olympe.host.fl=class{constructor(){}};olympe.host.fl.F=class{constructor(a,b,c=!1){this.name=a;this.value=b;this.D=c}ia(){return this.name}tb(a){return this.ia()===a.ia()&&this.value===a.value&&this.D===a.D}};olympe.host.fl.D=class{constructor(a,b,c){this.parameters=c}};function ac(a,b,c){var d=olympe.host.se;const e=c||olympe.$.Sb(),f=new olympe.C.ec('onTimeout context');d.D.ea(b,e,()=>{f.Bb()||f.run(a);d.D.G(e)});return new olympe.host.Mc.G(d.D,e)}function bc(a){var b=olympe.host.se;a=a instanceof olympe.host.Mc.G?a.ba():a;b.D.G(a)}function cc(a,b,c){var d=olympe.host.se;const e=c||olympe.$.Sb(),f=new olympe.C.ec('onInterval context');d.D.W(b,e,()=>{f.Bb()?d.D.F(e):f.run(a)});return new olympe.host.Mc.F(d.D,e)}
|
|
368
|
+
function dc(a){var b=olympe.host.se;a=a instanceof olympe.host.Mc.F?a.ba():a;b.D.F(a)}olympe.host.Mc=class{constructor(a){this.D=$b(a)}};olympe.host.Mc.D=class{constructor(a,b){this.se=a;this.id=b}ba(){return this.id}cancel(){}};olympe.host.Mc.L=class extends olympe.host.Mc.D{cancel(){this.se.P(this.id)}};olympe.host.Mc.G=class extends olympe.host.Mc.D{cancel(){this.se.G(this.id)}};olympe.host.Mc.F=class extends olympe.host.Mc.D{cancel(){this.se.F(this.id)}};olympe.host.me={};olympe.host.me.xd=class{destroy(){}};olympe.host.me.xd.prototype.destroy=olympe.host.me.xd.prototype.destroy;olympe.host.me.ap={gy:100,iy:101,hy:102,ky:103,jy:104,fy:105,mA:201,kA:202,hA:204,pA:205,gA:206,jA:207,nA:208,qA:209,rA:210,sA:211,iA:212,oA:218,lA:219,tA:220,fA:221,eA:222,AA:300,BA:301,CA:302,GA:303,HA:304,IA:305,DA:310,EA:311,FA:312,Kz:400,Lz:401,Mz:402,Gz:450,yz:500,wz:501,Bz:502,Az:503,xz:504,zz:505,aB:600,SA:601,WA:602,OA:603,PA:604,MA:605,RA:606,gB:607,ZA:608,JA:609,NA:610,QA:611,YA:612,cB:613,KA:614,bB:615,XA:616,fB:617,TA:618,UA:619,VA:620,$A:630,LA:631,dB:632,eB:633,JB:700,mB:701,nB:702,
|
|
369
|
+
oB:703,qB:704,rB:705,sB:706,pB:707,uB:708,tB:709,vB:710,zB:711,HB:712,wB:713,xB:714,AB:715,BB:716,DB:717,EB:718,GB:719,CB:720,FB:721,IB:722,yB:723,KB:724,LB:725,Zp:800};olympe.host.me.Mc=class{P(){}ea(){}G(){}W(){}F(){}};olympe.host.T={Mp:'host.System',to:'host.HistoryManager',Dp:'host.Scheduler',Fa:'host.platform.Logger',wa:'host.Manager'};olympe.host.se=null;olympe.U.config(function(a){qa(a,olympe.host.T.Mp);qa(a,olympe.host.T.to);A(a,olympe.host.T.Fa,[olympe.ua.T.wa],function(b){return b.Ic('host')});y(a,olympe.host.T.wa,olympe.host.qa,olympe.host.T.Fa,olympe.U.T.Oe);A(a,olympe.host.T.Dp,[olympe.host.T.wa],b=>{null===olympe.host.se&&(olympe.host.se=new olympe.host.Mc(b));return olympe.host.se},!0)},'olympe.host');
|
|
370
|
+
olympe.U.run([olympe.host.T.Dp],a=>a,'olympe.host.scheduler');olympe.U.run([olympe.host.T.wa],a=>a,'olympe.host');olympe.eb.node.host={};olympe.eb.node.host.xd=function(a,b){this.uid=a;this.N=b};olympe.eb.node.host.xd.prototype.constructor=olympe.eb.node.host.xd;olympe.eb.node.host.xd.prototype.destroy=function(){};olympe.eb.node.host.xd.prototype.destroy=olympe.eb.node.host.xd.prototype.destroy;olympe.eb.node.host.xd.prototype.vb=function(){return this.N};olympe.eb.node.host.xd.ja=[olympe.host.me.xd];olympe.eb.node.host.cp=class{constructor(a){this.N=a}Xq(){this.N.error('No history manager implemented in Node')}};olympe.eb.node.host.cp.ja=[olympe.host.fl];olympe.eb.node.host.Mc=class{constructor(){this.D={};this.L={}}destroy(){}P(a){clearTimeout(this.D[a]);delete this.D[a]}ea(a,b,c){this.D[b]=setTimeout(c,a)}G(a){clearTimeout(this.D[a]);delete this.D[a]}W(a,b,c){this.L[b]=setInterval(c,a)}F(a){clearInterval(this.L[a]);delete this.L[a]}};olympe.host.bp.register(olympe.host.me.ap.Zp,olympe.eb.node.host.Mc);olympe.eb.node.host.Mc.ja=[olympe.host.me.Mc];olympe.eb.node.host.Lj=class{constructor(a){this.N=a}};olympe.eb.node.host.Lj.ja=[olympe.host.Lj];olympe.U.config(function(a){pa(a,olympe.host.T.to,olympe.eb.node.host.cp,olympe.host.T.Fa);pa(a,olympe.host.T.Mp,olympe.eb.node.host.Lj,olympe.host.T.Fa)},'olympe.native.node.host');olympe.Aa={};olympe.Aa.Xb={};olympe.Aa.Xb.hi={Cl:'POST',Re:'GET',js:'HEAD',op:'PUT',DELETE:'DELETE',pt:'OPTIONS',ut:'PATCH'};olympe.Aa.Xb.ResponseType={Mj:'text',Hk:'blob',ARRAY_BUFFER:'arraybuffer'};olympe.Aa.Xb.Headers={Bn:'Content-Type',ry:'Content-Length'};olympe.Aa.Xb.sy={oz:'text/html',JSON:'application/json',NB:'application/zip'};olympe.Aa.Xb.Ye={Br:0,xl:200,tn:201,$i:202,ey:400,kB:401,kz:403,Iz:404,Cz:405,Zz:500,Pt:503};function ec(a){return a.host&&encodeURI(a.host)}function fc(a){return encodeURI(a.path).replace(olympe.Aa.Rj.D,(b,c)=>'%'+c)}function gc(a){return void 0===a.G?443===a.port:a.G}olympe.Aa.Rj=class{constructor(a,b,c,d){this.host='localhost';this.port=80;this.path='';this.G=!1;void 0!==a&&(this.host=a);void 0!==b&&(this.port=b);void 0!==c&&(this.path=c.replace(/^\/+/,''));void 0!==d&&(this.G=d)}D(){return`${gc(this)?'wss':'ws'}://${ec(this)}:${this.port}/${fc(this)}`}toString(){return`${ec(this)}:${this.port}/${fc(this)}`}};
|
|
371
371
|
olympe.Aa.Rj.D=/%25([0-9a-f]{2})/i;olympe.Aa.WebSocket=class{constructor(){}send(){}close(){}Ga(){}pa(){}ka(){}};function hc(a,b,c,d){a=olympe.$.dr(a.valueOf());if(!a.host&&!a.path)return null;const e=a.scheme?a.scheme.includes('s'):!1;b=new olympe.Aa.gl(a.host,a.port||(e?443:80),a.path||'',e,b,c,d,a.query||void 0);a.pr&&(c=a.pr.split(':'),2===c.length&&(c=olympe.$.Jh().D(Aa(`${c[0]}:${c[1]}`)),ic(b,{Authorization:`Basic ${c}`})));return b}function jc(a){return void 0!==a.query?a.query.replace(/[^=&]+/g,b=>encodeURIComponent(b)):null}
|
|
372
372
|
function ic(a,b){for(let c in b)Object.prototype.hasOwnProperty.call(b,c)&&(a.headers[c]=b[c])}
|
|
373
|
-
olympe.Aa.gl=class extends olympe.Aa.Rj{constructor(a,b,c,d,e,f,g,h){super(a,b,c,d);this.method=void 0!==e?e:olympe.Aa.Xb.hi.
|
|
374
|
-
olympe.Aa.gl.hi={Cl:'POST',
|
|
373
|
+
olympe.Aa.gl=class extends olympe.Aa.Rj{constructor(a,b,c,d,e,f,g,h){super(a,b,c,d);this.method=void 0!==e?e:olympe.Aa.Xb.hi.Re;this.query=h;this.headers={};this.body=f;this.F=void 0!==g?g:olympe.Aa.Xb.ResponseType.Mj;this.ca=this.cert=this.key=null;this.rejectUnauthorized=!1}setHeader(a,b){this.headers[a]=b}D(){let a=jc(this);a=a?`?${a}`:'';return ec(this)?`${gc(this)?'https':'http'}://${ec(this)}:${this.port}/${fc(this)}${a}`:`${fc(this)}${a}`}toString(){return this.D()}};
|
|
374
|
+
olympe.Aa.gl.hi={Cl:'POST',Re:'GET',js:'HEAD',op:'PUT',DELETE:'DELETE',pt:'OPTIONS'};olympe.Aa.ks=class{constructor(a,b,c,d){this.data=a;this.status=void 0===b?200:b;this.statusText=void 0===c?'':c;this.headers=void 0===d?{}:d}getHeader(a){return this.headers[a]}};function kc(a,b,c){const d=olympe.C.Ia(),e=d.onDestroy(()=>{var f=a.F();const g=f.D.get(b);g&&(f.D.delete(b),g())});return d.rb(f=>{d.re(e);a.F().D.delete(b);c(f)})}olympe.Aa.qa=class{constructor(a){this.N=a;this.G=1;a='Initializing NET layer';this.N.G()&&(a+=' (implementation: '+this.W()+')');this.N.info(a);this.N.log('DONE initializing NET layer (ready to receive connection requests)')}F(){}ka(){}D(){}L(){}P(){}W(){}};function lc(a){return!(!a.D||!a.D.connected)}function mc(a,b,c,d){a.connect();a.D.publish(b,JSON.stringify(c),void 0,e=>{d&&d(e);e&&a.N.error('Failed to publish a message '+c)})}function nc(a,b,c){a.connect();a.D.subscribe(b,void 0,d=>{d?a.N.error(`Failed to subscribe to topic ${b}: ${d}`):a.F.set(b,c)})}function oc(a,b,c){a.connect();a.D.unsubscribe(b,void 0,c);a.F.delete(b)}
|
|
375
375
|
olympe.Aa.yj=class{constructor(a,b){this.url=a;this.L=b||null;this.D=null;this.G=[];this.F=new Map;this.N=olympe.ua.vb('MQTT')}connect(a){if(lc(this))return a&&a(),this;a&&this.G.push(a);null===this.D&&(this.D=mqtt.connect(this.url,this.L),this.D.on(olympe.Aa.yj.D.ht,(b,c)=>{this.F.has(b)?this.F.get(b)(JSON.parse(c.toString())):this.N.warn('There is no subscriber for topic '+b)}),this.D.on(olympe.Aa.yj.D.Gr,()=>this.G.forEach(b=>b())));return this}end(a,b){this.D&&this.D.end(a,{},()=>{b&&b();this.D=
|
|
376
|
-
null});return this}};olympe.Aa.yj.D={Gr:'connect',ht:'message',
|
|
376
|
+
null});return this}};olympe.Aa.yj.D={Gr:'connect',ht:'message',oy:'close',Dy:'end'};olympe.Aa.T={wa:'net.Manager',Fa:'net.Logger'};olympe.Aa.Z={tt:'net.P2PServers',st:'net.P2POptions.reliable',rt:'net.P2POptions.maxRetransmitTime'};olympe.U.config(function(a){C(a,olympe.Aa.Z.tt,'stun:stun.l.google.com:19302');C(a,olympe.Aa.Z.st,!0);C(a,olympe.Aa.Z.rt,3E3);qa(a,olympe.Aa.T.wa);A(a,olympe.Aa.T.Fa,[olympe.ua.T.wa],function(b){return b.Ic('net')})},'olympe.net');olympe.Aa.Uc={};olympe.Aa.Uc.hl=class{constructor(a){this.N=a;this.D=new Map}G(){}F(){}};olympe.Aa.Uc.WebSocket=class{constructor(a,b){this.N=b;this.id=a;this.D=null;this.F=[];this.L=!1;this.G=this.P=this.W=null}ba(){return this.id}open(a){const b=this.ea(a);b.binaryType='arraybuffer';b.onopen=()=>{this.N.info('Websocket OPENED');this.L=!0;this.W?(this.N.debug('Notifying upper layer for WebSocket#'+this.id),this.W()):this.N.warn('Nothing to notify for WebSocket#'+this.id);this.F.forEach(b.send.bind(b));this.F.length=0};b.onmessage=c=>{c='string'===typeof c.data?String(c.data):Ba(c.data);
|
|
377
377
|
this.N.debug('#'+this.id+' < '+c);this.G&&this.G(c)};b.onclose=()=>{this.L=!1;this.N.debug('WebSocket#'+this.id+' CLOSE');this.P&&this.P()};b.onerror=()=>{this.N.debug('WebSocket#'+this.id+' ERROR')};this.D=b}send(a){this.N.debug('#'+this.id+' > '+a);this.L?this.D.send(a):this.F.push(a)}close(){const a=this.D.constructor,b=this.D.readyState;b===a.OPEN||b===a.CONNECTING?(this.N.debug('Force closing native websocket'),this.D.close(1E3)):this.N.debug('Try to force close native websocket, but not open nor connecting')}Ga(a){this.W=
|
|
378
|
-
a||null}pa(a){this.G=a||null}ka(a){this.P=a||null}ea(){}};olympe.Aa.Uc.WebSocket.ja=[olympe.Aa.WebSocket];olympe.
|
|
378
|
+
a||null}pa(a){this.G=a||null}ka(a){this.P=a||null}ea(){}};olympe.Aa.Uc.WebSocket.ja=[olympe.Aa.WebSocket];olympe.eb.node.Aa={};olympe.eb.node.Aa.mt=class extends olympe.Aa.qa{constructor(a,b){super(a,b);this.ea=new olympe.eb.node.Aa.hl(a)}W(){return'NodeJS'}P(){return olympe.C.fa.F}ka(a){var b=this.G++;a=a.D();this.N.debug('CREATE Websocket #'+b+' to '+a);b=new olympe.eb.node.Aa.nt(b,this.N);b.open(a);return b}D(a,b){this.N.debug('SEND HTTP '+a.method+' to '+a.D());const c=this.G++;b=kc(this,c,b);this.ea.G(c,{u:a.D(),s:gc(a),h:ec(a),p:a.port,z:fc(a),q:jc(a),m:a.method,v:a.headers,k:a.key,c:a.cert,a:a.ca,j:a.rejectUnauthorized,
|
|
379
379
|
b:a.body,r:a.F},b)}L(){this.N.warn('DOWNLOAD FILE not available with node native implementation. URL:')}F(){return this.ea}};const pc=require('fs'),qc=require('http'),rc=require('https');
|
|
380
|
-
olympe.
|
|
380
|
+
olympe.eb.node.Aa.hl=class extends olympe.Aa.Uc.hl{G(a,b,c){const d=b.s,e=b.b,f=b.m;var g=b.v;const h=b.k,k=b.c,m=b.a,n=b.j;var p=b.h;const q=b.p;let r=b.z;r.startsWith('/')||(r=`/${r}`);const t=b.q,w=b.u,u=b.r;b={host:p,port:q,path:t?r+'?'+t:r,method:f};g&&(b.headers=g);g=(x,G,H)=>new Promise((F,Ga)=>{pc.readFile(x,(S,cb)=>{S?Ga(S):(H[G]=cb,F(H))})});p=x=>{const G=F=>{F.setEncoding(u===olympe.Aa.Xb.ResponseType.Mj?'utf-8':'binary');let Ga='';F.on('data',S=>{Ga+=S});F.on('end',()=>{if(u!==olympe.Aa.Xb.ResponseType.Mj){var S=
|
|
381
381
|
(new Uint8Array(Buffer.from(Ga,'binary'))).buffer;S=u===olympe.Aa.Xb.ResponseType.Hk?new Blob([S]):S}else S=Ga;c(this.F(F.statusCode,F.statusMessage,S,F.headers))})},H=d?new rc.request(x,G):new qc.request(x,G);this.D.set(a,()=>{H.destroy()});H.on('error',F=>{c(this.F(0,'Conection refused','Error connecting to '+w+' with method '+f+', code = '+F.code+', message = '+F.message,''))});!e||'POST'!==f&&'PUT'!==f?H.end():(e instanceof Blob?e.arrayBuffer():Promise.resolve(e)).then(F=>{H.write(F instanceof
|
|
382
|
-
ArrayBuffer?Buffer.from(F):F);H.end()})};d&&(h||k||m)?h&&k&&m?(b.rejectUnauthorized=n,g(h,'key',b).then(g.bind(null,k,'cert')).then(g.bind(null,m,'ca')).then(p).catch(x=>{this.N.log('Error loading self signed files:',x)})):this.N.warn('All three self signed files must be specified!'):p(b)}F(a,b,c,d){this.N.debug('Received HTTP response',a,c);return new olympe.Aa.ks(c,a,b,d)}};olympe.
|
|
383
|
-
b&&b(!0)}clear(){this.D||this.open();this.db.setState({})}};olympe.
|
|
382
|
+
ArrayBuffer?Buffer.from(F):F);H.end()})};d&&(h||k||m)?h&&k&&m?(b.rejectUnauthorized=n,g(h,'key',b).then(g.bind(null,k,'cert')).then(g.bind(null,m,'ca')).then(p).catch(x=>{this.N.log('Error loading self signed files:',x)})):this.N.warn('All three self signed files must be specified!'):p(b)}F(a,b,c,d){this.N.debug('Received HTTP response',a,c);return new olympe.Aa.ks(c,a,b,d)}};olympe.eb.node.Aa.nt=class extends olympe.Aa.Uc.WebSocket{ea(a){return new (require('ws'))(a)}};olympe.eb.node.Aa.Z={lB:'native.html.net.useWorkers'};olympe.U.config(function(a){pa(a,olympe.Aa.T.wa,olympe.eb.node.Aa.mt,olympe.Aa.T.Fa,olympe.host.T.wa)},'olympe.native.node.net');olympe.eb.node.Wb={};olympe.eb.node.Wb.Uo=class{constructor(a){this.F={};this.N=a}D(a){void 0===this.F[a]&&(this.F[a]=new olympe.eb.node.Wb.Vo(a,this.N));return this.F[a].open()}};olympe.eb.node.Wb.Uo.ja=[olympe.Wb.Us];olympe.eb.node.Wb.Vo=class{constructor(a,b){this.name=a;this.N=b;this.D=!1;this.db=null}open(){if(this.D)return this;const a=require('lowdb');this.D=!0;const b=require('lowdb/adapters/Memory');this.db=a(new b);return this}close(){}get(a,b){this.D||this.open();b(this.db.get(a).value(),a)}set(a,b,c){this.D||this.open();this.db.set(a,b).write();c&&c(!0)}forEach(a,b){this.D||this.open();const c=this.db.getState();for(const [d,e]of Object.entries(c))a(e,d);b()}remove(a,b){this.D||this.open();this.db.unset(a).write();
|
|
383
|
+
b&&b(!0)}clear(){this.D||this.open();this.db.setState({})}};olympe.eb.node.Wb.Vo.ja=[olympe.Wb.Vs];olympe.U.config(function(a){y(a,olympe.Wb.T.uj,olympe.eb.node.Wb.Uo,olympe.Wb.T.Fa)},'olympe.native.node.localstorage');olympe.eb.node.storage={};olympe.eb.node.storage.Storage=class{constructor(a){this.N=a}F(a){a&&a('Not Implemented.')}P(a){a&&a('Not Implemented.')}write(a,b,c,d,e){e&&e('Not Implemented.')}G(a){a&&a('Not Implemented.')}L(a){a&&a('Not Implemented.')}D(a){a&&a('Not Implemented.')}open(a){a(null)}close(a){a(null)}};olympe.eb.node.storage.Storage.ja=[olympe.Wb.Storage];olympe.U.config(function(a){pa(a,olympe.Wb.T.li,olympe.eb.node.storage.Storage,olympe.host.T.Fa)},'olympe.native.html.storage');olympe.eg={};olympe.eg.Z={VERSION:'version.version',xr:'version.branch',zf:'version.commit',$t:'version.tag',ao:'version.olympe-framework',yr:'version.build'};olympe.U.config(function(a){C(a,olympe.eg.Z.VERSION,'');C(a,olympe.eg.Z.xr,'');C(a,olympe.eg.Z.zf,'');C(a,olympe.eg.Z.$t,'');C(a,olympe.eg.Z.ao,'');C(a,olympe.eg.Z.yr,'')},'olympe.main');const sc=require('fs');let ta,sa;function tc(a,b){sc.readFile(a,(c,d)=>{c?b(Object.create(null)):(d=JSON.parse(d),b(d))})}
|
|
384
384
|
function uc(){if(void 0!==ta&&void 0!==sa){0===Object.keys(sa).length&&console.warn('No configuration found. Check presence of oConfig.json');0===Object.keys(ta).length&&console.warn('No version found. Check presence of version.json');var a=Object.create(null),b=process.argv;for(var c=2;c<b.length;c++){var d=/^true|false$/i,e=/^\d+(\.\d+)?$/;let f;const g=/([^?&=]+)(=?([^?&=]+))?/g.exec(b[c]);f=g[3];void 0===f?f=!0:d.test(f)?f='true'===f.toLowerCase():e.test(f)&&(f=parseFloat(f));a[g[1]]=f}a=new olympe.U.Nr(a);
|
|
385
385
|
d=a.vb();d.debug('Registering configurations...');d.D++;for(let f=0,g=ja.length;f<g;f++)b=a,c=ja[f],z(b.N,'Registering configure callback '+(c.D?'for module '+c.D:'')),b.F.push(c.F);na(d);d.debug('done registering');a=a.compile();c=a.vb();c.debug('Running run callbacks of container...');for(let f=0,g=ka.length;f<g;f++)c.D++,d=ka[f],b=a,e=ma(b,d.Fi()),e.push(b),b.N.debug('Calling run callback '+(d.D?'for module '+d.D:'')),d.F.apply(null,e),na(c);c.debug('done calling run callbacks. DI process completed!')}}
|
|
386
|
-
olympe.$.pm('oConfig.json',tc,function(a){sa=a;uc()});tc('version.json',function(a){ta=a;uc()});olympe.dc={};olympe.dc.Ea=function(a){if('string'===typeof a)return a;let b=null;a=olympe.C.
|
|
386
|
+
olympe.$.pm('oConfig.json',tc,function(a){sa=a;uc()});tc('version.json',function(a){ta=a;uc()});olympe.dc={};olympe.dc.Ea=function(a){if('string'===typeof a)return a;let b=null;a=olympe.C.Sa(a);void 0!==a&&null!==a&&(a=a.valueOf(),'string'===typeof a?b=a:a.R?b=a.R():'function'===typeof a&&(b=olympe.dc.Ba.hc(a)));return b||''};v('olympe.dc.instanceToTag',olympe.dc.Ea);olympe.dc.Xa=function(){return olympe.dc.Tc().view};olympe.dc.Ja={ORIGIN:'<',DESTINATION:'>',oh:'<',uh:'>'};v('olympe.dc.RelationDirection',olympe.dc.Ja);olympe.dc.Qf=class{xc(){}bc(){}qc(){}sa(){}mb(){}};olympe.dc.El=class{md(){}ba(){}Cc(){}};function vc(a,b,c,d,e,f,g){d=new olympe.dc.la(olympe.dc.la.oa.Qj,{file:b,url:null,content:c,Yg:e?h=>{wc(a,b,c);f(h)}:f,mimeType:d,hg:g||null},[olympe.dc.Xa().source(b)||olympe.dc.Na.ld]);a.F.send(d)}function wc(a,b,c){const d=olympe.dc.Ea(b);a.D.set(d,c);const e=olympe.$.Xf();xc(olympe.dc.Xa(),d,f=>{f||(a.D.delete(d),yc(olympe.dc.Xa(),d,e))},e)}
|
|
387
387
|
function zc(a,b,c,d){olympe.C.er([b.Uq(),b.R(),b.ml(),b.wm()],(e,f,g,h)=>{a.D.has(f)?c(a.D.get(f)):(e=new olympe.dc.la(olympe.dc.la.oa.ij,{file:f,url:e.valueOf()?null:g,mimeType:h.valueOf(),Yg:a.G?k=>{wc(a,f,k);c(k)}:c,hg:d},[olympe.dc.Xa().source(f)||olympe.dc.Na.ld]),a.F.send(e))})}
|
|
388
|
-
olympe.dc.bs=class{constructor(a,b,c,d,e){this.N=a;this.F=c;this.G=e;this.D=new Map}ne(a,b,c,d,e,f=!0){b=b instanceof olympe.C.
|
|
389
|
-
function Kc(a){a=a.R()+'@'+a.
|
|
390
|
-
olympe.dc.Ba=class{constructor(){}static D(a,b,...c){if(Dc.has(a))throw Error(`Tag: ${a} - overwriting already defined sync ${Dc.get(a).F.name} with ${b.name}`);let d=null;const e=c.length;if(0<e){d=Array(e);for(let f=0;f<e;f++){let g=c[f];d[f]='string'===typeof g?new olympe.U.vc(g):g}}b=new olympe.dc.xa.Entry(a,b,d);Dc.set(a,b);return b.F.entry=b}static hc(a){return(a=a.entry)&&a.R()||null}};olympe.dc.xa={};function Lc(a,b){a.D=b}function Q(a,b){b=b.Cd();Jc(b.R(),b.
|
|
388
|
+
olympe.dc.bs=class{constructor(a,b,c,d,e){this.N=a;this.F=c;this.G=e;this.D=new Map}ne(a,b,c,d,e,f=!0){b=b instanceof olympe.C.Ra?b.valueOf():b;'string'===typeof b?b=new Blob([Aa(b)],{type:c}):b instanceof ArrayBuffer&&(b=new Blob([b],{type:c}));vc(this,a,b,c,f&&this.G,d,e)}};olympe.dc.de=class{R(){}};olympe.dc.de.prototype.getTag=olympe.dc.de.prototype.R;olympe.dc.de.prototype.R.K=new olympe.C.J(()=>String,[]);olympe.dc.Hc={fe:'ff022000000000000000',gh:'ff02200000000000000e',sn:'ff02200000000000000f'};olympe.dc.Rb={VERSION:'@v',Sd:'@s'};olympe.dc.qg={jd:'?'};olympe.dc.qa=class{constructor(a,b,c,d,e,f){this.N=a;this.D=f}ne(a,b,c,d,e,f){f?this.D.ne(a,b,c,g=>{g&&f.update(a,olympe.dm.File.urlProp,g);f.update(a,olympe.dm.File.D,olympe.C.fa.F);d(g)},e):this.D.ne(a,b,c,d,e)}};function Ac(a,b){a.F.unshift(b);return a}olympe.dc.la=class{constructor(a,b,c){this.type=a;this.content=b;this.D=c;this.F=[]}validate(a=null){this.F.forEach(b=>{b(a||null)})}toString(){const a=olympe.$.Lq(olympe.dc.la.oa,this.type);return a?a:'UNKNOWN_MESSAGE'}};olympe.dc.la.oa={pg:10,mz:11,Ip:20,xA:21,Ut:22,Pl:23,$h:24,Zh:25,nz:26,bl:28,Tz:30,Uz:31,ri:40,Ql:41,ah:45,hn:46,Yk:47,Qj:50,ij:51,Tk:52,gu:60,Gt:61,ds:62,es:63,Er:64,zr:65,lz:90,Rk:91,cl:92,ko:93,Jo:94,zj:95,Tt:96};olympe.dc.We=class{D(){}};olympe.dc.Fl=class{constructor(...a){this.Pb=a}D(a,b,c){const d=this.Pb.length,e=(f,g,h)=>{g||f>=d?c(g,h):this.Pb[f].D(a,h,e.bind(null,f+1))};e(0,null,b)}};olympe.dc.Fl.ja=[olympe.dc.We];olympe.dc.Bc=class{constructor(a){this.tag='string'===typeof a?a:a.R()}R(){return this.tag}toJSON(){return'{ "type": "reference", "tag": '+JSON.stringify(this.tag)+' }'}tb(a){return a instanceof olympe.dc.Bc&&this.tag===a.tag}static ac(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return new olympe.dc.Bc(b.tag)}};olympe.dc.Bc.ja=[olympe.dc.de];olympe.dc.Bc.prototype.toJSON.K=olympe.C.J.D;olympe.dc.Bc.prototype.tb.K=olympe.C.J.D;olympe.dc.Mf=class{send(){}D(){}Ga(){}P(){}};olympe.dc.ni={gp:'online',wl:'offline',Eo:'invalidate'};olympe.dc.Na={jb:'self',ld:'server',Ot:'self.only'};const Bc=olympe.dc.Ja.ORIGIN,Cc=olympe.dc.Ja.DESTINATION,Dc=new Map,Ec=new Map,Fc=new Map,Gc=new Map;function Hc(a,b){var c=olympe.dm.File;let d=c;'function'===typeof c&&(d=b.entry);c=[...(d.Sm||[])];return olympe.dc.Ba.D(a,b,...c)}function N(a,b){Gc.set(a,b);return a}function Ic(a){return(a=Dc.get(a))&&a.F||olympe.dc.Sync}function Jc(a,b,c){const d=a+'@'+(b===Cc?Bc:Cc);if(Ec.has(d))throw Error(`Try to register the same relation (${b+a}) multiple times.`);Ec.set(d,c)}
|
|
389
|
+
function Kc(a){a=a.R()+'@'+a.Qa();return Ec.get(a)||olympe.dc.Sync}function O(a,b){b.NAME=a;Fc.set(a,b)}function P(a){return a.NAME||null}
|
|
390
|
+
olympe.dc.Ba=class{constructor(){}static D(a,b,...c){if(Dc.has(a))throw Error(`Tag: ${a} - overwriting already defined sync ${Dc.get(a).F.name} with ${b.name}`);let d=null;const e=c.length;if(0<e){d=Array(e);for(let f=0;f<e;f++){let g=c[f];d[f]='string'===typeof g?new olympe.U.vc(g):g}}b=new olympe.dc.xa.Entry(a,b,d);Dc.set(a,b);return b.F.entry=b}static hc(a){return(a=a.entry)&&a.R()||null}};olympe.dc.xa={};function Lc(a,b){a.D=b}function Q(a,b){b=b.Cd();Jc(b.R(),b.Qa(),a.F);return b}function Mc(a){a.G=!0;return a}
|
|
391
391
|
olympe.dc.xa.Entry=class{constructor(a,b,c){this.tag=a;this.F=b;this.Sm=c||null;this.D=null;this.G=!1}R(){return this.tag}instantiate(a,b){const c=this.F;if(this.Mi()&&b.getParameter(olympe.dc.Z.Qn)){var d=olympe.dc.Xa();d=`Trying to instantiate an abstract class ${d.name(this)} (${this.R()}).`+` This may happen when the implementation of another class extending ${d.name(this)} has not been registered`;olympe.ua.vb('dc').error(d)}return this.Sm?(a=[void 0,a].concat(ma(b,this.Sm)),new c(...a)):new c(void 0,
|
|
392
|
-
a)}za(a){return new olympe.dc.xa.Property(a)}Oa(a,b=olympe.dc.Ja.DESTINATION){Jc(a,b,this.F);return new olympe.dc.V.Fb(a,b)}Mi(){return this.G}};v('olympe.dc.registry.Entry',olympe.dc.xa.Entry);olympe.dc.xa.Entry.prototype.addRelation=olympe.dc.xa.Entry.prototype.Oa;olympe.dc.xa.Entry.prototype.addProperty=olympe.dc.xa.Entry.prototype.za;olympe.dc.xa.Entry.ja=[olympe.dc.de];olympe.dc.xa.Property=class{constructor(a){this.tag=a}R(){return this.tag}};olympe.dc.xa.Property.ja=[olympe.dc.de];olympe.dc.xa.Relation=class a{constructor(b,c){this.tag=b;this.direction=c||olympe.dc.Ja.DESTINATION}R(){return this.tag}
|
|
393
|
-
olympe.dc.xa.Relation.ja=[olympe.dc.de];olympe.dc.db={};function Nc(a,b,c,d,e){var f=olympe.dc.Na.
|
|
394
|
-
olympe.dc.db.Rr=class{constructor(a,b,c,d,e){this.N=a;this.D=b;this.F=new olympe.dc.db.Mr(a,b,d);this.view=new olympe.dc
|
|
395
|
-
olympe.dc.db.Database=class a extends Map{constructor(b,c){super();this.id=olympe.$.Sb();this.N=b;this.
|
|
396
|
-
d.zd(c&&c.get(Tc)||this.zd);c&&(c.delete(Sc),c.delete(Tc),this.ed(d,c));this.D(a.D.Co,b)}update(b,c,d=!1){if(void 0!==c&&null!==c){b=this.
|
|
397
|
-
c&&void 0!==d)switch(b){case Uc:c.Sg(d);break;case Vc:c.Rg(d);break;default:c.unlink(b,d)}}Ya(b){for(const c of b)this.
|
|
392
|
+
a)}za(a){return new olympe.dc.xa.Property(a)}Oa(a,b=olympe.dc.Ja.DESTINATION){Jc(a,b,this.F);return new olympe.dc.V.Fb(a,b)}Mi(){return this.G}};v('olympe.dc.registry.Entry',olympe.dc.xa.Entry);olympe.dc.xa.Entry.prototype.addRelation=olympe.dc.xa.Entry.prototype.Oa;olympe.dc.xa.Entry.prototype.addProperty=olympe.dc.xa.Entry.prototype.za;olympe.dc.xa.Entry.ja=[olympe.dc.de];olympe.dc.xa.Property=class{constructor(a){this.tag=a}R(){return this.tag}};olympe.dc.xa.Property.ja=[olympe.dc.de];olympe.dc.xa.Relation=class a{constructor(b,c){this.tag=b;this.direction=c||olympe.dc.Ja.DESTINATION}R(){return this.tag}Qa(){return this.direction}Cd(){const b=olympe.dc.Ja.ORIGIN,c=olympe.dc.Ja.DESTINATION;return new a(this.tag,this.direction===b?c:b)}toString(){return this.direction+this.tag}};olympe.dc.xa.Relation.prototype.getInverse=olympe.dc.xa.Relation.prototype.Cd;olympe.dc.xa.Relation.prototype.getDirection=olympe.dc.xa.Relation.prototype.Qa;olympe.dc.xa.Relation.prototype.getTag=olympe.dc.xa.Relation.prototype.R;
|
|
393
|
+
olympe.dc.xa.Relation.ja=[olympe.dc.de];olympe.dc.db={};function Nc(a,b,c,d,e){var f=olympe.dc.Na.jb;const g=c.ba();Oc(a.F,b,c,d,e,f);return h=>{if(h)a.F.push(g);else{h=a.F;const k=h.G.get(g);if(void 0!==k){const m=h.F.indexOf(g);h.F.splice(m,1);Pc(h,Qc(h,k.D,h.F.length),k.source);h.G.delete(g)}}}}function Rc(a,b,c){b&&a.D.Ya(b);c&&a.D.Kb(c)}
|
|
394
|
+
olympe.dc.db.Rr=class{constructor(a,b,c,d,e){this.N=a;this.D=b;this.F=new olympe.dc.db.Mr(a,b,d);this.view=new olympe.dc.ab(a,b);this.Zw=new olympe.dc.db.kt(this.N,this.view,b,e)}vb(){return this.N}persist(a){this.D.ka();this.D.La(a,olympe.dc.db.Instance.D.mp);this.D.ea()}wf(a,b){this.F.wf(a,b)}};const Sc=olympe.dc.Rb.VERSION,Tc=olympe.dc.Rb.Sd,Uc=olympe.dc.Hc.fe,Vc=olympe.dc.Hc.gh;
|
|
395
|
+
olympe.dc.db.Database=class a extends Map{constructor(b,c){super();this.id=olympe.$.Sb();this.N=b;this.Ta=olympe.C.Ia();this.zd=c.get('defaultSource')||olympe.dc.Na.jb;this.L=olympe.dc.db.Database.F.IDLE;this.W=new Map;this.Ub=[];this.G=[];this.Ga=new Map;b=c.get('garbageCollector')||olympe.dc.db.ai.D.Uk;new olympe.dc.db.ai(this,b,this.Ta);c.get('debug')&&this.pe()}ba(){return this.id}getState(){return this.L}vb(){return this.N}create(b,c){const d=this.Nb(b,!0);d.qb(c&&parseInt(c.get(Sc),10)||1);
|
|
396
|
+
d.zd(c&&c.get(Tc)||this.zd);c&&(c.delete(Sc),c.delete(Tc),this.ed(d,c));this.D(a.D.Co,b)}update(b,c,d=!1){if(void 0!==c&&null!==c){b=this.Nb(b,!0);var e=c&&parseInt(c.get(Sc),10);0>e||!d&&b.version()>=e||(c.delete(Sc),b.qb(isNaN(e)?b.version()+1:e),this.ed(b,c))}}qc(b){const c=this.get(b);void 0!==c&&(this.pa(c,!1),this.D(a.D.Do,b))}link(b,c,d){c=this.Nb(c,!0);d=this.Nb(d,!0);switch(b){case Uc:c.pe(d);break;case Vc:c.oe(d);break;default:c.link(b,d)}}unlink(b,c,d){c=this.get(c);d=this.get(d);if(void 0!==
|
|
397
|
+
c&&void 0!==d)switch(b){case Uc:c.Sg(d);break;case Vc:c.Rg(d);break;default:c.unlink(b,d)}}Ya(b){for(const c of b)this.Nb(c).Tf()}Kb(b){for(const c of b)(b=this.get(c))&&b.detach()}La(b,c){b.forEach(d=>{this.Nb(d).Pg(c)})}Eh(b){const c=this.get(b);void 0!==c&&(c.clear(),super.delete(b),this.D(a.D.Pn,b))}Nb(b,c=!1){let d=this.get(b);void 0===d&&(d=new olympe.dc.db.Instance(b,this),this.set(b,d),this.D(a.D.On,b),c&&this.D(a.D.Oj,b));return d}He(b,c,d=!1,e=null){return{[Symbol.iterator]:function*(f){const g=
|
|
398
398
|
olympe.dm.Relation.D.Nj,h=olympe.dm.Relation.D.Gj,k=olympe.dc.Ja.ORIGIN,m=olympe.dc.Ja.DESTINATION,n=a.Tb.th+olympe.dc.nb.Jq(c),p=d?h:g,q=d?g:h,r=(new Map).set(f,!1),t=(u,x)=>(u=this.get(u))&&0!==(u.get(n)&x),w=([u,x])=>!r.has(u)&&(e?e(x):!0);for(const u of r.keys())r.get(u)||(r.set(u,!0),yield u),f=this.get(u),void 0!==f&&f.forEach((x,G)=>{(G[0]===k&&t(G.substring(1),q)||G[0]===m&&t(G.substring(1),p))&&Array.from(x.entries()).filter(w).forEach(([H])=>{r.set(H,!1)})})}.bind(this,b)}}qb(b){this.G[0].De(olympe.$.Xf(),
|
|
399
|
-
b)}P(b){this.G[0].D.delete(b)}D(b,c,...d){this.W.has(b)&&this.W.get(b).forEach(e=>{e(c,...d)})}pa(b,c){this.Ga.set(b,c)}Gd(b,c,d,e){0<this.G.length&&this.G[0].
|
|
400
|
-
this.
|
|
401
|
-
this.Ga.clear()}pe(){const b=a.Tb.DESTINATION,c=a.D.Wk,d=a.D.Fj,e=new Set,f=new Map;this.F(a.D.Co,g=>{e.add(g)});this.F(c,g=>{e.delete(g);f.delete(g)});this.F(d,(g,...h)=>{if(h[0]===Vc&&h[1]===b){const k=h[2];this.get(k).Hb()||(h=f.get(k)||new Set,0===h.size&&f.set(k,h),h.add(g))}});this.
|
|
399
|
+
b)}P(b){this.G[0].D.delete(b)}D(b,c,...d){this.W.has(b)&&this.W.get(b).forEach(e=>{e(c,...d)})}pa(b,c){this.Ga.set(b,c)}Gd(b,c,d,e){0<this.G.length&&this.G[0].Nb(b).za(e?Wc+c:c,d)}oe(b,c,d,e,f){if(0<this.G.length){var g=this.G[0];d===Xc?f?g.Nb(b).link(c,e):g.Nb(b).unlink(c,e):f?g.Nb(b).La(c,e):g.Nb(b).hb(c,e)}}F(b,c){let d=this.W.get(b);void 0===d&&(d=[],this.W.set(b,d));d.push(c)}hb(b){this.Ub.push(b)}Vd(b){return this.G.reduce((c,d)=>d.L.has(b)||c,!1)}ka(){this.L===a.F.IDLE&&(this.L=a.F.wr);this.G.unshift(new olympe.dc.db.Vr(this,
|
|
400
|
+
this.Ta))}ea(){this.L=a.F.zf;this.gf();Yc(this.G[0]);this.G.shift();0===this.G.length&&(this.Ub.forEach(b=>{b()}),this.L=a.F.IDLE)}ed(b,c){const d=a.Tb.jd;for(const [e,f]of c)void 0!==f&&(e[0]===d?b.Oi(e.substr(1),f):b.update(e,f))}gf(){const b=a.Tb.ORIGIN,c=this.Ga,d=new Map,e=(g,h)=>{const k=g.get(b+Uc);k&&k.forEach((m,n)=>{g!==m&&(d.set(m,h),c.delete(n),e(m,h))})};c.forEach((g,h)=>{d.set(h,g);e(h,g)});const f=this.G[0];d.forEach((g,h)=>{h.Vd(g)&&(h=h.tag(),g?f.Nb(h).create():f.Nb(h).delete())});
|
|
401
|
+
this.Ga.clear()}pe(){const b=a.Tb.DESTINATION,c=a.D.Wk,d=a.D.Fj,e=new Set,f=new Map;this.F(a.D.Co,g=>{e.add(g)});this.F(c,g=>{e.delete(g);f.delete(g)});this.F(d,(g,...h)=>{if(h[0]===Vc&&h[1]===b){const k=h[2];this.get(k).Hb()||(h=f.get(k)||new Set,0===h.size&&f.set(k,h),h.add(g))}});this.hb(()=>{e.forEach(g=>{const h=this.get(g);h&&null===h.model()&&this.N.error(`\n[DEBUG - DATABASE]\nInstance ${g} created but does not exist !\n${h.toString()}`)});e.clear();f.forEach((g,h)=>{const k=this.get(h);k&&
|
|
402
402
|
this.N.error(`\n[DEBUG - DATABASE]\nThe model ${h} is extended by other models but does not exist !`+`\nExtension models: ${Array.from(g.values()).join(', ')}`+`\n\n ${k.toString()}`)});f.clear()})}};olympe.dc.db.Database.Tb={th:'$',ps:'~',jd:'?',Ck:'=',Mk:'@',ORIGIN:olympe.dc.Ja.ORIGIN,DESTINATION:olympe.dc.Ja.DESTINATION};olympe.dc.db.Database.D={On:0,Pn:1,Vp:2,Oj:3,pn:4,qn:5,Wk:6,DELETE:7,Fj:8,Kl:9,Co:10,Do:11,wp:12};olympe.dc.db.Database.F={IDLE:0,wr:1,zf:2};const R=olympe.dc.db.Database.D,Zc=olympe.dc.db.Database.Tb.th,$c=olympe.dc.db.Database.Tb.ps,ad=olympe.dc.db.Database.Tb.jd,bd=olympe.dc.db.Database.Tb.Ck,cd=olympe.dc.db.Database.Tb.Mk,T=olympe.dc.Ja.ORIGIN,U=olympe.dc.Ja.DESTINATION,dd=olympe.dc.Hc.fe,ed=olympe.dc.Hc.gh;
|
|
403
|
-
olympe.dc.db.Instance=class a extends Map{constructor(b,c){super();this.D=b;this.ed=olympe.dc.Na.
|
|
404
|
-
b=`Instance: ${this.D}, Exist: ${this.e}, Name: ${b}`;var c=this.model();if(c){var d=c.
|
|
405
|
-
void 0!==d?d:this.get($c+b)}update(b,c){const d=Zc+b;var e=this.get(d),f=e=void 0===e?null:e;(null!==f&&'function'===typeof f.tb?f.tb(c):f===c)||(e instanceof olympe.dc.Bc&&(this.db.get(e.R()).Ub(),this.db.qc(e.R())),c instanceof olympe.dc.Bc&&(e=this.db.
|
|
406
|
-
')'),e.Qg(this.D,b)),e=bd+b,null===c?(this.delete(d),c=(c=this.model())&&c.pa(b),void 0!==c?(this.set(e,c),this.L(b,c,!0)):this.L(b,null,!1)):(this.set(d,c),this.delete(e),this.L(b,c,!1)))}Oi(b,c){const d=ad+b;var e=this.get(d);(void 0===e?null:e)!==c&&(e=$c+b,null===c?(this.delete(d),c=(c=this.
|
|
407
|
-
b);d=c.
|
|
408
|
-
(b.e||b===this)&&this.db.pa(this,!0)}Sg(b){this.unlink(dd,b);this.forEach((c,d)=>{this.Ga(d.substr(1),null)});this.db.pa(this,!1)}oe(b){const c=this.
|
|
409
|
-
f.length;const h=f[g-2];(g=this.db.get(f[g-1]))&&(h?g.Tf():g.detach());d(...f)};this.De(b,c,e);return e}De(b,c,d){const e=this.
|
|
403
|
+
olympe.dc.db.Instance=class a extends Map{constructor(b,c){super();this.D=b;this.ed=olympe.dc.Na.jb;this.e=!1;this.hb=0;this.F=void 0;this.c=0;this.ka=a.D.mp;this.db=c}tag(){return this.D}Hb(){return this.e}Ya(){return this.db.Vd(this.D)}source(){return this.ed}version(){return this.hb}model(){const b=this.get(U+dd);return b&&b.values().next().value||null}ff(){const b=this.get(U+ed);return b&&b.values().next().value||null}persisted(){return this.ka!==a.D.$p}toString(){var b=this.Ib(olympe.dc.Sync.nameProp.R());
|
|
404
|
+
b=`Instance: ${this.D}, Exist: ${this.e}, Name: ${b}`;var c=this.model();if(c){var d=c.Ib(olympe.dc.Sync.nameProp.R())||'No model name';b+=`\nModel: ${c.D}, Exist: ${c.e}, Model name: ${d}`}else b+='\nModel: no model';(c=this.ff())?(d=c.Ib(olympe.dc.Sync.nameProp.R())||'No extension name',b+=`\nExtension: ${c.D}, Exist: ${c.e}, Extension name: ${d}`):b+='\nExtension: no extension';return b}Ib(b,c=!1){const d=this.get(Zc+b);return c||void 0!==d?d:this.get(bd+b)}pa(b,c=!1){const d=this.get(ad+b);return c||
|
|
405
|
+
void 0!==d?d:this.get($c+b)}update(b,c){const d=Zc+b;var e=this.get(d),f=e=void 0===e?null:e;(null!==f&&'function'===typeof f.tb?f.tb(c):f===c)||(e instanceof olympe.dc.Bc&&(this.db.get(e.R()).Ub(),this.db.qc(e.R())),c instanceof olympe.dc.Bc&&(e=this.db.Nb(c.R(),!0),e.F&&e.F.tag!==this.D&&this.db.vb().fatal('Instance',c.R(),'referenced multiple times!\nThis instance is currently property of',e.F.tag,'(for the property '+e.F.tk+')','and is assigned as a property of',this.D,'(for the property '+b+
|
|
406
|
+
')'),e.Qg(this.D,b)),e=bd+b,null===c?(this.delete(d),c=(c=this.model())&&c.pa(b),void 0!==c?(this.set(e,c),this.L(b,c,!0)):this.L(b,null,!1)):(this.set(d,c),this.delete(e),this.L(b,c,!1)))}Oi(b,c){const d=ad+b;var e=this.get(d);(void 0===e?null:e)!==c&&(e=$c+b,null===c?(this.delete(d),c=(c=this.ff())&&c.pa(b),c=void 0===c?null:c,null!==c&&this.set(e,c),this.W((new Map).set(b,c))):(void 0!==this.get(e)&&this.delete(e),this.set(d,c),this.W((new Map).set(b,c))))}link(b,c){var d=T+b;const e=this.Ta(U+
|
|
407
|
+
b);d=c.Ta(d);e.has(c.D)||(e.set(c.D,c),d.set(this.D,this),this.db.D(R.Fj,this.D,b,U,c.D),this.db.D(R.Fj,c.D,b,T,this.D),this.e&&c.e&&(this.G(b,U,c,!0),c.G(b,T,this,!0)))}unlink(b,c){const d=T+b;void 0!==this.La(U+b,c.D)&&(c.La(d,this.D),this.db.D(R.Kl,this.D,b,U,c.D),this.db.D(R.Kl,c.D,b,T,this.D),this.e&&c.e&&(this.G(b,U,c,!1),c.G(b,T,this,!1)))}pe(b){const c=this.model();if(null!==c){if(c===b)return;this.unlink(dd,c)}this.link(dd,b);b.forEach((d,e)=>{e[0]!==ad&&e[0]!==$c||this.Ga(e.substr(1),d)});
|
|
408
|
+
(b.e||b===this)&&this.db.pa(this,!0)}Sg(b){this.unlink(dd,b);this.forEach((c,d)=>{this.Ga(d.substr(1),null)});this.db.pa(this,!1)}oe(b){const c=this.ff();if(null!==c){if(c===b)return;this.unlink(ed,c)}this.link(ed,b);const d=new Map;b.forEach((e,f)=>{if(f[0]===ad||f[0]===$c)f=f.substr(1),this.has(ad+f)||(this.set($c+f,e),d.set(f,e))});this.W(d)}Rg(b){this.unlink(ed,b);const c=new Map;this.forEach((d,e)=>{e[0]===$c&&(this.delete(e),c.set(e.substr(1),null))});this.W(c)}Kb(b,c,d){const e=(...f)=>{var g=
|
|
409
|
+
f.length;const h=f[g-2];(g=this.db.get(f[g-1]))&&(h?g.Tf():g.detach());d(...f)};this.De(b,c,e);return e}De(b,c,d){const e=this.Ta(cd+b);e.has(c)||(e.set(c,d),this.Tf(),this.db.D(R.pn,this.D,b,c))}P(b,c){const d=this.La(cd+b,c);void 0!==d&&(this.detach(),this.db.D(R.qn,this.D,b,c));return d}zd(b){this.ed=b}qb(b){this.hb=b}Pg(b){this.ka=b;this.ea()||this.db.D(R.Oj,this.D)}Vd(b){const c=this.e!==b;c&&(b?(this.e=b,this.Dg()):(this.gf(),this.e=b),this.Gd(b));return c}Tf(){this.c++;1===this.c&&this.db.D(R.Vp,
|
|
410
410
|
this.D)}detach(){0<this.c?--this.c:this.db.D(R.wp,this.D,`Try to decrease references on instance ${this.D} but the reference counter is already 0.\n`+'It happens when you try to remove a callback from an instance multiple times.\nThis counter reference is used for garbage collection of instances in the database.');0===this.c&&this.db.D(R.Oj,this.D)}ea(){return 0<this.c||this.ka===olympe.dc.db.Instance.D.np}clear(){this.forEach((b,c)=>{const d=c[0];if(d===T||d===U){const e=c.substr(1),f=d===T?U:T;
|
|
411
|
-
b.forEach(g=>{const h=g.get(f+e);h.delete(this.D);0===h.size&&g.delete(f+e)})}d===Zc&&b instanceof olympe.dc.Bc&&this.db.get(b.R()).Ub()});void 0!==this.F&&this.db.get(this.F.tag).delete(Zc+this.F.tk)}Qg(b,c){void 0===this.F&&this.Tf();this.F={tag:b,tk:c}}Ub(){void 0!==this.F&&(this.detach(),this.F=void 0)}Dg(){this.forEach((b,c)=>{const d=c[0];if(d===T||d===U){const e=c.substr(1),f=d===T?U:T;b.forEach(g=>{g.e&&(this.G(e,d,g,!0),g.G(e,f,this,!0))})}else d!==Zc&&d!==bd||this.L(c.substr(1),b,d===bd)})}
|
|
412
|
-
c)=>{const d=c[0];if(d!==cd){var e=c.substr(1);d===T?b.forEach(f=>{f.unlink(e,this)}):d===U?b.forEach(f=>{this.unlink(e,f)}):d===Zc&&this.update(d,null);this.delete(c)}});this.
|
|
413
|
-
e.Ga(g,f))});d=this.get(T+ed);void 0!==d&&d.forEach((e,f)=>{if(!c.includes(e.tag())){var g=new Map;b.forEach((h,k)=>{e.has(ad+k)||(g.set(k,h),null!==h?e.set($c+k,h):e.delete($c+k))});e.W(g,[...c,f])}})}Ga(b,c){if(!this.has(Zc+b)){const d=bd+b,e=this.get(d);c!==(void 0!==e?e:null)&&(null===c?this.delete(d):this.set(d,c),this.L(b,c,null!==c))}}
|
|
411
|
+
b.forEach(g=>{const h=g.get(f+e);h.delete(this.D);0===h.size&&g.delete(f+e)})}d===Zc&&b instanceof olympe.dc.Bc&&this.db.get(b.R()).Ub()});void 0!==this.F&&this.db.get(this.F.tag).delete(Zc+this.F.tk)}Qg(b,c){void 0===this.F&&this.Tf();this.F={tag:b,tk:c}}Ub(){void 0!==this.F&&(this.detach(),this.F=void 0)}Dg(){this.forEach((b,c)=>{const d=c[0];if(d===T||d===U){const e=c.substr(1),f=d===T?U:T;b.forEach(g=>{g.e&&(this.G(e,d,g,!0),g.G(e,f,this,!0))})}else d!==Zc&&d!==bd||this.L(c.substr(1),b,d===bd)})}gf(){this.forEach((b,
|
|
412
|
+
c)=>{const d=c[0];if(d!==cd){var e=c.substr(1);d===T?b.forEach(f=>{f.unlink(e,this)}):d===U?b.forEach(f=>{this.unlink(e,f)}):d===Zc&&this.update(d,null);this.delete(c)}});this.hb=0;if(void 0!==this.F){const b=this.db.get(this.F.tag),c=b.get(Zc+this.F.tk);c&&c.R&&c.R()===this.D&&b.update(this.F.tk,null)}}Gd(b){this.db.D(b?R.Wk:R.DELETE,this.D)}L(b,c,d){this.e&&this.db.Gd(this.D,b,c,d)}G(b,c,d,e){this.db.oe(this.D,b,c,d.D,e)}W(b,c=[]){var d=this.get(T+dd);void 0!==d&&d.forEach(e=>{b.forEach((f,g)=>
|
|
413
|
+
e.Ga(g,f))});d=this.get(T+ed);void 0!==d&&d.forEach((e,f)=>{if(!c.includes(e.tag())){var g=new Map;b.forEach((h,k)=>{e.has(ad+k)||(g.set(k,h),null!==h?e.set($c+k,h):e.delete($c+k))});e.W(g,[...c,f])}})}Ga(b,c){if(!this.has(Zc+b)){const d=bd+b,e=this.get(d);c!==(void 0!==e?e:null)&&(null===c?this.delete(d):this.set(d,c),this.L(b,c,null!==c))}}Ta(b){let c=this.get(b);void 0===c&&(c=new Map,this.set(b,c));return c}La(b,c){const d=this.get(b);if(void 0!==d){const e=d.get(c);d.delete(c);0===d.size&&this.delete(b);
|
|
414
414
|
return e}}};olympe.dc.db.Instance.D={$p:0,np:1,mp:2};const Xc=olympe.dc.db.Database.Tb.DESTINATION,Wc=olympe.dc.db.Database.Tb.Ck,fd=olympe.dc.db.Database.Tb.th,gd=olympe.dc.db.Database.Tb.Mk,hd=olympe.dc.db.Database.Tb.ORIGIN+Xc,id=fd+fd;
|
|
415
|
-
function Yc(a){const b=a.W;a.F.forEach((c,d)=>{const e=b.get(d);if(c.
|
|
415
|
+
function Yc(a){const b=a.W;a.F.forEach((c,d)=>{const e=b.get(d);if(c.Je()||c.P()){var f=e.get(gd);f&&jd(a,f,c.Je(),d);c.P()&&a.L.add(d)}for(const [m,n]of c.Hd()){var g=m[0]===Wc;d=a;var h=e;f=g?m.substr(1):m;var k=n;const p=h.get(gd+fd+f);p&&jd(d,p,k,g);(h=h.get(gd+id))&&jd(d,h,f,k,g)}for(const m of c.qb())kd(a,e,...m)});a.F.clear();ld(a)}function jd(a,b,...c){b.forEach((d,e)=>{a.De(e,d.bind(null,...c))})}
|
|
416
416
|
function kd(a,b,c,d,e,f){const g=b.get(gd+d+c);g&&jd(a,g,f,e);(b=b.get(gd+hd))&&jd(a,b,c,d,f,e)}function ld(a){a.P.run(()=>{const b=a.D;for(const [d,e]of a.G){var c=b.get(d);(c=c&&c[e])&&c()}});a.D.clear();a.G.length=0}
|
|
417
|
-
olympe.dc.db.Vr=class{constructor(a,b){this.W=a;this.P=b;this.F=new Map;this.L=new Set;this.D=new Map;this.G=[]}De(a,b){let c=this.D.get(a);void 0===c&&(c=[],this.D.set(a,c));this.G.push([a,c.length]);c.push(b)}
|
|
417
|
+
olympe.dc.db.Vr=class{constructor(a,b){this.W=a;this.P=b;this.F=new Map;this.L=new Set;this.D=new Map;this.G=[]}De(a,b){let c=this.D.get(a);void 0===c&&(c=[],this.D.set(a,c));this.G.push([a,c.length]);c.push(b)}Nb(a){let b=this.F.get(a);void 0===b&&(b=new olympe.dc.db.Ff(a),this.F.set(a,b));return b}};function md(a){const b=olympe.dc.db.Database.D.Pn,c=olympe.dc.db.Database.D.Wk,d=olympe.dc.db.Database.D.DELETE,e=olympe.dc.db.Database.D.Fj,f=olympe.dc.db.Database.D.Kl,g=olympe.dc.db.Database.D.pn,h=olympe.dc.db.Database.D.qn,k=()=>{};a.D.F(olympe.dc.db.Database.D.On,()=>{});a.D.F(b,()=>{});a.D.F(c,m=>{a.D.qb(()=>{nd(a.view,m,k,`monitorRelations${m}`)})});a.D.F(d,m=>{a.D.qb(()=>{od(a.view,m,`monitorRelations${m}`)})});a.D.F(e,()=>{});a.D.F(f,()=>{});a.D.F(g,()=>{});a.D.F(h,()=>{})}
|
|
418
418
|
olympe.dc.db.kt=class{constructor(a,b,c,d){this.N=a;this.view=b;this.D=c;d&&md(this)}debug(a){const b=olympe.dc.Ea(a);if(this.D.has(b)){var c=this.D.get(a);a='\n[DEBUG - DATABASE]\n'+c.toString();if(!c.Hb()){const d=[];for(;null!==c&&!d.includes(c.tag());)d.push(c.tag()),c=c.model();c=this.D.get(d[d.length-1]);const e=olympe.dc.db.Database.Tb.th+olympe.dc.Sync.nameProp.R();d.push('???');a+='\n\nThe instance <<'+b+'>> does not exists because the instance '+c.tag()+' (name: '+c.get(e)+') has no model.\nList: '+
|
|
419
|
-
d.join(' --M--\x3e ')}this.N.info(a)}else this.N.info('[DATABASE] Instance',b,'has never been created or referred by the database')}};olympe.dc.db.ai=class a{constructor(b,c,d){this.N=b.vb();this.D=b;this.G=new Set;this.mode=c;this.P=d;this.F=!1;c!==a.D.Uk&&this.W()}run(){if(!this.F)switch(this.mode){case a.D.qr:this.F=!0;this.P.run(()=>{ac(()=>{this.L();this.F=!1},0)});break;case a.D.Kp:this.F=!0,this.L(),this.F=!1}}L(){const b=this.D,c=olympe.dc.nb.RUNTIME,d=this.G,e=h=>b.get(h);var f=h=>!(h.persisted()||h.ea());for(var g of d){const h=b.get(g);if(h&&!h.ea()){if(!h.persisted())continue;Array.from(b.
|
|
420
|
-
b.Eh(g)}d.delete(g)}for(const h of d)f=Array.from(b.
|
|
421
|
-
f.bind(this));this.D.F(c,f.bind(this));this.D.F(b,g=>{this.G.delete(g)});this.D.F(d,(g,...h)=>{this.N.error(h[0])})}};olympe.dc.db.ai.D={Uk:0,Kp:1,qr:2};const pd=olympe.dc.db.Database.Tb.ORIGIN,qd=olympe.dc.db.Database.Tb.DESTINATION,rd=olympe.dc.db.Database.Tb.th,sd=olympe.dc.db.Database.Tb.Ck,td=pd+qd,ud=rd+rd,vd=olympe.dc.db.Database.F;function xc(a,b,c,d){const e=a.D.
|
|
422
|
-
function nd(a,b,c,d){const e=a.D.
|
|
423
|
-
function yd(a,b,c,d){b=a.D.
|
|
424
|
-
function zd(a,b,c){b=a.D.
|
|
425
|
-
function Bd(a,b,c){return c===olympe.dc.nb.NONE?0:a.
|
|
426
|
-
function Dd(a,b,c){if(!a.Hb(b))return a.N.warn(`No instance found with tag ${b}`),new Map;const d=new Map,e=[olympe.dc.Ea(b)];for(const f of e){const g=a.
|
|
419
|
+
d.join(' --M--\x3e ')}this.N.info(a)}else this.N.info('[DATABASE] Instance',b,'has never been created or referred by the database')}};olympe.dc.db.ai=class a{constructor(b,c,d){this.N=b.vb();this.D=b;this.G=new Set;this.mode=c;this.P=d;this.F=!1;c!==a.D.Uk&&this.W()}run(){if(!this.F)switch(this.mode){case a.D.qr:this.F=!0;this.P.run(()=>{ac(()=>{this.L();this.F=!1},0)});break;case a.D.Kp:this.F=!0,this.L(),this.F=!1}}L(){const b=this.D,c=olympe.dc.nb.RUNTIME,d=this.G,e=h=>b.get(h);var f=h=>!(h.persisted()||h.ea());for(var g of d){const h=b.get(g);if(h&&!h.ea()){if(!h.persisted())continue;Array.from(b.He(g,c,!1,f)).forEach(k=>{d.add(k)});
|
|
420
|
+
b.Eh(g)}d.delete(g)}for(const h of d)f=Array.from(b.He(h,c,!0)).map(e),g=Array.from(b.He(h,c)).map(e),f.some(k=>k.ea())?g.filter(k=>!k.persisted()).forEach(k=>{d.delete(k.tag())}):f.concat(g).filter(k=>!k.persisted()).map(k=>k.tag()).forEach(k=>{d.delete(k);b.Eh(k)});d.clear()}W(){this.D.hb(this.run.bind(this));const b=olympe.dc.db.Database.D.Vp,c=olympe.dc.db.Database.D.Do,d=olympe.dc.db.Database.D.wp,e=olympe.dc.db.Database.F.IDLE,f=g=>{this.G.add(g);this.D.getState()===e&&this.run()};this.D.F(olympe.dc.db.Database.D.Oj,
|
|
421
|
+
f.bind(this));this.D.F(c,f.bind(this));this.D.F(b,g=>{this.G.delete(g)});this.D.F(d,(g,...h)=>{this.N.error(h[0])})}};olympe.dc.db.ai.D={Uk:0,Kp:1,qr:2};const pd=olympe.dc.db.Database.Tb.ORIGIN,qd=olympe.dc.db.Database.Tb.DESTINATION,rd=olympe.dc.db.Database.Tb.th,sd=olympe.dc.db.Database.Tb.Ck,td=pd+qd,ud=rd+rd,vd=olympe.dc.db.Database.F;function xc(a,b,c,d){const e=a.D.Nb(olympe.dc.Ea(b));d=d||wd(a);e.De('',d,c);e.Hb()&&a.G.run(()=>{c(!0,b)});return d}function yc(a,b,c,d=!1){const e=V(a,b);if(null!==e){const f=e.P('',c);void 0!==f&&(a.D.getState()===vd.zf&&a.D.P(c),!d&&e.Hb()&&a.G.run(()=>{f(!1,b)}))}}
|
|
422
|
+
function nd(a,b,c,d){const e=a.D.Nb(olympe.dc.Ea(b));b=d||wd(a);const f=e.Kb(td,b,c);e.Hb()&&e.forEach((g,h)=>{g=h[0];g!==pd&&g!==qd||xd(a,e,h,!0,f,!0)})}function od(a,b,c){const d=V(a,b);if(null!==d){const e=d.P(td,c);void 0!==e&&(a.D.getState()!==vd.zf||d.Ya()||a.D.P(c),d.Hb()&&d.forEach((f,g)=>{f=g[0];(f===pd||f===qd)&&e&&xd(a,d,g,!1,e,!0)}))}}function wd(a){++a.P;return String(a.P)}
|
|
423
|
+
function yd(a,b,c,d){b=a.D.Nb(olympe.dc.Ea(b));c=olympe.dc.Ea(c);const e=rd+c,f=wd(a);b.De(e,f,d);if(b.Hb()){let g=!1,h=b.get(e);void 0===h&&(g=!0,h=b.get(sd+c));if(void 0===h)return f;a.G.run(()=>{d(h,g)})}return f}function V(a,b,c=!1){if(null===b||void 0===b)throw Error('Provided tag is null or undefined.');a=a.D.get(olympe.dc.Ea(b));return!a||c&&!a.Hb()?null:a}
|
|
424
|
+
function zd(a,b,c){b=a.D.Nb(olympe.dc.Ea(b));const d=wd(a);b.De(ud,d,c);b.Hb()&&b.forEach((e,f)=>{const g=f[0];g!==rd&&g!==sd||a.G.run(()=>{c(f.substr(1),e,g===sd)})});return d}function xd(a,b,c,d,e,f){(b=b.get(c))&&b.forEach((g,h)=>{g.Hb()&&(f?a.G.run(()=>{e(c.substr(1),c[0],d,h)}):a.G.run(()=>{e(d,h)}))})}function Ad(a,b,c,d,e){b=a.D.Nb(olympe.dc.Ea(b));c=c.Qa()+c.R();e=e||wd(a);d=b.Kb(c,e,d);b.Hb()&&xd(a,b,c,!0,d,!1);return e}
|
|
425
|
+
function Bd(a,b,c){return c===olympe.dc.nb.NONE?0:a.Ib(b,olympe.dc.nb.Jq(c),!0)||0}function Cd(a,b){return function*(c){if(c)for(const [d,e]of c)if(c=d[0],c===pd||c===qd){const f=d.substring(1);for(const g of e.keys())yield[f,c,g]}}(V(a,b,!0))}
|
|
426
|
+
function Dd(a,b,c){if(!a.Hb(b))return a.N.warn(`No instance found with tag ${b}`),new Map;const d=new Map,e=[olympe.dc.Ea(b)];for(const f of e){const g=a.cb(f,c);d.set(f,g);for(const h of g.filter(k=>!d.has(k)))e.push(h)}a.N.debug(`Found ${d.size} instances in sub-tree rooted at ${olympe.dc.Ea(b)}`);return d}function Ed(a,b,c){return null!==a.mm(c,olympe.dc.Sync.extendRel,d=>olympe.dc.Xa().Hm(d,olympe.dc.Sync.propertyRel,b))}
|
|
427
427
|
function Fd(a,b,c,d){return(c=(a=V(a,b,!0))&&a.get(d+c))?Array.from(c.values()).filter(e=>e.Hb()).length:0}
|
|
428
|
-
olympe.dc
|
|
429
|
-
''}model(a){return(a=(a=V(this,a,!0))?a.model():null)?a.tag():null}
|
|
430
|
-
e]of c)c=d[0],(c===rd||!b&&c===sd)&&a.set(d.substring(1),e);return a}
|
|
428
|
+
olympe.dc.ab=class{constructor(a,b){this.N=a;this.G=new olympe.C.ec('DB View context');this.D=b;this.P=0}ba(){return this.D.ba()}L(a,b,c){a=V(this,a);null!==a&&(b=olympe.dc.Ea(b),a.P(rd+b,c),this.D.getState()===vd.zf&&this.D.P(c))}F(a,b,c,d=!1){a=V(this,a);if(null!==a){b=b.Qa()+b.R();const e=a.P(b,c);void 0!==e&&(this.D.getState()!==vd.zf||a.Ya()&&!d||this.D.P(c),!d&&a.Hb()&&xd(this,a,b,!1,e,!1))}}Hb(a){a=V(this,a);return!(!a||!a.Hb())}name(a){return(a=V(this,a))?a.Ib(olympe.dc.Sync.nameProp.R()):
|
|
429
|
+
''}model(a){return(a=(a=V(this,a,!0))?a.model():null)?a.tag():null}ff(a){return(a=(a=V(this,a,!0))&&a.ff())?a.tag():null}Ph(a){a=V(this,a,!0);return!(!a||!a.ff())}dg(a,b){a=(a=V(this,a,!0))&&a.model();return!(!a||!this.Fm(a.tag(),b))}version(a){return(a=V(this,a,!0))&&a.version()}source(a){return(a=V(this,a,!0))&&a.source()}jk(a){return(a=V(this,a,!1))?!!a.persisted():!0}Ib(a,b,c){b=(a=V(this,a,!0))?a.Ib(olympe.dc.Ea(b),c):null;return void 0!==b?b:null}Hd(a,b=!1){var c=V(this,a,!0);a=new Map;if(c)for(const [d,
|
|
430
|
+
e]of c)c=d[0],(c===rd||!b&&c===sd)&&a.set(d.substring(1),e);return a}He(a,b){return this.D.He(a,b)}cb(a,b){return this.Ji(a,[b])}Hm(a,b,c){return this.cb(a,b).includes(olympe.dc.Ea(c))}Ji(a,b){a=V(this,a,!0);if(!a)return[];a=[a.tag()];for(const c of b){b=[];for(const d of a)if(a=V(this,d,!0).get(c.Qa()+c.R()),void 0!==a)for(const e of a.values())e.Hb()&&b.push(e.tag());a=b}return a}Dc(a,b){var c=V(this,a,!0);return c?(c=c.get(b.Qa()+b.R()))&&1<c.size?(this.N.warn(`Relation ${b.R()} to instance ${a} is not unique: found ${c.size} related items`),
|
|
431
431
|
null):(a=c?c.values().next().value:null)&&a.Hb()?a.tag():null:null}fk(a,b,c){a=olympe.dc.Ea(a);const d=Dd(this,a,b);d.delete(a);return c?(c=olympe.dc.Ea(c),d.has(c)?Array.from(Dd(this,c,b.Cd()).keys()).filter(e=>d.has(e)):[]):Array.from(d.keys())}mm(a,b,c){if(!this.Hb(a))return null;b=Dd(this,a,b);const d=[olympe.dc.Ea(a)];for(const e of d){if(c(e))return e;if(a=b.get(e))for(const f of a.filter(g=>!d.includes(g)))d.push(f)}return null}nm(a,b,c){return this.Ji(a,b).find(c)||null}dv(a,b,c){return this.Ji(a,
|
|
432
|
-
b).filter(c)}Hi(a,b=olympe.dc.Sync){var c=V(this,a,!0);const d=b&&V(this,b,!0),e=[c];for(;c&&c!==d;){c=c.
|
|
433
|
-
return e.map(f=>f.tag())}Fm(a,b){const c=olympe.dc.Ea(b);return!!this.mm(a,olympe.dc.Sync.extendRel,d=>d===c)}rd(a){return this.
|
|
434
|
-
olympe.dc
|
|
435
|
-
olympe.dc
|
|
436
|
-
olympe.dc.db.Ff.D.ul,d=olympe.dc.db.Ff.D.DELETE,e=olympe.dc.db.Ff.D.Pj;this.Va.forEach((f,g)=>{const h=f.getState();switch(h.id){case c:b.xc(g,f.Ga()?f.Hd():void 0);break;case e:f.Ga()&&b.bc(g,f.Hd(),h.Ci);break;case d:b.qc(g,h.Ci)}for(const [k,m,n]of f.Xd())n?b.sa(k,g,m):b.mb(k,g,m)})}Cc(){let b=0;this.Va.forEach(c=>{b+=c.Cc()});return b}xc(b,c){b=this.
|
|
437
|
-
else{this.
|
|
438
|
-
c.value;const d=c.tag();yield*c.Xd((e,f,g)=>[e,d,f,g]);c=b.next()}}(this.Va.values())}fk(b,c,d=(e,f)=>[e,f]){return this.fr(b,c,d)}*fr(b,c,d,e=[]){e.push(b);b=this.
|
|
439
|
-
f=this.Va.get(b);for(const [g,h,k]of f.Xd()){if(!k&&c)continue;const m=this.Va.get(h);m&&m.W(g,d,b)}for(const [g,h,k]of f.pa())(k||!c)&&(d=this.Va.get(h))&&d.W(g,e,b)}
|
|
440
|
-
this.Va.has(k))}
|
|
432
|
+
b).filter(c)}Hi(a,b=olympe.dc.Sync){var c=V(this,a,!0);const d=b&&V(this,b,!0),e=[c];for(;c&&c!==d;){c=c.ff();if(e.includes(c))throw Error(`Cycle detected when following recursively extend relations from base model instance "${a}".`);if(c&&!c.Hb())throw a=`Try to get all extensions of the model ${olympe.dc.Ea(a)} but one of them does not exists (${c.tag()})`,Error(a);null!==c&&e.push(c)}c=V(this,olympe.dc.Sync,!0);if(d!==c&&e[e.length-1]===c)throw Error(`The model "${this.name(a)}" (tag = ${a}) does not extend the expected model "${this.name(b)}" (tag = ${b}).`);
|
|
433
|
+
return e.map(f=>f.tag())}Fm(a,b){const c=olympe.dc.Ea(b);return!!this.mm(a,olympe.dc.Sync.extendRel,d=>d===c)}rd(a){return this.cb(a,olympe.dc.Sync.instancesRel)}};olympe.dc.ab.prototype.getInstances=olympe.dc.ab.prototype.rd;olympe.dc.ab.prototype.isExtending=olympe.dc.ab.prototype.Fm;olympe.dc.ab.prototype.getExtendedModels=olympe.dc.ab.prototype.Hi;olympe.dc.ab.prototype.findAllRelated=olympe.dc.ab.prototype.dv;olympe.dc.ab.prototype.findRelated=olympe.dc.ab.prototype.nm;
|
|
434
|
+
olympe.dc.ab.prototype.findRecursive=olympe.dc.ab.prototype.mm;olympe.dc.ab.prototype.getRecursiveRelated=olympe.dc.ab.prototype.fk;olympe.dc.ab.prototype.getUniqueRelated=olympe.dc.ab.prototype.Dc;olympe.dc.ab.prototype.getMultiRelated=olympe.dc.ab.prototype.Ji;olympe.dc.ab.prototype.isRelated=olympe.dc.ab.prototype.Hm;olympe.dc.ab.prototype.getRelated=olympe.dc.ab.prototype.cb;olympe.dc.ab.prototype.getProperties=olympe.dc.ab.prototype.Hd;olympe.dc.ab.prototype.getProperty=olympe.dc.ab.prototype.Ib;
|
|
435
|
+
olympe.dc.ab.prototype.isPersisted=olympe.dc.ab.prototype.jk;olympe.dc.ab.prototype.instanceOf=olympe.dc.ab.prototype.dg;olympe.dc.ab.prototype.isModel=olympe.dc.ab.prototype.Ph;olympe.dc.ab.prototype.extension=olympe.dc.ab.prototype.ff;olympe.dc.ab.prototype.model=olympe.dc.ab.prototype.model;olympe.dc.ab.prototype.name=olympe.dc.ab.prototype.name;olympe.dc.ab.prototype.exist=olympe.dc.ab.prototype.Hb;olympe.dc.db.Gc=class a{constructor(b){this.id=b||olympe.$.om();this.Va=new Map}toJSON(){let b='{ "id": '+JSON.stringify(this.id)+', "instances": {';for(const c of this.Va.keys()){const d=this.Va.get(c);b+=JSON.stringify(c)+': '+d.toJSON()+', '}b.endsWith(', ')&&(b=b.substr(0,b.length-2));return b+'}}'}static ac(b){var c;'string'===typeof b?c=JSON.parse(b):c=b;b=new olympe.dc.db.Gc(c.id);c=c.instances;for(const d of Object.keys(c)){const e=olympe.dc.db.Ff.ac(c[d]);b.Va.set(d,e)}return b}ba(){return this.id}md(b){const c=
|
|
436
|
+
olympe.dc.db.Ff.D.ul,d=olympe.dc.db.Ff.D.DELETE,e=olympe.dc.db.Ff.D.Pj;this.Va.forEach((f,g)=>{const h=f.getState();switch(h.id){case c:b.xc(g,f.Ga()?f.Hd():void 0);break;case e:f.Ga()&&b.bc(g,f.Hd(),h.Ci);break;case d:b.qc(g,h.Ci)}for(const [k,m,n]of f.Xd())n?b.sa(k,g,m):b.mb(k,g,m)})}Cc(){let b=0;this.Va.forEach(c=>{b+=c.Cc()});return b}xc(b,c){b=this.Nb(b).create();c&&b.ka(c)}bc(b,c,d){c&&(b=this.Nb(b).ka(c),d&&b.Kb())}qc(b,c=olympe.dc.nb.NONE){const d=this.Va.get(b);if(d&&d.Je())this.Eh(b,c);
|
|
437
|
+
else{this.Nb(b).delete(c);for(const e of this.He(b,c))this.Va.get(e).Hd().clear(),this.wq(e,!0)}}sa(b,c,d){this.Nb(c).link(b,d);this.Nb(d).La(b,c)}mb(b,c,d){this.Nb(c).unlink(b,d);this.Nb(d).hb(b,c)}Ih(){return this.Va}rd(){return function*(b){for(const c of b.values())if(c.Je()||c.P()||c.Ga())yield c}(this.Va)}Lb(b){return this.Va.get(olympe.dc.Ea(b))||null}Eh(b,c=olympe.dc.nb.NONE){b=this.He(b,c);for(const d of b)this.wq(d,!1),this.Va.delete(d)}Xd(){return function*(b){for(var c=b.next();!c.done;){c=
|
|
438
|
+
c.value;const d=c.tag();yield*c.Xd((e,f,g)=>[e,d,f,g]);c=b.next()}}(this.Va.values())}fk(b,c,d=(e,f)=>[e,f]){return this.fr(b,c,d)}*fr(b,c,d,e=[]){e.push(b);b=this.Lb(b);for(const [f,g]of b.cb(c))e.includes(f)||(yield*this.fr(f,c,d,e),yield d(f,g))}gm(b,c,d){const e=this.Va.get(c),f=this.Va.get(d);e&&e.W(b,olympe.dc.Ja.DESTINATION,d);f&&f.W(b,olympe.dc.Ja.ORIGIN,c)}clone(){const b=new a(this.id);this.Va.forEach((c,d)=>{b.Va.set(d,c.clone())});return b}wq(b,c){var d=olympe.dc.Ja.ORIGIN;const e=olympe.dc.Ja.DESTINATION,
|
|
439
|
+
f=this.Va.get(b);for(const [g,h,k]of f.Xd()){if(!k&&c)continue;const m=this.Va.get(h);m&&m.W(g,d,b)}for(const [g,h,k]of f.pa())(k||!c)&&(d=this.Va.get(h))&&d.W(g,e,b)}He(b,c){const d=olympe.dm.Relation.D.Gj,e=olympe.dm.Relation.D.Nj,f=olympe.dc.Ja.ORIGIN,g=olympe.dc.Xa();b=new Set([b]);for(const k of b){var h=this.Va.get(k);if(void 0!==h){for(const [m,n]of h.Xd())Bd(g,m,c)&e&&b.add(n);for(const [m,n]of h.pa())Bd(g,m,c)&d&&b.add(n)}for(const [m,n,p]of Cd(g,k))h=n===f?d:e,Bd(g,m,c)&h&&b.add(p)}return Array.from(b).filter(k=>
|
|
440
|
+
this.Va.has(k))}Nb(b){let c=this.Va.get(b);void 0===c&&(c=new olympe.dc.db.Ff(b),this.Va.set(b,c));return c}};olympe.dc.db.Gc.ja=[olympe.dc.Qf,olympe.dc.El];const Gd=new Map;
|
|
441
441
|
olympe.dc.db.Ff=class a{constructor(b){this.ea=b;this.G=a.F(a.D.Pj,!1);this.L=this.F=this.D=null}toJSON(){let b='{ "tag": '+JSON.stringify(this.ea)+', "state": '+JSON.stringify(this.G);if(this.D){b+=', "properties": {';for(var c of this.D.keys()){const d=this.D.get(c);b+=JSON.stringify(c)+': ';b=d.toJSON?b+d.toJSON():b+JSON.stringify(d);b+=', '}b.endsWith(', ')&&(b=b.substr(0,b.length-2));b+='}'}if(this.F){b+=', "relations": {';for(const d of this.F.keys()){c=this.F.get(d);b+=JSON.stringify(d)+': {';
|
|
442
442
|
for(const e of c.keys())b+=JSON.stringify(e)+': '+JSON.stringify(c.get(e))+', ';b.endsWith(', ')&&(b=b.substr(0,b.length-2));b+='}, '}b.endsWith(', ')&&(b=b.substr(0,b.length-2));b+='}'}return b+'}'}static ac(b){var c;'string'===typeof b?c=JSON.parse(b):c=b;b=new olympe.dc.db.Ff(c.tag);b.G=c.state;const d=c.properties;if(d){b.D=new Map;for(var e of Object.keys(d)){const f=d[e],g=f.type;let h=f;g&&('reference'===g?h=olympe.dc.Bc.ac(f):h=olympe.C.ac(f));null!==h&&void 0!==h&&b.D.set(e,h)}}if(c=c.relations){b.F=
|
|
443
|
-
new Map;for(const f of Object.keys(c)){e=new Map;for(const g of Object.keys(c[f]))e.set(g,c[f][g]);b.F.set(f,e)}}return b}static F(b,c){const d=String(b)+','+String(c);let e=Gd.get(d);void 0===e&&(e={id:b,Ci:c},Gd.set(d,e));return e}tag(){return this.ea}getState(){return this.G}create(){this.G=a.F(a.D.ul);return this}delete(b=olympe.dc.nb.NONE){this.G=a.F(a.D.DELETE,b);this.D=null;return this}
|
|
444
|
-
(this.D=new Map);this.D.set(b,c);return this}ka(b){this.D||(this.D=new Map);b.forEach((c,d)=>{this.D.set(d,c)});return this}Ya(b){this.D&&this.D.delete(b);0===this.D.size&&(this.D=null)}link(b,c){null===this.F&&(this.F=new Map);this.Oa(this.F,b,c,!0);return this}unlink(b,c){null===this.F&&(this.F=new Map);this.Oa(this.F,b,c,!1);return this}La(b,c){this.L||(this.L=new Map);this.Oa(this.L,b,c,!0)}
|
|
445
|
-
c.get(b))&&b.get(d)}W(b,c,d){const e=(c=c===olympe.dc.Ja.ORIGIN?this.L:this.F)&&c.get(b);e&&e.delete(d);e&&0===e.size&&c.delete(b)}
|
|
446
|
-
new Map}
|
|
447
|
-
a.D.DELETE||!e){var f=b.get(c);if(void 0===f)f=new Map,b.set(c,f);else if(b=f.get(d),void 0!==b&&b!==e){f.delete(d);return}f.set(d,e)}}*
|
|
443
|
+
new Map;for(const f of Object.keys(c)){e=new Map;for(const g of Object.keys(c[f]))e.set(g,c[f][g]);b.F.set(f,e)}}return b}static F(b,c){const d=String(b)+','+String(c);let e=Gd.get(d);void 0===e&&(e={id:b,Ci:c},Gd.set(d,e));return e}tag(){return this.ea}getState(){return this.G}create(){this.G=a.F(a.D.ul);return this}delete(b=olympe.dc.nb.NONE){this.G=a.F(a.D.DELETE,b);this.D=null;return this}Kb(){this.G.id===a.D.Pj&&(this.G=a.F(a.D.Pj,!0))}za(b,c){if(this.G.type===a.D.DELETE)return this;this.D||
|
|
444
|
+
(this.D=new Map);this.D.set(b,c);return this}ka(b){this.D||(this.D=new Map);b.forEach((c,d)=>{this.D.set(d,c)});return this}Ya(b){this.D&&this.D.delete(b);0===this.D.size&&(this.D=null)}link(b,c){null===this.F&&(this.F=new Map);this.Oa(this.F,b,c,!0);return this}unlink(b,c){null===this.F&&(this.F=new Map);this.Oa(this.F,b,c,!1);return this}La(b,c){this.L||(this.L=new Map);this.Oa(this.L,b,c,!0)}hb(b,c){this.L||(this.L=new Map);this.Oa(this.L,b,c,!1)}Ub(b,c,d){if(c=c===olympe.dc.Ja.ORIGIN?this.L:this.F)return(b=
|
|
445
|
+
c.get(b))&&b.get(d)}W(b,c,d){const e=(c=c===olympe.dc.Ja.ORIGIN?this.L:this.F)&&c.get(b);e&&e.delete(d);e&&0===e.size&&c.delete(b)}Je(){return this.G.id===a.D.ul}P(){return this.G.id===a.D.DELETE}Cc(){let b=this.D?this.D.size:0;this.F&&this.F.forEach(c=>{b+=c.size});return b}clone(){const b=new a(this.ea);b.G=this.G;this.D&&b.ka(this.D);for(const [c,d,e]of this.Xd())e?b.link(c,d):b.unlink(c,d);for(const [c,d,e]of this.pa())e?b.La(c,d):b.hb(c,d);return b}Ga(){return null!==this.D}Hd(){return this.D||
|
|
446
|
+
new Map}Ib(b){if(this.D)return this.D.get(b)}cb(b,c=(d,e)=>[d,e]){return function*(d){if(d=d&&d.get(b.R()))for(const [e,f]of d)yield c(e,f)}(b.Qa()===olympe.dc.Ja.ORIGIN?this.L:this.F)}Xd(b=(c,d,e)=>[c,d,e]){return this.Ta(this.F,b)}pa(b=(c,d,e)=>[c,d,e]){return this.Ta(this.L,b)}qb(b=(c,d,e,f)=>[c,d,e,f]){const c=olympe.dc.Ja.ORIGIN,d=olympe.dc.Ja.DESTINATION;return function*(e,f,g){yield*e(f,(h,k,m)=>b(h,d,k,m));yield*e(g,(h,k,m)=>b(h,c,k,m))}(this.Ta.bind(this),this.F,this.L)}Oa(b,c,d,e){if(this.G.id!==
|
|
447
|
+
a.D.DELETE||!e){var f=b.get(c);if(void 0===f)f=new Map,b.set(c,f);else if(b=f.get(d),void 0!==b&&b!==e){f.delete(d);return}f.set(d,e)}}*Ta(b,c){if(null!==b)for(const [d,e]of b){b=e.entries();for(const [f,g]of b)yield c(d,f,g)}}};olympe.dc.db.Ff.D={ul:0,Pj:1,DELETE:2};function Oc(a,b,c,d,e,f=olympe.dc.Na.jb){const g=olympe.dc.db.Instance.D.np,h=olympe.dc.db.Instance.D.$p,k=c.ba();if(a.G.has(k))throw Error(`You try to execute the patch ${k} a second times whereas the first execution has not been validated yet.`);const m=new Hd(c,Id(a,c),f);a.F.push(k);a.G.set(k,m);a.D.ka();a.D.La(d,g);a.D.La(e,h);Pc(a,c,f);const n=Array.from(c.rd()).filter(p=>p.Je()).map(p=>p.tag());a.D.Ya(n);a.D.ea();0<n.length&&b.Vc(()=>{a.D.ka();a.D.Kb(n);a.D.ea()})}
|
|
448
448
|
function Pc(a,b,c){a.L.D(c,b,d=>{d||a.N.debug('CommitController: Rebase of patch',b.ba(),'done')})}function Qc(a,b,c){return a.F.slice(0,c).map(d=>a.G.get(d)).reduce((d,e)=>e?e.wf(d):d,b)}
|
|
449
|
-
function Id(a,b){const c=a.D,d=olympe.dc.db.Database.Tb.th,e=olympe.dc.db.Database.Tb.jd,f=olympe.dc.db.Database.Tb.ORIGIN,g=olympe.dc.db.Database.Tb.DESTINATION,h=olympe.dc.Rb.VERSION,k=new olympe.dc.db.Gc('rev-'+b.ba());a.N.debug('Generate the reverse graphLayer of',b.ba());b.Ih().forEach((m,n)=>{if(m.
|
|
450
|
-
u)=>{const x=u[0],G=u.substr(1);x===d?q.set(G,w):x===e?q.set(u,w):x===f?w.forEach((H,F)=>{k.sa(G,F,t,0)}):x===g&&w.forEach((H,F)=>{k.sa(G,t,F,0)})}),k.xc(t,q,0)}else{for(const t of m.Hd().keys()){var r=t[0]===e;const w=r?t.substr(1):t;r=r?p.pa(w,!0):p.
|
|
451
|
-
olympe.dc.db.Mr=class{constructor(a,b,c){this.N=a;this.D=b;this.L=c;this.F=[];this.G=new Map}wf(a,b){Pc(this,Qc(this,a,this.F.length),b)}push(a){const b=this.F.indexOf(a);if(-1<b){const c=this.G.get(a);this.F.splice(b,1);Qc(this,c.F,b);this.G.delete(a)}}};function Jd(a,b,c,d){const e=olympe.dc.Ja.DESTINATION;c=c.tag();const f=a.D.
|
|
452
|
-
function Kd(a,b,c,d){const e=olympe.dc.Ja.DESTINATION,f=c.tag(),g=a.D.
|
|
453
|
-
class Hd{constructor(a,b,c){this.F=a;this.D=b;this.source=c;this.db=olympe.dc.Xa()}ba(){return this.F.ba()}wf(a){var b=this.F.Ih(),c=a.Ih();const d=b.size>c.size,e=d?b:c;b=d?c:b;for(const [g,h]of b){b=g;var f=e.get(b);void 0!==f&&(c=d?f:h,f=d?h:f,f.P()?c.
|
|
449
|
+
function Id(a,b){const c=a.D,d=olympe.dc.db.Database.Tb.th,e=olympe.dc.db.Database.Tb.jd,f=olympe.dc.db.Database.Tb.ORIGIN,g=olympe.dc.db.Database.Tb.DESTINATION,h=olympe.dc.Rb.VERSION,k=new olympe.dc.db.Gc('rev-'+b.ba());a.N.debug('Generate the reverse graphLayer of',b.ba());b.Ih().forEach((m,n)=>{if(m.Je()){k.qc(n,olympe.dc.nb.NONE);for(const [t,w]of m.Xd())k.mb(t,n,w)}else{var p=c.get(n);if(void 0!==p){var q=(new Map).set(h,p.version());if(m.P()){m=m.getState().Ci;for(const t of c.He(n,m))c.get(t).forEach((w,
|
|
450
|
+
u)=>{const x=u[0],G=u.substr(1);x===d?q.set(G,w):x===e?q.set(u,w):x===f?w.forEach((H,F)=>{k.sa(G,F,t,0)}):x===g&&w.forEach((H,F)=>{k.sa(G,t,F,0)})}),k.xc(t,q,0)}else{for(const t of m.Hd().keys()){var r=t[0]===e;const w=r?t.substr(1):t;r=r?p.pa(w,!0):p.Ib(w,!0);q.set(t,void 0===r?null:r)}1<q.size&&k.bc(n,q,!0,0);for(const [t,w,u]of m.Xd())u?k.mb(t,n,w):k.sa(t,n,w)}}}});return k}
|
|
451
|
+
olympe.dc.db.Mr=class{constructor(a,b,c){this.N=a;this.D=b;this.L=c;this.F=[];this.G=new Map}wf(a,b){Pc(this,Qc(this,a,this.F.length),b)}push(a){const b=this.F.indexOf(a);if(-1<b){const c=this.G.get(a);this.F.splice(b,1);Qc(this,c.F,b);this.G.delete(a)}}};function Jd(a,b,c,d){const e=olympe.dc.Ja.DESTINATION;c=c.tag();const f=a.D.Lb(c);b.Hd().forEach((g,h)=>{f.za(h,g);b.Ya(h)});for(const [g,h,k,m]of b.qb()){if(!m)continue;const n=h===e?c:k,p=h===e?k:c;a.D.sa(g,n,p);d.gm(g,n,p)}}
|
|
452
|
+
function Kd(a,b,c,d){const e=olympe.dc.Ja.DESTINATION,f=c.tag(),g=a.D.Lb(f);b.Hd().forEach((h,k)=>{void 0!==c.Ib(k)&&(g.za(k,h),b.Ya(k))});for(const [h,k,m]of b.Xd()){const n=c.Ub(h,e,k);void 0!==n&&(d.gm(h,f,k),n===m&&a.D.gm(h,f,k))}}
|
|
453
|
+
class Hd{constructor(a,b,c){this.F=a;this.D=b;this.source=c;this.db=olympe.dc.Xa()}ba(){return this.F.ba()}wf(a){var b=this.F.Ih(),c=a.Ih();const d=b.size>c.size,e=d?b:c;b=d?c:b;for(const [g,h]of b){b=g;var f=e.get(b);void 0!==f&&(c=d?f:h,f=d?h:f,f.P()?c.Je()||this.D.Eh(b,f.getState().Ci):c.P()?(Jd(this,f,c,a),a.Eh(b,c.getState().Ci)):Kd(this,f,c,a))}return a}};olympe.dc.db.T={Fa:'dc.db.Logger',wa:'dc.db.DatabaseManager',hj:'dc.db.Database',ab:'dc.db.Driver',al:'dc.db.Graph',Cn:'dc.db.DataProcessor',Fn:'dc.db.DebugProcessor',vt:'dc.db.PermissionProcessor',gi:'dc.db.GraphMonitor'};olympe.dc.db.Z={eo:'db.garbageCollector',gi:'db.monitor',En:'db.debug'};
|
|
454
454
|
olympe.U.config(function(a){C(a,olympe.dc.db.Z.eo,olympe.dc.db.ai.D.Kp);C(a,olympe.dc.db.Z.gi,!1);C(a,olympe.dc.db.Z.En,!1);A(a,olympe.dc.db.T.Fa,[olympe.ua.T.wa],b=>b.Ic('dc.db'));A(a,olympe.dc.db.T.hj,[olympe.dc.db.T.Fa,new olympe.U.ha(olympe.dc.Z.Gn),new olympe.U.ha(olympe.dc.db.Z.eo),new olympe.U.ha(olympe.dc.Z.yg),new olympe.U.ha(olympe.dc.db.Z.En)],(b,c,d,e,f)=>{d=e?olympe.dc.db.ai.D.Uk:d;c=(new Map).set('defaultSource',c).set('garbageCollector',d).set('debug',f);return new olympe.dc.db.Database(b,
|
|
455
|
-
c)});A(a,olympe.dc.db.T
|
|
456
|
-
olympe.dc.db.T.Fa,olympe.dc.db.T.hj,olympe.dc.T.ze,olympe.dc.db.T.Cn,new olympe.U.ha(olympe.dc.db.Z.gi))},'olympe.dc.db');olympe.U.run([olympe.dc.db.T.hj,olympe.dc.db.T.gi],(a,b)=>{olympe.Ii().db=a;olympe.Ii().dbMonitor=b},'DC.DB debug service injection');olympe.dc.db.Pb={};olympe.dc.db.Pb.eq=class{constructor(a,b){this.N=a;this.F=b}D(a,b,c){this.F.ka();b.md(this);this.F.ea();c(null,b)}xc(a,b){this.F.create(a,b)}bc(a,b,c){this.F.update(a,b,c)}qc(a,b=olympe.dc.nb.NONE){for(const c of this.F.
|
|
455
|
+
c)});A(a,olympe.dc.db.T.ab,[olympe.dc.db.T.wa],b=>b.view);A(a,olympe.dc.db.T.gi,[olympe.dc.db.T.wa],b=>b.Zw);y(a,olympe.dc.db.T.Fn,olympe.dc.db.Pb.Ln,olympe.dc.T.Fa);A(a,olympe.dc.db.T.Cn,[olympe.dc.db.T.Fa,olympe.dc.db.T.hj,olympe.U.T.Oe,new olympe.U.ha(olympe.dc.Z.Af)],(b,c,d,e)=>{b=new olympe.dc.db.Pb.eq(b,c);e&&(b=new olympe.dc.Fl(la(d,olympe.dc.db.T.Fn),b));return b});y(a,olympe.dc.db.T.vt,olympe.dc.db.Pb.tg,olympe.dc.T.Fa,olympe.dc.T.fh,olympe.dc.T.ze);y(a,olympe.dc.db.T.wa,olympe.dc.db.Rr,
|
|
456
|
+
olympe.dc.db.T.Fa,olympe.dc.db.T.hj,olympe.dc.T.ze,olympe.dc.db.T.Cn,new olympe.U.ha(olympe.dc.db.Z.gi))},'olympe.dc.db');olympe.U.run([olympe.dc.db.T.hj,olympe.dc.db.T.gi],(a,b)=>{olympe.Ii().db=a;olympe.Ii().dbMonitor=b},'DC.DB debug service injection');olympe.dc.db.Pb={};olympe.dc.db.Pb.eq=class{constructor(a,b){this.N=a;this.F=b}D(a,b,c){this.F.ka();b.md(this);this.F.ea();c(null,b)}xc(a,b){this.F.create(a,b)}bc(a,b,c){this.F.update(a,b,c)}qc(a,b=olympe.dc.nb.NONE){for(const c of this.F.He(a,b))this.F.qc(c)}sa(a,b,c){this.F.link(a,b,c)}mb(a,b,c){this.F.unlink(a,b,c)}};olympe.dc.db.Pb.eq.ja=[olympe.dc.We,olympe.dc.Qf];function Ld(a,b,c){if(!b)return'';let d='';if(c&&1<c)return'...';for(const [e,f]of b)d+=(d?', "':'"')+e+'":',f?f instanceof olympe.dc.Bc||f instanceof olympe.dc.Sync?d+='new olympe.dc.Reference("'+f.R()+'")':f instanceof olympe.C.Color?d+='new olympe.df.Color("'+f.Lg()+','+f.Jg()+','+f.Fg()+','+f.Eg()+'")':f.constructor&&Object.prototype.hasOwnProperty.call(f.constructor.prototype,'toString')?d+=JSON.stringify(f.toString()):'object'===typeof f&&(d+=Ld(a,f,(c||0)+1)):d+=JSON.stringify(f);return'{'+
|
|
457
457
|
(d?d:'')+'}'}function Md(a){switch(a){case olympe.dc.Hc.fe:return'Model';case olympe.dc.Sync.La.R():return'Owner';case olympe.dc.Sync.G.R():return'GroupOfObjects';default:return''}}
|
|
458
458
|
olympe.dc.db.Pb.Ln=class{constructor(a){this.N=a;this.output=''}D(a,b,c){this.output='Patch #'+b.ba()+' (source: '+a+')';b.md(this);this.N.info(this.output);this.output='';c(null,b)}log(a,b){this.output+='\ndb.'+a+';'+(b?' // '+b:'')}xc(a,b){this.log('createInstance("'+a+'", '+Ld(this,b)+')')}bc(a,b){this.log('updateInstance("'+a+'", '+Ld(this,b)+')')}qc(a,b){var c=olympe.dc.Xa();const d=c.model(a);c=d?c.name(d)+' #'+d:'';this.log('deleteInstance("'+a+'", rule: '+b+')',c)}sa(a,b,c){this.log('createRelation("'+
|
|
459
|
-
a+'", "'+b+'", "'+c+'")',Md(a))}mb(a,b,c){this.log('deleteRelation("'+a+'", "'+b+'", "'+c+'")',Md(a))}};olympe.dc.db.Pb.Ln.ja=[olympe.dc.Qf,olympe.dc.
|
|
459
|
+
a+'", "'+b+'", "'+c+'")',Md(a))}mb(a,b,c){this.log('deleteRelation("'+a+'", "'+b+'", "'+c+'")',Md(a))}};olympe.dc.db.Pb.Ln.ja=[olympe.dc.Qf,olympe.dc.We];olympe.dc.db.Pb.tg=class{constructor(a,b,c){this.N=a;this.db=b;this.L=c;this.G=new Nd;this.F=Object.create(null)}D(a,b,c){let d=null;if(a!==olympe.dc.Na.ld){b.md(this.G);const e=this.G.flush();a=this.L.Ga(a);this.F[a]||(this.F[a]=new olympe.dc.ga.tg(a));try{b.md(new Od(this.F[a],this.db,e))}catch(f){d=f}}null!==d?c(d,null):c(null,b)}};class Pd{constructor(){this.G={};this.D={};this.F={}}}
|
|
460
460
|
class Nd{constructor(){this.D=new Pd}flush(){const a=this.D;this.D=null;return a}xc(a){this.D.D[a]=a}bc(){}qc(a){this.D.F[a]=a}sa(a,b,c){a===olympe.dc.Sync.modelRel.R()&&(this.D.G[b]=c)}mb(){}}function W(a,b){throw Error('Permission error for instance: '+a+': '+b);}
|
|
461
461
|
class Od{constructor(a,b,c){var d=olympe.dc.nc();this.D=olympe.C.createNode(Number);this.G=new olympe.dc.aa.fj(this.D,a);this.db=b;this.F=d;this.L=c}xc(a){const b=this.L.G[a]||this.db.model(a);b?(K(this.D,olympe.dm.Ha.D.Dj),this.G.D(this.F,b)||W(a,'CreateInstance requires CREATE permission on the model '+b)):W(a,'CreateInstance requires to create a relation with the model')}bc(a){K(this.D,olympe.dm.Ha.D.READ_WRITE);!this.L.D[a]||this.G.D(this.F,a)||W(a,'UpdateInstance requires READ_WRITE permission on the instance')}qc(a){K(this.D,
|
|
462
|
-
olympe.dm.Ha.D.tp);!this.L.D[a]||this.G.D(this.F,a)||W(a,'DeleteInstance requires READ_DELETE permission on the instance')}sa(a,b,c){!this.L.F[b]&&W(b,'Cannot create a relation which link an instance deleted in the same transaction');!this.L.F[c]&&W(c,'Cannot create a relation which link an instance deleted in the same transaction');K(this.D,olympe.dm.Ha.D.Dj);!this.L.D[a]||this.G.D(this.F,a)||W(a,'CreateRelation requires READ_CREATE permission on the PropDef');let d=!1,e=!1;switch(this.db.
|
|
462
|
+
olympe.dm.Ha.D.tp);!this.L.D[a]||this.G.D(this.F,a)||W(a,'DeleteInstance requires READ_DELETE permission on the instance')}sa(a,b,c){!this.L.F[b]&&W(b,'Cannot create a relation which link an instance deleted in the same transaction');!this.L.F[c]&&W(c,'Cannot create a relation which link an instance deleted in the same transaction');K(this.D,olympe.dm.Ha.D.Dj);!this.L.D[a]||this.G.D(this.F,a)||W(a,'CreateRelation requires READ_CREATE permission on the PropDef');let d=!1,e=!1;switch(this.db.Ib(a,olympe.dm.Relation.Ui)){case olympe.dm.Relation.F.Ml:K(this.D,
|
|
463
463
|
olympe.dm.Ha.D.READ_WRITE);d=!0;break;case olympe.dm.Relation.F.Ll:K(this.D,olympe.dm.Ha.D.vg);d=!0;break;case olympe.dm.Relation.F.sl:K(this.D,olympe.dm.Ha.D.READ_WRITE);e=!0;break;case olympe.dm.Relation.F.rl:K(this.D,olympe.dm.Ha.D.vg);e=!0;break;case olympe.dm.Relation.F.Kk:K(this.D,olympe.dm.Ha.D.READ_WRITE);d=e=!0;break;case olympe.dm.Relation.F.Ik:K(this.D,olympe.dm.Ha.D.vg),d=e=!0}!d||!this.L.D[c]||this.G.D(this.F,c)||W(c,'CreateRelation requires more permissions on this instance');!e||!this.L.D[b]||
|
|
464
|
-
this.G.D(this.F,b)||W(b,'CreateRelation requires more permissions on this instance')}mb(a,b,c){K(this.D,olympe.dm.Ha.D.Dj);this.G.D(this.F,a)||W(a,'DeleteRelation requires READ_CREATE permission on the PropDef');let d=!1,e=!1;switch(this.db.
|
|
465
|
-
olympe.dm.Ha.D.vg);e=!0;break;case olympe.dm.Relation.F.Kk:K(this.D,olympe.dm.Ha.D.READ_WRITE);d=e=!0;break;case olympe.dm.Relation.F.Ik:K(this.D,olympe.dm.Ha.D.vg),d=e=!0}d&&!this.G.D(this.F,c)&&W(c,'DeleteRelation requires more permissions on this instance');e&&!this.G.D(this.F,b)&&W(b,'DeleteRelation requires more permissions on this instance')}}olympe.dc.db.Pb.tg.ja=[olympe.dc.
|
|
464
|
+
this.G.D(this.F,b)||W(b,'CreateRelation requires more permissions on this instance')}mb(a,b,c){K(this.D,olympe.dm.Ha.D.Dj);this.G.D(this.F,a)||W(a,'DeleteRelation requires READ_CREATE permission on the PropDef');let d=!1,e=!1;switch(this.db.Ib(a,olympe.dm.Relation.Ui)){case olympe.dm.Relation.F.Ml:K(this.D,olympe.dm.Ha.D.READ_WRITE);d=!0;break;case olympe.dm.Relation.F.Ll:K(this.D,olympe.dm.Ha.D.vg);d=!0;break;case olympe.dm.Relation.F.sl:K(this.D,olympe.dm.Ha.D.READ_WRITE);e=!0;break;case olympe.dm.Relation.F.rl:K(this.D,
|
|
465
|
+
olympe.dm.Ha.D.vg);e=!0;break;case olympe.dm.Relation.F.Kk:K(this.D,olympe.dm.Ha.D.READ_WRITE);d=e=!0;break;case olympe.dm.Relation.F.Ik:K(this.D,olympe.dm.Ha.D.vg),d=e=!0}d&&!this.G.D(this.F,c)&&W(c,'DeleteRelation requires more permissions on this instance');e&&!this.G.D(this.F,b)&&W(b,'DeleteRelation requires more permissions on this instance')}}olympe.dc.db.Pb.tg.ja=[olympe.dc.We,olympe.dc.Qf,olympe.dc.Qf];olympe.dc.transaction={};function Qd(a){a&&a(!0,null)}function Rd(a,b,c,d){const e=b+' , '+c;a.L.set(e,d);a.P.add(e);a.ea(b,[c],[d],olympe.dc.Na.jb);null===a.F&&(a.F=setTimeout(a.G.bind(a),a.ka))}
|
|
466
466
|
olympe.dc.Wh=class{constructor(a,b){this.id=a||olympe.$.Sb();this.D=new olympe.C.ec('BurstTransaction#'+this.id,b);this.ea=Sd(this);this.D.onDestroy(()=>Qd());this.W=new Set;this.L=new Map;this.P=new Set;this.F=null;this.ka=olympe.dc.Mg().ea}G(){null!==this.F&&(clearTimeout(this.F),this.F=null);const a=new Map;this.P.forEach(b=>{const c=b.split(' , ');let d=a.get(c[0]);void 0===d&&(d=new Map,a.set(c[0],d));d.set(c[1],this.L.get(b))});0<a.size&&Td(this,a);this.P.clear()}push(a,b){const c=olympe.dc.Ea(a);
|
|
467
467
|
a=b.subscribe(d=>{for(const [e,f]of d)d=olympe.dc.Ea(e),this.L.get(c+' , '+d)!==f&&Rd(this,c,d,f.valueOf())});this.W.add(a)}complete(){return new Promise((a,b)=>{this.G();Qd((c,d)=>{for(const e of this.W)e.unsubscribe();c?a():b(d)})})}update(a,b,c){const d=olympe.dc.Ea(a),e=olympe.dc.Ea(b);void 0===d||void 0===e?olympe.dc.Mg().vb().error('Burst transaction: instance tag or property tag is undefined'):(this.D.run(()=>{olympe.C.Om([c],f=>{f instanceof olympe.dc.Bc?olympe.dc.Mg().vb().error('Cannot send complex property values in burst transactions'):
|
|
468
468
|
Rd(this,d,e,f.valueOf())})}),this.D.Vc(this.G.bind(this)))}stop(){this.D.destroy()}ba(){return this.id}tf(){return!1}toString(){return'Burst transaction #'+this.id}};olympe.dc.Wh.prototype.complete=olympe.dc.Wh.prototype.complete;olympe.dc.Wh.prototype.push=olympe.dc.Wh.prototype.push;olympe.dc.Ha=class{D(){}toString(){}};olympe.dc.transaction.If=class{constructor(a){this.id=a||olympe.$.om();this.ra=[];this.size=0}ba(){return this.id}Cc(){return this.size}concat(a){this.ra.push(...a.ra)}md(a){const b=olympe.dc.transaction.If.D,c=this.ra.length;let d=0;for(;d<c;)switch(this.ra[d]){case b.un:a.xc(this.ra[d+1],this.ra[d+2],this.ra[d+3]);d+=4;break;case b.Up:a.bc(this.ra[d+1],this.ra[d+2],this.ra[d+3],this.ra[d+4]);d+=5;break;case b.Hn:a.qc(this.ra[d+1],this.ra[d+2],this.ra[d+3]);d+=4;break;case b.vn:a.sa(this.ra[d+1],
|
|
@@ -470,48 +470,48 @@ this.ra[d+2],this.ra[d+3],this.ra[d+4]);d+=5;break;case b.In:a.mb(this.ra[d+1],t
|
|
|
470
470
|
this.ra.push(olympe.dc.transaction.If.D.vn,a,b,c,d);this.size++}mb(a,b,c,d){this.ra.push(olympe.dc.transaction.If.D.In,a,b,c,d);this.size++}};olympe.dc.transaction.If.D={un:1,Up:2,Hn:3,vn:4,In:5};olympe.dc.transaction.If.ja=[olympe.dc.Qf,olympe.dc.El];function Ud(a,b){return a.W[b]||a.db.source(b)||olympe.dc.Na.ld}function Vd(a,b){return a.P.has(b)?a.P.get(b):a.db.jk(b)}function Wd(a,b,c,d){null===a.D&&(a.D=Object.create(null));c in a.D||(a.D[c]=[]);0>a.D[c].indexOf(b)&&(Xd(a,b).xc(c,(new Map).set(olympe.dc.Rb.Sd,d),0),a.D[c].push(b))}function Xd(a,b){let c=a.F.get(b);c||(c=new olympe.dc.db.Gc(a.id),a.F.set(b,c));return c}
|
|
471
471
|
olympe.dc.transaction.xt=class{constructor(a,b){this.id=b||olympe.$.Sb();this.db=a;this.F=new Map;this.L=new olympe.dc.db.Gc(b);this.versions=new Map;this.W={};this.ea={};this.P=new Map;this.D=null;this.G=!0}qf(){return 0===this.L.Ih().size}Cc(){return this.F.size}persist(a){this.G=a}xc(a,b,c){var d=c&&c.get(olympe.dc.Rb.VERSION);this.versions.set(a,Number(d)||1);c&&(this.W[a]=c.get(olympe.dc.Rb.Sd));d=Ud(this,a);this.P.set(a,b&&this.G);this.pc(d,b,e=>{e.xc(a,c,0)})}bc(a,b,c=!1){var d=b&&b.get(olympe.dc.Rb.VERSION);
|
|
472
472
|
this.versions.set(a,Number(d)||1);d=Ud(this,a);if(!d)throw Error('Attempt to update an instance which has an unknown source.');this.pc(d,Vd(this,a),e=>{e.bc(a,b,c,0)})}qc(a,b){const c=Ud(this,a),d=Vd(this,a);this.pc(c,d,f=>{f.qc(a,b)});var e=this.db.model(a);e&&(e=Ud(this,e),c!==e&&this.pc(e,d,f=>{f.qc(a,b)}))}sa(a,b,c){const d=Ud(this,b),e=Ud(this,c),f=Vd(this,b)&&Vd(this,c);this.pc(d,f,g=>{g.sa(a,b,c,0)});f&&d!==e&&(Wd(this,d,c,e),Wd(this,e,b,d),this.pc(e,f,g=>{g.sa(a,b,c,0)}))}mb(a,b,c){const d=
|
|
473
|
-
Ud(this,b),e=Ud(this,c),f=Vd(this,b)&&Vd(this,c);this.pc(d,f,g=>{g.mb(a,b,c,0)});f&&d!==e&&this.pc(e,f,g=>{g.mb(a,b,c,0)})}pc(a,b,c){c(this.L);b&&this.G&&c(Xd(this,a))}};function Yd(a,b,c){const d=Object.create(null);if(!b)return d;for(const f of Array.from(b.keys()).sort()){let g=f;var e=b.get(f);if(g===olympe.dc.Rb.Sd)if(e===olympe.dc.Na.
|
|
473
|
+
Ud(this,b),e=Ud(this,c),f=Vd(this,b)&&Vd(this,c);this.pc(d,f,g=>{g.mb(a,b,c,0)});f&&d!==e&&this.pc(e,f,g=>{g.mb(a,b,c,0)})}pc(a,b,c){c(this.L);b&&this.G&&c(Xd(this,a))}};function Yd(a,b,c){const d=Object.create(null);if(!b)return d;for(const f of Array.from(b.keys()).sort()){let g=f;var e=b.get(f);if(g===olympe.dc.Rb.Sd)if(e===olympe.dc.Na.jb)d[g]=olympe.dc.Xa().ba();else{if(e===olympe.dc.Na.ld)continue}else g.startsWith(olympe.dc.Rb.VERSION)?(g=g.substr(1),e=null===e?1:e):g.startsWith(olympe.dc.qg.jd)&&(g='fd'+g.substr(1));e=a.ea(e);c&&e instanceof Object&&8===e.c?a.W.set(g,e):d[g]=e}return d}
|
|
474
474
|
function Zd(a){if(0===a.W.size)return null;const b=Object.create(null);a.W.forEach((c,d)=>{b[d]=c});a.W.clear();return b}
|
|
475
|
-
class $d{constructor(){this.W=new Map}ea(a){return a instanceof olympe.C.
|
|
475
|
+
class $d{constructor(){this.W=new Map}ea(a){return a instanceof olympe.C.Ra||a instanceof olympe.C.fa||a instanceof olympe.C.da?a.valueOf():a instanceof Date||a instanceof olympe.C.bb?(a=a instanceof olympe.C.bb?a.valueOf():a,{c:4,y:a.getUTCFullYear(),M:a.getUTCMonth()+1,d:a.getUTCDate(),h:a.getUTCHours(),m:a.getUTCMinutes(),s:a.getUTCSeconds(),S:a.getUTCMilliseconds(),z:0}):a instanceof olympe.C.Color?{c:7,r:a.Lg().valueOf(),g:a.Jg().valueOf(),b:a.Fg().valueOf(),a:a.Eg().valueOf()}:a&&'function'===
|
|
476
476
|
typeof a.R?{c:8,t:a.R()}:a}}function ae(a){a.fg=[];a.Ee=[];a.xf=[];a.gg=[];a.Vf=[]}function be(a){const b={};0<a.Vf.length&&(b.Vf=a.Vf);0<a.Ee.length&&(b.Ee=a.Ee);0<a.fg.length&&(b.fg=a.fg);0<a.xf.length&&(b.xf=a.xf);0<a.gg.length&&(b.gg=a.gg);ae(a);return b}function ce(a){const b=[...a.Vf,...a.Ee,...a.fg,...a.xf,...a.gg];ae(a);return b}
|
|
477
477
|
olympe.dc.transaction.ye=class{constructor(a=!1){this.fg=[];this.Ee=[];this.xf=[];this.gg=[];this.Vf=[];this.F=a;this.D=olympe.C?new $d:new class extends $d{ea(b){return b&&'function'===typeof b.R?{c:8,t:b.R()}:b}}}flush(){return JSON.stringify(ce(this))}xc(a,b,c=-1){this.fg.push({o:1,t:a,p:Yd(this.D,b||null,this.F),i:c});this.F&&(b=Zd(this.D))&&this.xf.push({o:2,t:a,p:b,i:c})}bc(a,b,c,d=-1){this.xf.push({o:2,t:a,p:Yd(this.D,b||null,!1),i:d})}qc(a,b,c=-1){this.Ee.push({o:3,t:a,f:b,i:c})}sa(a,b,c,
|
|
478
478
|
d=-1){if(!a)throw Error('Cannot create relation of undefined type');if(!b)throw Error(`Cannot create relation ${a} from undefined origin to ${c}`);if(!c)throw Error(`Cannot create relation ${a} from ${b} to undefined destination`);this.gg.push({o:4,m:a,l:b,r:c,i:d})}mb(a,b,c,d=-1){if(!a)throw Error('Cannot delete relation of undefined type');if(!b)throw Error('Cannot delete relation with undefined origin');if(!c)throw Error('Cannot delete relation with undefined destination');this.Vf.push({o:5,m:a,
|
|
479
479
|
l:b,r:c,i:d})}};olympe.dc.transaction.ye.ja=[olympe.dc.Qf];olympe.dc.transaction.xh=class{constructor(a){this.id=a||olympe.$.Sb();this.Va=new Map;this.D=new Map}ba(){return this.id}xc(a,b){this.Va.has(a)&&console.warn('Try to add twice the same instance in the graph');const c=new olympe.dc.transaction.xh.Instance(a);if(b)for(const [d,e]of b)c.za(d,e);this.Va.set(a,c)}bc(){throw Error('UpdateInstance should never be called on a SubGraph since it represents the result of a GraphDef Query');}qc(){throw Error('DeleteInstance should never be called on a SubGraph since it represents the result of a GraphDef Query');
|
|
480
480
|
}sa(a,b,c){a=new olympe.dc.transaction.xh.Relation(b,c,a);this.D.set(a.toString(),a)}mb(a,b,c){a=new olympe.dc.transaction.xh.Relation(b,c,a);this.D.delete(a.F+'.'+a.G+'.'+a.D)}Cc(){return this.D.size+this.Va.size}rd(){return this.Va}md(a){const b=new Map;this.Va.forEach((c,d)=>{const e=new Map;de(c,(f,g)=>{if(g instanceof olympe.dc.Bc){const h=b.get(d)||new Map;h.set(f,g);b.set(d,h)}else e.set(f,g)});a.xc(d,e)});b.forEach((c,d)=>{a.bc(d,c)});this.D.forEach(c=>{a.sa(c.D,c.F,c.G)})}};
|
|
481
|
-
function de(a,b){a.D.forEach((c,d)=>{b(d,b)})}olympe.dc.transaction.xh.Instance=class{constructor(a){this.tag=a;this.D=new Map}R(){return this.tag}za(a,b){this.D.set(a,b);return this}deleteProperty(a){this.D.delete(a);return this}};olympe.dc.transaction.xh.Relation=class{constructor(a,b,c){this.F=a;this.G=b;this.D=olympe.dc.Ea(c)}toString(){return this.F+'.'+this.G+'.'+this.D}};olympe.dc.transaction.xh.ja=[olympe.dc.Qf,olympe.dc.El];function ee(a,b,c,d){c=a.create(c?c:olympe.dc.Sync,void 0);if('string'===typeof b)c.setProperty(olympe.dc.Sync.nameProp,b||'');else for(let f=Object.keys(b),g=f.length,h=0;h<g;h++)c.setProperty(f[h],b[f[h]]);b=c.R();d=d||olympe.dc.Sync;const e=olympe.dc.Sync.extendRel.R();a.
|
|
482
|
-
olympe.dc.
|
|
483
|
-
a);return this.create(d,a).persist(b)}delete(a,b=olympe.dc.nb.DELETE){this.
|
|
481
|
+
function de(a,b){a.D.forEach((c,d)=>{b(d,b)})}olympe.dc.transaction.xh.Instance=class{constructor(a){this.tag=a;this.D=new Map}R(){return this.tag}za(a,b){this.D.set(a,b);return this}deleteProperty(a){this.D.delete(a);return this}};olympe.dc.transaction.xh.Relation=class{constructor(a,b,c){this.F=a;this.G=b;this.D=olympe.dc.Ea(c)}toString(){return this.F+'.'+this.G+'.'+this.D}};olympe.dc.transaction.xh.ja=[olympe.dc.Qf,olympe.dc.El];function ee(a,b,c,d){c=a.create(c?c:olympe.dc.Sync,void 0);if('string'===typeof b)c.setProperty(olympe.dc.Sync.nameProp,b||'');else for(let f=Object.keys(b),g=f.length,h=0;h<g;h++)c.setProperty(f[h],b[f[h]]);b=c.R();d=d||olympe.dc.Sync;const e=olympe.dc.Sync.extendRel.R();a.df(new olympe.dc.transaction.ra.Mn(e,b,!1));a.df(new olympe.dc.transaction.ra.Pk(e,b,d));return c}function fe(a){return(b,c)=>a.forEach(d=>d&&d(b,c))}
|
|
482
|
+
olympe.dc.kb=class{constructor(a){this.id=a||olympe.$.Sb();this.ra=[];this.G=!0;this.F=[]}ba(){return this.id}df(a){a&&this.ra.push(a);return a}persist(a){this.G=a;return this}D(a){a.persist(this.G);const b=this.ra;for(let c=0,d=b.length;c<d;c++)b[c].D(a)}create(a,b){return this.df(new olympe.dc.transaction.ra.ud(a,b))}Nm(a,b=!0){const c=olympe.dc.Ea(a);var d=this.ra.find(e=>e instanceof olympe.dc.transaction.ra.ud&&e.R()===c);if(d)return d.persist(b);d=olympe.dc.Xa().model(a);if(null===d)throw Error('Try to persist a instance that does not exist: '+
|
|
483
|
+
a);return this.create(d,a).persist(b)}delete(a,b=olympe.dc.nb.DELETE){this.df(new olympe.dc.transaction.ra.kj(a,b))}update(a,b,c){return this.df(new olympe.dc.transaction.ra.zh(a,b,c))}sa(a,b,c){this.df(new olympe.dc.transaction.ra.Pk(a,b,c))}mb(a,b,c,d){this.df(new olympe.dc.transaction.ra.Sr(a,b,c,d))}Ru(a,b,c,d){this.df(new olympe.dc.transaction.ra.Mn(a,b,c,d))}defineProperty(a,b,c,d,e,f){f=this.create(olympe.dm.Property,f);f.setProperty(olympe.dc.Sync.nameProp,c||'');void 0!==e&&this.update(a,
|
|
484
484
|
olympe.dc.qg.jd+f.R(),e);this.sa(olympe.dc.Sync.propertyRel,a,f);this.sa(olympe.dm.Property.typeRel,f,b);d&&this.sa(olympe.dc.Sync.G,f,d);this.sa(olympe.dc.Sync.containsRel,a,f);return f}zi(a,b,c='',d,{yi:e=olympe.dm.Relation.L.yl,Ti:f=olympe.dm.Relation.F.Jl,Cq:g=olympe.dm.Relation.D.xp,Aq:h=olympe.dm.Relation.D.Jk,Wi:k=olympe.dm.Relation.D.wo}={},m=olympe.$.Sb()){m=this.create(olympe.dm.Relation,m);m.setProperty(olympe.dc.Sync.nameProp,c||'');m.setProperty(olympe.dm.Relation.$l,e);m.setProperty(olympe.dm.Relation.Ui,
|
|
485
485
|
f);m.setProperty(olympe.dm.Relation.jm,g);m.setProperty(olympe.dm.Relation.im,h);m.setProperty(olympe.dm.Relation.Qm,k);this.sa(olympe.dc.Sync.ka,a,m);this.sa(olympe.dm.Relation.destinationModelRel,m,b);d&&this.sa(olympe.dc.Sync.G,m,d);this.sa(olympe.dc.Sync.containsRel,a,m);return m}tf(){return!1}xu(a){this.F.push(olympe.C.Ia().rb(a))}gd(a,b){a=fe([...this.F,a]);ge(this,a,b)}av(a){a=fe([...this.F,a]);he(olympe.dc.Mg(),this,a,!0)}toString(){return`Transaction #${this.id}`}};
|
|
486
|
-
olympe.dc.
|
|
487
|
-
olympe.dc.
|
|
486
|
+
olympe.dc.kb.prototype.executeAsLarge=olympe.dc.kb.prototype.av;olympe.dc.kb.prototype.execute=olympe.dc.kb.prototype.gd;olympe.dc.kb.prototype.afterExecution=olympe.dc.kb.prototype.xu;olympe.dc.kb.prototype.deleteAllRelations=olympe.dc.kb.prototype.Ru;olympe.dc.kb.prototype.deleteRelation=olympe.dc.kb.prototype.mb;olympe.dc.kb.prototype.createRelation=olympe.dc.kb.prototype.sa;olympe.dc.kb.prototype.update=olympe.dc.kb.prototype.update;olympe.dc.kb.prototype['delete']=olympe.dc.kb.prototype.delete;
|
|
487
|
+
olympe.dc.kb.prototype.persistInstance=olympe.dc.kb.prototype.Nm;olympe.dc.kb.prototype.create=olympe.dc.kb.prototype.create;olympe.dc.kb.prototype.persist=olympe.dc.kb.prototype.persist;olympe.dc.kb.prototype.addOperation=olympe.dc.kb.prototype.df;olympe.dc.kb.prototype.getId=olympe.dc.kb.prototype.ba;olympe.dc.kb.ja=[olympe.dc.Ha];function Sd(a){var b=olympe.dc.Mg();const c=a.ba();b.L.set(c,a);a.D.onDestroy(()=>{b.L.delete(c)});return b.ka.bind(b,a)}function Td(a,b){var c=olympe.dc.Mg();const d=olympe.dc.Rb.VERSION,e=a.tf(),f=[];a=new olympe.dc.db.Gc(a.ba());for(const h of b.keys()){const k=c.db.version(h);var g=c.db.source(h);g!==olympe.dc.Na.jb&&(f.includes(g)||f.push(g),g=b.get(h),g.set(d,k+1),a.bc(h,g,!1,0))}c.F.send(new olympe.dc.la(olympe.dc.la.oa.ah,{pc:a,tf:e},f))}
|
|
488
488
|
function ge(a,b,c){var d=olympe.dc.Mg();if(c){const e=a.ba();d.G.set(e,b);he(d,a,(f,g)=>{f||(d.G.delete(e),b(f,g))},!1)}else he(d,a,b,!1)}
|
|
489
|
-
function ie(a){const b=olympe.dc.la.oa.Yk;a.F.D(olympe.dc.la.oa.hn,(c,d)=>{c=d.id;var e=d.rollback;d=d.error;const f=a.L.get(c);void 0!==f&&(a.L.delete(c),f.stop());olympe.dc.Tc().wf(e,olympe.dc.Na.
|
|
489
|
+
function ie(a){const b=olympe.dc.la.oa.Yk;a.F.D(olympe.dc.la.oa.hn,(c,d)=>{c=d.id;var e=d.rollback;d=d.error;const f=a.L.get(c);void 0!==f&&(a.L.delete(c),f.stop());olympe.dc.Tc().wf(e,olympe.dc.Na.jb);a.N.warn(`Fast update (id=${c}) has been refused and is rolled back. Error: ${d}`)});a.F.D(b,(c,d)=>{c=d.finalize;var e=d.error;(d=(d=a.D.get(d.id))&&d.pop())&&d(c,e)})}
|
|
490
490
|
function he(a,b,c,d=!1){const e=olympe.C.Ia(),f=c?e.rb(c):void 0;c=olympe.dc.Tc();const g=b.ba(),h=new olympe.dc.transaction.xt(a.db,g);b.D(h);if(h.qf())f&&f(!0,null);else{a.D.set(g,[]);const k=[],m=[];for(const p of h.versions.keys())Vd(h,p)?k.push(p):m.push(p);const n=Nc(c,e,h.L,k,m);je(a,h,(p,q,r)=>{q?(ke(a,g,k,h.Cc()),le(a,h,d,b.tf(),(t,w)=>{!t&&a.D.has(g)&&(a.D.get(g).forEach(u=>u(olympe.dc.transaction.Ag.D.zj,w)),me(a,g));n(t);p&&p(t);f&&f(t,w)})):(a.N.error(r),n(!1),f&&f(!1,r))})}}
|
|
491
|
-
function je(a,b,c){const d=[];for(const p of b.versions.keys())a.db.dg(p,olympe.dm.File)&&Vd(b,p)&&d.push(p);if(0===d.length)c(null,!0,null);else{var e=olympe.dm.File.urlProp.R(),f=olympe.dm.File.D.R(),g=olympe.dm.File.modificationDateProp.R(),h=Array.from(b.F.values()),k=[],m=new olympe.async.Jf(olympe.C.$f()),n=olympe.$.Jh();d.forEach(p=>{m.add((q,r)=>{const t=a.db.
|
|
492
|
-
u,w,x=>{const G=h.reduce((H,F)=>H||F.
|
|
491
|
+
function je(a,b,c){const d=[];for(const p of b.versions.keys())a.db.dg(p,olympe.dm.File)&&Vd(b,p)&&d.push(p);if(0===d.length)c(null,!0,null);else{var e=olympe.dm.File.urlProp.R(),f=olympe.dm.File.D.R(),g=olympe.dm.File.modificationDateProp.R(),h=Array.from(b.F.values()),k=[],m=new olympe.async.Jf(olympe.C.$f()),n=olympe.$.Jh();d.forEach(p=>{m.add((q,r)=>{const t=a.db.Ib(p,e,!0),w=a.db.Ib(p,olympe.dm.File.mimeTypeProp)||'application/data';t.startsWith('blob:')?n.F(t,u=>{n.W(t);null===u?q():a.W.ne(p,
|
|
492
|
+
u,w,x=>{const G=h.reduce((H,F)=>H||F.Lb(p),null);null!==G&&(G.za(e,x).za(f,!0),k.push([p,x]));q()},x=>{r(x)})}):(2048<t.length&&a.N.error('Trying to create a file with an URL longer than 2048. It likely is a data url and should be an object url. File tag:',p),q())})});Ab(m,(p,q)=>{let r=null;if(p){const t=new olympe.dc.db.Gc;k.forEach(([w,u])=>{const x=new Map;x.set(e,u).set(f,!0).set(g,olympe.C.bb.now());t.bc(w,x,!0,0)});r=Nc(olympe.dc.Tc(),olympe.C.$f(),t,[],[])}c(r,p,q)});m.start()}}
|
|
493
493
|
function ke(a,b,c,d){const e=olympe.C.$f(),f=new olympe.async.Jf(e);0<a.timeout&&zb(f,a.timeout);const g=a.D.get(b);for(let h=0;h<d;h++)f.add((k,m,n)=>{g.push(e.rb((p,q)=>{n.set('final',p);q?m(q):k()}))});Ab(f,(h,k,m)=>{h||a.N.warn(`An error occurred while processing the notification of transaction (${b}): ${k}.`);m.get('final')!==olympe.dc.transaction.Ag.D.$o&&olympe.dc.Tc().persist(c);me(a,b)});f.start()}
|
|
494
494
|
function le(a,b,c,d,e){b=b.F;if(0===b.size)e(!0,null);else{var f=c?olympe.dc.la.oa.Ql:olympe.dc.la.oa.ri;c=(h,k,m,n)=>{h=Ac(new olympe.dc.la(f,{pc:h,tf:d},[k]),p=>{p instanceof Error?n(p.message):m()});a.F.send(h)};var g=new olympe.async.Jf(olympe.C.$f());for(const [h,k]of b)g.add(c.bind(null,k,h));Ab(g,e);g.start()}}function me(a,b){a.D.delete(b);if(0===a.D.size){for(var c of a.P)c();a.P=[]}a.G.has(b)&&(c=a.G.get(b),a.G.delete(b),c(!0,null))}
|
|
495
495
|
function ne(a,b){0<a.D.size?a.P.push(olympe.C.Ia().rb(b)):b()}
|
|
496
|
-
olympe.dc.transaction.Ag=class{constructor(a,b,c,d,e,f){this.N=a;this.db=b;this.F=c;this.W=d;this.timeout=e;this.ea=f;this.L=new Map;this.D=new Map;this.P=[];this.G=new Map;ie(this)}vb(){return this.N}ka(a,b,c,d,e){const f=olympe.dc.Na.
|
|
496
|
+
olympe.dc.transaction.Ag=class{constructor(a,b,c,d,e,f){this.N=a;this.db=b;this.F=c;this.W=d;this.timeout=e;this.ea=f;this.L=new Map;this.D=new Map;this.P=[];this.G=new Map;ie(this)}vb(){return this.N}ka(a,b,c,d,e){const f=olympe.dc.Na.jb,g=olympe.dc.Rb.VERSION,h=a.tf();a=new olympe.dc.db.Gc(a.ba());const k=this.db.version(b);e=void 0!==e?e:this.db.source(b);const m=new Map;for(let n=0;n<c.length;n++)m.set(c[n],d[n]);m.set(g,k+1);a.bc(b,m,!1,0);olympe.dc.Tc().wf(a.clone(),f);e!==f&&this.F.send(new olympe.dc.la(olympe.dc.la.oa.ah,
|
|
497
497
|
{pc:a,tf:h},[e]))}};olympe.dc.transaction.Ag.D={zj:0,lt:1,$o:2};olympe.dc.transaction.T={Fa:'dc.transaction.Logger',wa:'dc.transaction.Manager'};olympe.dc.transaction.Z={TIMEOUT:'dc.transaction.timeout',gn:'dc.transaction.burstInterval'};
|
|
498
|
-
olympe.U.config(function(a){C(a,olympe.dc.transaction.Z.TIMEOUT,6E4);C(a,olympe.dc.transaction.Z.gn,30);A(a,olympe.dc.transaction.T.Fa,[olympe.ua.T.wa],b=>b.Ic('dc'));y(a,olympe.dc.transaction.T.wa,olympe.dc.transaction.Ag,olympe.dc.transaction.T.Fa,olympe.dc.T.fh,olympe.dc.T.ze,olympe.dc.T.Xh,new olympe.U.ha(olympe.dc.transaction.Z.TIMEOUT),new olympe.U.ha(olympe.dc.transaction.Z.gn))},'olympe.dc.transaction');olympe.dc.transaction.ra={};function X(a){return olympe.dc.Ea(a)}function oe(a,b){const c=new Map;for(const [d,e]of b)c.set(d,a.
|
|
499
|
-
this.R();if(void 0===c)throw Error('OperationError: Cannot create instance, model tag is undefined');if(this.F.has(olympe.dc.Rb.Sd))this.F.get(olympe.dc.Rb.Sd)===olympe.dc.Na.Ot&&(this.F.set(olympe.dc.Rb.Sd,olympe.dc.Na.
|
|
500
|
-
this.G,e);a.sa(olympe.dc.Sync.modelRel.R(),d,c);for(const [f,g,h]of Cd(b,d))Vd(a,h)&&(g===olympe.dc.Ja.ORIGIN?a.sa(f,h,d):a.sa(f,d,h))}else b.Hb(d)||(a.xc(d,this.G,oe(this,this.F)),a.sa(olympe.dc.Sync.modelRel.R(),d,c))}toString(){return`CreateInstance(${this.hc()}, ${this.R()})`}};olympe.dc.transaction.ra.ud.prototype.setProperty=olympe.dc.transaction.ra.ud.prototype.setProperty;olympe.dc.transaction.ra.ud.prototype.localSource=olympe.dc.transaction.ra.ud.prototype.
|
|
501
|
-
olympe.dc.transaction.ra.ud.prototype.persist=olympe.dc.transaction.ra.ud.prototype.persist;olympe.dc.transaction.ra.ud.prototype.getModelTag=olympe.dc.transaction.ra.ud.prototype.hc;olympe.dc.transaction.ra.ud.prototype.getTag=olympe.dc.transaction.ra.ud.prototype.R;olympe.dc.transaction.ra.ud.ja=[olympe.dc.de];olympe.dc.transaction.ra.Pk=class extends olympe.dc.transaction.ra.mg{constructor(a,b,c){super();this.type=a.
|
|
502
|
-
const d=X(this.G);if(''===d)throw Error('OperationError: Cannot create relation, destination tag is undefined, null or empty string');this.
|
|
503
|
-
var d=olympe.dc.Xa();const e=this.
|
|
504
|
-
this.
|
|
505
|
-
b+' not found so it cannot be updated');d=oe(this,this.F);0>=d.get(olympe.dc.Rb.VERSION)&&d.set(olympe.dc.Rb.VERSION,e+1);for(const [f,g]of d)e=c.
|
|
498
|
+
olympe.U.config(function(a){C(a,olympe.dc.transaction.Z.TIMEOUT,6E4);C(a,olympe.dc.transaction.Z.gn,30);A(a,olympe.dc.transaction.T.Fa,[olympe.ua.T.wa],b=>b.Ic('dc'));y(a,olympe.dc.transaction.T.wa,olympe.dc.transaction.Ag,olympe.dc.transaction.T.Fa,olympe.dc.T.fh,olympe.dc.T.ze,olympe.dc.T.Xh,new olympe.U.ha(olympe.dc.transaction.Z.TIMEOUT),new olympe.U.ha(olympe.dc.transaction.Z.gn))},'olympe.dc.transaction');olympe.dc.transaction.ra={};function X(a){return olympe.dc.Ea(a)}function oe(a,b){const c=new Map;for(const [d,e]of b)c.set(d,a.Sa(e));return c}olympe.dc.transaction.ra.mg=class{D(){throw Error('Abstract method build() not override !');}toString(){throw Error('Abstract method toString() not override !');}Sa(a){a=olympe.C.Sa(a);return void 0===a||null===a?null:olympe.C.Vq(a)?a.valueOf():a}};olympe.dc.transaction.ra.mg.ja=[olympe.dc.Ha];olympe.dc.transaction.ra.ud=class extends olympe.dc.transaction.ra.mg{constructor(a,b){super();this.tag=void 0!==b?b:olympe.$.Sb();this.model=a;this.F=new Map;this.G=!0;this.F.set(olympe.dc.Rb.VERSION,1)}R(){return X(this.tag)}hc(){return X(this.model)}persist(a){this.G=a;return this}Sw(){this.F.set(olympe.dc.Rb.Sd,olympe.dc.Na.jb)}setProperty(a,b){this.F.set(olympe.dc.Ea(a),b);return this}yk(a){this.setProperty(olympe.dc.Sync.nameProp.R(),a);return this}D(a){const b=olympe.dc.Xa(),c=this.hc(),d=
|
|
499
|
+
this.R();if(void 0===c)throw Error('OperationError: Cannot create instance, model tag is undefined');if(this.F.has(olympe.dc.Rb.Sd))this.F.get(olympe.dc.Rb.Sd)===olympe.dc.Na.Ot&&(this.F.set(olympe.dc.Rb.Sd,olympe.dc.Na.jb),this.G=!1);else{var e=b.source(c);this.F.set(olympe.dc.Rb.Sd,null!==e?e:olympe.dc.Na.ld)}if(b.Hb(d)&&!b.jk(d)&&this.G){e=new Map([...b.Hd(d,!0),...oe(this,this.F)]);for(const f of e.values())if(f instanceof olympe.dc.Bc&&!Vd(a,f.R())){const g=new olympe.dc.kb;g.Nm(f.R());g.D(a)}a.xc(d,
|
|
500
|
+
this.G,e);a.sa(olympe.dc.Sync.modelRel.R(),d,c);for(const [f,g,h]of Cd(b,d))Vd(a,h)&&(g===olympe.dc.Ja.ORIGIN?a.sa(f,h,d):a.sa(f,d,h))}else b.Hb(d)||(a.xc(d,this.G,oe(this,this.F)),a.sa(olympe.dc.Sync.modelRel.R(),d,c))}toString(){return`CreateInstance(${this.hc()}, ${this.R()})`}};olympe.dc.transaction.ra.ud.prototype.setProperty=olympe.dc.transaction.ra.ud.prototype.setProperty;olympe.dc.transaction.ra.ud.prototype.localSource=olympe.dc.transaction.ra.ud.prototype.Sw;
|
|
501
|
+
olympe.dc.transaction.ra.ud.prototype.persist=olympe.dc.transaction.ra.ud.prototype.persist;olympe.dc.transaction.ra.ud.prototype.getModelTag=olympe.dc.transaction.ra.ud.prototype.hc;olympe.dc.transaction.ra.ud.prototype.getTag=olympe.dc.transaction.ra.ud.prototype.R;olympe.dc.transaction.ra.ud.ja=[olympe.dc.de];olympe.dc.transaction.ra.Pk=class extends olympe.dc.transaction.ra.mg{constructor(a,b,c){super();this.type=a.Qa?a:new olympe.dc.V.Fb(X(a));this.F=b;this.G=c}Qa(){return this.Sa(this.type).Qa()}D(a){const b=X(this.type);if(''===b)throw Error('OperationError: Cannot create relation, type is undefined, null or empty string');if(b===olympe.dc.Hc.fe)throw Error('OperationError: Cannot create the instance -> model relation');const c=X(this.F);if(''===c)throw Error('OperationError: Cannot create relation, origin tag is undefined, null or empty string');
|
|
502
|
+
const d=X(this.G);if(''===d)throw Error('OperationError: Cannot create relation, destination tag is undefined, null or empty string');this.Qa()===olympe.dc.Ja.DESTINATION?a.sa(b,c,d):a.sa(b,d,c)}toString(){return`CreateRelation('${this.Qa()}${X(this.type)}, ${X(this.F)}, ${X(this.G)})`}};olympe.dc.transaction.ra.zy=class extends olympe.dc.transaction.ra.mg{constructor(a,b=olympe.dc.nb.DELETE){super();this.model=a;this.F=b}hc(){return X(this.model)}D(a){const b=this.hc();if(void 0===b)throw Error('OperationError: Cannot delete instances of model, model is undefined');const c=olympe.dc.Xa();for(const d of c.rd(b))d!==b&&(new olympe.dc.transaction.ra.kj(d,this.F)).D(a)}toString(){return`DeleteAllInstances(${this.hc()}, ${this.F})`}};olympe.dc.transaction.ra.Mn=class extends olympe.dc.transaction.ra.mg{constructor(a,b,c,d){super();this.type=a.Qa?a:new olympe.dc.V.Fb(X(a));this.F=b;this.G=c||!1;this.L=d instanceof Array?d.map(e=>X(e)):null}Qa(){return this.Sa(this.type).Qa()}D(a){const b=X(this.type);if(void 0===b)throw Error('OperationError: Cannot delete relation, type is undefined');if(b===olympe.dc.Hc.fe)throw Error('OperationError: Cannot delete the instance -> model relation');const c=X(this.F);if(void 0===c)throw Error('OperationError: Cannot delete relation, left tag is undefined');
|
|
503
|
+
var d=olympe.dc.Xa();const e=this.Qa(),f=this.L;d=d.cb(c,this.type);for(const g of d)e===olympe.dc.Ja.DESTINATION?a.mb(b,c,g):a.mb(b,g,c),null!==f&&0<=f.indexOf(g)||this.G&&(new olympe.dc.transaction.ra.kj(g,olympe.dc.nb.DELETE)).D(a)}toString(){return`DeleteAllRelations(${this.Qa()}${X(this.type)}, ${X(this.F)}, ${this.G})`}};olympe.dc.transaction.ra.kj=class extends olympe.dc.transaction.ra.mg{constructor(a,b=olympe.dc.nb.DELETE){super();this.tag=a;this.F=b}R(){return X(this.tag)}D(a){const b=olympe.dc.Xa(),c=this.R();if(void 0===c)throw Error('OperationError: Cannot delete instance, tag is undefined');const d=b.model(c);0<=b.version(c)&&d&&a.qc(c,this.F)}toString(){return'DeleteInstance('+this.R()+', '+this.F+')'}};olympe.dc.transaction.ra.Sr=class extends olympe.dc.transaction.ra.Pk{constructor(a,b,c,d=!1){super(a,b,c);this.L=d}D(a){const b=X(this.type);if(void 0===b)throw Error('OperationError: Cannot delete relation, type is undefined');if(b===olympe.dc.Hc.fe)throw Error('OperationError: Cannot delete the instance -> model relation');const c=X(this.F);if(void 0===c)throw Error('OperationError: Cannot delete relation, left tag is undefined');const d=X(this.G);if(void 0===d)throw Error('OperationError: Cannot delete relation, right tag is undefined');
|
|
504
|
+
this.Qa()===olympe.dc.Ja.DESTINATION?a.mb(b,c,d):a.mb(b,d,c);this.L&&(new olympe.dc.transaction.ra.kj(d,olympe.dc.nb.DELETE)).D(a)}toString(){return'DeleteRelation('+this.Qa()+X(this.type)+', '+X(this.F)+', '+X(this.G)+', '+this.L+')'}};olympe.dc.transaction.ra.zh=class extends olympe.dc.transaction.ra.mg{constructor(a,b,c){super();this.tag=a;this.F=new Map;this.F.set(olympe.dc.Rb.VERSION,-1);void 0!==b&&this.setProperty(b,c)}R(){return X(this.tag)}setProperty(a,b){this.F.set(X(a),b);return this}D(a){const b=this.R();if(void 0===b)throw Error('OperationError: Cannot update instance, tag is undefined');const c=olympe.dc.Xa();var d=c.version(b),e=a.versions.get(b);e=void 0!==e?e:d;if(null===e)throw Error('OperationError: Instance #'+
|
|
505
|
+
b+' not found so it cannot be updated');d=oe(this,this.F);0>=d.get(olympe.dc.Rb.VERSION)&&d.set(olympe.dc.Rb.VERSION,e+1);for(const [f,g]of d)e=c.Ib(b,f),e instanceof olympe.dc.Bc&&(e=e.R(),a.ea[e]=!0),g instanceof olympe.dc.Bc&&!Vd(a,g.R())&&(e=new olympe.dc.kb,e.Nm(g.R()),e.D(a));a.bc(b,d)}toString(){return'UpdateInstance('+this.R()+', '+oe(this,this.F)+')'}};olympe.dc.transaction.ra.zh.prototype.setProperty=olympe.dc.transaction.ra.zh.prototype.setProperty;
|
|
506
506
|
olympe.dc.transaction.ra.zh.prototype.getTag=olympe.dc.transaction.ra.zh.prototype.R;olympe.dc.query={};function pe(a,b,c){let d=a.D.get(b);void 0===d&&(d=new Set,a.D.set(b,d));b=olympe.$.Sb();d.add(b);a.wc.set(b,c)}function qe(a,b){if(a.D.has(b)){for(const c of a.D.get(b))a.wc.delete(c);a.D.delete(b)}}
|
|
507
|
-
function re(a,b,c){if(a.D.has(b)){if(!a.F.has(b)){a.F.add(b);for(const d of a.D.get(b)){const e=a.wc.get(d);a.wc.delete(d);c instanceof olympe.dc.query.Bi.pj?e(Error(c.ka()),c):e(null,c)}a.D.delete(b);a.F.delete(b)}}else a.N.info(`Graph result of graphdef ${b} has no associated handler in the datacloud`)}olympe.dc.query.Lr=class{constructor(a){this.N=a;this.D=new Map;this.wc=new Map;this.F=new Set}};olympe.dc.ve=class{ia(){}L(){}G(){}P(){}ma(){}toString(){}};olympe.dc.Pd={xg:0,Cj:1,Gl:2,St:0,
|
|
507
|
+
function re(a,b,c){if(a.D.has(b)){if(!a.F.has(b)){a.F.add(b);for(const d of a.D.get(b)){const e=a.wc.get(d);a.wc.delete(d);c instanceof olympe.dc.query.Bi.pj?e(Error(c.ka()),c):e(null,c)}a.D.delete(b);a.F.delete(b)}}else a.N.info(`Graph result of graphdef ${b} has no associated handler in the datacloud`)}olympe.dc.query.Lr=class{constructor(a){this.N=a;this.D=new Map;this.wc=new Map;this.F=new Set}};olympe.dc.ve=class{ia(){}L(){}G(){}P(){}ma(){}toString(){}};olympe.dc.Pd={xg:0,Cj:1,Gl:2,St:0,Re:1};olympe.dc.Pd.toString=function(a){for(const [b,c]of Object.entries(olympe.dc.Pd))if(c===a)return b;return null};olympe.dc.nb={NONE:-1,DUMP:0,DELETE:1,RUNTIME:2};v('olympe.dc.FollowRules',olympe.dc.nb);olympe.dc.nb.toString=function(a){for(const [b,c]of Object.entries(olympe.dc.nb))if(c===a)return b;return null};
|
|
508
508
|
olympe.dc.nb.Jq=function(a){const b=olympe.dm.Relation,c=olympe.dc.nb.DELETE,d=olympe.dc.nb.DUMP,e=olympe.dc.nb.RUNTIME;switch(a){case d:return b.jm.R();case c:return b.im.R();case e:return b.Qm.R()}};function se(a){return null===a.D?olympe.dc.nb.NONE:a.D}function te(a,b){a.validate(b,'activateFollowRules');return a}function ue(a,b,c=!1){a.validate(olympe.dc.nb.NONE,'follow');a.W=ve(a,b,c);return a}
|
|
509
509
|
function we(a,b=1){a.validate(olympe.dc.nb.NONE,'back');let c=a.W;for(let d=0;d<b&&null!==c;d++)c=a.F.get(c.D)||null;a.W=c}function xe(a){return null!==a.D&&a.D!==olympe.dc.nb.NONE}function ye(a){if(xe(a))throw Error('An implicit GraphDef has no blocks');return a.F.values()}
|
|
510
|
-
function ve(a,b,c){c=new olympe.dc.query.Relation(b.R(),b.
|
|
510
|
+
function ve(a,b,c){c=new olympe.dc.query.Relation(b.R(),b.Qa(),c||b instanceof olympe.dc.V.Zb);b=[];var d;for(var e of ze(a)){if(d=a.F.get(e)){var f=new olympe.dc.query.oj(c,d.id);d.children.has(f.ba())?d=d.children.get(f.ba()):(d.children.set(f.ba(),f),d=f)}else{d=a;var g=c;const h=olympe.$.Ec(d.G);f=olympe.$.Ec(h+g.toString());g=d.F.get(f)||new olympe.dc.query.oj(g,h);d.P.set(f,g);d=g}f=d.ba();a.F.set(f,d);b.push(f)}e=b[0];a.pa.set(e,b);return a.F.get(e)}
|
|
511
511
|
function Ae(a,b){if(xe(a))a.ea.push(b);else throw Error('You cannot add a "skip predicate" to an explicit graphdef. Please activate a follow rule first.');return a}function Be(a,b){a.ka=b;return a}function Ce(a,b){return xe(a)?new olympe.dc.query.kl(a.clone(),b||olympe.C.Ia()):new olympe.dc.query.nj(a.clone(),b||olympe.C.Ia())}
|
|
512
512
|
function ze(a){let b=a.W;const c=[];for(;b&&b.Hf.recursive;)c.push(b.ba()),b=a.F.get(b.D)||null;c.push(b&&b.ba()||olympe.$.Ec(a.G));const d=[];c.slice(0,5).forEach(e=>{d.push(...a.pa.get(e))});return d}
|
|
513
|
-
olympe.dc.Ef=class{constructor(a,b=olympe.dc.Pd.xg){if(void 0===a||null===a)throw Error('Cannot create GraphDef with undefined or null baseTag');this.G=olympe.dc.Ea(a);this.L=b;this.D=null;this.ea=[];this.W=null;this.P=new Map;this.F=new Map;this.ka=null;this.pa=(new Map).set(olympe.$.Ec(this.G),[olympe.$.Ec(this.G)])}static qc(a,b){olympe.dc.Ef.Ee([a],b)}static Ee(a,b){const c=new olympe.dc.
|
|
514
|
-
Object.create(null),e=c.Hf;d.t=e.R();d.d=e.
|
|
513
|
+
olympe.dc.Ef=class{constructor(a,b=olympe.dc.Pd.xg){if(void 0===a||null===a)throw Error('Cannot create GraphDef with undefined or null baseTag');this.G=olympe.dc.Ea(a);this.L=b;this.D=null;this.ea=[];this.W=null;this.P=new Map;this.F=new Map;this.ka=null;this.pa=(new Map).set(olympe.$.Ec(this.G),[olympe.$.Ec(this.G)])}static qc(a,b){olympe.dc.Ef.Ee([a],b)}static Ee(a,b){const c=new olympe.dc.kb;a.forEach(d=>c.delete(d,olympe.dc.nb.DELETE));c.gd(b)}toJSON(){const a=Object.create(null),b=c=>{const d=
|
|
514
|
+
Object.create(null),e=c.Hf;d.t=e.R();d.d=e.Qa();d.r=e.recursive;d.c=c.Gg().map(b);return d};a.t=this.G;a.o=this.L;a.f=se(this);a.b=Array.from(this.P.keys()).map(c=>b(this.F.get(c)));return JSON.stringify(a)}static ac(a){a='string'===typeof a?JSON.parse(a):a;const b=te(new olympe.dc.Ef(a.t,a.o),a.f),c=d=>{const e=new olympe.dc.xa.Relation(d.t,d.d);ue(b,e,d.r);for(const f of d.c)c(f);we(b)};for(const d of a.b)c(d);return b}ba(){const a=olympe.$.Ec,b=d=>d.ba()+d.Gg().map(e=>b(e)).sort().join(''),c=Array.from(this.P,
|
|
515
515
|
([,d])=>b(d)).sort().join('');return a(`${this.L}-${this.G}${c}-${se(this)}`)}add(a,b=!1){this.validate(olympe.dc.nb.NONE,'add');ve(this,a,b);return this}gd(a=b=>b){null===this.D&&(this.D=olympe.dc.nb.NONE);const b=olympe.dc.Nh();a=olympe.C.Ia().rb(a);switch(this.L){case olympe.dc.Pd.xg:case olympe.dc.Pd.Cj:const c=De(b,this,a);olympe.C.Ia().Vc(()=>{Ee(olympe.dc.Nh(),c.ba())});break;case olympe.dc.Pd.Gl:Fe(b,this,a);break;default:throw Error('Wrong graph operation');}}validate(a,b){if(null!==this.D&&
|
|
516
516
|
this.D!==a)throw Error(this.D>olympe.dc.nb.NONE?`Method ${b} can't be called on an implicit Graphdef`:`Method ${b} can't be called on an explicit Graphdef`);this.D=a}clone(){const a=new olympe.dc.Ef(this.G,this.L);a.D=this.D;for(const [b,c]of this.P)a.P.set(b,c);for(const [b,c]of this.F)a.F.set(b,c);a.ka=this.ka;a.ea=[...this.ea];return a}};function Ge(a,b){a.data.md(b.data);a.D.forEach((c,d)=>{if(b.D.has(d))d=b.D.get(d),d.add.push(...c.add),d.remove.push(...c.remove);else{var e=c.remove;const f=new He(d);f.add=c.add;f.remove=e;b.D.set(d,f)}})}function Ie(a,b){a.D.forEach((c,d)=>b(d,c.add,c.remove))}olympe.dc.query.hs=class{constructor(a,b){this.id=a;this.D=new Map;this.data=b}ba(){return this.id}};class He{constructor(a){this.id=a;this.add=[];this.remove=[]}ba(){return this.id}};function Je(a){return(a=a.D)&&olympe.dc.Xa().source(a)||olympe.dc.Na.ld}function Ke(a){return Array.from(a.pa,b=>a.F.get(b))}function Le(a){if(!a.G){for(const b of a.L.values())b();a.L.clear();a.G=!0}}
|
|
517
517
|
olympe.dc.query.nj=class{constructor(a,b){this.Og=a;this.D=a.G;this.id=a.ba();this.W=new olympe.C.ec(`GraphSubscription ${this.id}`,b);this.N=olympe.ua.vb('dc.query');this.pa=[];this.F=new Map;this.G=!1;this.L=new Map;b=olympe.$.Ec(this.D);if(!xe(a))for(const c of ye(a))this.F.set(c.ba(),c),c.D===b&&this.pa.push(c.ba())}ba(){return this.id}uf(a,b){b=b||olympe.$.Sb();this.G?a():this.L.set(b,olympe.C.Ia().rb(a));return b}Ri(a){return this.L.delete(a)}onDestroy(a){this.W.onDestroy(a)}release(){this.W.destroy()}P(){return function*(a,
|
|
@@ -522,67 +522,67 @@ for(const b of this.Va)a+=JSON.stringify(b)+', ';a.endsWith(', ')&&(a=a.substr(0
|
|
|
522
522
|
b){for(const c of a)yield c;for(const c of b)yield*c.Ih()}(this.rd(),this.children.values())}toString(){return this.D+this.Hf.toString()}};function Me(a,b){a.D.forEach((c,d)=>b(d,c))}
|
|
523
523
|
olympe.dc.query.bi=class{constructor(a,b,c,d){this.id=a;this.source=b;this.F=c;this.D=new Map;this.pc=d}toJSON(){let a=`{ "id": "${this.id}", "source": "${this.source}", "destination": "${this.F}"`;a.endsWith(', ')&&(a=a.substr(0,a.length-2));a+=', "blocks": {';for(const [b,c]of this.D)a+=`"${b}": ${JSON.stringify(Array.from(c))}, `;a.endsWith(', ')&&(a=a.substr(0,a.length-2));a+=`}, "patch": ${this.pc.toJSON()}`;return a+'}'}static ac(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;a=olympe.dc.db.Gc.ac(b.patch);
|
|
524
524
|
a=new olympe.dc.query.bi(b.id,b.source,b.destination,a);for(const [c,d]of Object.entries(b.blocks))a.D.set(c,new Set(d));return a}ba(){return this.id}};const Ne=olympe.dc.Hc.fe,Oe=olympe.dc.Hc.gh,Pe=olympe.dc.Ja.ORIGIN,Qe=olympe.dc.Ja.DESTINATION;function Re(a,b,c){const d=a.Og.ea;return c.filter(e=>d.reduce((f,g)=>f&&!g(b,e.Hf),!0))}
|
|
525
|
-
olympe.dc.query.kl=class extends olympe.dc.query.nj{constructor(a,b){super(a,b);this.Va=(new Set).add(a.G)}P(){return this.Va.values()}ea(a){a=a.pc;for(const b of a.rd())b.P()?this.Va.delete(b.tag()):b.
|
|
526
|
-
!this.Va.has(c))return!1;c=olympe.dm.Relation.D.Nj;d=olympe.dm.Relation.D.Gj;const f=olympe.dc.Xa();for(const k of e){var g=k.Hf,h=g.R();e=g.
|
|
525
|
+
olympe.dc.query.kl=class extends olympe.dc.query.nj{constructor(a,b){super(a,b);this.Va=(new Set).add(a.G)}P(){return this.Va.values()}ea(a){a=a.pc;for(const b of a.rd())b.P()?this.Va.delete(b.tag()):b.Je()&&this.Va.add(b.tag())}ka(a){let b=[],c=[];Ie(a,(d,e,f)=>{b=b.concat(e.filter(g=>{if(this.Va.has(g)&&this.D!==g)return!1;this.Va.add(g);return!0}));c=c.concat(f.filter(g=>this.Va.delete(g)))});Rc(olympe.dc.Tc(),b,c)}yq(a,b){var c=a.D,d=Array.from(a.F.values()),e=Re(this,c,d);if(e.length===d.length&&
|
|
526
|
+
!this.Va.has(c))return!1;c=olympe.dm.Relation.D.Nj;d=olympe.dm.Relation.D.Gj;const f=olympe.dc.Xa();for(const k of e){var g=k.Hf,h=g.R();e=g.Qa();if(e!==Qe||h!==Ne&&h!==Oe){if(!f.Hb(g))return this.N.info('ImplicitGraphQuery: [Sub. ID:',b,']: checking coverage of graphPath',a.ba(),'failed at the relation',h,'which is not in local DB'),!1;g=Bd(f,g,se(this.Og));h=0===k.Gg().length;if(!(g&(e===Pe?h?12:d:h?3:c)))return!1}}return!0}};function Se(a){let b=null;for(a=[...a.V];null===b&&0<a.length;)b=a.pop().Ob();return b}function Te(a,b){a.W()||(a=`Calling "${b}" on subscription with id ${a.ba()} while it is not ready (thus no data is available).`+'This call should be made within an onReady callback.',olympe.ua.vb('dc').warn(a))}
|
|
527
527
|
function Ue(a,b){const c=new olympe.C.ec('listDef toObservable',a.cc().mh());return new rxjs.Observable(d=>{c.run(()=>{olympe.C.tc([b],e=>{d.next(e.valueOf())})});c.onDestroy(()=>{d.complete()});return c.destroy.bind(c)})}
|
|
528
528
|
olympe.dc.na=class{constructor(a,b,c){void 0===a||null===a?olympe.ua.vb('dc').warn('attempt to create a listdef with a null or undefind basetag. This listdef is thus without effect.'):(this.F=olympe.C.va([a],olympe.dc.Ea,String),this.V=void 0!==b&&(Array.isArray(b)?b:[b])||[],this.valueType=c||Se(this),this.D=null)}nc(){return olympe.dc.nc()}gd(){if(null===this.D){const a=olympe.dc.Nh();this.D=Ve(a,this);null!==this.valueType&&this.D.kd(this.valueType);olympe.C.Ia().Vc(()=>{We(a,this.D.ba());this.D=
|
|
529
529
|
null})}return this}cc(){null===this.D&&this.gd();return this.D}kd(a){this.valueType=a;null!==this.D&&this.D.kd(this.valueType)}Ob(){return null!==this.D?this.D.Ob():null===this.valueType?olympe.dc.Sync:this.valueType}pd(){return this.F}nl(){return this.V}uf(a,b){return this.cc().uf(a,b)}Ri(a){this.cc().Ri(a)}Cs(){return this.cc().Dg()}Bs(){return this.cc().W()}get(a){return this.cc().get(a)}Lh(){return this.cc().Lh()}Hg(a){const b=this.cc();Te(b,'getCurrent');return b.Hg(a)}has(a){return this.cc().has(a)}cg(a){const b=
|
|
530
|
-
this.cc();Te(b,'hasCurrent');return b.cg(a)}
|
|
530
|
+
this.cc();Te(b,'hasCurrent');return b.cg(a)}hf(a){return this.cc().hf(a)}ix(a){return Ue(this,this.hf(a))}qe(a){const b=this.cc();Te(b,'getCurrentAt');return b.qe(a)}Ie(a){return this.cc().Ie(a)}jf(a){const b=this.cc();Te(b,'getCurrentKeyAt');return b.jf(a)}Id(a){return this.cc().Id(a)}mx(a){return Ue(this,this.Id(a))}kf(a){const b=this.cc();Te(b,'getCurrentRank');return b.kf(a)}qd(){return this.cc().qd()}jx(){return Ue(this,this.qd())}lf(){return this.cc().lf()}Cc(){return this.cc().Cc()}nx(){return Ue(this,
|
|
531
531
|
this.Cc())}Yf(){const a=this.cc();Te(a,'getCurrentSize');return a.Yf()}forEach(a,b){this.cc().forEach(a,b)}od(a){const b=this.cc();Te(b,'forEachCurrentValue');return b.od(a)}Di(a,b,c,d){a=new olympe.dc.V.Ed(a,b);(new olympe.dc.na(this.F,[...this.V,a],this.valueType)).forEach(c,d)}transform(...a){var b=a;if(Array.isArray(a[0])){if(1<a.length)throw Error('ListDef.transform() should be called either with one array argument, or with ... arguments, but not both');b=a[0]}a=[...this.V];for(const c of b){if(void 0===
|
|
532
|
-
c)throw Error('ListDef.transform(): Trying to set an undefined transformer');if(c instanceof olympe.dc.xa.Property)throw Error(`ListDef.transform(): Properties cannot be used as transformer, unlike relations ${c}`);if(!c||'function'!==typeof c.getTransform)break;a.push(c)}b=new olympe.dc.na(this.F,a);b.kd(Se(b)||this.valueType||Object);return b}Bk(a){return this.transform(new olympe.dc.V
|
|
533
|
-
void 0:this.valueType);let b=this.V;b instanceof Array||(b=b?[b]:[]);a.transform(b);return a}toString(){let a=this.V;a=a?', '+(a.join?a.join(', '):a.toString()):'';return'ListDef(#'+olympe.C.
|
|
534
|
-
olympe.dc.na.prototype.transform=olympe.dc.na.prototype.transform;olympe.dc.na.prototype.forEachCurrentValue=olympe.dc.na.prototype.od;olympe.dc.na.prototype.forEach=olympe.dc.na.prototype.forEach;olympe.dc.na.prototype.getCurrentSize=olympe.dc.na.prototype.Yf;olympe.dc.na.prototype.observeSize=olympe.dc.na.prototype.
|
|
535
|
-
olympe.dc.na.prototype.getCurrentAt=olympe.dc.na.prototype.qe;olympe.dc.na.prototype.observeAt=olympe.dc.na.prototype.
|
|
536
|
-
l.pd.K=new olympe.C.J(()=>String,[]);l.nl.K=new olympe.C.J(()=>Array,[]);l.uf.K=new olympe.C.J(()=>String,[]);l.Ri.K=new olympe.C.J(()=>{},[]);l.Cs.K=olympe.C.J.P;l.Bs.K=olympe.C.J.D;l.get.K=new olympe.C.J(()=>olympe.dc.Sync,[],'valueType');l.Lh.K=new olympe.C.J(()=>Array,[]);l.Hg.K=olympe.C.J.D;l.has.K=olympe.C.J.P;l.cg.K=olympe.C.J.D;l.
|
|
537
|
-
l.qd.K=new olympe.C.J(()=>olympe.dc.Sync,[],'valueType');l.lf.K=new olympe.C.J(()=>String,[]);l.Cc.K=olympe.C.J.G;l.Yf.K=olympe.C.J.D;l.forEach.K=new olympe.C.J(()=>{},[]);l.od.K=olympe.C.J.D;l.Di.K=new olympe.C.J(()=>{},[]);l.transform.K=new olympe.C.J(()=>olympe.dc.na,[]);l.Bk.K=new olympe.C.J(()=>olympe.dc.na,[]);l.filter.K=new olympe.C.J(()=>olympe.dc.na,[]);l.Uf.K=new olympe.C.J(()=>olympe.dc.wj,[]);l.toString.K=olympe.C.J.D;l.As.K=olympe.C.J.D;l.Wc.K=olympe.C.J.F;const Xe={
|
|
538
|
-
olympe.dc.wj=class{constructor(a,b){this.D=Ze(a);this.N=olympe.dc.Nh().vb();this.valueType=void 0===b?olympe.dc.Sync:b;this.V=[];this.ra=[]}
|
|
539
|
-
'one of the argument is not a Transformer '+d);const e=d.Ob();null!==e&&(this.valueType=e);this.V.push(d)}return this}Bk(a){this.V.push(new olympe.dc.V
|
|
540
|
-
olympe.dc.Sync;return this}fv(a){const b=[];let c;for(let d=0;d<a.length;d++){const e=a[d];b.push(e.R());void 0===c&&(c=e.
|
|
532
|
+
c)throw Error('ListDef.transform(): Trying to set an undefined transformer');if(c instanceof olympe.dc.xa.Property)throw Error(`ListDef.transform(): Properties cannot be used as transformer, unlike relations ${c}`);if(!c||'function'!==typeof c.getTransform)break;a.push(c)}b=new olympe.dc.na(this.F,a);b.kd(Se(b)||this.valueType||Object);return b}Bk(a){return this.transform(new olympe.dc.V.af(a))}filter(a){return this.transform(new olympe.dc.V.ad(a))}Uf(){const a=new olympe.dc.wj(this.F,null===this.valueType?
|
|
533
|
+
void 0:this.valueType);let b=this.V;b instanceof Array||(b=b?[b]:[]);a.transform(b);return a}toString(){let a=this.V;a=a?', '+(a.join?a.join(', '):a.toString()):'';return'ListDef(#'+olympe.C.Sa(this.F)+a+')'}As(){return this.cc().rg()}Wc(){return olympe.C.va([this.Cc()],a=>{let b='[';for(let c=0;c<a;c++){const d=this.qe(c).toString();b=0<c&&c<a?b+(', '+d):b+d}return olympe.C.pb(b+']')},olympe.C.Ra)}};olympe.dc.na.prototype.filter=olympe.dc.na.prototype.filter;olympe.dc.na.prototype.union=olympe.dc.na.prototype.Bk;
|
|
534
|
+
olympe.dc.na.prototype.transform=olympe.dc.na.prototype.transform;olympe.dc.na.prototype.forEachCurrentValue=olympe.dc.na.prototype.od;olympe.dc.na.prototype.forEach=olympe.dc.na.prototype.forEach;olympe.dc.na.prototype.getCurrentSize=olympe.dc.na.prototype.Yf;olympe.dc.na.prototype.observeSize=olympe.dc.na.prototype.nx;olympe.dc.na.prototype.observeFirst=olympe.dc.na.prototype.jx;olympe.dc.na.prototype.getCurrentRank=olympe.dc.na.prototype.kf;olympe.dc.na.prototype.observeRank=olympe.dc.na.prototype.mx;
|
|
535
|
+
olympe.dc.na.prototype.getCurrentAt=olympe.dc.na.prototype.qe;olympe.dc.na.prototype.observeAt=olympe.dc.na.prototype.ix;olympe.dc.na.prototype.offReady=olympe.dc.na.prototype.Ri;olympe.dc.na.prototype.onReady=olympe.dc.na.prototype.uf;olympe.dc.na.prototype.getBaseTag=olympe.dc.na.prototype.pd;olympe.dc.na.ja=[olympe.C.dd];l=olympe.dc.na.prototype;l.nc.K=olympe.C.J.D;l.gd.K=olympe.C.J.L();l.cc.K=new olympe.C.J(()=>olympe.dc.query.Subscription,[]);l.kd.K=new olympe.C.J(()=>{},[]);
|
|
536
|
+
l.pd.K=new olympe.C.J(()=>String,[]);l.nl.K=new olympe.C.J(()=>Array,[]);l.uf.K=new olympe.C.J(()=>String,[]);l.Ri.K=new olympe.C.J(()=>{},[]);l.Cs.K=olympe.C.J.P;l.Bs.K=olympe.C.J.D;l.get.K=new olympe.C.J(()=>olympe.dc.Sync,[],'valueType');l.Lh.K=new olympe.C.J(()=>Array,[]);l.Hg.K=olympe.C.J.D;l.has.K=olympe.C.J.P;l.cg.K=olympe.C.J.D;l.hf.K=new olympe.C.J(()=>olympe.dc.Sync,[],'valueType');l.qe.K=olympe.C.J.D;l.Ie.K=new olympe.C.J(()=>String,[]);l.jf.K=olympe.C.J.D;l.Id.K=olympe.C.J.G;l.kf.K=olympe.C.J.D;
|
|
537
|
+
l.qd.K=new olympe.C.J(()=>olympe.dc.Sync,[],'valueType');l.lf.K=new olympe.C.J(()=>String,[]);l.Cc.K=olympe.C.J.G;l.Yf.K=olympe.C.J.D;l.forEach.K=new olympe.C.J(()=>{},[]);l.od.K=olympe.C.J.D;l.Di.K=new olympe.C.J(()=>{},[]);l.transform.K=new olympe.C.J(()=>olympe.dc.na,[]);l.Bk.K=new olympe.C.J(()=>olympe.dc.na,[]);l.filter.K=new olympe.C.J(()=>olympe.dc.na,[]);l.Uf.K=new olympe.C.J(()=>olympe.dc.wj,[]);l.toString.K=olympe.C.J.D;l.As.K=olympe.C.J.D;l.Wc.K=olympe.C.J.F;const Xe={$x:'append',Xk:'filter_not',Zn:'filter_and',$n:'filter_or'};function Ye(a,b){a=Ze(a);a=olympe.dc.Sync.Lb(a);return(new olympe.dc.ga.dn(a,b)).G}
|
|
538
|
+
olympe.dc.wj=class{constructor(a,b){this.D=Ze(a);this.N=olympe.dc.Nh().vb();this.valueType=void 0===b?olympe.dc.Sync:b;this.V=[];this.ra=[]}Ue(){return new olympe.dc.na(this.D,this.V,this.valueType)}transform(a){for(let b=0,c=a.length,d;b<c;b++){d=a[b];if(void 0===d)throw new $e('transform','Trying to set an undefined transformer');if(d instanceof olympe.dc.xa.Property)throw new $e('transform','Properties cannot be used as transformer, unlike relations '+d);if(!d||'function'!==typeof d.getTransform)throw new $e('transform',
|
|
539
|
+
'one of the argument is not a Transformer '+d);const e=d.Ob();null!==e&&(this.valueType=e);this.V.push(d)}return this}Bk(a){this.V.push(new olympe.dc.V.af(a));return this}Xx(a){this.V.push(new olympe.dc.V.af(Ze(a)));return this}Es(a){this.valueType=a;return this}sj(a){this.V.push(a);this.valueType=a.Ob()||olympe.dc.Sync;return this}hv(a){for(const b of a)this.V.push(b),this.valueType=b.Ob()||olympe.dc.Sync;return this}gv(a,b,c){a=new olympe.dc.V.Zb(a,a.Qa(),b,c);this.V.push(a);this.valueType=a.Ob()||
|
|
540
|
+
olympe.dc.Sync;return this}fv(a){const b=[];let c;for(let d=0;d<a.length;d++){const e=a[d];b.push(e.R());void 0===c&&(c=e.Qa())}a=new olympe.dc.V.ge(b,c);this.V.push(a);this.valueType=a.Ob()||olympe.dc.Sync;return this}Va(){this.sj(olympe.dc.Sync.instancesRel);return this}Fe(a){var b=this.ra.pop();b===Xe.Xk&&(a=new olympe.dc.aa.xe(a),b=this.ra.pop());switch(b){case Xe.Zn:b=this.V.pop().D;b instanceof olympe.dc.aa.ng?(b=b.aa,b.push(a),a=new olympe.dc.aa.ng(...b)):a=new olympe.dc.aa.ng(b,a);b=this.ra.pop();
|
|
541
541
|
break;case Xe.$n:b=this.V.pop().D,b instanceof olympe.dc.aa.sg?(b=b.aa,b.push(a),a=new olympe.dc.aa.sg(...b)):a=new olympe.dc.aa.sg(b,a),b=this.ra.pop()}b===Xe.Xk&&(a=new olympe.dc.aa.xe(a),this.ra.pop());this.V.push(new olympe.dc.V.ad(a));return this}Zu(a,b,c){return this.Fe(new olympe.dc.aa.vd(Ye(a,c),new olympe.dc.ga.Qc(b)))}contains(a,b,c=!1,d){return this.Fe(new olympe.dc.aa.Nd(Ye(a,d),new olympe.dc.ga.Qc(b),c))}dg(a){if(!(a instanceof Array))throw new $e('instanceOf','Provided argument "models" must be an array.');
|
|
542
|
-
const b=[];for(let c=0;c<a.length;c++)b.push(Ze(a[c]));return this.Fe(new olympe.dc.aa.
|
|
543
|
-
a.forEach(e=>{c.push(e);d.push(e.
|
|
544
|
-
this.ra.push(Xe.Zn);return this}or(){this.V[this.V.length-1]instanceof olympe.dc.V.ad&&this.ra.push(Xe.$n);return this}
|
|
545
|
-
b));return this}sort(a,b,c){const d=new class extends olympe.dc.sb.lg{L(e,f){return a(olympe.dc.Sync.
|
|
546
|
-
function Ze(a){return'string'===typeof a||a instanceof olympe.C.
|
|
547
|
-
l.Zu.K=olympe.C.J.L();l.contains.K=olympe.C.J.L();l.dg.K=olympe.C.J.L();l.hk.K=olympe.C.J.L();l.$u.K=olympe.C.J.L();l.Li.K=olympe.C.J.L();l.Ds.K=olympe.C.J.L();l.Fs.K=olympe.C.J.L();l.
|
|
548
|
-
olympe.dc.query.pp=class{constructor(){this.uid=0;this.values=null}add(a){let b;b=olympe.C.Za(a)?'n'+a.
|
|
549
|
-
e,'] sending GraphQuery to',g),a.D.send(b));return f}function Ee(a,b){var c=olympe.dc.Na.
|
|
550
|
-
function Fe(a,b,c){var d=olympe.dc.Na.
|
|
551
|
-
function Ve(a,b){var c=olympe.dc.Na.
|
|
552
|
-
function We(a,b){var c=olympe.dc.Na.
|
|
542
|
+
const b=[];for(let c=0;c<a.length;c++)b.push(Ze(a[c]));return this.Fe(new olympe.dc.aa.Te(b))}hk(a){return this.Fe(new olympe.dc.aa.vd(new olympe.dc.ga.Ze,new olympe.dc.ga.Qc(Ze(a))))}$u(a){if(!Array.isArray(a))throw Error('ExcludeInstances should be called with an array');if(0<a.length){this.Wg().hk(a[0]);for(let b=1,c=a.length;b<c;b++)this.and().Wg().hk(a[b])}return this}Li(a,b){if(!(a instanceof Array))throw new $e('hasRelated','Provided argument "relations" must be an array.');const c=[],d=[];
|
|
543
|
+
a.forEach(e=>{c.push(e);d.push(e.Qa())});return this.Fe(new olympe.dc.aa.Se(c,d,b))}Ds(a,b,c){a=Ye(a,c);return this.Fe(new olympe.dc.aa.ce(a,new olympe.dc.ga.Qc(b)))}Fs(a,b,c){a=Ye(a,c);return this.Fe(new olympe.dc.aa.ke(a,new olympe.dc.ga.Qc(b)))}Xw(a,b,c,d){a=Ye(a,d);return this.Fe(new olympe.dc.aa.Xe(a,b,c))}filter(a){const b=new class extends olympe.dc.aa.lg{D(c,d){return a(olympe.dc.Sync.Lb(d))}};return this.Fe(b)}Wg(){this.ra.push(Xe.Xk);return this}and(){this.V[this.V.length-1]instanceof olympe.dc.V.ad&&
|
|
544
|
+
this.ra.push(Xe.Zn);return this}or(){this.V[this.V.length-1]instanceof olympe.dc.V.ad&&this.ra.push(Xe.$n);return this}Px(a,b,c){a=Ze(a);let d=null;switch(olympe.dc.Xa().Dc(a,olympe.dm.Property.typeRel)){case olympe.dm.String.O.R():d=new olympe.dc.sb.String(new olympe.dc.ga.Ud(a,c));break;case olympe.dm.Number.O.R():d=new olympe.dc.sb.Number(new olympe.dc.ga.Rd(a,c));break;case olympe.dm.DateTime.O.R():d=new olympe.dc.sb.DateTime(new olympe.dc.ga.Od(a,c))}c=d;null!==c&&this.V.push(new olympe.dc.V.yd(c,
|
|
545
|
+
b));return this}sort(a,b,c){const d=new class extends olympe.dc.sb.lg{L(e,f){return a(olympe.dc.Sync.Lb(f))}G(e,f){return b(e,f).valueOf()}};this.V.push(new olympe.dc.V.yd(d,c));return this}Vu(){this.V.push(new olympe.dc.V.$c);return this}Mw(a,b){this.V.push(new olympe.dc.V.Ed(a,b));return this}};class $e extends Error{constructor(a,b){super(`ListDefBuilder.${a}(): ${b}`)}}
|
|
546
|
+
function Ze(a){return'string'===typeof a||a instanceof olympe.C.Ra?a:'function'===typeof a?olympe.dc.Ba.hc(a):olympe.C.Za(a)?a.Sj===olympe.C.Ra?a:olympe.C.va([a],b=>olympe.C.pb(olympe.dc.Ea(b)),olympe.C.Ra):a.R()}l=olympe.dc.wj.prototype;l.Ue.K=new olympe.C.J(()=>olympe.dc.na,[]);l.transform.K=olympe.C.J.L();l.Bk.K=olympe.C.J.L();l.Xx.K=olympe.C.J.L();l.Es.K=olympe.C.J.L();l.sj.K=olympe.C.J.L();l.hv.K=olympe.C.J.L();l.gv.K=olympe.C.J.L();l.fv.K=olympe.C.J.L();l.Va.K=olympe.C.J.L();l.Fe.K=olympe.C.J.L();
|
|
547
|
+
l.Zu.K=olympe.C.J.L();l.contains.K=olympe.C.J.L();l.dg.K=olympe.C.J.L();l.hk.K=olympe.C.J.L();l.$u.K=olympe.C.J.L();l.Li.K=olympe.C.J.L();l.Ds.K=olympe.C.J.L();l.Fs.K=olympe.C.J.L();l.Xw.K=olympe.C.J.L();l.filter.K=olympe.C.J.L();l.Wg.K=olympe.C.J.L();l.and.K=olympe.C.J.L();l.or.K=olympe.C.J.L();l.Px.K=olympe.C.J.L();l.sort.K=olympe.C.J.L();l.Vu.K=olympe.C.J.L();l.Mw.K=olympe.C.J.L();olympe.dc.query.Qo=class{constructor(a){this.id=a;this.D=[];this.data=new olympe.dc.db.Gc}F(a){this.D.push(olympe.dc.Ea(a))}ba(){return this.id}};function af(a){return olympe.C.Za(a)?'Node#'+a.Ua.ba():String(a)}function bf(a,b){return olympe.C.Za(b)?'{"c":"Parameter","v":"'+a.add(b)+'"}':JSON.stringify(b)}
|
|
548
|
+
olympe.dc.query.pp=class{constructor(){this.uid=0;this.values=null}add(a){let b;b=olympe.C.Za(a)?'n'+a.Ua.ba():'p'+ ++this.uid;null===this.values&&(this.values={});this.values[b]=a;return b}get(a){return this.values[a]}clear(){const a=this.values;if(null!==a)for(let b=Object.keys(a),c=b.length,d=0;d<c;d++)delete a[b[d]]}forEach(a){const b=this.values;if(null!==b)for(let c=Object.keys(b),d=c.length,e=0;e<d;e++)a(b[c[e]],c[e])}};olympe.dc.Yb=class{ia(){}D(){}F(){}ma(){}toString(){}};function De(a,b,c){var d=olympe.dc.Na.jb;const e=b.ba();let f=cf(a.xa,e),g=olympe.dc.Na.jb;null===f&&(f=Ce(b,a.G),a.L||(g=Je(f)));df(a.xa,f,d,g);c&&pe(a.F,e,c);b=olympe.dc.la.oa.$h;const h=olympe.dc.la.oa.Zh,k=m=>{null!==m&&(a.N.error(`graph subscription "${e}" failed to subscribe ${m}`),ef(a.xa,e,d),qe(a.F,e),c(m,null))};g===olympe.dc.Na.jb?(a.N.debug('QueryManager: [ID:',e,'] GraphQuery processed locally'),a.P.D(d,f,k)):(b=Ac(new olympe.dc.la(f.Og.L===olympe.dc.Pd.Cj?h:b,f,[g]),k),a.N.debug('QueryManager: [ID:',
|
|
549
|
+
e,'] sending GraphQuery to',g),a.D.send(b));return f}function Ee(a,b){var c=olympe.dc.Na.jb;const d=olympe.dc.Na.jb;if(c===d){const e=cf(a.xa,b).Og.L,f=ff(a.xa,b);ef(a.xa,b,c)&&f!==d&&e===olympe.dc.Pd.xg&&(c=Ac(new olympe.dc.la(olympe.dc.la.oa.bl,String(b),[f]),g=>{g&&a.N.error(`Unsubscription of graphdef ${b} failed: ${g.message}`)}),a.D.send(c))}else ef(a.xa,b,c)}
|
|
550
|
+
function Fe(a,b,c){var d=olympe.dc.Na.jb;b=Ce(b,a.G);const e=b.ba();var f=a.F.D.has(e);c&&pe(a.F,e,c);if(!f){f=h=>{h&&(qe(a.F,e),c(h,null))};var g=Je(b);g===olympe.dc.Na.jb?a.P.D(d,b,f):(d=Ac(new olympe.dc.la(olympe.dc.la.oa.Zh,b,[g]),f),a.D.send(d))}}
|
|
551
|
+
function Ve(a,b){var c=olympe.dc.Na.jb;const d=b.pd();var e=new olympe.dc.query.pp;let f;f=d;olympe.C.Za(f)&&(f=e.add(d));b=(b=b.nl())?Array.isArray(b)?b:[b]:null;const g=olympe.dc.query.Subscription.G(f,b,e);e=gf(a.xa,g);null===e&&(a.N.debug('QueryMGR: new',a.L?'local':'remote','subscription "',g,'": #',`${f},`,b),e=new olympe.dc.query.Subscription(g,d,b,a.G),a.L||e.Kb());a.pa.D(c,e,h=>{h&&(hf(a.xa,g,c||olympe.dc.Na.jb),a.N.error(`subscription "${g}" failed to subscribe ${h}`))});return e}
|
|
552
|
+
function We(a,b){var c=olympe.dc.Na.jb;if(c===olympe.dc.Na.jb){const d=ff(a.xa,b);a.N.debug('QueryMGR: [ID:',b,'] - Unregistered');hf(a.xa,b,c)&&d!==olympe.dc.Na.jb&&(c=Ac(new olympe.dc.la(olympe.dc.la.oa.Pl,String(b),[d]),e=>{e&&a.N.error(`Unsubscription of listdef ${b} failed, ${e.message}`)}),a.D.send(c))}else hf(a.xa,b,c)}
|
|
553
553
|
function jf(a){const b=olympe.dc.la.oa.ko,c=olympe.dc.la.oa.Rk,d=olympe.dc.la.oa.Jo;a.D.D(olympe.dc.la.oa.cl,(e,f)=>{kf(a,f,e)});a.D.D(b,(e,f)=>{lf(a,f,e)});a.D.D(c,(e,f)=>{olympe.dc.Tc().wf(f,e)});a.D.D(d,(e,f)=>{mf(a,f,e)});a.D.P((e,f)=>{nf(a,f,e)})}function of(a,b){a.N.log('Received subscribeToAll command');b=b?olympe.C.Ia().rb(b):void 0;const c=new olympe.dc.la(olympe.dc.la.oa.pg,null,[olympe.dc.Na.ld]);b&&Ac(c,b);a.D.send(c)}
|
|
554
|
-
function kf(a,b,c=olympe.dc.Na.
|
|
555
|
-
function lf(a,b,c=olympe.dc.Na.
|
|
556
|
-
function mf(a,b,c=olympe.dc.Na.
|
|
554
|
+
function kf(a,b,c=olympe.dc.Na.jb){b.F!==olympe.dc.Na.jb?a.N.error(`Graphdefs registered from peers is not supported yet ! (id: ${b.ba()})`):a.ea.D(c,b,d=>{d&&a.N.error(`An error occurred during the process of a graphdef result ${b.ba()}: ${d.message}`)})}
|
|
555
|
+
function lf(a,b,c=olympe.dc.Na.jb){const d=pf(a.xa,b.ba());0!==d.length&&(1<d.length||d[0]!==olympe.dc.Na.jb?a.N.error(`Notification received for graphdefs subscription registered from peers. Not supported yet ! (id: ${b.ba()})`):a.W.D(c,b,e=>{e&&a.N.error(`An error occurred during the process of a graphNotification ${b.ba()}`)}))}
|
|
556
|
+
function mf(a,b,c=olympe.dc.Na.jb){const d=qf(a.xa,b.ba());1<d.length||d[0]!==olympe.dc.Na.jb?a.N.error(`Listdefs registered from peers is not supported yet ! (id: ${b.ba()})`):a.ka.D(c,b,e=>{e&&a.N.error(`An error occurred during the process of a listNotification ${b.ba()}`)})}
|
|
557
557
|
function nf(a,b,c){a.N.debug('Source event',b,'received for source',c);if(b===olympe.dc.ni.gp){const d=(e,f)=>{f&&a.N.error(`Error after trying to resubscribe to ${e}: ${f}`)};rf(a.xa,c).forEach(e=>{pe(a.F,e.ba(),d.bind(a,e.ba()));a.N.debug(`resubscribing graph subscription ${e.ba()} to destination : ${c}`);e=Ac(new olympe.dc.la(olympe.dc.la.oa.$h,e,[c]),d.bind(a,e.ba()));a.D.send(e)});sf(a.xa,c).forEach(e=>{a.N.debug(`resubscribing list subscription ${e.ba()} to destination : ${c}`);e=Ac(new olympe.dc.la(olympe.dc.la.oa.Ip,
|
|
558
|
-
e,[c]),d.bind(a,e.ba()));a.D.send(e)})}}olympe.dc.query.zt=class{constructor(a,b,c,d,e,f){this.N=a;this.L=b;this.D=c;this.xa=d;this.F=e;this.G=new olympe.C.ec('Query Manager context');this.pa=f[0];this.P=f[1];this.ea=f[2];this.W=f[3];this.ka=f[4];jf(this)}vb(){return this.N}};olympe.dc.query.Relation=class extends olympe.dc.xa.Relation{constructor(a,b,c){super(a,b);this.recursive=c}toJSON(){let a='{ "tag": '+JSON.stringify(this.R())+', ';a+='"direction": '+JSON.stringify(this.
|
|
559
|
-
olympe.dc.Ja.DESTINATION,b=olympe.dc.Ja.ORIGIN;return new olympe.dc.query.Relation(this.tag,this.direction===a?b:a,this.recursive)}toString(){return`${this.direction}${this.tag}${this.recursive?'-r':''}`}};olympe.dc.query.Subscription=class a extends olympe.C.bj{constructor(b,c,d,e){super(olympe.dc.Sync,new olympe.C.ec('context subscription '+b,e));this.id=b;this.
|
|
560
|
-
olympe.dc.Xa(),c=olympe.C.
|
|
561
|
-
M(this.G);return b&&b.valueOf()>=olympe.dc.query.Subscription.D.sp}uf(b,c){this.W()?b(this):(null===this.ka&&(this.ka=new Map),void 0===c&&(c=olympe.$.Sb()),this.ka.set(c,olympe.C.Ia().rb(b)));return c||''}Ri(b){null!==this.ka&&b&&this.ka.delete(b)}zd(){const b=olympe.dc.query.Subscription.D.sp;if(!this.G.
|
|
562
|
-
0,d=b.length;c<d;c++)this.Vl(b[c],c);if(this.W())this.
|
|
563
|
-
d)){b=!1;break}b&&this.zd()}}Vd(b){this.G.
|
|
564
|
-
else if(g instanceof olympe.dc.V
|
|
558
|
+
e,[c]),d.bind(a,e.ba()));a.D.send(e)})}}olympe.dc.query.zt=class{constructor(a,b,c,d,e,f){this.N=a;this.L=b;this.D=c;this.xa=d;this.F=e;this.G=new olympe.C.ec('Query Manager context');this.pa=f[0];this.P=f[1];this.ea=f[2];this.W=f[3];this.ka=f[4];jf(this)}vb(){return this.N}};olympe.dc.query.Relation=class extends olympe.dc.xa.Relation{constructor(a,b,c){super(a,b);this.recursive=c}toJSON(){let a='{ "tag": '+JSON.stringify(this.R())+', ';a+='"direction": '+JSON.stringify(this.Qa())+', ';a+='"recursive": '+JSON.stringify(this.recursive);return a+'}'}static ac(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return new olympe.dc.query.Relation(b.tag,b.direction,b.recursive)}static from(a){return new olympe.dc.query.Relation(a.R(),a.Qa(),a instanceof olympe.dc.V.Zb)}Cd(){const a=
|
|
559
|
+
olympe.dc.Ja.DESTINATION,b=olympe.dc.Ja.ORIGIN;return new olympe.dc.query.Relation(this.tag,this.direction===a?b:a,this.recursive)}toString(){return`${this.direction}${this.tag}${this.recursive?'-r':''}`}};olympe.dc.query.Subscription=class a extends olympe.C.bj{constructor(b,c,d,e){super(olympe.dc.Sync,new olympe.C.ec('context subscription '+b,e));this.id=b;this.gf=c;this.V=d||null;this.G=this.P.run(()=>olympe.C.Kd(olympe.dc.query.Subscription.D.INIT));this.pe=!1;this.ka=this.oe=null}static G(b,c,d){let e;try{e=b;if(c)for(let f=0,g=c.length;f<g;f++)e+='|'+c[f].ma(d);else e+='|null';e=olympe.$.Ec(e)}catch(f){e=olympe.$.Sb()}return e}ba(){return this.id}pd(){return this.gf}nf(){return this.V}Kb(){const b=
|
|
560
|
+
olympe.dc.Xa(),c=olympe.C.Sa(this.pd());return c?b.jk(c)?b.source(c)||olympe.dc.Na.ld:olympe.dc.Na.jb:olympe.dc.Na.ld}Rg(){const b=M(this.G);return b&&b.valueOf()>=olympe.dc.query.Subscription.D.Hp}Sg(){if(this.G.Ua.Bb())throw Error(`Cannot set destroyed subscription '${this.id}' as subscribed`);const b=this.oe;this.oe=null;for(let c in b)if(Object.prototype.hasOwnProperty.call(b,c))b[c](this);nb(this.G,olympe.C.Kd(olympe.dc.query.Subscription.D.Hp))}Dg(){return olympe.C.va([this.G],()=>{},olympe.C.fa)}W(){const b=
|
|
561
|
+
M(this.G);return b&&b.valueOf()>=olympe.dc.query.Subscription.D.sp}uf(b,c){this.W()?b(this):(null===this.ka&&(this.ka=new Map),void 0===c&&(c=olympe.$.Sb()),this.ka.set(c,olympe.C.Ia().rb(b)));return c||''}Ri(b){null!==this.ka&&b&&this.ka.delete(b)}zd(){const b=olympe.dc.query.Subscription.D.sp;if(!this.G.Ua.Bb()&&olympe.C.Sa(this.G)!==b&&(this.cf(),nb(this.G,b),null!==this.ka)){for(const c of this.ka.values())c(this);this.ka=null}}onDestroy(b){this.P.onDestroy(b)}release(){this.P.destroy()}qb(b){if(!this.G.Ua.Bb()){for(let c=
|
|
562
|
+
0,d=b.length;c<d;c++)this.Vl(b[c],c);if(this.W())this.cf();else{this.pe=b=!0;for(let c in this.F)if(Object.prototype.hasOwnProperty.call(this.F,c)&&!Object.prototype.hasOwnProperty.call(this.values,c)){b=!1;break}b&&this.zd()}}}Gd(b){const c=this.F;for(let d in c)Object.prototype.hasOwnProperty.call(c,d)&&b(c[d],d)}ed(b,c){if(!this.G.Ua.Bb()&&(this.Uj(b,olympe.dc.Sync.Lb(c)),b=this.W(),this.pe&&!b)){b=!0;for(let d in this.F)if(Object.prototype.hasOwnProperty.call(this.F,d)&&!Object.prototype.hasOwnProperty.call(this.values,
|
|
563
|
+
d)){b=!1;break}b&&this.zd()}}Vd(b){this.G.Ua.Bb()||(this.Ul(b),this.ui(b,!this.W()))}rg(){return this.W()?super.rg():'Subscription is not ready!'}Pg(){const b=olympe.C.Sa(this.pd());return olympe.dc.query.Subscription.F(b,this.nf())}static F(b,c){var d=new olympe.dc.Ef(b,olympe.dc.Pd.xg);if(null===c)return[d];b=[];b.push(d);for(let e=0,f=c.length;e<f;e++){const g=c[e];if(g instanceof olympe.dc.V.Fb||g instanceof olympe.dc.V.Zb)b.forEach(h=>{const k=olympe.dc.query.Relation.from(g);ue(h,k,k.recursive)});
|
|
564
|
+
else if(g instanceof olympe.dc.V.af)d=a.F(olympe.C.Sa(g.pd()),g.nf()),b.push(...d);else if(g instanceof olympe.dc.V.ad||g instanceof olympe.dc.V.yd){const h=g.G();b.forEach(k=>{for(const m of h){for(const n of m)ue(k,n,n.recursive);we(k,m.length)}})}}return b}};olympe.dc.query.Subscription.D={INIT:0,Hp:1,sp:2};olympe.dc.query.Subscription.prototype.rg.K=olympe.C.J.D;function gf(a,b){return a.F.has(b)?a.F.get(b).F():null}function hf(a,b,c){return tf(a,a.F,b,c)}function ff(a,b){for(const [c,d]of a.G)if(d.has(b))return c;return null}function cf(a,b){return a.D.has(b)?a.D.get(b).F():null}function df(a,b,c,d){const e=b.ba();let f=a.D.get(e);void 0===f&&(f=new olympe.dc.query.xa.gs(b,a.L,a),a.D.set(e,f));f.L(c);uf(a,e,d)}function ef(a,b,c){return tf(a,a.D,b,c)}function pf(a,b){return(a=a.D.get(b))?Array.from(a.D.keys()):[]}
|
|
565
565
|
function qf(a,b){return(a=a.F.get(b))?Array.from(a.D.keys()):[]}function rf(a,b){const c=new Set;(a.G.get(b)||new Set).forEach(d=>{(d=a.D.get(d))&&c.add(d.F())});return c}function sf(a,b){const c=new Set;(a.G.get(b)||new Set).forEach(d=>{(d=a.F.get(d))&&c.add(d.F())});return c}function vf(a,b,c){a=a.F.get(b);if(void 0===a)throw Error(`Check if the subscription ${b} has been processed, but it has never been registered`);b=a.G.get(c);a.G.set(c,!0);return b||!1}
|
|
566
|
-
function uf(a,b,c){let d=a.G.get(c);d?d.add(b):(d=(new Set).add(b),a.G.set(c,d))}function wf(a,b,c){var d=olympe.dc.Na.
|
|
566
|
+
function uf(a,b,c){let d=a.G.get(c);d?d.add(b):(d=(new Set).add(b),a.G.set(c,d))}function wf(a,b,c){var d=olympe.dc.Na.jb;const e=b.ba();let f=a.F.get(e);void 0===f&&(f=new olympe.dc.query.xa.ct(b,a.L),a.F.set(e,f));f.L(c);uf(a,e,d)}function tf(a,b,c,d){if(!b.has(c))return!1;const e=b.get(c);var f=e.D.get(d)-1;0===f?(e.D.delete(d),e.G.delete(d),f=0===e.D.size):(e.D.set(d,f),f=!1);return f?((d=ff(a,c))&&a.G.get(d).delete(c),e.F().release(),b.delete(c),!0):0===e.D.get(d)}
|
|
567
567
|
function xf(a,b,c){const d=a.D.get(b);d?yf(d,c):a.N.error(`Try to set the subscription ${c.ba()} as covered by a graphquery that is not registered (${b}).`)}olympe.dc.query.Zt=class{constructor(a,b){this.N=a;this.D=new Map;this.F=new Map;this.G=new Map;this.L=b}};olympe.dc.Nc=class{ia(){}Ob(){}getTransform(){}ma(){}toString(){}};olympe.dc.rp=class{G(){}};olympe.dc.Ce=class{ia(){}F(){}D(){}ma(){}toString(){}};olympe.dc.query.T={Fa:'olympe.dc.query.Logger',wa:'olympe.dc.query.QueryManager'};olympe.dc.query.kc={Of:'olympe.dc.query.SubscriptionRegistry',Nk:'olympe.dc.query.CallbackRegistry',mo:'olympe.dc.query.GraphProcessor',lo:'olympe.dc.query.GraphNotificationProcessor',no:'olympe.dc.query.GraphResultProcessor',Ko:'olympe.dc.query.ListProcessor',vj:'olympe.dc.query.ListNotificationProcessor'};olympe.dc.query.Z={Jp:'subscription.debug'};
|
|
568
568
|
olympe.U.config(function(a){C(a,olympe.dc.query.Z.Jp,!1);A(a,olympe.dc.query.T.Fa,[olympe.ua.T.wa],b=>b.Ic('dc.query'));y(a,olympe.dc.query.kc.Of,olympe.dc.query.Zt,olympe.dc.query.T.Fa,new olympe.U.ha(olympe.dc.query.Z.Jp));y(a,olympe.dc.query.kc.Nk,olympe.dc.query.Lr,olympe.dc.query.T.Fa);y(a,olympe.dc.query.kc.Ko,olympe.dc.query.Pb.So,olympe.dc.query.T.Fa,olympe.dc.T.fh,olympe.dc.query.kc.Of,olympe.dc.transaction.T.wa,new olympe.U.ha(olympe.dc.Z.yg));y(a,olympe.dc.query.kc.mo,olympe.dc.query.Pb.ro,
|
|
569
569
|
olympe.dc.query.T.Fa,olympe.dc.query.kc.Of,new olympe.U.ha(olympe.dc.Z.yg));y(a,olympe.dc.query.kc.no,olympe.dc.query.Pb.so,olympe.dc.query.T.Fa,olympe.dc.query.kc.Of,olympe.dc.query.kc.Nk);y(a,olympe.dc.query.kc.lo,olympe.dc.query.Pb.qo,olympe.dc.query.T.Fa,olympe.dc.query.kc.Of);y(a,olympe.dc.query.kc.vj,olympe.dc.query.Pb.Ro,olympe.dc.query.T.Fa,olympe.dc.T.fh,olympe.dc.query.kc.Of);A(a,olympe.dc.query.T.wa,[olympe.dc.query.T.Fa,new olympe.U.ha(olympe.dc.Z.yg),olympe.dc.T.ze,olympe.dc.query.kc.Of,
|
|
570
570
|
olympe.dc.query.kc.Nk,olympe.dc.query.kc.Ko,olympe.dc.query.kc.mo,olympe.dc.query.kc.no,olympe.dc.query.kc.lo,olympe.dc.query.kc.vj],(b,c,d,e,f,g,h,k,m,n)=>new olympe.dc.query.zt(b,c,d,e,f,[g,h,k,m,n]))});olympe.U.run([olympe.dc.query.kc.Of],a=>{olympe.Ii().subscriptions=a});olympe.dc.query.xa={};function zf(){const a=Error.stackTraceLimit;Error.stackTraceLimit=16;let b=Error().stack||'';b=b.split('\n').map(d=>d.trim());var c='Error'===b[0]?2:1;b=b.slice(c,Error.stackTraceLimit+c).reverse();c=[];for(const d of b)if(c.push(' '+d),d.includes('at ListDef.')||d.includes('at GraphDef.'))break;Error.stackTraceLimit=a;3<c.length&&(c=c.slice(c.length-3));return c.join('\n')||b.join('\n')}
|
|
571
|
-
olympe.dc.query.xa.Rp=class{constructor(a,b){this.D=new Map;this.G=new Map;this.P=a;this.ea=b}F(){}L(a){var b=this.D.get(a);this.D.set(a,void 0!==b?b+1:1);b=this.G.get(a);this.G.set(a,void 0!==b?b:!1)}};function yf(a,b){const c=b.ba();a.W.set(c,b);olympe.C.Ia().onDestroy(()=>{a.W.delete(c)})}olympe.dc.query.xa.gs=class extends olympe.dc.query.xa.Rp{constructor(a,b,c){super(a,b);this.xa=c;this.W=new Map;b&&zf()}F(){return this.P}};olympe.dc.query.xa.ct=class extends olympe.dc.query.xa.Rp{constructor(a,b){super(a,b);this.W=new Map}F(){return this.P}L(a){super.L(a);if(this.ea){const b='md_'+olympe.$.Sb();this.W.set(b,zf());olympe.C.Ia().onDestroy(()=>{this.W.delete(b)})}}};olympe.dc.query.Pb={};olympe.dc.query.Pb.qo=class{constructor(a,b){this.N=a;this.xa=b}D(a,b,c){const d=b.ba();this.xa.D.has(d)?(cf(this.xa,d).ka(b),olympe.dc.Tc().wf(b.data,a),c(null,b)):c(Error(`Received a notification for the graphdef ${d} which does not exist.`),b)}};olympe.dc.query.Pb.qo.ja=[olympe.dc.
|
|
572
|
-
olympe.dc.query.Pb.so.ja=[olympe.dc.
|
|
571
|
+
olympe.dc.query.xa.Rp=class{constructor(a,b){this.D=new Map;this.G=new Map;this.P=a;this.ea=b}F(){}L(a){var b=this.D.get(a);this.D.set(a,void 0!==b?b+1:1);b=this.G.get(a);this.G.set(a,void 0!==b?b:!1)}};function yf(a,b){const c=b.ba();a.W.set(c,b);olympe.C.Ia().onDestroy(()=>{a.W.delete(c)})}olympe.dc.query.xa.gs=class extends olympe.dc.query.xa.Rp{constructor(a,b,c){super(a,b);this.xa=c;this.W=new Map;b&&zf()}F(){return this.P}};olympe.dc.query.xa.ct=class extends olympe.dc.query.xa.Rp{constructor(a,b){super(a,b);this.W=new Map}F(){return this.P}L(a){super.L(a);if(this.ea){const b='md_'+olympe.$.Sb();this.W.set(b,zf());olympe.C.Ia().onDestroy(()=>{this.W.delete(b)})}}};olympe.dc.query.Pb={};olympe.dc.query.Pb.qo=class{constructor(a,b){this.N=a;this.xa=b}D(a,b,c){const d=b.ba();this.xa.D.has(d)?(cf(this.xa,d).ka(b),olympe.dc.Tc().wf(b.data,a),c(null,b)):c(Error(`Received a notification for the graphdef ${d} which does not exist.`),b)}};olympe.dc.query.Pb.qo.ja=[olympe.dc.We];olympe.dc.query.Pb.ro=class{constructor(a,b,c){this.N=a;this.xa=b;this.F=c}D(a,b,c){var d=b.ba();if(a===olympe.dc.Na.jb||this.xa.D.has(d)){if(c(null,b),a=cf(this.xa,d),this.F||a&&a.G)a=olympe.dc.Na.jb,d=new olympe.dc.query.bi(d,a,a,new olympe.dc.db.Gc),kf(olympe.dc.Nh(),d)}else c(Error('The local Graph Engine is not implemented yet. It should handle Graphdefs addressed to instances owned by this local OVM'),b)}};olympe.dc.query.Pb.ro.ja=[olympe.dc.We];olympe.dc.query.Pb.so=class{constructor(a,b,c){this.N=a;this.F=b;this.G=c}D(a,b,c){const d=b.ba();if(this.F.D.has(d)){const f=cf(this.F,d);if(b instanceof olympe.dc.query.Bi.pj)ef(this.F,d,a);else if(!f.G){f.ea(b);const g=olympe.dc.Tc();Rc(g,f.P());g.wf(b.pc,b.F);f.onDestroy(()=>{Rc(g,void 0,f.P())});Le(f)}}let e;b instanceof olympe.dc.query.Bi.pj&&(e=`graph subscription "${d}" failed to create the initial result: ${b.ka()}`,this.N.error(e));re(this.G,b.ba(),b);c(e?Error(e):null,b)}};
|
|
572
|
+
olympe.dc.query.Pb.so.ja=[olympe.dc.We];const Af=[],Bf=new Map;function Cf(a,b,c,d){xc(a.db,d,e=>{e?b.cg(c)?a.N.warn('Adding the same index twice (should never happen) for sub #'+b.ba()+', index #'+c+', tag #'+d):b.ed(c,d):Df(a,b,c,d)},c)}function Df(a,b,c,d){yc(a.db,d,c,!0);b.Vd(c);Af.length=0;b.Gd(function(e,f){Af[e]=f});c=a=0;for(d=Af.length;a<d;a++)'string'===typeof Af[a]&&(Af[c++]=Af[a]);Af.length=c;b.qb(Af)}
|
|
573
573
|
olympe.dc.query.Pb.Ro=class{constructor(a,b,c){this.N=a;this.db=b;this.xa=c}D(a,b,c){const d=b.ba();a=b.D;const e=gf(this.xa,d);if(null===e)c(Error(`Received list notification for undefined subscription "${d}"`),b);else{Af.length=a.length;e.Gd((f,g)=>{if(f=e.Hg(g)){f=f.R();var h=Bf.get(f);void 0===h?Bf.set(f,g):'string'===typeof h?Bf.set(f,[h,g]):h.push(g)}else this.N.warn('Subscription #'+d+' has a rank for index #'+g+' but no instance. This is caused by receiving a new list notification before receiving all instances of the previous list notification.')});
|
|
574
|
-
for(let f=0,g=a.length;f<g;f++){const h=a[f];let k=Bf.get(h);void 0===k?(k=olympe.$.Sb(),Cf(this,e,k,h)):'string'===typeof k?Bf.delete(h):(k=k.pop(),0===k.length&&Bf.delete(h));Af[f]=k}for(const [f,g]of Bf){if('string'===typeof g)Df(this,e,g,f);else for(let h=0,k=g.length;h<k;h++)Df(this,e,g[h],f);Bf.delete(f)}e.qb(Af);c(null,b)}}};olympe.dc.query.Pb.Ro.ja=[olympe.dc.
|
|
575
|
-
[]).filter(h);for(const m of k)g.push(m.pd()),k.push(...(m.nf()||[]).filter(h));ne(a.G,()=>{olympe.C.tc(g,()=>{Gf(a,c,(m,n)=>{m?Ff(a,c):a.N.error(n)})})})})}b===olympe.dc.Na.
|
|
574
|
+
for(let f=0,g=a.length;f<g;f++){const h=a[f];let k=Bf.get(h);void 0===k?(k=olympe.$.Sb(),Cf(this,e,k,h)):'string'===typeof k?Bf.delete(h):(k=k.pop(),0===k.length&&Bf.delete(h));Af[f]=k}for(const [f,g]of Bf){if('string'===typeof g)Df(this,e,g,f);else for(let h=0,k=g.length;h<k;h++)Df(this,e,g[h],f);Bf.delete(f)}e.qb(Af);c(null,b)}}};olympe.dc.query.Pb.Ro.ja=[olympe.dc.We];function Ef(a,b,c,d){const e=c.ba();a.N.debug('ListProcessor: [ID:',e,'] - processing with source ',b);wf(a.xa,c,b);if(vf(a.xa,e,olympe.dc.Na.jb))a.N.debug('ListProcessor: [ID:',e,'] - id already processed');else{a.N.debug('ListProcessor: [ID:',e,'] - NOT processed yet.');const f=c.Kb();a.F||f===olympe.dc.Na.jb?(a.N.debug('QueryMGR: [ID:',e,'] - Local subscription, no need for coverage check, booting subscription '),Ff(a,c)):c.mh().run(()=>{const g=[c.pd()],h=m=>m instanceof olympe.dc.V.af,k=(c.nf()||
|
|
575
|
+
[]).filter(h);for(const m of k)g.push(m.pd()),k.push(...(m.nf()||[]).filter(h));ne(a.G,()=>{olympe.C.tc(g,()=>{Gf(a,c,(m,n)=>{m?Ff(a,c):a.N.error(n)})})})})}b===olympe.dc.Na.jb||vf(a.xa,e,b)||a.notify(b,c);d(null,c)}
|
|
576
576
|
function Ff(a,b){if(b.W())a.N.debug('ListProcessor: [ID:',b.ba(),'] - Subscription already booted, ignoring');else{a.N.debug('ListProcessor: [ID:',b.ba(),'] - Booting subscription');var c=new olympe.dc.jc.Qp(a.db,a.N),d=Hf(a,b,c),e=b.ba();b.mh().run(()=>{olympe.C.tc([b.pd()],f=>{const g=olympe.dc.Ea(f);a.N.debug('ListProcessor: [ID:',b.ba(),'] - Booting with baseTag',g);b.Rg()||b.Sg();xc(a.db,g,h=>d(h,g),e);olympe.C.Ia().Vc(()=>yc(a.db,g,e));a.db.Hb(g.valueOf())||If(c);b.W()||(If(c),b.qb([]))})})}}
|
|
577
|
-
function Gf(a,b,c){var d=b.
|
|
577
|
+
function Gf(a,b,c){var d=b.Kb();const e=b.ba(),f=Array.from(rf(a.xa,d));d=b.Pg();a.N.debug('ListProcessor: [ID:',e,'] - checking coverage of remote subscription over',d.length,'paths.');const g=new olympe.async.Jf(olympe.C.Ia()),h=k=>{g.add((m,n)=>{k.gd(p=>{p?n(`The subscription ${e} is not covered by an existing graphdef, `+`and the specific graphdef id ${k.ba()} has encountered an error: ${p}`):m()});xf(a.xa,k.ba(),b)})};d.forEach(k=>{const m=Ce(k);let n=!1;for(let p=0,q=f.length;p<q;p++){const r=
|
|
578
578
|
f[p];if(r.yq(m,e)){h(r.Og,!1);n=!0;break}}n?a.N.debug('ListProcessor: [ID:',b.ba(),'] - graphPath',k,' is covered'):h(k,!0)});Ab(g,c);g.start()}
|
|
579
579
|
function Hf(a,b,c){const d=new olympe.dc.jc.ej;let e=!1;const f=b.mh(),g=b.nf(),h=[];h[g?g.length:0]=f.rb((k,m,n,p)=>{f.Yd()||f.Bb()||(k?b.cg(n)?a.N.warn('Adding the same index twice (should never happen) for sub #',b.ba(),', index #',n,', tag #',m):(a.N.debug('ListProcessor: [ID:',b.ba(),'] - Adding Instance',m,'to the subscription'),b.ed(n,m)):(a.N.debug('ListProcessor: [ID:',b.ba(),'] - Removing Instance',m,'from the subscription'),b.Vd(n)),e||(Jf(c,()=>{p.Rf();If(c)}),p.nc().ig(b.qb.bind(b)),
|
|
580
580
|
e=!0),Kf(c,n))});if(null!==g){const k=olympe.dc.nc();for(let m=g.length-1;0<=m;m--)h[m]=f.rb(g[m].getTransform(k,c,h[m+1]))}return(k,m)=>{const n=b.ba();c.register(n,null);const p=d.D(k,m,n,null);if(null!==p)h[0](k,m,n,Lf(p,k,m,n))}}
|
|
581
|
-
olympe.dc.query.Pb.So=class{constructor(a,b,c,d,e){this.N=a;this.db=b;this.xa=c;this.G=d;this.F=e}D(a,b,c){Ef(this,a,b,c)}notify(a,b){const c=b.ba();this.N.debug(`Register notification of list subscription ${c} for destination ${a}`);const d=()=>{const f=new olympe.dc.query.Qo(c);b.od(g=>f.F(g));mf(olympe.dc.Nh(),f)};let e=!1;b.forEach(()=>{e&&d()});b.uf(()=>{e=!0;d()})}};olympe.dc.query.Pb.So.ja=[olympe.dc.
|
|
581
|
+
olympe.dc.query.Pb.So=class{constructor(a,b,c,d,e){this.N=a;this.db=b;this.xa=c;this.G=d;this.F=e}D(a,b,c){Ef(this,a,b,c)}notify(a,b){const c=b.ba();this.N.debug(`Register notification of list subscription ${c} for destination ${a}`);const d=()=>{const f=new olympe.dc.query.Qo(c);b.od(g=>f.F(g));mf(olympe.dc.Nh(),f)};let e=!1;b.forEach(()=>{e&&d()});b.uf(()=>{e=!0;d()})}};olympe.dc.query.Pb.So.ja=[olympe.dc.We];olympe.dc.query.Bi={};olympe.dc.query.Bi.pj=class extends olympe.dc.query.bi{constructor(a,b,c,d){super(a,b,c,new olympe.dc.db.Gc);this.error=d}ka(){return this.error}};olympe.dc.jc={};function Lf(a,b,c,d){b?a.P[d]=c:delete a.P[d];null===a.F&&(a.F=new olympe.dc.jc.jj(a.D,a));return a.F}function Mf(a,b){for(let c=0;c<b;c++)if(null!==a.F)a=a.F;else break;return a}function Nf(a,b){a=a.P;if(null!==a)for(let c in a)Object.prototype.hasOwnProperty.call(a,c)&&b.push(c)}olympe.dc.jc.jj=class{constructor(a,b){this.D=a;this.parent=b||null;this.ea=b?b.ea+1:0;this.P=Object.create(null);this.F=null}nc(){return this.D}Rf(){this.D.P()?this.D.G():this.D.ea(this.ea-1)}};olympe.dc.jc.qa=class{constructor(){}D(){}P(){}ea(){}G(){}ig(){}};olympe.dc.jc.ej=class{constructor(){this.W=this.L=this.index=this.F=null}P(){return null!==this.F}ea(a){if(null!==this.F)throw Error('Manager already activated (depth='+this.F+')');this.F=a;this.G()}D(a,b,c){b=this.L;if(a&&null!==b)throw Error('The AutoManger handles only a single item.');a?(b=new olympe.dc.jc.jj(this),this.index=c,this.L=b):this.L=this.index=null;return b}G(){if(null===this.F)throw Error('Manager not activated, need to set a depth before updating ranks');if(null!==this.W){const a=
|
|
582
582
|
[];null!==this.L&&(0<=this.F?Nf(Mf(this.L,this.F),a):a.push(this.index));this.W(a)}}ig(a){this.W=a}};olympe.dc.jc.ej.ja=[olympe.dc.jc.qa];function Of(a,b){olympe.C.sf(a.value)?(a.node=olympe.C.rk(a.value,b),Ta(a.node)||b()):b()}function Pf(a,b){if(olympe.C.sf(a.value)){const c=olympe.C.Ia(),d=a.L;olympe.C.tc([a.value],e=>{d!==e.valueOf()&&(c.run(()=>Of(a,b)),olympe.C.Ia().destroy())})}}
|
|
583
|
-
class Qf extends olympe.dc.jc.jj{constructor(a,b,c){super(a);this.index=b;this.value=c;this.L=this.
|
|
584
|
-
function Rf(a,b){if(!b.Bb()){var c=a.F;var d=a.Ga,e=b.
|
|
585
|
-
function Sf(a){const b=a.Ga;a.F.sort((c,d)=>b(c.
|
|
583
|
+
class Qf extends olympe.dc.jc.jj{constructor(a,b,c){super(a);this.index=b;this.value=c;this.L=this.Sa();this.position=this.node=null;this.W=!1;this.G=null}Sa(){const a=olympe.C.Sa(this.value);return a?a.valueOf():a}destroy(){this.node&&(this.node.destroy(),this.node=null);this.G=this.value=null}Bb(){return null===this.value}}
|
|
584
|
+
function Rf(a,b){if(!b.Bb()){var c=a.F;var d=a.Ga,e=b.Sa(),f=0;let g=c.length,h=0,k;for(null!==b.position&&--g;g>f;){h=Math.floor((f+g)/2);k=d(c[h].L,e);if(0===k||2>g-f){0>k&&null!==b.position&&b.position<=h&&(k=d(c[g].L,e));h=0>k?g:h;break}0>k?f=h:g=h}c=h;b.L=b.Sa();if(c!==b.position){d=a.F;e=d.length;f=b.position;null===f&&(f=e);if(c<f)for(e=f;e>c;e--)d[e]=d[e-1],d[e].position=e;else for(e=f;e<c;e++)d[e]=d[e+1],d[e].position=e;d[c]=b;d[c].position=c;b.W&&a.G()}}}
|
|
585
|
+
function Sf(a){const b=a.Ga;a.F.sort((c,d)=>b(c.Sa(),d.Sa()))}
|
|
586
586
|
olympe.dc.jc.Pp=class{constructor(a){this.Ga=a;this.L=null;this.F=[];this.W=[];this.ka=null;this.pa=new Map}D(a,b,c,d){b='$'+c;const e=this.F;let f;if(a)f=new Qf(this,c,d),this.pa.set(b,f),this.P()?Of(f,()=>Rf(this,f)):(f.position=e.length,e.push(f));else{f=this.pa.get(b);if(void 0===f)throw Error('Trying to remove an non-registered item: "'+c+'"');this.pa.delete(b);null!==f.position&&(this.P()?this.remove(f):delete e[f.position]);f.destroy()}return f}P(){return null!==this.L}ea(a){if(null!==this.L)throw Error('Manager already activated (depth='+
|
|
587
587
|
this.L+')');this.L=a;Sf(this);for(let b=0,c=this.F.length;b<c;b++){const d=this.F[b];d.position=b;Pf(d,()=>Rf(this,d))}this.G()}G(){if(null===this.L)throw Error('Manager not activated, need to set a depth before updating ranks');const a=this.F.length;this.W.length=0;for(let d=0;d<a;d++){let e=this.F[d];if(!e.W){var b=e,c=this.L;b.W=!0;b.G=Mf(b,c)}0>this.L?this.W.push(e.index):e.G&&Nf(e.G,this.W)}this.ka&&this.ka(this.W)}ig(a){this.ka=a}remove(a){const b=this.F,c=b.length-1;if(null!==a.position){for(a=
|
|
588
588
|
a.position;a<c;a++)b[a]=b[a+1],b[a].position=a;b.length=c}}};olympe.dc.jc.Pp.ja=[olympe.dc.jc.qa];class Tf extends olympe.dc.jc.jj{constructor(a,b,c){super(a);this.index=b;this.tag=c;this.ka=this.W=this.L=!1;this.G=null}}
|
|
@@ -591,165 +591,165 @@ olympe.dc.jc.tl=class{constructor(){this.L={};this.Ga=[];this.F=null;this.pa=!1;
|
|
|
591
591
|
Mf(f,g)}null!==e.G&&Nf(e.G,this.W)}}this.ka&&this.ka(this.W)}}ig(a){this.ka=a}D(a,b,c){let d=this.L[c];a?void 0===d?(d=new Tf(this,c,b),this.L[c]=d):(d.tag=b,d.W=!1):void 0!==d&&(d.W=!0);return d}};olympe.dc.jc.tl.ja=[olympe.dc.jc.qa];function If(a){if(!a.F){for(let b in a.G)Vf(a.G[b]);a.F=!0}a.L=null;a.P=null}function Jf(a,b,c){a.G[c||'root'].L=b}function Kf(a,b,c){a.G[c||'root'].Rf(b)}function Wf(a,b,c,d){const e=a.P,f=b+d+c;let g=e[f];void 0===g&&(g=Fd(a.db,b,c,d),e[f]=g);return g}function Xf(a,b){a.F||a.D.Rf(b)}function Yf(a,b,c,d,e){if(!a.F){let f=Wf(a,c,d,e||olympe.dc.Ja.DESTINATION);e||(f+=Wf(a,c,d,olympe.dc.Ja.ORIGIN));0===f&&Xf(a,b)}}
|
|
592
592
|
function Zf(a,b){const c=a.G[b];void 0!==c?(a.N&&a.N.debug('Set current block to',b,null!==c.parent?'parent = '+c.parent.ba():''),a.D=c):a.N&&a.N.error('Try to set a block that does not exists:',b)}function $f(a){const b=String(++a.W),c=a.D;a.G[b]=new ag(b,c);bg(c,b);c.F||(c.F=()=>Zf(a,c.ba()));return b}function cg(a,b){const c=a.D;a.D.F=()=>{Zf(a,c.ba());b()}}function dg(a,b){Vf(b?a.G[b]:a.D)}
|
|
593
593
|
olympe.dc.jc.Qp=class{constructor(a,b){this.db=a;this.N=b||null;this.L=Object.create(null);this.P=Object.create(null);this.F=!1;this.W=0;this.D=new ag('root');this.G=Object.create(null);this.G.root=this.D}register(a,b,c,d,e){this.F||(null!==b&&c&&d&&e?(c=Wf(this,c,d,e),d=this.L[b]||0,this.L[b]=++d,this.D.D===b&&c<=d&&(this.D.D=a)):this.D.D=a)}};function bg(a,b){null===a.children&&(a.children=Object.create(null));a.children[b]=!1}function Vf(a){a.G=!0;null!==a.parent&&a.parent.notify(a.id)}
|
|
594
|
-
class ag{constructor(a,b){this.id=a;this.parent=b||null;this.D=this.L=this.F=this.children=null;this.G=!1}ba(){return this.id}Rf(a){const b=this.L;if(this.G||this.D===a||null===a)b&&b(),!b&&Vf(this)}notify(a){const b=this.F,c=this.children;if(this.G)b&&b();else if(!c[a]){a=c[a]=!0;for(let d in c)if(!c[d]){a=!1;break}a&&b&&b()}}};olympe.dc.ga={};olympe.dc.ga.
|
|
594
|
+
class ag{constructor(a,b){this.id=a;this.parent=b||null;this.D=this.L=this.F=this.children=null;this.G=!1}ba(){return this.id}Rf(a){const b=this.L;if(this.G||this.D===a||null===a)b&&b(),!b&&Vf(this)}notify(a){const b=this.F,c=this.children;if(this.G)b&&b();else if(!c[a]){a=c[a]=!0;for(let d in c)if(!c[d]){a=!1;break}a&&b&&b()}}};olympe.dc.ga={};olympe.dc.ga.Ze=class{ia(){return P(olympe.dc.ga.Ze)}D(){return[]}F(a,b){return b}ma(){return'{"c":"'+this.ia()+'","a":[]}'}toString(){return'Tag()'}};O('olympe.dc.valuedefs.Tag',olympe.dc.ga.Ze);olympe.dc.ga.Ze.ja=[olympe.dc.Ce];olympe.dc.ga.Qc=class{constructor(a){this.value=a}ia(){return P(olympe.dc.ga.Qc)}D(){return[]}F(){return this.value}ma(a){a=bf(a,this.value);return`{"c":"${this.ia()}","a":[${a}]}`}toString(){return`Constant(${af(this.value)})`}};O('olympe.dc.valuedefs.Constant',olympe.dc.ga.Qc);olympe.dc.ga.Qc.ja=[olympe.dc.Ce];function eg(a,b,c,d){const e=olympe.dc.Xa(),f=new olympe.dc.jc.ej,g=new olympe.dc.jc.Qp(e);let h=!1;const k=Object.create(null),m=r=>{if(0<r.length)for(const t in k)r[0]===t&&d(k[t])};let n=(r,t,w,u)=>{const x=olympe.C.Ia();x.Yd()||x.Bb()||(h||(Jf(g,()=>{u.Rf();If(g)}),u.nc().ig(m),h=!0),r?k[w]=t:delete k[w],Kf(g,w))};const p=olympe.C.Ia();if(null!==c)for(let r=c.length-1;0<=r;r--)n=c[r].getTransform(a,g,p.rb(n));n=p.rb(n);const q=olympe.$.Sb();xc(e,b,(r,t)=>{g.register(q,null);const w=f.D(r,b,q,
|
|
595
595
|
null);n(r,t,q,Lf(w,r,b,q))},q);p.onDestroy(()=>{yc(e,b,q)});e.Hb(b)||If(g)}function fg(a,b,c){const d=c.node,e=olympe.dc.Xa(),f=a.L(),g=yd(e,b,a.P,d.rb(h=>{null!==h&&(h=f(h));null===h?c.clear():c.update(h)}));d.onDestroy(()=>e.L(b,a.P,g))}
|
|
596
|
-
olympe.dc.ga.Fc=class{constructor(a,b,c){this.P=a&&a.R?a.R():a;this.V=b&&b.filter(d=>d instanceof olympe.dc.V.Fb||d instanceof olympe.dc.V.Zb)||null;this.G=c||null;this.defaultValue=null}ia(){}Ob(){}L(){}D(){return(this.V||[]).reduce((a,b)=>a.concat(olympe.dc.query.Relation.from(b)),[])}
|
|
597
|
-
null!==this.V?eg(a,b,this.V,d=>{fg(this,d,c)}):fg(this,b,c);return c.ub()}ma(a){const b=bf(a,this.P),c=bf(a,this.G);let d='null';this.V&&(d=this.V.map(function(e){return e.ma(a)}).join(','));return`{"c":"${this.ia()}","a":["${b}",${d},${c}]}`}toString(){const a=af(this.P),b=this.G?','+af(this.G):'';let c='';this.V&&(c=','+this.V.join(','));return this.ia().replace(/^.+\./,'')+'('+a+c+b+')'}};olympe.dc.ga.Fc.ja=[olympe.dc.Ce];olympe.dc.ga.Rd=class extends olympe.dc.ga.Fc{constructor(a,b,c){super(a,b,c)}ia(){return P(olympe.dc.ga.Rd)}L(){return olympe.dc.$.
|
|
598
|
-
{d.forEach(h=>{f&&g.R()===h.R()&&K(e,e.Kc.valueOf()|M(h.ag()).valueOf())})});return olympe.C.te([this.
|
|
599
|
-
break;case olympe.dm.Boolean.O.R():d=new olympe.dc.ga.$d(c,b);break;case olympe.dm.DateTime.O.R():d=new olympe.dc.ga.Od(c,b)}this.G=d}ia(){return this.G.ia()}D(){return this.G.D()}F(a,b){return this.G.F(a,b)}ma(a){return this.G.ma(a)}toString(){return this.G.toString()}};olympe.dc.ga.dn.ja=[olympe.dc.Ce];olympe.dc.sb={};olympe.dc.sb.Number=class{constructor(a){this.D=a}ia(){return P(olympe.dc.sb.Number)}P(){return this.D.D()}L(a,b){return this.D.F(a,b)}G(a,b){return a!==b?a>b?1:-1:0}ma(a){return`{"c":"${this.ia()}",a:[${this.D.ma(a)}]}`}toString(){return`Number(${this.D.toString()})`}};O('olympe.dc.comparators.Number',olympe.dc.sb.Number);olympe.dc.sb.Number.ja=[olympe.dc.ve];olympe.dc.sb.String=class{constructor(a){this.D=a}ia(){return P(olympe.dc.sb.String)}P(){return this.D.D()}L(a,b){return olympe.C.va([this.D.F(a,b)],c=>c.toLowerCase(),olympe.C.
|
|
596
|
+
olympe.dc.ga.Fc=class{constructor(a,b,c){this.P=a&&a.R?a.R():a;this.V=b&&b.filter(d=>d instanceof olympe.dc.V.Fb||d instanceof olympe.dc.V.Zb)||null;this.G=c||null;this.defaultValue=null}ia(){}Ob(){}L(){}D(){return(this.V||[]).reduce((a,b)=>a.concat(olympe.dc.query.Relation.from(b)),[])}Le(a){this.defaultValue=a;return this}nf(){return this.V}pd(){return this.G}F(a,b){const c=olympe.C.Jc(this.Ob()||Object,'AbstractProperty valueType');null!==this.defaultValue&&ob(c,this.defaultValue);b=this.G||b;
|
|
597
|
+
null!==this.V?eg(a,b,this.V,d=>{fg(this,d,c)}):fg(this,b,c);return c.ub()}ma(a){const b=bf(a,this.P),c=bf(a,this.G);let d='null';this.V&&(d=this.V.map(function(e){return e.ma(a)}).join(','));return`{"c":"${this.ia()}","a":["${b}",${d},${c}]}`}toString(){const a=af(this.P),b=this.G?','+af(this.G):'';let c='';this.V&&(c=','+this.V.join(','));return this.ia().replace(/^.+\./,'')+'('+a+c+b+')'}};olympe.dc.ga.Fc.ja=[olympe.dc.Ce];olympe.dc.ga.Rd=class extends olympe.dc.ga.Fc{constructor(a,b,c){super(a,b,c)}ia(){return P(olympe.dc.ga.Rd)}L(){return olympe.dc.$.Mb.cm}Ob(){return olympe.C.da}};O('olympe.dc.valuedefs.NumberProperty',olympe.dc.ga.Rd);olympe.dc.ga.Ud=class extends olympe.dc.ga.Fc{constructor(a,b,c){super(a,b,c)}ia(){return P(olympe.dc.ga.Ud)}L(){return olympe.dc.$.Mb.em}Ob(){return olympe.C.Ra}};O('olympe.dc.valuedefs.StringProperty',olympe.dc.ga.Ud);olympe.dc.ga.$d=class extends olympe.dc.ga.Fc{constructor(a,b,c){super(a,b,c)}ia(){return P(olympe.dc.ga.$d)}L(){return olympe.dc.$.Mb.am}Ob(){return olympe.C.fa}};O('olympe.dc.valuedefs.BooleanProperty',olympe.dc.ga.$d);olympe.dc.ga.Od=class extends olympe.dc.ga.Fc{constructor(a,b,c){super(a,b,c)}ia(){return P(olympe.dc.ga.Od)}L(){return olympe.dc.$.Mb.bm}Ob(){return olympe.C.bb}};O('olympe.dc.valuedefs.DateTimeProperty',olympe.dc.ga.Od);olympe.dc.ga.tg=class{constructor(a){this.Me=a&&a.R?a.R():a}ia(){return P(olympe.dc.ga.tg)}D(){return[]}F(a,b){a=new olympe.dc.na(b,olympe.dc.Sync.G,olympe.dm.wb);b=new olympe.dc.na(b,olympe.dc.Sync.La,olympe.dm.User);const c=a.transform(olympe.dm.wb.F);c.kd(olympe.dm.Ha);const d=new olympe.dc.na(this.Me,[olympe.dm.User.D,olympe.dm.Jb.F],olympe.dm.Ha),e=olympe.C.createNode(Number);let f=!1;c.uf(()=>{d.uf(()=>{let g=0;c.od(h=>{d.od(k=>{h.R()===k.R()&&(g|=M(k.ag()).valueOf())})});K(e,g);f=!0})});c.forEach(g=>
|
|
598
|
+
{d.forEach(h=>{f&&g.R()===h.R()&&K(e,e.Kc.valueOf()|M(h.ag()).valueOf())})});return olympe.C.te([this.Me,b.qe(0),a.Cc(),e],(g,h,k,m)=>0===k.valueOf()?h&&g===h.R()?olympe.dm.Ha.D.bo:olympe.dm.Ha.D.NONE:m)}ma(a){a=bf(a,this.Me);return'{"c":"'+this.ia()+'","a":["'+a+'"]}'}toString(){const a=af(this.Me);return this.ia().replace(/^.+\./,'')+'('+a+')'}};O('olympe.dc.valuedefs.Permission',olympe.dc.ga.tg);olympe.dc.ga.tg.ja=[olympe.dc.Ce];olympe.dc.ga.dn=class{constructor(a,b){if(olympe.C.sf(a))throw Error('Dataflows of Property not supported by AnyProperty');const c=a.R();var d=olympe.dc.Xa();const e=d.Dc(a,olympe.dm.Property.typeRel);if(!e)throw Error('Type of property '+a+'unavailable locally, cannot proceed with AnyProperty');a=d.fk(e,olympe.dc.Sync.extendRel,olympe.dm.Lf);d=null;switch(1<a.length?a[a.length-2]:e){case olympe.dm.String.O.R():d=new olympe.dc.ga.Ud(c,b);break;case olympe.dm.Number.O.R():d=new olympe.dc.ga.Rd(c,b);
|
|
599
|
+
break;case olympe.dm.Boolean.O.R():d=new olympe.dc.ga.$d(c,b);break;case olympe.dm.DateTime.O.R():d=new olympe.dc.ga.Od(c,b)}this.G=d}ia(){return this.G.ia()}D(){return this.G.D()}F(a,b){return this.G.F(a,b)}ma(a){return this.G.ma(a)}toString(){return this.G.toString()}};olympe.dc.ga.dn.ja=[olympe.dc.Ce];olympe.dc.sb={};olympe.dc.sb.Number=class{constructor(a){this.D=a}ia(){return P(olympe.dc.sb.Number)}P(){return this.D.D()}L(a,b){return this.D.F(a,b)}G(a,b){return a!==b?a>b?1:-1:0}ma(a){return`{"c":"${this.ia()}",a:[${this.D.ma(a)}]}`}toString(){return`Number(${this.D.toString()})`}};O('olympe.dc.comparators.Number',olympe.dc.sb.Number);olympe.dc.sb.Number.ja=[olympe.dc.ve];olympe.dc.sb.String=class{constructor(a){this.D=a}ia(){return P(olympe.dc.sb.String)}P(){return this.D.D()}L(a,b){return olympe.C.va([this.D.F(a,b)],c=>c.toLowerCase(),olympe.C.Ra)}G(a,b){return void 0===a?void 0===b?0:1:a!==b?a>b?1:-1:0}ma(a){return`{"c":"${this.ia()}",a:[${this.D.ma(a)}]}`}toString(){return`String(${this.D.toString()})`}};O('olympe.dc.comparators.String',olympe.dc.sb.String);olympe.dc.sb.String.ja=[olympe.dc.ve];olympe.dc.sb.DateTime=class{constructor(a){this.D=a}ia(){return P(olympe.dc.sb.DateTime)}P(){return this.D.D()}L(a,b){return this.D.F(a,b)}G(a,b){if(!a)return b?-1:0;if(!b)return 1;a=a.getTime();b=b.getTime();return a!==b?a>b?1:-1:0}ma(a){return'{"c":"'+this.ia()+'",a:['+this.D.ma(a)+']}'}toString(){return'Number('+this.D.toString()+')'}};O('olympe.dc.comparators.DateTime',olympe.dc.sb.DateTime);olympe.dc.sb.DateTime.ja=[olympe.dc.ve];let gg=0;olympe.dc.sb.lg=class{constructor(){this.id=gg++}ia(){return'CustomLocalComparator#'+gg}P(){return[]}L(){throw Error('GetComparedValue function was not implemented.');}G(){throw Error('Compare function was not implemented.');}ma(){return`{"c":"${this.ia()}"}`}toString(){return this.ia()+'()'}};olympe.dc.sb.lg.ja=[olympe.dc.ve];olympe.dc.aa={};olympe.dc.aa.xe=class{constructor(a){this.G=a}ia(){return P(olympe.dc.aa.xe)}F(){return this.G.F()}D(a,b){return olympe.C.rk(this.G.D(a,b),c=>!c.valueOf())}ma(a){return`{"c":"${this.ia()}","a":[${this.G.ma(a)}]}`}toString(){return'Not('+this.G.toString()+')'}};O('olympe.dc.predicates.Not',olympe.dc.aa.xe);olympe.dc.aa.xe.ja=[olympe.dc.Yb];olympe.dc.aa.ng=class{constructor(a){this.aa=[];for(let b=arguments.length,c=0;c<b;c++)Array.isArray(arguments[c])?this.aa=this.aa.concat(arguments[c]):this.aa.push(arguments[c])}ia(){return P(olympe.dc.aa.ng)}F(){return this.aa.reduce((a,b)=>a.concat(b.F()),[])}D(a,b){return olympe.C.te(this.aa.map(c=>c.D(a,b)),function(){for(let c=arguments.length,d=0;d<c;d++)if(!arguments[d].valueOf())return!1;return!0})}ma(a){const b=this.aa.map(c=>c.ma(a));return'{"c":"'+this.ia()+'","a":['+b.join(',')+']}'}toString(){return'And('+
|
|
600
600
|
this.aa.map(a=>a.toString()).join(',')+')'}};O('olympe.dc.predicates.And',olympe.dc.aa.ng);olympe.dc.aa.ng.ja=[olympe.dc.Yb];olympe.dc.aa.sg=class{constructor(a){this.aa=[];for(let b=arguments.length,c=0;c<b;c++)Array.isArray(arguments[c])?this.aa=this.aa.concat(arguments[c]):this.aa.push(arguments[c])}ia(){return P(olympe.dc.aa.sg)}F(){return this.aa.reduce((a,b)=>a.concat(b.F()),[])}D(a,b){return olympe.C.te(this.aa.map(c=>c.D(a,b)),function(){for(let c=arguments.length,d=0;d<c;d++)if(arguments[d].valueOf())return!0;return!1})}ma(a){const b=this.aa.map(c=>c.ma(a));return'{"c":"'+this.ia()+'","a":['+b.join(',')+']}'}toString(){return'Or('+
|
|
601
601
|
this.aa.map(a=>a.toString()).join(',')+')'}};O('olympe.dc.predicates.Or',olympe.dc.aa.sg);olympe.dc.aa.sg.ja=[olympe.dc.Yb];olympe.dc.aa.Dk=class{constructor(a,b){this.G=a;this.L=b}ia(){}F(){return[this.G.D(),this.L.D()]}D(a,b){return olympe.C.va([this.G.F(a,b),this.L.F(a,b)],(c,d)=>{c=c.valueOf();d=d.valueOf();return this.P('string'===typeof c?c:Number(c),'string'===typeof d?d:Number(d))},Boolean)}P(){}ma(a){return'{"c":"'+this.ia()+'","a":['+this.G.ma(a)+','+this.L.ma(a)+']}'}toString(){return this.ia().replace(/^.+\./,'')+'('+this.G.toString()+','+this.L.toString()+')'}};olympe.dc.aa.Dk.ja=[olympe.dc.Yb];olympe.dc.aa.vd=class{constructor(a,b){this.G=a;this.L=b}ia(){return P(olympe.dc.aa.vd)}F(){return[this.G.D(),this.L.D()]}D(a,b){return olympe.C.va([this.G.F(a,b),this.L.F(a,b)],(c,d)=>'object'===typeof c&&void 0!==c.Dd?c.Dd(d):'object'===typeof d&&void 0!==d.Dd?d.Dd(c):olympe.C.rc(c.valueOf()===d.valueOf()),olympe.C.fa,'Test equal predicate')}ma(a){return'{"c":"'+this.ia()+'","a":['+this.G.ma(a)+','+this.L.ma(a)+']}'}toString(){return'Equals('+this.G.toString()+','+this.L.toString()+')'}};
|
|
602
602
|
O('olympe.dc.predicates.Equals',olympe.dc.aa.vd);olympe.dc.aa.vd.ja=[olympe.dc.Yb];olympe.dc.aa.Ur=class extends olympe.dc.aa.vd{constructor(a,b){super(a,new olympe.dc.ga.Qc(b))}};olympe.dc.aa.Ur.ja=[olympe.dc.Yb];olympe.dc.aa.ce=class extends olympe.dc.aa.Dk{constructor(a,b){super(a,b)}ia(){return P(olympe.dc.aa.ce)}P(a,b){return a>b}};O('olympe.dc.predicates.Greater',olympe.dc.aa.ce);olympe.dc.aa.ke=class extends olympe.dc.aa.Dk{constructor(a,b){super(a,b)}ia(){return P(olympe.dc.aa.ke)}P(a,b){return a<b}};O('olympe.dc.predicates.Smaller',olympe.dc.aa.ke);olympe.dc.aa.Nd=class{constructor(a,b,c){this.source=a;this.value=b;this.G=c?c:!1}ia(){return P(olympe.dc.aa.Nd)}F(){return[this.source.D(),this.value.D()]}D(a,b){return olympe.C.va([this.source.F(a,b),this.value.F(a,b),this.G],(c,d,e)=>{c=String(c);d=String(d);e.valueOf()||(c=c.toLowerCase(),d=d.toLowerCase());return olympe.C.rc(c.includes(d))},olympe.C.fa)}ma(a){const b=this.source.ma(a),c=this.value.ma(a);a=bf(a,this.G);return'{"c":"'+this.ia()+'","a":['+b+','+c+','+a+']}'}toString(){const a=af(this.G);
|
|
603
|
-
return'Contains('+this.source.toString()+','+this.value.toString()+','+a+')'}};O('olympe.dc.predicates.Contains',olympe.dc.aa.Nd);olympe.dc.aa.Nd.ja=[olympe.dc.Yb];olympe.dc.aa.
|
|
604
|
-
','+this.L+','+a+')'}};O('olympe.dc.predicates.Regex',olympe.dc.aa.
|
|
605
|
-
!0),f()):(h=new hg(k,olympe.dc.Sync.extendRel),e.push(h),Ad(d,h.tag,h.D,g,h.id))}};a=new hg(b,olympe.dc.Sync.modelRel);e.push(a);Ad(d,a.tag,a.D,g,a.id);c.onDestroy(f);Ta(c)||K(c,!1);return c}ma(){return'{"c":"'+this.ia()+'","a":['+JSON.stringify(Array.from(this.G))+']}'}toString(){return'InstanceOf('+Array.from(this.G).join(', ')+')'}};class hg{constructor(a,b){this.tag=a;this.D=b;this.id=olympe.$.Xf()}}O('olympe.dc.predicates.InstanceOf',olympe.dc.aa.
|
|
606
|
-
olympe.dc.aa.
|
|
607
|
-
c.Bb()||(f+=h?1:-1,K(c,0<f))};const g=this.G;for(let h=g.length-1;0<=h;h--)a=lg(g[h],e,a,d+h);xc(e,b,a,d);olympe.C.Ia().onDestroy(()=>{yc(e,b,d)});c.
|
|
608
|
-
function lg(a,b,c,d){const e=Object.create(null);d+=olympe.$.Xf();const f=(g,h,k)=>{k>=a.F&&c(g,h);if(!(0<=a.D&&k>=a.D)){var m=d+k;g?e[h]||(e[h]=!0,Ad(b,h,a,(n,p)=>{f(n,p,k+1)},m)):(delete e[h],b.F(h,a,m))}};return(g,h)=>f(g,h,0)}class kg extends olympe.dc.query.Relation{constructor(a,b,c,d){super(a,b,1!==c||1!==d);this.F=c;this.D=d}ma(){return`${this.R()}, ${this.
|
|
609
|
-
','+this.value.toString()+')'}};O('olympe.dc.predicates.BitMask',olympe.dc.aa.fj);olympe.dc.aa.fj.ja=[olympe.dc.Yb];let mg=0;olympe.dc.aa.lg=class{constructor(){this.id=mg++}ia(){return'CustomLocalPredicate#'+this.id}F(){return[]}D(){throw Error('Test function was not implemented.');}ma(){return`{"c":"${this.ia()}"}`}toString(){return this.ia()+'()'}};olympe.dc.aa.lg.ja=[olympe.dc.Yb];olympe.dc.aa.dl=class{constructor(a,b,c){this.G=[];this.L=void 0!==c?c.map(olympe.dc.Ea):null;a=Array.isArray(a)?a:[a];for(let d=0,e=a.length;d<e;d++)c=a[d],c instanceof olympe.dc.V.Zb?this.G.push(new ng(c.R(),c.
|
|
610
|
-
for(let h=f.length-1;0<=h;h--)a=f[h].getTransform(d,a,e+h);let g=0;xc(d,b,a.bind(null,h=>{c.Yd()||c.Bb()||(g+=h,K(c,0<g))}),e);olympe.C.Ia().onDestroy(()=>yc(d,b,e));c.
|
|
603
|
+
return'Contains('+this.source.toString()+','+this.value.toString()+','+a+')'}};O('olympe.dc.predicates.Contains',olympe.dc.aa.Nd);olympe.dc.aa.Nd.ja=[olympe.dc.Yb];olympe.dc.aa.Xe=class{constructor(a,b,c){this.source=a;this.L=b;this.G=void 0===c?!0:c}ia(){return P(olympe.dc.aa.Xe)}F(){return[this.source.D()]}D(a,b){return olympe.C.te([this.source.F(a,b),this.L,this.G],(c,d,e)=>{c=String(c);d=String(d);e.valueOf()||(c=c.toLowerCase(),d=d.toLowerCase());return(new RegExp(d)).test(c)})}ma(a){const b=this.source.ma(a),c=bf(a,this.L);a=bf(a,this.G);return'{"c":"'+this.ia()+'","a":['+b+','+c+','+a+']}'}toString(){const a=af(this.G);return'Regex('+this.source.toString()+
|
|
604
|
+
','+this.L+','+a+')'}};O('olympe.dc.predicates.Regex',olympe.dc.aa.Xe);olympe.dc.aa.Xe.ja=[olympe.dc.Yb];olympe.dc.aa.Te=class{constructor(a){this.G=new Set;a instanceof Array?a.forEach(b=>{this.G.add(olympe.dc.Ea(b))}):this.G.add(olympe.dc.Ea(a))}ia(){return P(olympe.dc.aa.Te)}F(){return[]}D(a,b){const c=olympe.C.createNode(Boolean),d=olympe.dc.Xa();let e=[];const f=()=>{e.forEach(h=>{d.F(h.tag,h.D,h.id)});e=[]},g=(h,k)=>{if(h)if(k===olympe.dc.Ea(olympe.dc.Sync))K(c,this.G.has(k)),f();else{for(const m of e)if(m.tag===k)throw Error(`You should never extend a model to itself (${k})`);this.G.has(k)?(K(c,
|
|
605
|
+
!0),f()):(h=new hg(k,olympe.dc.Sync.extendRel),e.push(h),Ad(d,h.tag,h.D,g,h.id))}};a=new hg(b,olympe.dc.Sync.modelRel);e.push(a);Ad(d,a.tag,a.D,g,a.id);c.onDestroy(f);Ta(c)||K(c,!1);return c}ma(){return'{"c":"'+this.ia()+'","a":['+JSON.stringify(Array.from(this.G))+']}'}toString(){return'InstanceOf('+Array.from(this.G).join(', ')+')'}};class hg{constructor(a,b){this.tag=a;this.D=b;this.id=olympe.$.Xf()}}O('olympe.dc.predicates.InstanceOf',olympe.dc.aa.Te);olympe.dc.aa.Te.ja=[olympe.dc.Yb];function ig(a){return a.G.map(b=>b.R())}function jg(a){return a.G.map(b=>b.Qa())}
|
|
606
|
+
olympe.dc.aa.Se=class{constructor(a,b,c){this.G=[];this.L=c instanceof Array?c:void 0!==c?[olympe.dc.Ea(c)]:[];a=Array.isArray(a)?a:[a];for(let d=0,e=a.length;d<e;d++)c=a[d],c instanceof olympe.dc.V.Zb?this.G.push(new kg(c.R(),c.Qa(),c.F,c.D)):this.G.push(new kg(olympe.dc.Ea(c),b[d],1,1))}ia(){return P(olympe.dc.aa.Se)}F(){return[this.G.reduce((a,b)=>a.concat(b),[])]}D(a,b){const c=olympe.C.createNode(Boolean),d=olympe.$.Sb(),e=olympe.dc.Xa();let f=0;a=(h,k)=>{0!==this.L.length&&!this.L.includes(k)||
|
|
607
|
+
c.Bb()||(f+=h?1:-1,K(c,0<f))};const g=this.G;for(let h=g.length-1;0<=h;h--)a=lg(g[h],e,a,d+h);xc(e,b,a,d);olympe.C.Ia().onDestroy(()=>{yc(e,b,d)});c.Le(!1);return c}ma(){return'{"c":"'+this.ia()+'","a":['+JSON.stringify(this.G.map(a=>a.ma()))+(0!==this.L.length?',"'+this.L.toString():'')+'"]}'}toString(){return'HasRelated('+(0!==this.L.length?'#'+this.L.toString()+', ':'')+this.G.map(a=>a.ma())+')'}};O('olympe.dc.predicates.HasRelated',olympe.dc.aa.Se);
|
|
608
|
+
function lg(a,b,c,d){const e=Object.create(null);d+=olympe.$.Xf();const f=(g,h,k)=>{k>=a.F&&c(g,h);if(!(0<=a.D&&k>=a.D)){var m=d+k;g?e[h]||(e[h]=!0,Ad(b,h,a,(n,p)=>{f(n,p,k+1)},m)):(delete e[h],b.F(h,a,m))}};return(g,h)=>f(g,h,0)}class kg extends olympe.dc.query.Relation{constructor(a,b,c,d){super(a,b,1!==c||1!==d);this.F=c;this.D=d}ma(){return`${this.R()}, ${this.Qa()}, ${this.F}, ${this.D}`}}olympe.dc.aa.Se.ja=[olympe.dc.Yb];olympe.dc.aa.fj=class{constructor(a,b){this.G=a;this.value=b}D(a,b){return olympe.C.te([this.G,this.value.F(a,b)],(c,d)=>{c=c.valueOf();return(Number(c)&Number(d.valueOf()))===Number(c)})}ia(){return P(olympe.dc.aa.fj)}F(){return[this.value.D()]}ma(a){const b=olympe.C.Za(this.G)?M(this.G).valueOf():this.G.valueOf();return'{"c":"'+this.ia()+'","a":['+b+','+this.value.ma(a)+']}'}toString(){const a=olympe.C.Za(this.G)?M(this.G).valueOf():this.G.valueOf();return this.ia().replace(/^.+\./,'')+'('+a.toString()+
|
|
609
|
+
','+this.value.toString()+')'}};O('olympe.dc.predicates.BitMask',olympe.dc.aa.fj);olympe.dc.aa.fj.ja=[olympe.dc.Yb];let mg=0;olympe.dc.aa.lg=class{constructor(){this.id=mg++}ia(){return'CustomLocalPredicate#'+this.id}F(){return[]}D(){throw Error('Test function was not implemented.');}ma(){return`{"c":"${this.ia()}"}`}toString(){return this.ia()+'()'}};olympe.dc.aa.lg.ja=[olympe.dc.Yb];olympe.dc.aa.dl=class{constructor(a,b,c){this.G=[];this.L=void 0!==c?c.map(olympe.dc.Ea):null;a=Array.isArray(a)?a:[a];for(let d=0,e=a.length;d<e;d++)c=a[d],c instanceof olympe.dc.V.Zb?this.G.push(new ng(c.R(),c.Qa(),c.F,c.D)):this.G.push(new ng(olympe.dc.Ea(c),b[d],1,1))}ia(){return P(olympe.dc.aa.dl)}F(){return[this.G.reduce((a,b)=>a.concat(b),[])]}D(a,b){const c=olympe.C.createNode(Boolean),d=olympe.dc.Xa(),e=olympe.$.Xf();a=(h,k,m)=>{k&&(null===this.L||this.L.includes(m))&&h(1)};const f=this.G;
|
|
610
|
+
for(let h=f.length-1;0<=h;h--)a=f[h].getTransform(d,a,e+h);let g=0;xc(d,b,a.bind(null,h=>{c.Yd()||c.Bb()||(g+=h,K(c,0<g))}),e);olympe.C.Ia().onDestroy(()=>yc(d,b,e));c.Le(!1);return c}ma(){return'{"c":"'+this.ia()+'","a":['+JSON.stringify(this.G.map(a=>a.ma()))+(null!==this.L?',"'+this.L.toString():'')+'"]}'}toString(){return'HasRelatedTree('+(null!==this.L?'#['+this.L.toString()+'], ':'')+this.G.map(a=>a.ma())+')'}};O('olympe.dc.predicates.HasRelatedTree',olympe.dc.aa.dl);
|
|
611
611
|
class ng extends olympe.dc.query.Relation{constructor(a,b,c,d){super(a,b,1!==c||1!==d);this.F=c;this.D=d;this.L=new Map;this.G=new Map}getTransform(a,b,c){const d=this.G,e=this.L,f=new Set,g=(k,m,n)=>{e.has(m)?e.get(m).set(c+n,k):e.set(m,(new Map).set(c+n,k))},h=(k,m,n,p,q)=>{const r=olympe.$.Xf();if(p){const t=n+q,w=u=>{const x=e.get(q);if(f.has(t))throw Error(`Try to use the predicate HasRelatedTree with recursion in a graph cluster containing a loop around instances ${n} and ${q}`);void 0!==x&&
|
|
612
|
-
null!==x&&(f.add(t),d.set(q,(d.get(q)||0)+u),Array.from(x.values()).forEach(G=>G(u)));f.delete(t)};g(k,q,n);d.has(q)?k(d.get(q)):(m>=this.F&&b(u=>{d.set(q,(d.get(q)||0)+u);k(u)},p,q),(0>this.D||m<=this.D)&&q!==n&&Ad(a,q,this,h.bind(this,w,m+1,q),r))}else k(-d.get(q)),e.get(q).delete(c+n),0===e.get(q).size&&(d.delete(q),e.delete(q),a.F(q,this,r))};return(k,m,n)=>h(k,0,'origin',m,n)}ma(){return`${this.R()}, ${this.
|
|
613
|
-
k):d.F(h,this,k)}}ma(){return'{"c":"'+this.ia()+'","a":["'+this.R()+'","'+this.
|
|
614
|
-
const x=olympe.$.Ec(q+k+(h+'_'+p)+t[w],20);b.register(x,q,r,h,k||g);null===k&&b.register(x,q,r,h,f)}}},n=(p,q,r,t,w,u)=>{w&&!b.F&&m(p,t,u);p>=this.F?c(w,u,t,Lf(r,w,u,t)):Yf(b,t,u,h,k);0<=this.D&&p>=this.D||(w?e[u]||(e[u]=!0,Ad(d,u,this,(x,G)=>{const H=p+1,F=olympe.$.Ec(t+k+(h+'_'+H)+G,20);n(H,u,r,F,x,G)},t)):(d.F(u,this,t),delete e[u]))};return(p,q,r,t)=>n(0,null,t,r,p,q)}ma(){return'{"c":"'+this.ia()+'","a":["'+this.R()+'","'+this.
|
|
615
|
-
this.
|
|
616
|
-
olympe.dc.V.ge=class{constructor(a,b){this.direction=b||olympe.dc.Ja.DESTINATION;this.D=a.map(c=>new olympe.dc.xa.Relation(c,this.direction))}Ob(){return olympe.dc.Sync}ia(){return P(olympe.dc.V.ge)}
|
|
617
|
-
{d.F(g,m,h)})}}ma(){return'{"c":"'+this.ia()+'","a":['+JSON.stringify(og(this))+',"'+this.direction+'"]}'}toString(){return'MultiRelated('+this.
|
|
612
|
+
null!==x&&(f.add(t),d.set(q,(d.get(q)||0)+u),Array.from(x.values()).forEach(G=>G(u)));f.delete(t)};g(k,q,n);d.has(q)?k(d.get(q)):(m>=this.F&&b(u=>{d.set(q,(d.get(q)||0)+u);k(u)},p,q),(0>this.D||m<=this.D)&&q!==n&&Ad(a,q,this,h.bind(this,w,m+1,q),r))}else k(-d.get(q)),e.get(q).delete(c+n),0===e.get(q).size&&(d.delete(q),e.delete(q),a.F(q,this,r))};return(k,m,n)=>h(k,0,'origin',m,n)}ma(){return`${this.R()}, ${this.Qa()}, ${this.F}, ${this.D}`}}olympe.dc.aa.dl.ja=[olympe.dc.Yb];olympe.dc.V={};olympe.dc.V.Hj={Zr:1,ms:-1,Ao:0};olympe.dc.V.zA={ay:!0,xy:!1};olympe.dc.V.Fb=class extends olympe.dc.xa.Relation{constructor(a,b){super(olympe.dc.Ea(a),b||olympe.dc.Ja.DESTINATION)}Ob(){return Kc(this)}ia(){return P(olympe.dc.V.Fb)}Cd(){return new olympe.dc.V.Fb(this.tag,this.direction===olympe.dc.Ja.DESTINATION?olympe.dc.Ja.ORIGIN:olympe.dc.Ja.DESTINATION)}getTransform(a,b,c){const d=olympe.dc.Xa(),e=this.R(),f=this.Qa();return(g,h,k,m)=>{Yf(b,k,h,e,f);g?Ad(d,h,this,(n,p)=>{const q=olympe.$.Ec(k+f+e+p,20),r=Lf(m,n,p,q);n&&b.register(q,k,h,e,f);c(n,p,q,r)},
|
|
613
|
+
k):d.F(h,this,k)}}ma(){return'{"c":"'+this.ia()+'","a":["'+this.R()+'","'+this.Qa()+'"]}'}toString(){return'Related('+this.Qa()+this.R()+')'}};O('olympe.dc.transformers.Related',olympe.dc.V.Fb);olympe.dc.V.Fb.ja=[olympe.dc.Nc];olympe.dc.V.Zb=class extends olympe.dc.xa.Relation{constructor(a,b,c,d){super(olympe.dc.Ea(a),b||olympe.dc.Ja.DESTINATION);this.F='number'===typeof c?c:1;this.D='number'===typeof d?d:-1}Ob(){return Kc(this)}ia(){return P(olympe.dc.V.Zb)}getTransform(a,b,c){const d=olympe.dc.Xa(),e=Object.create(null),f=olympe.dc.Ja.ORIGIN,g=olympe.dc.Ja.DESTINATION,h=this.R(),k=this.Qa(),m=(p,q,r)=>{if(!(0<=this.D&&p>=this.D)){var t=d.cb(r,this);p+=1;for(let w=0,u=t.length;w<u;w++){if(void 0!==e[t[w]]||r===t[w])continue;
|
|
614
|
+
const x=olympe.$.Ec(q+k+(h+'_'+p)+t[w],20);b.register(x,q,r,h,k||g);null===k&&b.register(x,q,r,h,f)}}},n=(p,q,r,t,w,u)=>{w&&!b.F&&m(p,t,u);p>=this.F?c(w,u,t,Lf(r,w,u,t)):Yf(b,t,u,h,k);0<=this.D&&p>=this.D||(w?e[u]||(e[u]=!0,Ad(d,u,this,(x,G)=>{const H=p+1,F=olympe.$.Ec(t+k+(h+'_'+H)+G,20);n(H,u,r,F,x,G)},t)):(d.F(u,this,t),delete e[u]))};return(p,q,r,t)=>n(0,null,t,r,p,q)}ma(){return'{"c":"'+this.ia()+'","a":["'+this.R()+'","'+this.Qa()+'",'+this.F+','+this.D+']}'}toString(){return'RecursiveRelated('+
|
|
615
|
+
this.Qa()+this.R()+'['+this.F+'..'+this.D+'])'}};O('olympe.dc.transformers.RecursiveRelated',olympe.dc.V.Zb);olympe.dc.V.Zb.ja=[olympe.dc.Nc];function og(a){return a.D.map(b=>b.R())}
|
|
616
|
+
olympe.dc.V.ge=class{constructor(a,b){this.direction=b||olympe.dc.Ja.DESTINATION;this.D=a.map(c=>new olympe.dc.xa.Relation(c,this.direction))}Ob(){return olympe.dc.Sync}ia(){return P(olympe.dc.V.ge)}Qa(){return this.direction}getTransform(a,b,c){const d=olympe.dc.Xa(),e=(f,g,h,k)=>Ad(d,f,k,(m,n)=>{var p=k.Qa();var q=k.R();p=olympe.$.Ec(g+p+q+n,20);q=Lf(h,m,n,p);m&&b.register(p,g,f,k.R(),k.Qa());c(m,n,p,q)},g);return(f,g,h,k)=>{f?this.D.forEach(m=>{Yf(b,h,g,m.R(),m.Qa());e(g,h,k,m)}):this.D.forEach(m=>
|
|
617
|
+
{d.F(g,m,h)})}}ma(){return'{"c":"'+this.ia()+'","a":['+JSON.stringify(og(this))+',"'+this.direction+'"]}'}toString(){return'MultiRelated('+this.Qa()+'['+og(this).join(',')+'])'}};O('olympe.dc.transformers.MultiRelated',olympe.dc.V.ge);olympe.dc.V.ge.ja=[olympe.dc.Nc];olympe.dc.V.Zk=class{constructor(a,b,c,d){this.D=new olympe.dc.xa.Relation(olympe.dc.Ea(a),c||olympe.dc.Ja.DESTINATION);this.F=new olympe.dc.xa.Relation(olympe.dc.Ea(b),d||olympe.dc.Ja.DESTINATION)}Ob(){return Kc(this.D)}ia(){return P(olympe.dc.V.Zk)}getTransform(a,b,c){const d=olympe.dc.Xa(),e={},f=this.D.R(),g=this.D.Qa(),h=this.F.R(),k=this.F.Qa();let m=null,n=null;const p=(r,t,w,u,x,G)=>{if(x){if(x=()=>{const H=olympe.$.Ec(w+g+(f+'_'+r)+G,20),F=Lf(t,!0,G,H);m=r;n=()=>{c(!1,G,H,Lf(t,!1,G,H))};
|
|
618
618
|
b.register(H,w,u,f,g);c(!0,G,H,F)},x.Tq=r,e[u]=x,null===m||r<m)n&&n(),x()}else if(m===r){n();e[u]=!0;x=Infinity;let H=null;for(let F=Object.keys(e),Ga=F.length,S=0;S<Ga;S++){let cb=e[F[S]];cb.Tq<x&&(x=cb.Tq,H=cb)}H&&H()}},q=(r,t,w,u,x)=>{u?e[x]||(e[x]=!0,Yf(b,w,x,f,g),Yf(b,w,x,h,k),Ad(d,x,this.D,p.bind(this,r,t,w,x),w+'_val'),Ad(d,x,this.F,q.bind(this,r+1,t,w),w+'_follow')):(d.F(x,this.F,w+'_follow'),d.F(x,this.D,w+'_val'),delete e[x])};return(r,t,w,u)=>q(0,u,w,r,t)}ma(){return'{"c":"'+this.ia()+
|
|
619
619
|
'","a":["'+this.D.toString()+'","'+this.F.toString()+'"]}'}toString(){return'FirstRelated('+this.D.toString()+', '+this.F.toString()+')'}};O('olympe.dc.transformers.FirstRelated',olympe.dc.V.Zk);olympe.dc.V.Zk.ja=[olympe.dc.Nc];olympe.dc.V.$c=class{Ob(){return null}ia(){return P(olympe.dc.V.$c)}getTransform(a,b,c){const d={};return function(e,f,g,h){e?void 0===d[f]?(d[f]=1,b.D.D!==g||b.F||(b.D.D=f),c(!0,f,f,Lf(h,!0,f,f))):(d[f]++,Xf(b,g)):void 0!==d[f]&&0>=--d[f]&&(delete d[f],c(!1,f,f,Lf(h,!1,f,f)))}}ma(){return'{"c":"'+this.ia()+'"}'}toString(){return'Distinct()'}};O('olympe.dc.transformers.Distinct',olympe.dc.V.$c);olympe.dc.V.$c.ja=[olympe.dc.Nc];olympe.dc.V.yd=class{constructor(a,b){this.D=a;this.F=void 0===b?!0:!!b}Ob(){return null}ia(){return P(olympe.dc.V.yd)}G(){return[this.D.P()]}getTransform(a,b,c){const d=new olympe.dc.jc.Pp(this.F?this.D.G.bind(this.D):(e,f)=>this.D.G(f,e));return(e,f,g)=>{var h=e?this.D.L(a,f):void 0;h=d.D(e,f,g,h);c(e,f,g,h)}}ma(a){return'{"c":"'+this.ia()+'","a":['+this.D.ma(a)+','+JSON.stringify(this.F)+']}'}toString(){return'Sort('+this.D.toString()+','+JSON.stringify(this.F)+')'}};
|
|
620
|
-
O('olympe.dc.transformers.Sort',olympe.dc.V.yd);olympe.dc.V.yd.ja=[olympe.dc.Nc,olympe.dc.rp];olympe.dc.V.ad=class{constructor(a){this.D=a}Ob(){return null}ia(){return P(olympe.dc.V.ad)}G(){return this.D.F()}getTransform(a,b,c){function d(f,g,h,k){k=k.valueOf();!1===k&&Xf(b,g);k!==!!e[g]&&(e[g]=k,c(k,f,g,Lf(h,k,f,g)))}const e={};return(f,g,h,k)=>{const m='@'+h;f?(f=this.D.D(a,g),olympe.C.Za(f)&&(f=f.
|
|
620
|
+
O('olympe.dc.transformers.Sort',olympe.dc.V.yd);olympe.dc.V.yd.ja=[olympe.dc.Nc,olympe.dc.rp];olympe.dc.V.ad=class{constructor(a){this.D=a}Ob(){return null}ia(){return P(olympe.dc.V.ad)}G(){return this.D.F()}getTransform(a,b,c){function d(f,g,h,k){k=k.valueOf();!1===k&&Xf(b,g);k!==!!e[g]&&(e[g]=k,c(k,f,g,Lf(h,k,f,g)))}const e={};return(f,g,h,k)=>{const m='@'+h;f?(f=this.D.D(a,g),olympe.C.Za(f)&&(f=f.Ua),olympe.C.rf(f)?(b.F||void 0!==olympe.C.Sa(f)||Xf(b,h),e[m]=f,olympe.C.tc([f],n=>{d(g,h,k,n)},'filterResultHandler')):d(g,h,k,f)):(void 0!==e[m]&&(e[m].destroy(),delete e[m]),d(g,h,k,!1),delete e[h])}}ma(a){return'{"c":"'+
|
|
621
621
|
this.ia()+'","a":['+this.D.ma(a)+']}'}toString(){return'Filter('+this.D.toString()+')'}};O('olympe.dc.transformers.Filter',olympe.dc.V.ad);olympe.dc.V.ad.ja=[olympe.dc.Nc,olympe.dc.rp];olympe.dc.V.Ed=class{constructor(a,b){this.start=a;this.D=b}Ob(){return null}ia(){return P(olympe.dc.V.Ed)}getTransform(a,b,c){const d=new olympe.dc.jc.tl;let e,f,g,h=!1;const k=()=>{if(void 0!==f&&void 0!==g&&void 0!==e){var n=f+g;b.F||(b.D.D=e[0>n-1?0:Math.min(e.length,n)-1]);Uf(d,e,f,n,c)}};olympe.C.Md([this.start,this.D],(n,p)=>{f=n.valueOf();g=p.valueOf();k()});cg(b,k);const m=$f(b);Zf(b,m);return(n,p,q,r)=>{h||(r.nc().ig(t=>{e=t;dg(b,m)}),Jf(b,()=>r.Rf(),m),h=!0);d.D(n,p,q,null);Kf(b,q,m)}}ma(a){return'{"c":"'+
|
|
622
|
-
this.ia()+'","a":['+bf(a,this.start)+','+bf(a,this.D)+']}'}toString(){return`Limit(${olympe.C.
|
|
623
|
-
olympe.dc.V
|
|
624
|
-
w.Yd()||w.Bb()||(k||(t.nc().ig(u=>{g=u;dg(b,n)}),Jf(b,()=>t.Rf(),n),k=!0),d.D(p,q,r),Kf(b,r,n))});Zf(b,m);return(p,q,r,t)=>{h||(t.nc().ig(w=>{f=w;dg(b,m)}),Jf(b,()=>t.Rf(),m),h=!0);d.D(p,q,r,m);Kf(b,r,m)}}ma(a){const b=this.V?'['+this.V.map(c=>c.ma(a)).join(',')+']':'null';return'{"c":"'+this.ia()+'","a":['+bf(a,this.D)+','+b+']}'}toString(){const a=olympe.C.Za(this.D)?'N:'+this.D.
|
|
625
|
-
O('olympe.dc.transformers.Union',olympe.dc.V
|
|
622
|
+
this.ia()+'","a":['+bf(a,this.start)+','+bf(a,this.D)+']}'}toString(){return`Limit(${olympe.C.Sa(this.start)},${olympe.C.Sa(this.D)})`}};O('olympe.dc.transformers.Limit',olympe.dc.V.Ed);olympe.dc.V.Ed.ja=[olympe.dc.Nc];function pg(a,b,c,d,e,f){function g(p,q){if(m)for(var r=m.length-1;0<=r;r--)f=m[r].getTransform(b,e,n.rb(f));f=n.rb(f);e.register(h,null);r=d.D(p,q,c,null);f(p,q,h,Lf(r,p,q,h))}const h=olympe.$.Sb(),k=olympe.dc.Xa(),m=a.V,n=olympe.C.Ia();olympe.C.tc([a.D],p=>{qg(k,p,g,h);void 0===k.model(p)&&If(e)})}function qg(a,b,c,d){const e=b&&b.valueOf();e&&(xc(a,e,c,d),olympe.C.Ia().Vc(()=>yc(a,e,d)))}
|
|
623
|
+
olympe.dc.V.af=class{constructor(a,b){this.V=this.D=null;a instanceof olympe.dc.na?(this.D=a.pd(),this.V=a.nl()):(this.D=a,b&&(this.V=b))}Ob(){return null}ia(){return P(olympe.dc.V.af)||''}nf(){return this.V}pd(){return this.D}getTransform(a,b,c){const d=new olympe.dc.jc.tl,e=new olympe.dc.jc.ej;let f=[],g=[],h=!1,k=!1;const m=$f(b),n=$f(b);cg(b,()=>{const p=f.concat(g);0<p.length?b.F||(b.D.D=p[p.length-1]):dg(b);Uf(d,p,0,p.length,c)});Zf(b,n);pg(this,a,this.D,e,b,(p,q,r,t)=>{const w=olympe.C.Ia();
|
|
624
|
+
w.Yd()||w.Bb()||(k||(t.nc().ig(u=>{g=u;dg(b,n)}),Jf(b,()=>t.Rf(),n),k=!0),d.D(p,q,r),Kf(b,r,n))});Zf(b,m);return(p,q,r,t)=>{h||(t.nc().ig(w=>{f=w;dg(b,m)}),Jf(b,()=>t.Rf(),m),h=!0);d.D(p,q,r,m);Kf(b,r,m)}}ma(a){const b=this.V?'['+this.V.map(c=>c.ma(a)).join(',')+']':'null';return'{"c":"'+this.ia()+'","a":['+bf(a,this.D)+','+b+']}'}toString(){const a=olympe.C.Za(this.D)?'N:'+this.D.Ua.ba():this.D.valueOf(),b=this.V?','+this.V.map(c=>c.toString()).join(','):'';return'Union('+a+b+')'}};
|
|
625
|
+
O('olympe.dc.transformers.Union',olympe.dc.V.af);olympe.dc.V.af.ja=[olympe.dc.Nc];olympe.dc.jg={};function rg(a,b){let c=Dc.get(b)||null,d=null;for(;!c&&b&&b!==d;){d=b;b=a.db.ff(b);if(null===b)break;c=Dc.get(b)||null}return c||null}olympe.dc.jg.SyncManager=class{constructor(a,b,c){this.N=a;this.db=b;this.D=c}};olympe.dc.jg.T={Fa:'dc.syncs.Logger',wa:'dc.syncs.SyncManager'};olympe.U.config(function(a){A(a,olympe.dc.jg.T.Fa,[olympe.ua.T.wa],b=>b.Ic('dc'));y(a,olympe.dc.jg.T.wa,olympe.dc.jg.SyncManager,olympe.dc.jg.T.Fa,olympe.dc.T.fh,olympe.U.T.Oe)});olympe.dc.$={};olympe.dc.$.fC=function(a){a=olympe.dc.Ea(a);const b=olympe.C.Jc(olympe.C.Ra,'getInstanceName'),c=olympe.dc.Xa(),d=yd(c,a,olympe.dc.Sync.nameProp,b.update.bind(b));olympe.C.Ia().Vc(c.L.bind(c,a,olympe.dc.Sync.nameProp,d));return b.ub()};olympe.dc.$.iC=function(a){return olympe.C.va([a],b=>olympe.C.rx(olympe.dc.Xa().Ph(b)),olympe.C.fa)};olympe.dc.$.jC=function(a){return(a=olympe.C.Sa(a))?olympe.dc.Xa().Ph(a):!1};olympe.dc.$.kp=class a{constructor(b=olympe.dc.Na.ld){this.G=b}F(b){const c=new olympe.dc.db.Gc;this.D(b,c);return c}P(b,c,d){const e=new olympe.dc.db.Gc(b),f=new olympe.dc.query.bi(b,this.G,c,e);this.D(d,e,(g,h)=>{h=h||[];const k=f.D.get(g)||new Set;for(const m of h)k.add(m);f.D.set(g,k)});return f}L(b,c){const d=new olympe.dc.db.Gc(b),e=new olympe.dc.query.hs(b,d);this.D(c,d,(f,g,h)=>{h=h||[];const k=new He(f);k.add=g||[];k.remove=h;e.D.set(f,k)});return e}D(b,c,d){const e=olympe.dc.Rb.Sd;for(const f of b)switch(b=
|
|
626
626
|
f.i?f.i:-1,f.o){case 1:const g=a.D(f.p||{});g.has(e)||g.set(e,this.G);c.xc(f.t,g,b);break;case 2:c.bc(f.t,a.D(f.p),!0,b);break;case 3:c.qc(f.t,f.f,b);break;case 4:c.sa(f.m,f.l,f.r,b);break;case 5:c.mb(f.m,f.l,f.r,b);break;case 6:d&&d(f.i,f.a,f.d);break;default:throw Error('Undefined patch operation: '+f.o);}}static D(b){const c=new Map;for(const [d,e]of Object.entries(b)){b=d;if(b===olympe.dc.Rb.Sd||b===olympe.dc.Rb.VERSION){c.set(b,e);continue}else if('v'===d){c.set(olympe.dc.Rb.VERSION,e);continue}let f=
|
|
627
627
|
typeof e;b.startsWith('fd')&&(b=olympe.dc.qg.jd+b.substr(2));'object'===f&&(f=e&&e.c?String(e.c):'untyped');switch(f){case '1':case '2':case '3':throw Error('Complex format for primitive types not supported.');case 'string':c.set(b,String(e));break;case 'boolean':c.set(b,!!e);break;case 'number':c.set(b,Number(e));break;case '4':c.set(b,new Date(Date.UTC(e.y,e.M-1,e.d,e.h,e.m,e.s,e.S)));break;case '5':c.set(b,new Date(Date.UTC(e.y,e.M-1,e.d)));break;case '6':c.set(b,new Date(Date.UTC(e.y||1970,e.M&&
|
|
628
|
-
e.M-1||0,e.d||1,e.h,e.m,e.s,e.S)));break;case '7':c.set(b,new olympe.C.Color(e.r,e.g,e.b,e.a));break;case '8':c.set(b,new olympe.dc.Bc(e.t));break;case 'untyped':null===e&&c.set(b,null)}}return c}};olympe.dc.$.
|
|
629
|
-
olympe.dc.$.
|
|
630
|
-
olympe.dc.$.
|
|
631
|
-
olympe.dc.$.
|
|
632
|
-
olympe.U.config(function(a){C(a,olympe.dc.Z.Af,!1);C(a,olympe.dc.Z.yg,!1);C(a,olympe.dc.Z.Gn,olympe.dc.Na.ld);C(a,olympe.dc.Z.Xn,!0);C(a,olympe.dc.Z.Qn,!0);A(a,olympe.dc.T.Fa,[olympe.ua.T.wa],b=>b.Ic('dc'));B(a,olympe.dc.T.du,olympe.dc.transaction.T.Fa);B(a,olympe.dc.T.al,olympe.dc.db.T.al);B(a,olympe.dc.T.fh,olympe.dc.db.T
|
|
633
|
-
olympe.dc.T.Fa,olympe.dc.db.T.wa,olympe.dc.query.T.wa,olympe.dc.transaction.T.wa,olympe.dc.jg.T.wa,olympe.dc.T.Xh)},'olympe.dc');olympe.U.run([olympe.dc.db.T.wa,olympe.dc.query.T.wa,olympe.dc.transaction.T.wa,olympe.dc.jg.T.wa,olympe.dc.T.wa,olympe.dc.T.Xh],(a,b,c,d,e,f)=>{olympe.dc.Tc=()=>a;olympe.dc.Nh=()=>b;olympe.dc.Mg=()=>c;olympe.dc.Rq=()=>d;olympe.dc.nc=()=>e;olympe.dc.
|
|
628
|
+
e.M-1||0,e.d||1,e.h,e.m,e.s,e.S)));break;case '7':c.set(b,new olympe.C.Color(e.r,e.g,e.b,e.a));break;case '8':c.set(b,new olympe.dc.Bc(e.t));break;case 'untyped':null===e&&c.set(b,null)}}return c}};olympe.dc.$.Mb={};olympe.dc.$.Mb.em=a=>'string'===typeof a||'number'===typeof a||'boolean'===typeof a||a instanceof String?olympe.C.pb(a):a instanceof olympe.C.Ra?a:null;olympe.dc.$.Mb.am=a=>'boolean'===typeof a||a instanceof Boolean?olympe.C.rc(a):a instanceof olympe.C.fa?a:null;olympe.dc.$.Mb.cm=a=>'number'===typeof a||a instanceof Number?olympe.C.ta(a):'string'===typeof a||a instanceof String?olympe.C.ta(Number.parseFloat(a.valueOf())):a instanceof olympe.C.da?a:null;
|
|
629
|
+
olympe.dc.$.Mb.bm=function(a){return'number'===typeof a||a instanceof Number?qb(a.valueOf()):'string'===typeof a||a instanceof String?new olympe.C.bb(new Date(a.valueOf().valueOf())):a instanceof Date?new olympe.C.bb(a):a instanceof olympe.C.bb?a:null};olympe.dc.$.Mb.uq=function(a){return a instanceof olympe.C.Color?a:'string'===typeof a||a instanceof String?ub(a.valueOf()):null};olympe.dc.$.Mb.vq=a=>a instanceof olympe.dc.Sync?a:a instanceof olympe.dc.Bc?olympe.dc.Sync.Lb(a.tag):null;
|
|
630
|
+
olympe.dc.$.Mb.Dh=a=>a instanceof olympe.dc.Bc?olympe.dc.Sync.Lb(a.tag):a;olympe.dc.$.Mb.RB=a=>{switch(typeof a){case 'boolean':return olympe.C.rc(a);case 'number':return olympe.C.ta(a);case 'string':return olympe.C.pb(a);case 'object':if(a instanceof Date)return olympe.C.hx(a)}return a};
|
|
631
|
+
olympe.dc.$.Mb.cC=a=>{switch(a){case olympe.C.fa:return olympe.dc.$.Mb.am;case olympe.C.Ra:return olympe.dc.$.Mb.em;case olympe.C.da:return olympe.dc.$.Mb.cm;case olympe.C.bb:return olympe.dc.$.Mb.bm;case olympe.C.Color:return olympe.dc.$.Mb.uq;case olympe.dc.Sync:return olympe.dc.$.Mb.vq;default:return olympe.dc.$.Mb.Dh}};olympe.dc.T={wa:'dc.Manager',al:'dc.Graph',fh:'dc.DBView',Fa:'dc.Logger',du:'dc.TransactionLogger',Xh:'dc.FileServiceManager',ze:'dc.Router'};olympe.dc.Z={Af:'dc.debug',yg:'dc.subscribeAll',Gn:'dc.defaultSource',Xn:'dc.fileCache',Qn:'dc.errorOnAbstractInstantiation'};
|
|
632
|
+
olympe.U.config(function(a){C(a,olympe.dc.Z.Af,!1);C(a,olympe.dc.Z.yg,!1);C(a,olympe.dc.Z.Gn,olympe.dc.Na.ld);C(a,olympe.dc.Z.Xn,!0);C(a,olympe.dc.Z.Qn,!0);A(a,olympe.dc.T.Fa,[olympe.ua.T.wa],b=>b.Ic('dc'));B(a,olympe.dc.T.du,olympe.dc.transaction.T.Fa);B(a,olympe.dc.T.al,olympe.dc.db.T.al);B(a,olympe.dc.T.fh,olympe.dc.db.T.ab);y(a,olympe.dc.T.Xh,olympe.dc.bs,olympe.dc.T.Fa,olympe.Aa.T.wa,olympe.dc.T.ze,olympe.$.T.$g,new olympe.U.ha(olympe.dc.Z.Xn));qa(a,olympe.dc.T.ze);y(a,olympe.dc.T.wa,olympe.dc.qa,
|
|
633
|
+
olympe.dc.T.Fa,olympe.dc.db.T.wa,olympe.dc.query.T.wa,olympe.dc.transaction.T.wa,olympe.dc.jg.T.wa,olympe.dc.T.Xh)},'olympe.dc');olympe.U.run([olympe.dc.db.T.wa,olympe.dc.query.T.wa,olympe.dc.transaction.T.wa,olympe.dc.jg.T.wa,olympe.dc.T.wa,olympe.dc.T.Xh],(a,b,c,d,e,f)=>{olympe.dc.Tc=()=>a;olympe.dc.Nh=()=>b;olympe.dc.Mg=()=>c;olympe.dc.Rq=()=>d;olympe.dc.nc=()=>e;olympe.dc.Iv=()=>f},'DC singleton getter initialization');olympe.dc.Sync=class{constructor(a,b){this.tag=b;this.La=olympe.dc.nc&&olympe.dc.nc();this.db=olympe.dc.Tc&&olympe.dc.Tc().view;this.model=null}static xc(a,b,c){var d=[];b=olympe.dc.Ea(b);var e=Dc.get(b)||null;(e=e&&e.D)?e(a,c,...d):(a=a.create(b),c&&a.setProperty(olympe.dc.Sync.nameProp,c),a.R())}static Lb(a){{var b=olympe.dc.Rq();a=olympe.dc.Ea(a);const c=rg(b,b.db.model(a));null===c?(b.N.error(`Instantiation of a Sync (tag = '${a}') that does not exist (or incompletely exists) in the local database.\n
|
|
634
634
|
This could lead to unwanted behaviour and must be fixed.
|
|
635
|
-
For more information, activate the database debug mode or call "dbMonitor.debug(${a})" from this console.`),b=new olympe.dc.Sync(void 0,a)):b=c.instantiate(a,b.D)}return b}static
|
|
636
|
-
a=>olympe.C.pb(a),olympe.C.
|
|
637
|
-
{const c=yd(this.db,this.tag,a,d=>{null===d||void 0===d?b.next(null):b.next(d)});olympe.C.Ia().Vc(()=>{b.complete();this.db.L(this.tag,a,c)});return()=>this.db.L(this.tag,a,c)})}
|
|
638
|
-
olympe.dm.User)}
|
|
639
|
-
olympe.dm.wb)}bg(a,b,c){const d=olympe.C.Jc(c,'Sync valueType'),e=yd(this.db,this.tag,a,olympe.C.Ia().rb(f=>{b&&null!==f&&void 0!==f&&(f=b(f));null===f||void 0===f?d.clear():d.update(f)}));d.node.onDestroy(()=>this.db.L(this.tag,a,e));return d.node}xb(a){return L(this.bg(a,olympe.dc.$.
|
|
640
|
-
olympe.dc.$.
|
|
641
|
-
e),f.set(h,g),g.run(b,olympe.dc.Sync.
|
|
642
|
-
`orphan object (no model) #${this.tag}${b}`}tb(a){return a instanceof olympe.dc.Sync?this.R()===a.R():!1}Dd(a){return olympe.C.va([a],b=>olympe.C.rc(this.tb(b)),olympe.C.fa)}Su(a){const b=this.db;let c=!1;if(void 0===a||null===a)a=new olympe.dc.
|
|
643
|
-
olympe.dc.Sync.prototype.getProperty=olympe.dc.Sync.prototype.
|
|
644
|
-
olympe.dc.Sync.O=olympe.dc.Ba.D('ff021000000000000001',olympe.dc.Sync);olympe.dc.Sync.Mm=olympe.dc.Sync.O.za(olympe.dc.Rb.VERSION);olympe.dc.Sync.nameProp=olympe.dc.Sync.O.za('ff023000000000000011');v('olympe.dc.Sync.nameProp',olympe.dc.Sync.nameProp);olympe.dc.Sync.Ga=olympe.dc.Sync.O.za('ff023000000000000012');olympe.dc.Sync.ka=olympe.dc.Sync.O.Oa('ff02200000000000000a');olympe.dc.Sync.
|
|
635
|
+
For more information, activate the database debug mode or call "dbMonitor.debug(${a})" from this console.`),b=new olympe.dc.Sync(void 0,a)):b=c.instantiate(a,b.D)}return b}static Pv(a){var b=rg(olympe.dc.Rq(),olympe.dc.Ea(a));b=b&&b.F;return new olympe.dc.na(olympe.dc.Ea(a),olympe.dc.Sync.instancesRel,b)}static instantiate(a,b,c,d){a=a.instantiate(b,c);a.model=d;return a}nc(){return this.La}R(){return this.tag}Cw(){return this.db.version(this)}Gs(){return this.db.source(this)}ia(){return this.xb(olympe.dc.Sync.nameProp)}Iq(){return olympe.C.va([this.ia()],
|
|
636
|
+
a=>olympe.C.pb(a),olympe.C.Ra,'getDisplayName',olympe.C.pb('('+this.toString()+')'))}dk(){this.model||(this.model=olympe.dc.Sync.Lb(this.db.model(this)));return this.model}hc(){return this.model?this.model.R():this.db.model(this)}Uv(){return this.dk().transform(new olympe.dc.V.Zb(olympe.dc.Hc.gh,olympe.dc.Ja.DESTINATION,0))}rd(){return this.cb(olympe.dc.Sync.instancesRel,olympe.dc.Sync)}Ph(){return olympe.C.va([this.Pq()],()=>olympe.C.fa.F,olympe.C.fa,'isModel',olympe.C.fa.D)}lx(a){return new rxjs.Observable(b=>
|
|
637
|
+
{const c=yd(this.db,this.tag,a,d=>{null===d||void 0===d?b.next(null):b.next(d)});olympe.C.Ia().Vc(()=>{b.complete();this.db.L(this.tag,a,c)});return()=>this.db.L(this.tag,a,c)})}Ib(a){return this.db.Ib(this.tag,a,!0)}Hi(){return this.transform(new olympe.dc.V.Zb(olympe.dc.Sync.extendRel.R(),olympe.dc.Ja.DESTINATION,1))}Pq(){return this.yc(olympe.dc.Sync.extendRel,olympe.dc.Sync)}uv(){return this.yc(olympe.dc.Sync.Vd,olympe.dc.Sync)}rm(){return this.cb(olympe.dc.Sync.containsRel,olympe.dc.Sync)}bw(){return this.yc(olympe.dc.Sync.La,
|
|
638
|
+
olympe.dm.User)}iw(){return new olympe.dc.na(this.R(),[new olympe.dc.V.Zb(olympe.dc.Sync.extendRel.R(),olympe.dc.Sync.extendRel.Qa(),0),olympe.dc.Sync.propertyRel,new olympe.dc.V.$c],olympe.dm.Property)}Ov(){return new olympe.dc.na(this.R(),[new olympe.dc.V.Zb(olympe.dc.Sync.extendRel.R(),olympe.dc.Sync.extendRel.Qa()),olympe.dc.Sync.propertyRel,new olympe.dc.V.$c],olympe.dm.Property)}$v(){return this.cb(olympe.dc.Sync.propertyRel,olympe.dm.Property)}Nv(){return this.cb(olympe.dc.Sync.hb,olympe.dm.Property)}Kq(){return this.cb(olympe.dc.Sync.G,
|
|
639
|
+
olympe.dm.wb)}bg(a,b,c){const d=olympe.C.Jc(c,'Sync valueType'),e=yd(this.db,this.tag,a,olympe.C.Ia().rb(f=>{b&&null!==f&&void 0!==f&&(f=b(f));null===f||void 0===f?d.clear():d.update(f)}));d.node.onDestroy(()=>this.db.L(this.tag,a,e));return d.node}xb(a){return L(this.bg(a,olympe.dc.$.Mb.em,olympe.C.Ra))}Wd(a){return L(this.bg(a,olympe.dc.$.Mb.cm,olympe.C.da))}Kg(a){return L(this.bg(a,olympe.dc.$.Mb.am,olympe.C.fa))}Ki(a){return L(this.bg(a,olympe.dc.$.Mb.bm,olympe.C.bb))}Qq(){return L(this.bg(olympe.dm.Color.valueProp,
|
|
640
|
+
olympe.dc.$.Mb.uq,olympe.C.Color))}kw(a){return L(this.bg(a,olympe.dc.$.Mb.vq,olympe.dc.Sync))}cb(a,b){a=a instanceof olympe.dc.V.Fb?a:new olympe.dc.V.Fb(a.R(),a.Qa());return new olympe.dc.na(this.R(),a,b)}yc(a,b){return this.cb(a,b).qd()}Fq(a,b){a=this.db.cb(this,a);return b?a:a.map(c=>olympe.dc.Sync.Lb(c))}wv(a,b){return this.Fq(a,b)[0]||null}Dq(a,b){const c=this.db,d=olympe.$.Sb(),e=olympe.C.Ia(),f=new Map;Ad(c,this.tag,a,(g,h)=>{g?(g=new olympe.C.ec(`forEachRelated: (${this.tag})-[:${a.R()}]-(${h})`,
|
|
641
|
+
e),f.set(h,g),g.run(b,olympe.dc.Sync.Lb(h))):f.has(h)&&(f.get(h).destroy(),f.delete(h))},d);e.Vc(()=>{c.F(this.tag,a,d)})}Tx(){return new olympe.dc.na(this.R(),[],Ic(this.R()))}transform(...a){return(new olympe.dc.na(this.R(),[],this.constructor)).transform(...a)}Wc(){return this.Iq()}toString(){if(!this.db.Hb(this.tag))return`unknown object #${this.tag||'NULL_TAG'}`;const a=this.db.model(this.tag);var b=this.db.name(this);b=b?` instanceName: '${b}'`:'';return a?`${this.db.name(a)}#${this.tag}${b}`:
|
|
642
|
+
`orphan object (no model) #${this.tag}${b}`}tb(a){return a instanceof olympe.dc.Sync?this.R()===a.R():!1}Dd(a){return olympe.C.va([a],b=>olympe.C.rc(this.tb(b)),olympe.C.fa)}Su(a){const b=this.db;let c=!1;if(void 0===a||null===a)a=new olympe.dc.kb,c=!0;const d=olympe.dc.Ja.ORIGIN;for(const [e,f,g]of Cd(b,this))f===d?a.mb(e,g,this):e!==olympe.dc.Sync.modelRel.R()&&a.mb(e,this,g);a.delete(this,olympe.dc.nb.NONE);c&&a.gd()}zv(){const a=new olympe.dc.kb;a.delete(this,olympe.dc.nb.DELETE);return a}};
|
|
643
|
+
olympe.dc.Sync.prototype.getProperty=olympe.dc.Sync.prototype.Ib;olympe.dc.Sync.prototype.observeProperty=olympe.dc.Sync.prototype.lx;olympe.dc.Sync.prototype.getModelTag=olympe.dc.Sync.prototype.hc;olympe.dc.Sync.prototype.getModel=olympe.dc.Sync.prototype.dk;olympe.dc.Sync.prototype.getName=olympe.dc.Sync.prototype.ia;olympe.dc.Sync.prototype.getTag=olympe.dc.Sync.prototype.R;olympe.dc.Sync.getInstancesOf=olympe.dc.Sync.Pv;olympe.dc.Sync.getInstance=olympe.dc.Sync.Lb;
|
|
644
|
+
olympe.dc.Sync.O=olympe.dc.Ba.D('ff021000000000000001',olympe.dc.Sync);olympe.dc.Sync.Mm=olympe.dc.Sync.O.za(olympe.dc.Rb.VERSION);olympe.dc.Sync.nameProp=olympe.dc.Sync.O.za('ff023000000000000011');v('olympe.dc.Sync.nameProp',olympe.dc.Sync.nameProp);olympe.dc.Sync.Ga=olympe.dc.Sync.O.za('ff023000000000000012');olympe.dc.Sync.ka=olympe.dc.Sync.O.Oa('ff02200000000000000a');olympe.dc.Sync.hb=olympe.dc.Sync.O.Oa('ff02200000000000000b',olympe.dc.Ja.ORIGIN);olympe.dc.Sync.propertyRel=olympe.dc.Sync.O.Oa('ff02200000000000000c');
|
|
645
645
|
v('olympe.dc.Sync.propertyRel',olympe.dc.Sync.propertyRel);olympe.dc.Sync.typeRel=olympe.dc.Sync.O.Oa('ff02200000000000000d',olympe.dc.Ja.ORIGIN);olympe.dc.Sync.modelRel=olympe.dc.Sync.O.Oa(olympe.dc.Hc.fe);v('olympe.dc.Sync.modelRel',olympe.dc.Sync.modelRel);olympe.dc.Sync.instancesRel=Q(olympe.dc.Sync.O,olympe.dc.Sync.modelRel);v('olympe.dc.Sync.instancesRel',olympe.dc.Sync.instancesRel);olympe.dc.Sync.La=olympe.dc.Sync.O.Oa('ff022000000000000002');olympe.dc.Sync.G=olympe.dc.Sync.O.Oa('ff022000000000000003');
|
|
646
646
|
olympe.dc.Sync.extendRel=olympe.dc.Sync.O.Oa(olympe.dc.Hc.gh);v('olympe.dc.Sync.extendRel',olympe.dc.Sync.extendRel);olympe.dc.Sync.extendedByRel=Q(olympe.dc.Sync.O,olympe.dc.Sync.extendRel);v('olympe.dc.Sync.extendedByRel',olympe.dc.Sync.extendedByRel);olympe.dc.Sync.containsRel=olympe.dc.Sync.O.Oa(olympe.dc.Hc.sn);v('olympe.dc.Sync.containsRel',olympe.dc.Sync.containsRel);olympe.dc.Sync.Vd=Q(olympe.dc.Sync.O,olympe.dc.Sync.containsRel);olympe.dc.Sync.ja=[olympe.dc.de];l=olympe.dc.Sync.prototype;
|
|
647
|
-
l.nc.K=olympe.C.J.D;l.R.K=new olympe.C.J(()=>String,[]);l.
|
|
648
|
-
l.rm.K=new olympe.C.J(()=>olympe.dc.na,[]);l.
|
|
649
|
-
l.
|
|
650
|
-
new olympe.dc.V.$c)}
|
|
651
|
-
l=olympe.dc.xj.prototype;l.
|
|
652
|
-
olympe.dc.Y.Ab=class{constructor(a,b){a=this.D=a;if(a.D)throw b=a.D.ia(),a=a.D.R(),Error('Cannot work on a new definition without calling done on the previous one or popping it. '+`Make sure done() method has been called on previous definition ${b} (${a})`);if(void 0===this)throw Error('Current def cannot be set to undefined.');a.D=this;this.tag=b;this.G=new Map;this.pa=olympe.dc.Sync.O.R();this.ea=new Map;this.
|
|
653
|
-
this.pa=a;return this}hc(){return this.pa}Xi(a){Y(this);this.W=a;return this}
|
|
654
|
-
a);return this}mq(a){Y(this);this.
|
|
655
|
-
b&&this.La.set(a+'.'+b,[a,b]);return this}done(){if(this.ka)return this;const a=sg(this.D,this.Ga);a.xc(this.tag,this.G,-1);const b=this.D.Gq();this.ea.forEach(c=>{b.includes(c)?this.D.Yq('Instance '+this.tag+' is added to a goo that is among the default ones, this call is unnecessary'):a.sa(olympe.dc.Sync.G.R(),this.tag,c,-1)});b.forEach(c=>{a.sa(olympe.dc.Sync.G.R(),this.tag,c,-1)});tg(this.D,this);a.sa(olympe.dc.Hc.fe,this.tag,this.pa,-1);this.W&&a.sa(olympe.dc.Hc.sn,this.W,this.tag,-1);this.
|
|
656
|
-
{a.sa(olympe.dm.wb.D.R(),this.tag,c,-1)});this.L(-1);this.
|
|
657
|
-
olympe.dc.Y.Ab.prototype.addRelationTo=olympe.dc.Y.Ab.prototype.Wj;olympe.dc.Y.Ab.prototype.addParentGoo=olympe.dc.Y.Ab.prototype.mq;olympe.dc.Y.Ab.prototype.addToGroupOfObjects=olympe.dc.Y.Ab.prototype.pq;olympe.dc.Y.Ab.prototype.setName=olympe.dc.Y.Ab.prototype.yk;olympe.dc.Y.Ab.prototype.setProperty=olympe.dc.Y.Ab.prototype.setProperty;olympe.dc.Y.Ab.prototype.setProperties=olympe.dc.Y.Ab.prototype.Rh;olympe.dc.Y.Ab.prototype.setNameOrProperties=olympe.dc.Y.Ab.prototype.
|
|
658
|
-
olympe.dc.Y.Ab.prototype.setOptional=olympe.dc.Y.Ab.prototype.
|
|
647
|
+
l.nc.K=olympe.C.J.D;l.R.K=new olympe.C.J(()=>String,[]);l.Cw.K=new olympe.C.J(()=>Number,[]);l.Gs.K=new olympe.C.J(()=>String,[]);l.ia.K=olympe.C.J.F;l.Iq.K=olympe.C.J.F;l.dk.K=new olympe.C.J(()=>olympe.dc.Sync,[]);l.hc.K=new olympe.C.J(()=>String,[]);l.Uv.K=new olympe.C.J(()=>olympe.dc.na,[]);l.rd.K=new olympe.C.J(()=>olympe.dc.na,[]);l.Ph.K=olympe.C.J.P;l.Hi.K=new olympe.C.J(()=>olympe.dc.na,[]);l.Pq.K=new olympe.C.J(()=>olympe.dc.Sync,[]);l.uv.K=new olympe.C.J(()=>olympe.dc.Sync,[]);
|
|
648
|
+
l.rm.K=new olympe.C.J(()=>olympe.dc.na,[]);l.bw.K=new olympe.C.J(()=>olympe.dm.User,[]);l.iw.K=new olympe.C.J(()=>olympe.dc.na,[]);l.Ov.K=new olympe.C.J(()=>olympe.dc.na,[]);l.$v.K=new olympe.C.J(()=>olympe.dc.na,[]);l.Nv.K=new olympe.C.J(()=>olympe.dc.na,[]);l.Kq.K=new olympe.C.J(()=>olympe.dc.na,[]);l.bg.K=new olympe.C.J(()=>olympe.C.Node,[]);l.xb.K=olympe.C.J.F;l.Wd.K=olympe.C.J.G;l.Kg.K=olympe.C.J.P;l.Ki.K=new olympe.C.J(()=>olympe.C.bb,[]);l.Qq.K=new olympe.C.J(()=>olympe.C.Color,[]);
|
|
649
|
+
l.kw.K=new olympe.C.J(()=>olympe.dc.Sync,[]);l.cb.K=new olympe.C.J(()=>olympe.dc.na,[]);l.yc.K=new olympe.C.J(()=>olympe.dc.Sync,[]);l.Fq.K=olympe.C.J.D;l.wv.K=olympe.C.J.D;l.Dq.K=new olympe.C.J(()=>{},[]);l.Tx.K=new olympe.C.J(()=>olympe.dc.na,[]);l.transform.K=new olympe.C.J(()=>olympe.dc.na,[]);l.Wc.K=olympe.C.J.F;l.toString.K=olympe.C.J.D;l.tb.K=olympe.C.J.D;l.Dd.K=olympe.C.J.P;l.Su.K=new olympe.C.J(()=>{},[]);l.zv.K=new olympe.C.J(()=>olympe.dc.kb,[]);olympe.dc.xj=class{constructor(a){this.instance=a}R(){return this.instance.R()}Mi(){return lb(this.instance.Kg(olympe.dc.Sync.Ga))}Gv(){return this.instance.yc(olympe.dc.Sync.extendRel,olympe.dc.Sync)}Hi(){return this.instance.transform(new olympe.dc.V.Zb(olympe.dc.Sync.extendRel.R(),olympe.dc.Ja.DESTINATION,olympe.dc.V.Hj.Zr))}xm(){return this.instance.transform(new olympe.dc.V.Zb(olympe.dc.Sync.extendRel.R(),olympe.dc.Ja.DESTINATION,olympe.dc.V.Hj.Ao))}Hd(){return this.xm().transform(olympe.dc.Sync.propertyRel,
|
|
650
|
+
new olympe.dc.V.$c)}Zv(){return this.instance.transform(olympe.dc.Sync.propertyRel)}Xd(){return this.xm().transform(olympe.dc.Sync.ka,new olympe.dc.V.$c)}aw(){return this.instance.transform(olympe.dc.Sync.ka)}static from(a){return olympe.C.va([a],b=>{const c=b.R(),d=olympe.dc.Xa();if(!d.Ph(c))throw Error(`Instance "${d.name(c)}" (tag=${c}) is not a model.`);return new olympe.dc.xj(b)},olympe.dc.xj,'transformToModelInfo')}static Mi(){return lb((void 0).Kg(olympe.dc.Sync.Ga))}};olympe.dc.xj.ja=[olympe.dc.de];
|
|
651
|
+
l=olympe.dc.xj.prototype;l.Gv.K=new olympe.C.J(()=>olympe.dc.Sync,[]);l.Hi.K=new olympe.C.J(()=>olympe.dc.na,[]);l.xm.K=new olympe.C.J(()=>olympe.dc.na,[]);l.Hd.K=new olympe.C.J(()=>olympe.dc.na,[]);l.Zv.K=new olympe.C.J(()=>olympe.dc.na,[]);l.Xd.K=new olympe.C.J(()=>olympe.dc.na,[]);l.aw.K=new olympe.C.J(()=>olympe.dc.na,[]);olympe.dc.Fz=class{};olympe.dc.Y={};olympe.dc.Y.Fo=class{constructor(a){this.N=a}};olympe.dc.Y.Fo.Ye={mi:0,Yz:1,$z:3,Hz:4};olympe.dc.Y.qj=class{};function Y(a){if(a.ka)throw Error('Cannot modify definition after definition is written');}
|
|
652
|
+
olympe.dc.Y.Ab=class{constructor(a,b){a=this.D=a;if(a.D)throw b=a.D.ia(),a=a.D.R(),Error('Cannot work on a new definition without calling done on the previous one or popping it. '+`Make sure done() method has been called on previous definition ${b} (${a})`);if(void 0===this)throw Error('Current def cannot be set to undefined.');a.D=this;this.tag=b;this.G=new Map;this.pa=olympe.dc.Sync.O.R();this.ea=new Map;this.hb=new Map;this.Ta=new Map;this.La=new Map;this.ka=this.Ga=!1;this.W=null}xk(a){Y(this);
|
|
653
|
+
this.pa=a;return this}hc(){return this.pa}Xi(a){Y(this);this.W=a;return this}Gx(){this.Ga=!0;return this}Fx(a){Y(this);const b=new Map;if('string'===typeof a){const c=olympe.dc.Sync.nameProp.R();b.set(c,a||'')}else Object.keys(a).forEach(c=>{b.set(c,a[c])});this.G=b;return this}Rh(a){Y(this);Object.keys(a).forEach(b=>{this.G.set(b,a[b])});return this}setProperty(a,b){Y(this);this.G.set(a,b);return this}yk(a){Y(this);const b=olympe.dc.Sync.nameProp.R();this.G.set(b,a);return this}pq(a){Y(this);this.ea.set(a,
|
|
654
|
+
a);return this}mq(a){Y(this);this.hb.set(a,a);return this}Wj(a,b){Y(this);if(!a)throw Error('Cannot relate an object to another without a relation tag');if(a===olympe.dc.Sync.containsRel.R())throw Error('Container must be defined using dedicated helpers setContainedIn');b&&this.Ta.set(a+'.'+b,[a,b]);return this}wi(a,b){Y(this);if(!a)throw Error('Cannot relate an object to another without a relation tag');if(a===olympe.dc.Sync.containsRel.R())throw Error('Container must be defined using dedicated helper setContainedIn');
|
|
655
|
+
b&&this.La.set(a+'.'+b,[a,b]);return this}done(){if(this.ka)return this;const a=sg(this.D,this.Ga);a.xc(this.tag,this.G,-1);const b=this.D.Gq();this.ea.forEach(c=>{b.includes(c)?this.D.Yq('Instance '+this.tag+' is added to a goo that is among the default ones, this call is unnecessary'):a.sa(olympe.dc.Sync.G.R(),this.tag,c,-1)});b.forEach(c=>{a.sa(olympe.dc.Sync.G.R(),this.tag,c,-1)});tg(this.D,this);a.sa(olympe.dc.Hc.fe,this.tag,this.pa,-1);this.W&&a.sa(olympe.dc.Hc.sn,this.W,this.tag,-1);this.hb.forEach(c=>
|
|
656
|
+
{a.sa(olympe.dm.wb.D.R(),this.tag,c,-1)});this.L(-1);this.Ta.forEach(c=>{a.sa(c[0],this.tag,c[1],-1)});this.La.forEach(c=>{a.sa(c[0],c[1],this.tag,-1)});this.ka=!0;this.D.D=void 0;return this}L(){}R(){return this.tag}ia(){return this.G.get('ff023000000000000011')}};olympe.dc.Y.Ab.prototype.getName=olympe.dc.Y.Ab.prototype.ia;olympe.dc.Y.Ab.prototype.getTag=olympe.dc.Y.Ab.prototype.R;olympe.dc.Y.Ab.prototype.done=olympe.dc.Y.Ab.prototype.done;olympe.dc.Y.Ab.prototype.addRelationFrom=olympe.dc.Y.Ab.prototype.wi;
|
|
657
|
+
olympe.dc.Y.Ab.prototype.addRelationTo=olympe.dc.Y.Ab.prototype.Wj;olympe.dc.Y.Ab.prototype.addParentGoo=olympe.dc.Y.Ab.prototype.mq;olympe.dc.Y.Ab.prototype.addToGroupOfObjects=olympe.dc.Y.Ab.prototype.pq;olympe.dc.Y.Ab.prototype.setName=olympe.dc.Y.Ab.prototype.yk;olympe.dc.Y.Ab.prototype.setProperty=olympe.dc.Y.Ab.prototype.setProperty;olympe.dc.Y.Ab.prototype.setProperties=olympe.dc.Y.Ab.prototype.Rh;olympe.dc.Y.Ab.prototype.setNameOrProperties=olympe.dc.Y.Ab.prototype.Fx;
|
|
658
|
+
olympe.dc.Y.Ab.prototype.setOptional=olympe.dc.Y.Ab.prototype.Gx;olympe.dc.Y.Ab.prototype.setContainedIn=olympe.dc.Y.Ab.prototype.Xi;olympe.dc.Y.Ab.prototype.setModelTag=olympe.dc.Y.Ab.prototype.xk;function ug(a,b,c){const d={[olympe.dc.Sync.nameProp.R()]:b.name||''},e=olympe.dc.Ea(olympe.dm.Property),f=olympe.dc.Sync.propertyRel.R(),g=b.tag;a.D.push();a.D.Vg(g,e).Rh(d).done();a.D.pop();b=b.type;sg(a.D).sa(f,a.R(),g,c);sg(a.D).sa(olympe.dm.Property.typeRel.R(),g,b,c);const h=sg(a.D);a.ea.forEach(k=>{h.sa(olympe.dc.Sync.G.R(),g,k,c)})}
|
|
659
659
|
olympe.dc.Y.Rc=class extends olympe.dc.Y.Ab{constructor(a,b){super(a,b);this.P=this.D.OBJECT;this.Ya=new Map;this.qb=new Map}kr(a){Y(this);this.P=a;return this}extends(a){return this.kr(a)}vi(){Y(this);this.setProperty(olympe.dc.Sync.Ga.R(),!0);return this}defineProperty(a,b,c,d){Y(this);this.Ya.set(a,new olympe.dc.Y.Rc.Property(a,b,c,d));void 0!==d&&super.setProperty(olympe.dc.qg.jd+a,d);return this}zi(a,b,c,d,e,{yi:f=0,Ti:g=0,Wi:h=0}={}){Y(this);b=new olympe.dc.Y.Rc.Relation(a,this.R(),b,c||'',
|
|
660
660
|
d,e,h,f,g);this.qb.set(a,b);return this}L(a){super.L(a);sg(this.D).sa(olympe.dc.Sync.extendRel.R(),this.tag,this.P,a);this.Ya.forEach(b=>{ug(this,b,a)});this.qb.forEach(b=>{this.D.zi(b.D,b.G,b.F,b.name,b.Cq,b.Aq,{Wi:b.Wi,yi:b.yi,Ti:b.Ti},a);const c=sg(this.D);this.ea.forEach(d=>{c.sa(olympe.dc.Sync.G.R(),b.D,d,a)})})}};olympe.dc.Y.Rc.prototype.defineRelation=olympe.dc.Y.Rc.prototype.zi;olympe.dc.Y.Rc.prototype.defineProperty=olympe.dc.Y.Rc.prototype.defineProperty;
|
|
661
661
|
olympe.dc.Y.Rc.prototype['abstract']=olympe.dc.Y.Rc.prototype.vi;olympe.dc.Y.Rc.prototype['extends']=olympe.dc.Y.Rc.prototype.extends;olympe.dc.Y.Rc.prototype.setParentTag=olympe.dc.Y.Rc.prototype.kr;olympe.dc.Y.Rc.Property=class{constructor(a,b,c,d){this.tag=a;this.type=b;this.name=c||'';this.defaultValue=d}};olympe.dc.Y.Rc.Relation=class{constructor(a,b,c,d,e,f,g,h,k){this.D=a;this.G=b;this.F=c;this.name=d;this.Cq=e;this.Aq=f;this.Wi=g;this.yi=h;this.Ti=k}};function sg(a,b){return b?a.W:a.F}function tg(a,b){0<a.L.length&&(b.W||a.F.sa(olympe.dc.Sync.containsRel.R(),a.L[a.L.length-1].R(),b.R(),-1))}
|
|
662
662
|
olympe.dc.Y.ya=class{constructor(a){if(a&&void 0===a.log)throw Error('Argument of OSaveFileBuilder is not a logger - might be a source, adapt implementing classes');this.F=new olympe.dc.transaction.ye(!0);this.W=new olympe.dc.transaction.ye(!0);this.N=a||null;this.pa=[];this.La=!1;this.G=null;this.Ga=new Map;this.ea=null;this.ka=Object.create(null);this.D=void 0;this.L=[];this.P=!0;this.DEFAULT=olympe.dc.qg.jd;this.OBJECT=olympe.dc.Sync.O.R();this.PROPERTY=olympe.dm.Property.O.R();this.RELATION=olympe.dm.Relation.O.R();
|
|
663
|
-
this.STRING=olympe.dm.String.O.R();this.BOOLEAN=olympe.dm.Boolean.O.R();this.NUMBER=olympe.dm.Number.O.R();this.DATETIME=olympe.dm.DateTime.O.R();this.COLOR=olympe.dm.Color.O.R();this.FILE=olympe.dm.File.O.R();this.GOO=olympe.dm.wb.O.R();this.OPERATION=olympe.dm.Ha.O.R();this.ROLE=olympe.dm.
|
|
663
|
+
this.STRING=olympe.dm.String.O.R();this.BOOLEAN=olympe.dm.Boolean.O.R();this.NUMBER=olympe.dm.Number.O.R();this.DATETIME=olympe.dm.DateTime.O.R();this.COLOR=olympe.dm.Color.O.R();this.FILE=olympe.dm.File.O.R();this.GOO=olympe.dm.wb.O.R();this.OPERATION=olympe.dm.Ha.O.R();this.ROLE=olympe.dm.Jb.O.R();this.USER=olympe.dm.User.O.R();this.ONE_ONE=olympe.dm.Relation.L.ot;this.ONE_MANY=olympe.dm.Relation.L.yl;this.MANY_ONE=olympe.dm.Relation.L.ft;this.MANY_MANY=olympe.dm.Relation.L.et;this.NONE=olympe.dm.Ha.D.NONE;
|
|
664
664
|
this.READ=olympe.dm.Ha.D.Il;this.READ_CREATE=olympe.dm.Ha.D.Dj;this.READ_WRITE=olympe.dm.Ha.D.READ_WRITE;this.READ_DELETE=olympe.dm.Ha.D.tp;this.READ_CREATE_WRITE=olympe.dm.Ha.D.Bt;this.READ_LINK=olympe.dm.Ha.D.vg;this.READ_CREATE_LINK=olympe.dm.Ha.D.At;this.READ_WRITE_LINK=olympe.dm.Ha.D.Et;this.READ_DELETE_LINK=olympe.dm.Ha.D.Dt;this.READ_CREATE_WRITE_LINK=olympe.dm.Ha.D.Ct;this.FULL=olympe.dm.Ha.D.bo;this.RELATION_CREATE=olympe.dm.Relation.F.Jl;this.RIGHT_WRITE=olympe.dm.Relation.F.Ml;this.RIGHT_LINK=
|
|
665
665
|
olympe.dm.Relation.F.Ll;this.LEFT_WRITE=olympe.dm.Relation.F.sl;this.LEFT_LINK=olympe.dm.Relation.F.rl;this.BOTH_WRITE=olympe.dm.Relation.F.Kk;this.BOTH_LINK=olympe.dm.Relation.F.Ik;this.DUMP_IGNORE=olympe.dm.Relation.D.wo;this.DUMP_REF=olympe.dm.Relation.D.xp;this.DUMP_REVERSE_REF=olympe.dm.Relation.D.Lt;this.DUMP_UNILATERAL=olympe.dm.Relation.D.Nj;this.DUMP_REVERSE_UNILATERAL=olympe.dm.Relation.D.Gj;this.DUMP_EVERYTHING=olympe.dm.Relation.D.Rn;this.DUMP_DEFAULT=olympe.dm.Relation.D.jd;this.DUMP_REV_DEFAULT=
|
|
666
|
-
olympe.dm.Relation.D.Kt;this.DELETE_REF=this.DUMP_BOTH_REF=olympe.dm.Relation.D.Jk;this.DELETE_REF_AND_DESTINATION=olympe.dm.Relation.D.Ht;this.DELETE_REF_AND_ORIGIN=olympe.dm.Relation.D.It;this.DELETE_EVERYTHING=olympe.dm.Relation.D.Rn;this.OLYMPE_AUTHENTICATED_USERS=olympe.dm.
|
|
667
|
-
new Map,b=olympe.dc.Y.Wt.D(this.ea,this.F,this.W);for(const [c,d]of b.entries())a.set(c,d.G());return a}
|
|
668
|
-
this.log('Generating new tag to replace '+a+'. New tag is: '+this.G);return this.G}ym(a){const b=this.Ga.get(a)||1,c=olympe.$.ym(a,b);this.Ga.set(a,b+1);return c}
|
|
669
|
-
b,c,-1)}
|
|
666
|
+
olympe.dm.Relation.D.Kt;this.DELETE_REF=this.DUMP_BOTH_REF=olympe.dm.Relation.D.Jk;this.DELETE_REF_AND_DESTINATION=olympe.dm.Relation.D.Ht;this.DELETE_REF_AND_ORIGIN=olympe.dm.Relation.D.It;this.DELETE_EVERYTHING=olympe.dm.Relation.D.Rn;this.OLYMPE_AUTHENTICATED_USERS=olympe.dm.Jb.P;this.DEFAULT_GOO=olympe.dm.wb.Kb}Gq(){return[...this.pa]}push(){this.L.push(this.D);this.D=void 0}pop(){if(this.D)throw Error('Cannot unstack definition: current definition not closed');this.D=this.L.pop()}ev(){const a=
|
|
667
|
+
new Map,b=olympe.dc.Y.Wt.D(this.ea,this.F,this.W);for(const [c,d]of b.entries())a.set(c,d.G());return a}mw(){return this.ea}Ex(a){this.P=a}log(...a){this.P&&this.N&&this.N.log(...a)}Qi(...a){this.P&&this.N&&this.N.debug(...a)}Yq(...a){this.P&&this.N&&this.N.warn(...a)}Xq(...a){this.P&&this.N&&this.N.error(...a)}rq(a){if(a&&20===a.length&&!this.La){if(this.ka[a])throw Error('Tag '+a+' is used to define more than one keyword');return this.ka[a]=a}this.G=null===this.G?olympe.$.om():olympe.$.lw(this.G);
|
|
668
|
+
this.log('Generating new tag to replace '+a+'. New tag is: '+this.G);return this.G}ym(a){const b=this.Ga.get(a)||1,c=olympe.$.ym(a,b);this.Ga.set(a,b+1);return c}Kx(a){this.La=a}Uu(){}Ax(...a){this.Qi('Setting as default goo ',a);this.pa=a}Ix(a){this.ea=a}Vg(a,b){return(new olympe.dc.Y.Ab(this,a)).xk(b)}dx(a,b){return(new olympe.dc.Y.Rc(this,a)).yk(b)}cx(a,b){return(new olympe.dc.Y.Rc(this,a)).yk(b).vi()}ar(a){return new olympe.dc.Y.Sc(this,a)}fx(a){return new olympe.dc.Y.bf(this,a)}nk(a,b,c){this.F.sa(a,
|
|
669
|
+
b,c,-1)}ex(a,b,c){return this.ar(this.rq(c)).Wj(olympe.dm.Ha.P.R(),b).wi(olympe.dm.wb.F.R(),a)}defineProperty(a,b,c,d,e){this.Qi('Defining property ',d,' on model ',a);d={[olympe.dc.Sync.nameProp.R()]:d||''};void 0!==e&&this.bc(a,{[olympe.dc.qg.jd+c]:e});this.D?(this.push(),this.Vg(c,olympe.dm.Property.O.R()).Rh(d).done(),this.pop()):this.Vg(c,olympe.dm.Property.O.R()).Rh(d).Xi(a).done();this.nk(olympe.dc.Sync.propertyRel.R(),a,c);this.nk(olympe.dm.Property.typeRel.R(),c,b)}zi(a,b,c,d,e,f,{yi:g=olympe.dm.Relation.L.yl,
|
|
670
670
|
Ti:h=olympe.dm.Relation.F.Jl,Wi:k=0}={},m=-1){if(void 0===e||null===e)throw Error('Cannot define a relation without defining the dump follow rules (must be set to db.DUMP_<something> and cannot be undefined or null)');if(void 0===f||null===f)throw Error('Cannot define a relation without defining the delete follow rules (must be set to db.DELETE_<something> and cannot be undefined or null)');const n=olympe.dm.Relation;d={[olympe.dc.Sync.nameProp.R()]:d||'',[n.$l.R()]:g,[n.Ui.R()]:h,[n.jm.R()]:e,[n.im.R()]:f,
|
|
671
|
-
[n.Qm.R()]:k};this.D?(this.push(),this.Vg(a,n.O.R()).Rh(d).done(),this.pop()):this.Vg(a,n.O.R()).Rh(d).Xi(b).done();this.F.sa(n.originModelRel.R(),b,a,m);this.F.sa(n.destinationModelRel.R(),a,c,m)}
|
|
672
|
-
const d=new Map;Object.keys(b).forEach(e=>{d.set(e,b[e])});this.F.bc(a,d,c,-1)}assign(a,b,c){this.nk(b,a,c)}Au(a,b,c){this.W.sa(b,a,c,-1)}Qu(a){return new olympe.dc.Bc(a)}Mu(a,b,c,d){const e={c:7};e.r=a;e.g=b;e.b=c;e.a=d;return e}Nu({year:a=1970,month:b=1,day:c=1,hour:d=1,minute:e=0,second:f=0,
|
|
671
|
+
[n.Qm.R()]:k};this.D?(this.push(),this.Vg(a,n.O.R()).Rh(d).done(),this.pop()):this.Vg(a,n.O.R()).Rh(d).Xi(b).done();this.F.sa(n.originModelRel.R(),b,a,m);this.F.sa(n.destinationModelRel.R(),a,c,m)}Rw(a,b){this.Qi('Linking instance ',a,' to goo ',b);this.F.sa(olympe.dc.Sync.G.R(),a,b,-1)}Nw(a,b){this.F.sa(olympe.dm.wb.F.R(),a,b,-1)}Ow(a,b){this.F.sa(olympe.dm.Ha.P.R(),a,b,-1)}Pw(a,b){this.F.sa(olympe.dm.Jb.D.R(),a,b,-1)}bc(a,b,c=!1){this.Qi('Updating instance ',a);delete b[olympe.dc.Rb.Sd];delete b[olympe.dc.Rb.VERSION];
|
|
672
|
+
const d=new Map;Object.keys(b).forEach(e=>{d.set(e,b[e])});this.F.bc(a,d,c,-1)}assign(a,b,c){this.nk(b,a,c)}Au(a,b,c){this.W.sa(b,a,c,-1)}Qu(a){return new olympe.dc.Bc(a)}Mu(a,b,c,d){const e={c:7};e.r=a;e.g=b;e.b=c;e.a=d;return e}Nu({year:a=1970,month:b=1,day:c=1,hour:d=1,minute:e=0,second:f=0,oC:g=0,AC:h=0}={}){const k={c:4};k.y=a;k.M=b;k.d=c;k.h=d;k.m=e;k.s=f;k.S=g;k.z=h;return k}jv(a){a=new Date(Date.parse(a));const b={c:4};b.y=a.getFullYear();b.M=a.getMonth()+1;b.d=a.getDate();b.h=a.getHours();
|
|
673
673
|
b.m=a.getMinutes();b.s=a.getSeconds();b.S=a.getMilliseconds();b.z=-a.getTimezoneOffset();return b}Ou(a){a='number'===typeof a?new Date(a):a;const b={c:4};b.h=a.getHours();b.m=a.getMinutes();b.s=a.getSeconds();b.S=a.getMilliseconds();b.z=a.getTimezoneOffset();b.y=a.getFullYear();b.M=a.getMonth()+1;b.d=a.getDate();return b}Ei(a,b,c){return olympe.auth.zb.je.Ei(a,c)}Eq(a,b){return olympe.auth.zb.je.Ei(a,b)}mb(){throw Error('DeleteRelation method on OSaveFile is deprecated');}qc(){throw Error('DeleteInstance method on OSaveFile is deprecated');
|
|
674
674
|
}};olympe.dc.Y.ya.prototype.deleteInstance=olympe.dc.Y.ya.prototype.qc;olympe.dc.Y.ya.prototype.deleteRelation=olympe.dc.Y.ya.prototype.mb;olympe.dc.Y.ya.prototype.generateAuthenticationData=olympe.dc.Y.ya.prototype.Eq;olympe.dc.Y.ya.prototype.generateAuthData=olympe.dc.Y.ya.prototype.Ei;olympe.dc.Y.ya.prototype.createDateTimeLegacy=olympe.dc.Y.ya.prototype.Ou;olympe.dc.Y.ya.prototype.fromISODate=olympe.dc.Y.ya.prototype.jv;olympe.dc.Y.ya.prototype.createDateTime=olympe.dc.Y.ya.prototype.Nu;
|
|
675
|
-
olympe.dc.Y.ya.prototype.createColor=olympe.dc.Y.ya.prototype.Mu;olympe.dc.Y.ya.prototype.createReference=olympe.dc.Y.ya.prototype.Qu;olympe.dc.Y.ya.prototype.assignOptional=olympe.dc.Y.ya.prototype.Au;olympe.dc.Y.ya.prototype.assign=olympe.dc.Y.ya.prototype.assign;olympe.dc.Y.ya.prototype.updateInstance=olympe.dc.Y.ya.prototype.bc;olympe.dc.Y.ya.prototype.linkRoleToUser=olympe.dc.Y.ya.prototype.
|
|
676
|
-
olympe.dc.Y.ya.prototype.linkGroupOfObjectsToOperation=olympe.dc.Y.ya.prototype.
|
|
677
|
-
olympe.dc.Y.ya.prototype.newOperation=olympe.dc.Y.ya.prototype.ar;olympe.dc.Y.ya.prototype.newAbstractModel=olympe.dc.Y.ya.prototype.
|
|
678
|
-
olympe.dc.Y.ya.prototype.setUseNewTags=olympe.dc.Y.ya.prototype.
|
|
675
|
+
olympe.dc.Y.ya.prototype.createColor=olympe.dc.Y.ya.prototype.Mu;olympe.dc.Y.ya.prototype.createReference=olympe.dc.Y.ya.prototype.Qu;olympe.dc.Y.ya.prototype.assignOptional=olympe.dc.Y.ya.prototype.Au;olympe.dc.Y.ya.prototype.assign=olympe.dc.Y.ya.prototype.assign;olympe.dc.Y.ya.prototype.updateInstance=olympe.dc.Y.ya.prototype.bc;olympe.dc.Y.ya.prototype.linkRoleToUser=olympe.dc.Y.ya.prototype.Pw;olympe.dc.Y.ya.prototype.linkOperationToRole=olympe.dc.Y.ya.prototype.Ow;
|
|
676
|
+
olympe.dc.Y.ya.prototype.linkGroupOfObjectsToOperation=olympe.dc.Y.ya.prototype.Nw;olympe.dc.Y.ya.prototype.linkToGroupOfObjects=olympe.dc.Y.ya.prototype.Rw;olympe.dc.Y.ya.prototype.defineRelation=olympe.dc.Y.ya.prototype.zi;olympe.dc.Y.ya.prototype.defineProperty=olympe.dc.Y.ya.prototype.defineProperty;olympe.dc.Y.ya.prototype.newPermissions=olympe.dc.Y.ya.prototype.ex;olympe.dc.Y.ya.prototype.newRelation=olympe.dc.Y.ya.prototype.nk;olympe.dc.Y.ya.prototype.newUser=olympe.dc.Y.ya.prototype.fx;
|
|
677
|
+
olympe.dc.Y.ya.prototype.newOperation=olympe.dc.Y.ya.prototype.ar;olympe.dc.Y.ya.prototype.newAbstractModel=olympe.dc.Y.ya.prototype.cx;olympe.dc.Y.ya.prototype.newModel=olympe.dc.Y.ya.prototype.dx;olympe.dc.Y.ya.prototype.newInstance=olympe.dc.Y.ya.prototype.Vg;olympe.dc.Y.ya.prototype.setRootInstanceTag=olympe.dc.Y.ya.prototype.Ix;olympe.dc.Y.ya.prototype.setDefaultGroupOfObjects=olympe.dc.Y.ya.prototype.Ax;olympe.dc.Y.ya.prototype.disableChecks=olympe.dc.Y.ya.prototype.Uu;
|
|
678
|
+
olympe.dc.Y.ya.prototype.setUseNewTags=olympe.dc.Y.ya.prototype.Kx;olympe.dc.Y.ya.prototype.assignTag=olympe.dc.Y.ya.prototype.rq;olympe.dc.Y.ya.prototype.logError=olympe.dc.Y.ya.prototype.Xq;olympe.dc.Y.ya.prototype.logWarn=olympe.dc.Y.ya.prototype.Yq;olympe.dc.Y.ya.prototype.logDebug=olympe.dc.Y.ya.prototype.Qi;olympe.dc.Y.ya.prototype.log=olympe.dc.Y.ya.prototype.log;olympe.dc.Y.ya.prototype.setLoggingEnabled=olympe.dc.Y.ya.prototype.Ex;olympe.dc.Y.ya.prototype.getRootInstanceTag=olympe.dc.Y.ya.prototype.mw;
|
|
679
679
|
olympe.dc.Y.ya.prototype.flushContents=olympe.dc.Y.ya.prototype.ev;olympe.dc.Y.ya.prototype.getDefaultGroupOfObjects=olympe.dc.Y.ya.prototype.Gq;olympe.dc.Y.Sc=class extends olympe.dc.Y.Ab{constructor(a,b){super(a,b);this.F=0;this.xk(olympe.dc.Ea(olympe.dm.Ha))}nq(){Y(this);this.F|=1;this.G.set(olympe.dm.Ha.F.R(),this.F);return this}jq(){Y(this);this.F|=2;this.G.set(olympe.dm.Ha.F.R(),this.F);return this}qq(){Y(this);this.F|=4;this.G.set(olympe.dm.Ha.F.R(),this.F);return this}kq(){Y(this);this.F|=8;this.G.set(olympe.dm.Ha.F.R(),this.F);return this}lq(){Y(this);this.F|=16;this.G.set(olympe.dm.Ha.F.R(),this.F);return this}nu(){this.nq().kq().jq().lq().qq();
|
|
680
680
|
return this}Bu(a){this.wi(olympe.dm.wb.F.R(),a);return this}Cu(a){this.Wj(olympe.dm.Ha.P.R(),a);return this}};olympe.dc.Y.Sc.prototype.associateToRole=olympe.dc.Y.Sc.prototype.Cu;olympe.dc.Y.Sc.prototype.associateToGoo=olympe.dc.Y.Sc.prototype.Bu;olympe.dc.Y.Sc.prototype.addAllPermissions=olympe.dc.Y.Sc.prototype.nu;olympe.dc.Y.Sc.prototype.addLinkPermission=olympe.dc.Y.Sc.prototype.lq;olympe.dc.Y.Sc.prototype.addDeletePermission=olympe.dc.Y.Sc.prototype.kq;
|
|
681
|
-
olympe.dc.Y.Sc.prototype.addWritePermission=olympe.dc.Y.Sc.prototype.qq;olympe.dc.Y.Sc.prototype.addCreatePermission=olympe.dc.Y.Sc.prototype.jq;olympe.dc.Y.Sc.prototype.addReadPermission=olympe.dc.Y.Sc.prototype.nq;olympe.dc.Y.Nf=class extends olympe.dc.Y.Rc{constructor(a,b,c){super(a,b);this.F=this.description=null;this.setProperty(olympe.dm.BrickMetadata.qb.R(),olympe.dm.BrickMetadata.ed.wt);null!==c&&(this.oq(c),this.mq(c))}oq(a){this.Xi(a);this.wi(olympe.dm.Qb.L.R(),a);return this}
|
|
682
|
-
olympe.sc.uc.O.R()),this.description&&a.setProperty(olympe.sc.uc.D.R(),this.description),this.F&&a.setProperty(olympe.sc.uc.L.R(),this.F),a.Xi(this.tag).pq(this.tag).Wj(olympe.sc.uc.F.R(),this.tag).done(),this.D.pop()}};olympe.dc.Y.Nf.prototype.setSummary=olympe.dc.Y.Nf.prototype.
|
|
681
|
+
olympe.dc.Y.Sc.prototype.addWritePermission=olympe.dc.Y.Sc.prototype.qq;olympe.dc.Y.Sc.prototype.addCreatePermission=olympe.dc.Y.Sc.prototype.jq;olympe.dc.Y.Sc.prototype.addReadPermission=olympe.dc.Y.Sc.prototype.nq;olympe.dc.Y.Nf=class extends olympe.dc.Y.Rc{constructor(a,b,c){super(a,b);this.F=this.description=null;this.setProperty(olympe.dm.BrickMetadata.qb.R(),olympe.dm.BrickMetadata.ed.wt);null!==c&&(this.oq(c),this.mq(c))}oq(a){this.Xi(a);this.wi(olympe.dm.Qb.L.R(),a);return this}Dx(a){this.G.set(olympe.dm.be.Ya.R(),a);return this}Bx(a){Y(this);this.description=a;return this}Jx(a){Y(this);this.F=a;return this}L(a){super.L(a);if(null!==this.description||null!==this.F)this.D.push(),a=this.D.Vg(this.D.ym(this.tag),
|
|
682
|
+
olympe.sc.uc.O.R()),this.description&&a.setProperty(olympe.sc.uc.D.R(),this.description),this.F&&a.setProperty(olympe.sc.uc.L.R(),this.F),a.Xi(this.tag).pq(this.tag).Wj(olympe.sc.uc.F.R(),this.tag).done(),this.D.pop()}};olympe.dc.Y.Nf.prototype.setSummary=olympe.dc.Y.Nf.prototype.Jx;olympe.dc.Y.Nf.prototype.setDescription=olympe.dc.Y.Nf.prototype.Bx;olympe.dc.Y.Nf.prototype.setIcon=olympe.dc.Y.Nf.prototype.Dx;olympe.dc.Y.Nf.prototype.addToFolder=olympe.dc.Y.Nf.prototype.oq;olympe.dc.Y.Wt=class a{constructor(b,c,d){this.F=b;this.ra=c||[];this.D=d||[]}static D(b,c,d){if(c instanceof olympe.dc.transaction.ye&&d instanceof olympe.dc.transaction.ye){c=be(c);var e=be(d)}else e=new olympe.dc.transaction.ye(!0),c.md(e),c=be(e),d.md(e),e=be(e);d=new Map;var f=new a(b,c.Vf,e.Vf);f.qf()||d.set('delRel',f);f=new a(b,c.Ee,e.Ee);f.qf()||d.set('detInst',f);f=new a(b,c.fg,e.fg);f.qf()||d.set('newInst',f);f=new a(b,c.xf,e.xf);f.qf()||d.set('updateInst',f);b=new a(b,c.gg,e.gg);b.qf()||
|
|
683
683
|
d.set('newRel',b);return d}qf(){return 0===this.ra.length+this.D.length}G(){const b=(d,e)=>{var f=d.o,g=e.o;return f!==g?f<g?-1:1:1===f||2===f||3===f?(f=d.t,g=e.t,f===g?(d=Object.keys(d.p)[0],e=Object.keys(e.p)[0],void 0!==d?d.localeCompare(e):1):f.localeCompare(g)):4===f||5===f?(f=d.l,g=e.l,f===g?(f=d.m,g=e.m,f===g?d.r.localeCompare(e.r):f.localeCompare(g)):f.localeCompare(g)):JSON.stringify(f).localeCompare(JSON.stringify(g))},c=Object.create(null);c.rootTag=this.F;c.operations=this.ra.sort(b);
|
|
684
|
-
c.optionalOperations=this.D.sort(b);return c}};olympe.dc.Y.
|
|
685
|
-
c=new Map;c.set(olympe.dm.User.loginProp.R(),b.login);c.set(olympe.dm.User.saltProp.R(),b.salt);c.set(olympe.dm.User.verifierProp.R(),b.verifier);sg(this.D).bc(this.R(),c,!1,a)}};olympe.dc.Y.
|
|
686
|
-
u);const x=new Map;x.set(olympe.dm.File.urlProp.R(),u);h.bc(r,x);this.D.storage.D(q)})})};for(const n of c)(c=a.
|
|
687
|
-
h=f.get('files'),k=new olympe.async.Jf(c);this.F.forEach((m,n)=>{if(n!==g){const p=this.Ga.L(n);null!==p?(k.add(this.
|
|
688
|
-
h.tag());Nc(d,e,g,[],f)(!0)});c()});Ab(b,(c,d)=>{a(d?Error(d):null)});b.start()}ba(){return olympe.dc.Na.
|
|
689
|
-
break;case b:case c:const q=a.content;a.D.forEach(u=>{let x=this.F.get(u);void 0===x&&(x=new olympe.dc.db.Gc,this.F.set(u,x));q.md(x);this.L&&(this.P=!0)});a.validate(null);a=olympe.dc.transaction.Ag.D.$o;this.G(olympe.dc.Na.
|
|
690
|
-
break;case h:case m:case k:n=a.content;b=n.file;const w=n.Yg;c=n.hg;p===h?Gb(this.D,b,n.content,n.mimeType,w,c):p===m?Hb(this.D,u=>{w(u)}):this.D.storage.D(c);a.validate(null)}}ka(a){this.G=a}ea(){}close(){this.La.destroy()}
|
|
691
|
-
olympe.C.tc([Qb(this.W)],b=>{b.valueOf()?(this.L=!1,a&&(dc(a),a=null)):(this.L=!0,a=cc(()=>{if(this.P){this.P=!1;for(const c of this.F.keys())Db(this.D,c,this.F.get(c),()=>{},d=>{this.N.error(`Could persist transaction for ${c}: ${d}`)})}},5E3))})}};olympe.
|
|
692
|
-
e.close();d.N.debug('Peer connection closed :',c)}});olympe.C.ik(Qb(this.W),()=>{this.N.info('Router: ONLINE')},()=>{this.N.log('Router: OFFLINE (no auth layer not online)');for(const c of this.ea.ic.values())this.
|
|
693
|
-
(e=new Map,this.F.set(b,e));e.set(d,c)}P(b){this.pa.set(olympe.$.Xf(),b)}La(b,c,d){this.F.has(c)&&this.F.get(c).forEach(e=>{e(b,d)})}L(b,c=!0){let d=this.xa.D[b]||null;if(!c||null!==d)return d;d=this.
|
|
684
|
+
c.optionalOperations=this.D.sort(b);return c}};olympe.dc.Y.bf=class extends olympe.dc.Y.Ab{constructor(a,b){super(a,b);this.F=this.P=null;this.xk(olympe.dc.Ea(olympe.dm.User))}Lx(a){Y(this);this.P=a;return this}Rm(a){Y(this);this.F=a;return this}Cx(){return this}Du(a){Y(this);this.wi(olympe.dm.User.D.R(),a);return this}L(a){super.L(a);if(null==this.P||''===this.P)throw Error('A username must be set when calling new User');if(null==this.F||''===this.F)throw Error('A password must be set when calling new User');const b=this.D.Eq(this.P,this.F),
|
|
685
|
+
c=new Map;c.set(olympe.dm.User.loginProp.R(),b.login);c.set(olympe.dm.User.saltProp.R(),b.salt);c.set(olympe.dm.User.verifierProp.R(),b.verifier);sg(this.D).bc(this.R(),c,!1,a)}};olympe.dc.Y.bf.prototype.awardRole=olympe.dc.Y.bf.prototype.Du;olympe.dc.Y.bf.prototype.setDomain=olympe.dc.Y.bf.prototype.Cx;olympe.dc.Y.bf.prototype.setPassword=olympe.dc.Y.bf.prototype.Rm;olympe.dc.Y.bf.prototype.setUsername=olympe.dc.Y.bf.prototype.Lx;olympe.dc.Y.T={ts:'dc.io.IOService',kh:'dc.io.IOUrlsProvider'};olympe.U.config(function(a){qa(a,olympe.dc.Y.T.kh);A(a,olympe.dc.Y.T.ts,[olympe.ua.T.wa,olympe.Aa.T.wa,olympe.auth.T.wa,olympe.dc.Y.T.kh],b=>new olympe.dc.Y.Fo(b.Ic('dc.io')))},'olympe.dc.io');olympe.dc.Y.kC=function(a,b,c=!1){if(a.startsWith('@')||a.startsWith('v'))return!1;a.startsWith(olympe.dc.qg.jd)&&(a=a.substring(1));const d=olympe.dc.Xa();return b?c?Ed(d,a,b):Ed(d,a,d.model(b)):d.Hb(a)};olympe.fb={};olympe.fb.Pf=class{ba(){}Oc(){}pa(){}ka(){}ea(){}close(){}};olympe.fb.oa={St:1,ut:2,uz:3,Mk:4,Ey:5};olympe.fb.ph=class{constructor(a,b,c,d){this.N=a;this.La=new olympe.C.ec('Local source');this.F=new Map;this.W=b;this.D=c;this.Ga=this.G=null;this.P=this.L=!1;d.get('syncTimeout');d.get('autoSync')&&this.hb();d.get('autoPersist')&&this.Ta()}qb(a){this.Ga=a}Kb(a,b,c,d,e){const f=olympe.dc.la.oa.Ql,g=olympe.dc.la.oa.Rk,h=new olympe.dc.db.Gc,k=new olympe.async.Jf(olympe.C.Ia()),m=(n,p,q)=>{const r=n.tag(),t=n.Ib(olympe.dm.File.mimeTypeProp.R());Hb(this.D,w=>{olympe.dc.Iv().ne(r,w,t,u=>{n.za(olympe.dm.File.urlProp.R(),
|
|
686
|
+
u);const x=new Map;x.set(olympe.dm.File.urlProp.R(),u);h.bc(r,x);this.D.storage.D(q)})})};for(const n of c)(c=a.Lb(n))&&c.Je()&&k.add(m.bind(this,c));Ab(k,(n,p)=>{n?(n=Ac(new olympe.dc.la(f,a,[b.ba()]),q=>{q?e(q.message):(this.G(b.ba(),g,h),q=Array.from(a.rd()).map(r=>r.tag()),olympe.dc.Tc().persist(q),d())}),b.pa(n)):e(`Transaction synchronisation failed! ${p?p:''}`)});k.start()}Ub(a){const b=olympe.async.Jj.create(),c=b.G;b.add((d,e)=>{this.D.storage.L(e)});b.add((d,e,f)=>{const g=olympe.dc.Na.jb,
|
|
687
|
+
h=f.get('files'),k=new olympe.async.Jf(c);this.F.forEach((m,n)=>{if(n!==g){const p=this.Ga.L(n);null!==p?(k.add(this.Kb.bind(this,m,p,h)),this.D.storage.D(void 0)):e(`The source: ${n} is not reachable.`)}});Ab(k,(m,n)=>{m?d():e(n||void 0)});k.start()});Ab(b,(d,e)=>{a(d?null:Error(e));d&&(this.P=!1,this.F.clear())});b.start()}Ya(a){const b=new olympe.async.Jj(olympe.C.Ia());b.add((c,d)=>{Eb(this.D,e=>null===e?c():d(e))});b.add(c=>{const d=olympe.dc.Tc();this.F.forEach((e,f)=>{const g=Array.from(e.rd()).map(h=>
|
|
688
|
+
h.tag());Nc(d,e,g,[],f)(!0)});c()});Ab(b,(c,d)=>{a(d?Error(d):null)});b.start()}ba(){return olympe.dc.Na.jb}Oc(){return''}pa(a){var b=olympe.dc.la.oa.ri,c=olympe.dc.la.oa.ah;const d=olympe.dc.la.oa.$h,e=olympe.dc.la.oa.Zh,f=olympe.dc.la.oa.pg,g=olympe.dc.la.oa.cl,h=olympe.dc.la.oa.Qj,k=olympe.dc.la.oa.Tk,m=olympe.dc.la.oa.ij;var n=olympe.dc.la.oa.Yk;const p=a.type;switch(p){case f:a.validate(null);this.D.storage.F(void 0);this.Ya(u=>{null!==u&&this.N.error(`Could not load transactions: ${u.message}`)});
|
|
689
|
+
break;case b:case c:const q=a.content;a.D.forEach(u=>{let x=this.F.get(u);void 0===x&&(x=new olympe.dc.db.Gc,this.F.set(u,x));q.md(x);this.L&&(this.P=!0)});a.validate(null);a=olympe.dc.transaction.Ag.D.$o;this.G(olympe.dc.Na.jb,n,{id:q.ba(),finalize:a});break;case e:case d:const r=a.D[0],t=a.content;a.validate(null);Cb(this.D,t.ba(),u=>{this.N.warn('No graphresult for subscription : '+t.ba(),u,'\n',t.Og.toJSON());this.N.warn();this.G(r,g,new olympe.dc.query.bi(t.ba(),r,olympe.dc.Na.jb,new olympe.dc.db.Gc))});
|
|
690
|
+
break;case h:case m:case k:n=a.content;b=n.file;const w=n.Yg;c=n.hg;p===h?Gb(this.D,b,n.content,n.mimeType,w,c):p===m?Hb(this.D,u=>{w(u)}):this.D.storage.D(c);a.validate(null)}}ka(a){this.G=a}ea(){}close(){this.La.destroy()}hb(){olympe.C.tc([Qb(this.W)],a=>{if(a.valueOf()){const b=this.F.keys();this.Ub(c=>{if(c)this.N.error('An error occurred while auto synchronising:\n'+c.message);else if(this.N.debug('Auto synchronise transactions successfully'),this.L)for(const d of b)Fb(this.D,e=>{this.N.error(`Could not clear transactions for ${d}: ${e}.`)})})}})}Ta(){let a;
|
|
691
|
+
olympe.C.tc([Qb(this.W)],b=>{b.valueOf()?(this.L=!1,a&&(dc(a),a=null)):(this.L=!0,a=cc(()=>{if(this.P){this.P=!1;for(const c of this.F.keys())Db(this.D,c,this.F.get(c),()=>{},d=>{this.N.error(`Could persist transaction for ${c}: ${d}`)})}},5E3))})}};olympe.fb.ph.D='context';olympe.fb.ph.ja=[olympe.fb.Pf];function vg(a,b){const c=b.ba();a.D[c]?a.N.error('Attempt to register a source twice'):(a.D[c]=b,a.N.debug(`New source '${c}' added to the router.`))}olympe.fb.Ba=class{constructor(a){this.N=a;this.D=Object.create(null);this.F=Object.create(null)}forEach(a){const b=Object.keys(this.D);for(let c=0,d=b.length;c<d;c++)a(this.D[b[c]])}};olympe.fb.Kj=class{D(){}};olympe.fb.Buffer=class{constructor(){this.counter=0;this.ic=new Map}clear(a){this.ic.delete(a)}};olympe.fb.Mf=class a{constructor(b,c,d,e,f,g){this.N=b;this.W=c;this.ea=new olympe.fb.Buffer(this);this.xa=d;this.G=this.Ub(g);this.Ya=e;this.hb=new olympe.C.ec('Data Router context');this.F=new Map;this.pa=new Map;this.qb(f)}qb(b){this.N.info('Initializing DR layer');vg(this.xa,b);b.ka(this.La.bind(this));b.ea(this.ka.bind(this));b.qb(this);this.P((c,d)=>{this.N.debug('Source event occurred',d,'fired by source',c);if(d===olympe.dc.ni.Eo&&(d=this.xa,d.D[c])){const e=d.D[c];delete d.F[c];delete d.D[c];
|
|
692
|
+
e.close();d.N.debug('Peer connection closed :',c)}});olympe.C.ik(Qb(this.W),()=>{this.N.info('Router: ONLINE')},()=>{this.N.log('Router: OFFLINE (no auth layer not online)');for(const c of this.ea.ic.values())this.Ta(c)});this.N.log('DONE initializing DR layer (waiting for AUTH layer session to be established)')}send(b){var c=this.ea;const d=c.counter++;c.ic.set(d,b);Ac(b,c.clear.bind(c,d));this.Ta(b)}Ga(b){return(b=this.L(b))?b.Oc():''}D(b,c){const d=olympe.$.Sb();let e=this.F.get(b);void 0===e&&
|
|
693
|
+
(e=new Map,this.F.set(b,e));e.set(d,c)}P(b){this.pa.set(olympe.$.Xf(),b)}La(b,c,d){this.F.has(c)&&this.F.get(c).forEach(e=>{e(b,d)})}L(b,c=!0){let d=this.xa.D[b]||null;if(!c||null!==d)return d;d=this.hb.run(()=>this.Ya.D(b,this));vg(this.xa,d);return d}ka(b,c){this.pa.forEach(d=>{d(b,c)})}Ta(b){this.N.debug('Processing message',b.toString());const c=b.type!==olympe.dc.la.oa.Pl&&b.type!==olympe.dc.la.oa.bl;this.Kb(b).forEach(d=>{(d=this.L(d,c))&&d.pa(b)})}Kb(b){var c=olympe.dc.la.oa.pg,d=olympe.dc.la.oa.Zh,
|
|
694
694
|
e=olympe.dc.la.oa.$h,f=olympe.dc.la.oa.ri,g=olympe.dc.la.oa.ah;const h=olympe.dc.la.oa.Qj,k=olympe.dc.la.oa.Tk,m=olympe.dc.la.oa.ij;switch(b.type){case c:d=this.G.get(a.D.pg)||[];break;case d:case e:d=this.G.get(a.D.Gl)||[];break;case f:case g:d=this.G.get(a.D.cu)||[];break;case h:case m:case k:d=this.G.get(a.D.Yr)||[];break;default:d=[]}c=b.content;e=olympe.auth.qa.D.kg;f=olympe.auth.qa.D.jh;g=Pb(this.W);e=!(g===e||g===f);for(var n of d)if(d=n,f=c&&c.ba&&c.ba(),g=d.get('type'),g===a.F.wl&&e||g===
|
|
695
|
-
a.F.uo&&d.get('id')===f||g===a.F.jd)return n=n.get('destinations'),this.N.debug('Message',b.toString(),'is redirect to',n),n;this.N.debug('Message',b.toString(),'not redirect');return b.D}Ub(b){const c=Object.values(olympe.
|
|
696
|
-
n),h.push(n),m===a.F.uo&&n.set('id',k.id)):this.N.error('Routing rule',f,m,'is not valid. Destinations must be stored in an array')}else this.N.error('Routing rule',f,m,'is not valid. Valid rules are',d.toString())})}else this.N.error('Routing rule',f,'is not valid. Rules must be ordered in an array');else this.N.error('Routing rule',f,'is not valid. Valid messages are',c.toString())});return e}};olympe.
|
|
697
|
-
olympe.
|
|
698
|
-
olympe.U.config(function(a){C(a,olympe.
|
|
699
|
-
e)});y(a,olympe.
|
|
700
|
-
function xg(a,b,c,d,e,f){const g=olympe.C.Ia();e={Yg:g.rb(e),hg:f&&g.rb(f)};if(a.D.has(b))a.D.get(b).push(e);else{a.D.set(b,[e]);if(null===c){var h=hc(a.L+'/'+b);ic(h,{Authorization:olympe.C.
|
|
701
|
-
`Failed to download file ${b}. Response code ${m}`;n&&n.forEach(q=>{q.hg&&q.hg(p)})}a.D.delete(b)})})}}function yg(a,b,c,d){const e=hc(a.L+'/'+b,olympe.Aa.Xb.hi.DELETE);ic(e,{Authorization:olympe.C.
|
|
695
|
+
a.F.uo&&d.get('id')===f||g===a.F.jd)return n=n.get('destinations'),this.N.debug('Message',b.toString(),'is redirect to',n),n;this.N.debug('Message',b.toString(),'not redirect');return b.D}Ub(b){const c=Object.values(olympe.fb.Mf.D),d=Object.values(olympe.fb.Mf.F);b=Object.entries(b);const e=new Map;b.forEach(([f,g])=>{if(c.includes(f))if(g instanceof Array){var h=[];e.set(f,h);g.forEach(k=>{const m=k.type;if(d.includes(m)){var n=k.destinations;n instanceof Array?(n=(new Map).set('type',m).set('destinations',
|
|
696
|
+
n),h.push(n),m===a.F.uo&&n.set('id',k.id)):this.N.error('Routing rule',f,m,'is not valid. Destinations must be stored in an array')}else this.N.error('Routing rule',f,m,'is not valid. Valid rules are',d.toString())})}else this.N.error('Routing rule',f,'is not valid. Rules must be ordered in an array');else this.N.error('Routing rule',f,'is not valid. Valid messages are',c.toString())});return e}};olympe.fb.Mf.D={pg:'getContext',Gl:'query',cu:'transaction',Yr:'file'};
|
|
697
|
+
olympe.fb.Mf.F={jd:'default',wl:'offline',uo:'id'};olympe.fb.Mf.ja=[olympe.dc.Mf];olympe.fb.T={wa:'dr.Manager',Fa:'dr.Logger',Gp:'dr.SourceRegistry',ze:'dr.sources.Router',wh:'dr.sources.Factory',Mo:'dr.sources.Local'};olympe.fb.Z={bn:'dr.autoSync',an:'dr.autoPersist',Lp:'dr.syncTimeout',Ap:'dr.routing'};
|
|
698
|
+
olympe.U.config(function(a){C(a,olympe.fb.Z.Ap,{});C(a,olympe.fb.Z.bn,!1);C(a,olympe.fb.Z.an,!1);C(a,olympe.fb.Z.Lp,3E4);A(a,olympe.fb.T.Fa,[olympe.ua.T.wa],b=>b.Ic('dr'));y(a,olympe.fb.T.Gp,olympe.fb.Ba,olympe.fb.T.Fa);A(a,olympe.fb.T.Mo,[olympe.fb.T.Fa,olympe.auth.T.wa,olympe.Wb.T.Dn,new olympe.U.ha(olympe.fb.Z.bn),new olympe.U.ha(olympe.fb.Z.an),new olympe.U.ha(olympe.fb.Z.Lp)],(b,c,d,e,f,g)=>{e=(new Map).set('autoSync',e).set('autoPersist',f).set('syncTimeout',g);return new olympe.fb.ph(b,c,d,
|
|
699
|
+
e)});y(a,olympe.fb.T.ze,olympe.fb.Mf,olympe.fb.T.Fa,olympe.auth.T.wa,olympe.fb.T.Gp,olympe.fb.T.wh,olympe.fb.T.Mo,new olympe.U.ha(olympe.fb.Z.Ap));B(a,olympe.dc.T.ze,olympe.fb.T.ze);qa(a,olympe.fb.T.wh);A(a,olympe.dc.query.kc.vj,[olympe.dc.query.kc.vj],b=>new olympe.dc.Fl(b))},'olympe.dr');olympe.H={};olympe.H.Ac={eh:1,Af:2,zc:3,Ve:4,Hr:5,ci:6,Nz:7};olympe.H.oa={ci:1,hu:2,Xr:3,nh:5};olympe.H.qa=class{Ga(){}connect(){}disconnect(){}Rg(){}Sg(){}G(){}oe(){}Gd(){}La(){}gf(){}Mm(){}br(){}};olympe.H.qa.D={INIT:'initialize',CONNECTING:'connecting',Qe:'disconnected',dh:'connected',zc:'error'};olympe.H.qa.G={xl:1,cs:-1,ss:-2,au:-3};function wg(a,b,c,d,e,f){const g=hc(a.L+'/'+b,olympe.Aa.Xb.hi.op,c,olympe.Aa.Xb.ResponseType.Hk);ic(g,{Authorization:olympe.C.Sa(Sb(a.F)),[olympe.Aa.Xb.Headers.Bn]:d||'application/octet-stream'});a.G.D(g,h=>{h=h.status;h===olympe.Aa.Xb.Ye.xl||h===olympe.Aa.Xb.Ye.tn?(h=new URL(g.D()),e(h.pathname)):f&&(h=`Failed to create file ${b}. Response code ${h}`,a.N.error(h),f(h))})}
|
|
700
|
+
function xg(a,b,c,d,e,f){const g=olympe.C.Ia();e={Yg:g.rb(e),hg:f&&g.rb(f)};if(a.D.has(b))a.D.get(b).push(e);else{a.D.set(b,[e]);if(null===c){var h=hc(a.L+'/'+b);ic(h,{Authorization:olympe.C.Sa(Sb(a.F))})}else h=hc(c);h.F=olympe.Aa.Xb.ResponseType.Hk;ic(h,{[olympe.Aa.Xb.Headers.Bn]:d||'application/octet-stream'});a.P.run(()=>{a.G.D(h,k=>{const m=k.status,n=a.D.get(b);if(200<=m&&300>m){const p=k.data;n&&n.forEach(q=>{if(g.Bb()){const r=g.ck(),t=g.ba();a.N.warn(`Context ${r} ${t} is being destroyed while file tag ${b} is being downloaded`)}q.Yg(p)})}else{const p=
|
|
701
|
+
`Failed to download file ${b}. Response code ${m}`;n&&n.forEach(q=>{q.hg&&q.hg(p)})}a.D.delete(b)})})}}function yg(a,b,c,d){const e=hc(a.L+'/'+b,olympe.Aa.Xb.hi.DELETE);ic(e,{Authorization:olympe.C.Sa(Sb(a.F))});a.G.D(e,f=>{f=f.status;200<=f&&300>f?c():(f=`Failed to delete file ${b}. Response code ${f}`,a.N.error(f),d&&d(f))})}olympe.H.$r=class{constructor(a,b,c,d){this.N=a;this.G=b;this.F=c;this.L=d;this.D=new Map;this.P=new olympe.C.ec('File manager context')}};const zg=olympe.dc.la.oa.pg,Ag=olympe.dc.la.oa.ri,Bg=olympe.dc.la.oa.Ql,Cg=olympe.dc.la.oa.ah,Dg=olympe.dc.la.oa.Ip,Eg=olympe.dc.la.oa.Pl,Fg=olympe.dc.la.oa.Zh,Gg=olympe.dc.la.oa.$h,Hg=olympe.dc.la.oa.bl,Ig=olympe.dc.la.oa.ko,Jg=olympe.dc.la.oa.cl,Kg=olympe.dc.la.oa.Tk,Lg=olympe.dc.la.oa.ij,Mg=olympe.dc.la.oa.Qj,Ng=olympe.dc.la.oa.Yk,Og=olympe.dc.la.oa.gu,Pg=olympe.dc.la.oa.Gt,Qg=olympe.dc.la.oa.ds,Rg=olympe.dc.la.oa.zr,Sg=olympe.dc.la.oa.Er;
|
|
702
702
|
function Tg(a){a.F.La(olympe.H.Ac.eh,a.Ya.bind(a));olympe.C.tc([Qb(a.L)],b=>{b=b.valueOf()?olympe.dc.ni.gp:olympe.dc.ni.wl;a.W&&a.W(a.id,b)},'Server source is online')}function Ug(a,b,c){const d=new olympe.dc.transaction.ye(!0);b.md(d);Vg(a,a.Ub,Ag,!0,ce(d),e=>{c&&c(e);a.D(olympe.dc.Na.ld,Ng,{id:b.ba(),finalize:olympe.dc.transaction.Ag.D.lt})})}
|
|
703
|
-
function Wg(a,b,c,d){const e=c.ba();a.N.log('Graphdef (ID ',e,') sent: ',c);const f=c instanceof olympe.dc.query.kl?a.qb:a.
|
|
703
|
+
function Wg(a,b,c,d){const e=c.ba();a.N.log('Graphdef (ID ',e,') sent: ',c);const f=c instanceof olympe.dc.query.kl?a.qb:a.Ta,g=(new olympe.H.X.nj).ma(c);c=new olympe.async.Jf(a.P);b===Gg&&c.add((k,m)=>{a.G.set(e,{notification:null,px:a.P.rb(n=>n?m(n):k())});Z(a,b,g,n=>n&&m(n.message))});const h=olympe.C.Ia();c.add((k,m)=>{h.run(()=>{Vg(a,f,Fg,!1,g,a.P.rb(n=>n?m(n.message):k()))})});Ab(c,(k,m)=>{const n=a.G.get(e);k&&n&&n.notification?a.D(a.id,Ig,n.notification):!k&&n&&Xg(a,Hg,e,p=>p&&a.N.warn(p));
|
|
704
704
|
a.G.delete(e);k&&b===Gg&&a.F.Mm(e);d(m?Error(m):null)});c.start()}function Xg(a,b,c,d){a.N.log('Unsubscribe to: ',c);a.F.br(c);Z(a,b,{i:c},d)}
|
|
705
705
|
function Yg(a,b,c,d){const e=new olympe.dc.query.pp,f=c.ba();var g=c.pd();let h=g;olympe.C.Za(g)&&(h=e.add(g));let k;try{k=Zg(a,c.nf(),e)}catch(n){d(Error(`serialization failed for subscription "${f}": ${n.message}`));return}const m=olympe.H.Pf.D.rs;g=$g(e);c={i:c.ba(),y:m,b:h};k&&(c.q=k);g&&(c.p=g);Z(a,b,c,d);e.forEach((n,p)=>{olympe.C.Za(n)&&olympe.C.tc([n],q=>ah(a,f,bh(p,q),r=>null!==r&&a.N.warn(r)))})}function Z(a,b,c,d){b={c:b};Object.assign(b,c);a.F.G(olympe.H.Ac.eh,b,d&&(e=>{d(e)}))}
|
|
706
|
-
function Vg(a,b,c,d,e,f){if(a.F.Ga()){const g=olympe.H.Ac.eh;!d&&e&&Object.assign(e,{c});c=olympe.C.
|
|
707
|
-
olympe.H.Pf=class{constructor(a,b,c,d,e,f){this.id=a;this.N=b;this.F=c;this.L=e;this.
|
|
708
|
-
a.type;const c=a.validate.bind(a);a=a.content;switch(b){case zg:Vg(this,this.
|
|
706
|
+
function Vg(a,b,c,d,e,f){if(a.F.Ga()){const g=olympe.H.Ac.eh;!d&&e&&Object.assign(e,{c});c=olympe.C.Sa(Sb(a.L)).valueOf();a.F.oe(b,g,c,d,e,f)}else a.N.error('Server is disconnected, data request of type',c,'on url',b,'is canceled.'),f(Error('Server is disconnected'))}function Zg(a,b,c){return b&&0<b.length?ch(a.Kb,b,c):null}function ah(a,b,c,d){c&&Z(a,olympe.dc.la.oa.Ut,{i:b,p:c},d)}
|
|
707
|
+
olympe.H.Pf=class{constructor(a,b,c,d,e,f){this.id=a;this.N=b;this.F=c;this.L=e;this.Kb=new olympe.H.X.Hl;this.W=this.D=null;this.P=new olympe.C.ec('Server source context');this.Ga=new olympe.dc.$.kp(this.id);this.La=new olympe.H.$r(this.N,d,this.L,f[0]);if(7!==f.length)throw Error('Some HTTP end points to the orchestrator are not specified ! Please check DI of olympe.communication module; wants 7 urls but got: '+f.length);this.hb=f[3];this.qb=f[4];this.Ta=f[5];this.Ub=f[6];this.G=new Map;Tg(this)}ba(){return this.id}Oc(){return olympe.C.Sa(this.L.pf())}pa(a){var b=
|
|
708
|
+
a.type;const c=a.validate.bind(a);a=a.content;switch(b){case zg:Vg(this,this.hb,olympe.dc.la.oa.pg,!1,null,c);break;case Cg:b=new olympe.dc.transaction.ye;var d=a.pc;a=a.tf;d.md(b);Z(this,olympe.dc.la.oa.ah,{i:d.ba(),r:a,p:ce(b)});c(null);break;case Ag:b=new olympe.dc.transaction.ye;d=a.pc;a=a.tf;d.md(b);Z(this,olympe.dc.la.oa.ri,{i:d.ba(),r:a,p:ce(b)},c);break;case Bg:Ug(this,a.pc,c);break;case Fg:case Gg:Wg(this,b,a,c);break;case Hg:Xg(this,b,a,c);break;case Dg:Yg(this,b,a,c);break;case Eg:Z(this,
|
|
709
709
|
b,{i:a},c);break;case Og:Z(this,Og,{},c);break;case Pg:Z(this,Pg,{},c);break;case Qg:Z(this,Qg,{},c);break;case Rg:Z(this,Rg,a,c);break;case Sg:Z(this,Sg,{},c);break;case Lg:case Kg:case Mg:b===Lg?xg(this.La,a.file,a.url,a.mimeType,a.Yg,a.hg):b===Mg?wg(this.La,a.file,a.content,a.mimeType,a.Yg,a.hg):yg(this.La,a.file,a.Yg,a.hg);c();break;default:this.N.info(`Message of type ${b} not supported yet`)}}ka(a){this.D=a}ea(a){this.W=a}close(){this.W(this.id,olympe.dc.ni.Eo);this.P.destroy()}Ya(a){var b=
|
|
710
|
-
olympe.dc.la.oa.Rk,c=olympe.dc.la.oa.hn;const d=olympe.dc.la.oa.zj,e=olympe.dc.la.oa.Tt;var f=olympe.dc.la.oa.Jo;const g=olympe.dc.la.oa.es,h=a.c;h===b?(a=this.Ga.F(a.p),this.D(this.id,b,a)):h===c?(b=a.error.reason,f=this.Ga.F(a.p),this.D(this.id,c,{id:a.i,rollback:f,error:b})):h===Jg?(c=olympe.dc.Na.
|
|
711
|
-
c.ba(),') with',c.pc.Cc(),'operations')),this.D(this.id,Jg,c)):h===Ig?(c=a.i,a=this.Ga.L(c,a.p),this.G.has(c)?(c=this.G.get(c),c.notification?Ge(a,c.notification):c.notification=a):this.D(this.id,Ig,a)):h===f?(c=new olympe.dc.query.Qo(a.i),a.l.forEach(c.F.bind(c)),this.D(this.id,f,c)):h===d?this.D(this.id,Ng,{id:a.i,finalize:olympe.dc.transaction.Ag.D.zj,error:0<a.s?a.info.error.reason:null}):h===e?(c=this.G.get(a.i))&&c.
|
|
712
|
-
|
|
710
|
+
olympe.dc.la.oa.Rk,c=olympe.dc.la.oa.hn;const d=olympe.dc.la.oa.zj,e=olympe.dc.la.oa.Tt;var f=olympe.dc.la.oa.Jo;const g=olympe.dc.la.oa.es,h=a.c;h===b?(a=this.Ga.F(a.p),this.D(this.id,b,a)):h===c?(b=a.error.reason,f=this.Ga.F(a.p),this.D(this.id,c,{id:a.i,rollback:f,error:b})):h===Jg?(c=olympe.dc.Na.jb,b=olympe.dc.Na.ld,f=a.i,0<a.s?c=new olympe.dc.query.Bi.pj(f,b,c,a.info.error.reason):(c=this.Ga.P(f,c,a.p),this.N.debug('< Graphdef Result (ID ',c.ba(),'):',a.p),this.N.log('< Graphdef Result (ID ',
|
|
711
|
+
c.ba(),') with',c.pc.Cc(),'operations')),this.D(this.id,Jg,c)):h===Ig?(c=a.i,a=this.Ga.L(c,a.p),this.G.has(c)?(c=this.G.get(c),c.notification?Ge(a,c.notification):c.notification=a):this.D(this.id,Ig,a)):h===f?(c=new olympe.dc.query.Qo(a.i),a.l.forEach(c.F.bind(c)),this.D(this.id,f,c)):h===d?this.D(this.id,Ng,{id:a.i,finalize:olympe.dc.transaction.Ag.D.zj,error:0<a.s?a.info.error.reason:null}):h===e?(c=this.G.get(a.i))&&c.px(0<a.s?a.info.error.reason:null):h===g&&this.D(this.id,g,{hC:a.ids,BC:a.undo_stack_size,
|
|
712
|
+
wC:a.redo_stack_size})}};olympe.H.Pf.D={rs:1,wA:2};olympe.H.Pf.F={100:'Insufficient Rights',200:'Constraints',300:'IOException',400:'Unexpected',500:'Non Existing Subscription'};olympe.H.Pf.ja=[olympe.fb.Pf];olympe.H.Kj=class{constructor(a,b,c,d,e){this.N=a;this.P=b;this.G=c;this.F=d;this.L=e}D(a,b){a=new olympe.H.Pf(a,this.N,this.P,this.G,this.F,this.L);a.ka(b.La.bind(b));a.ea(b.ka.bind(b));return a}};olympe.H.Kj.ja=[olympe.fb.Kj];olympe.H.qj=class{constructor(){}};olympe.H.qj.ja=[olympe.dc.Y.qj];olympe.H.Da={};function dh(a,b,c){nc(a.D,b,d=>{d=new olympe.H.Da.ic.Request(d.dest,d.src,d.auth,d.seq,d.type,d.content);return c(d)})}function eh(a,b,c){a.G.set(b,c)}function fh(a,b){return new Promise((c,d)=>{oc(a.D,b,e=>e?d(e):c())})}function gh(a,b){return new Promise((c,d)=>{a.P.Ng(b.Jd(),(e,f)=>e?d(e):c(f))})}
|
|
713
713
|
olympe.H.Da.qa=class{constructor(a,b,c,d){this.N=a;this.P=c;this.G=new Map;a=d.get('url');d=d.get('connectionOptions');this.D=new olympe.Aa.yj(a,d);this.F=1;this.L=olympe.$.Sb()}connect(){return new Promise(a=>{lc(this.D)?a():this.D.connect(()=>{nc(this.D,this.L,b=>{b=new olympe.H.Da.ic.Response(b.dest,b.src,b.seq,b.type,b.content);const c=this.G.get(b.G);c&&c(b);this.G.delete(b.G)});a()})})}disconnect(){return new Promise(a=>this.D.end(!1,()=>a()))}Zg(a,b,c){return new Promise((d,e)=>{const f=a.source,
|
|
714
|
-
g=new olympe.H.Da.ic.Response(f,this.L,a.F,b,c);mc(this.D,f,g.ma(),h=>h?e(h):d())})}request(a,b,c){return new Promise((d,e)=>{const f=this.F;this.F++;var g=olympe.C.
|
|
715
|
-
olympe.H.Da.
|
|
716
|
-
olympe.H.Da.
|
|
714
|
+
g=new olympe.H.Da.ic.Response(f,this.L,a.F,b,c);mc(this.D,f,g.ma(),h=>h?e(h):d())})}request(a,b,c){return new Promise((d,e)=>{const f=this.F;this.F++;var g=olympe.C.Sa(Sb(this.P));g=new olympe.H.Da.ic.Request(a,this.L,g,f,b,c);mc(this.D,a,g.ma(),h=>h?e(h):d(f))})}notify(a,b,c){return new Promise((d,e)=>{var f=this.F;this.F++;f=new olympe.H.Da.ic.Response(b,a,f,olympe.H.Da.ic.Response.oa.si,c);mc(this.D,b,f.ma(),g=>g?e(g):d())})}};olympe.H.Da.ic={};olympe.H.Da.ic.Request=class{constructor(a,b,c,d,e,f){this.F=d;this.L=a;this.source=b;this.G=c;this.P=e;this.D=f||null}Jd(){return this.G}ma(){return{dest:this.L,src:this.source,seq:this.F,auth:this.G,type:this.P.toString(),content:this.D}}toString(){return JSON.stringify(this)}};olympe.H.Da.ic.Request.oa={Re:'GET',Ar:'CALL',xg:'SUBSCRIBE'};olympe.H.Da.ic.Response=class{constructor(a,b,c,d,e){this.G=c;this.L=a;this.source=b;this.F=d;this.D=e||null}ma(){return{dest:this.L,src:this.source,seq:this.G,type:this.F.toString(),content:this.D}}toString(){return JSON.stringify(this)}};olympe.H.Da.ic.Response.oa={si:'VALUE',Wm:'ACK',zc:'ERROR'};olympe.H.Da.gb={};olympe.H.Da.gb.vc=class{constructor(a){this.D=olympe.H.Da.nc();this.F=a;this.N=olympe.ua.vb(`Service ${this.F}`)}start(){return this.D.connect()}listen(){return new rxjs.Observable(a=>{dh(this.D,this.F,b=>a.next(new olympe.H.Da.gb.la(b,this.D)));return()=>fh(this.D,this.F).catch(b=>this.N.error('Failed to unsubscribe from '+this.F+', error: '+b))})}stop(){return this.D.disconnect()}};olympe.H.Da.gb.vc.prototype.stop=olympe.H.Da.gb.vc.prototype.stop;olympe.H.Da.gb.vc.prototype.listen=olympe.H.Da.gb.vc.prototype.listen;
|
|
715
|
+
olympe.H.Da.gb.vc.prototype.start=olympe.H.Da.gb.vc.prototype.start;olympe.H.Da.gb.Kr=class extends olympe.H.Da.gb.vc{toString(){return`CallService with id ${this.F}`}};olympe.H.Da.gb.po=class extends olympe.H.Da.gb.vc{toString(){return`GetService with id ${this.F}`}};olympe.H.Da.gb.oi=class extends olympe.H.Da.gb.vc{constructor(a){super(a);this.pk=olympe.$.Sb()}listen(){return new rxjs.Observable(a=>{dh(this.D,this.F,b=>{this.D.Zg(b,olympe.H.Da.ic.Response.oa.si,{pk:this.pk}).catch(c=>a.error(c));a.next()});return()=>fh(this.D,this.F).catch(b=>this.N.error('Failed to unsubscribe from a SubscribeService with error '+b))})}notify(a){return this.D.notify(this.F,this.pk,a)}};olympe.H.Da.gb.oi.prototype.notify=olympe.H.Da.gb.oi.prototype.notify;
|
|
716
|
+
olympe.H.Da.gb.oi.prototype.listen=olympe.H.Da.gb.oi.prototype.listen;olympe.H.Da.gb.Client=class{static call(a,b){return new Promise((c,d)=>{const e=olympe.H.Da.nc();e.connect().then(()=>e.request(a,olympe.H.Da.ic.Request.oa.Ar,b)).then(f=>{eh(e,f,g=>{g.F===olympe.H.Da.ic.Response.oa.Wm?c():d(g.D.errorMessage)})}).catch(f=>d(f))})}static get(a,b){return new Promise((c,d)=>{const e=olympe.H.Da.nc();e.connect().then(()=>e.request(a,olympe.H.Da.ic.Request.oa.Re,b)).then(f=>{eh(e,f,g=>{const h=g.D;h&&g.F===olympe.H.Da.ic.Response.oa.si?c(h):d(null!==h?h.errorMessage:'no payload')})}).catch(f=>
|
|
717
717
|
d(f))})}static observe(a,b){return new rxjs.Observable(c=>{const d=olympe.H.Da.nc();let e=null;d.connect().then(()=>d.request(a,olympe.H.Da.ic.Request.oa.xg,b)).then(f=>{eh(d,f,g=>{const h=g.D;h&&g.F===olympe.H.Da.ic.Response.oa.si?(e=h.pk,dh(d,e,k=>{k.D?c.next(k.D):c.error('No payload')})):c.error(null!==h?h.errorMessage:'No payload')})}).catch(f=>c.error(f));return()=>e&&fh(d,e).catch(f=>olympe.ua.vb('ServiceClient').error('Failed to unsubscribe from a topic '+f))})}};
|
|
718
|
-
olympe.H.Da.
|
|
719
|
-
olympe.H.Da.
|
|
720
|
-
olympe.H.Vb.Ma=class{constructor(a,b,c,d,e,f){this.N=a;this.D=b;this.F=e;this.
|
|
721
|
-
b){hh(this,olympe.H.Vb.Ma.D.
|
|
718
|
+
olympe.H.Da.gb.Client.observe=olympe.H.Da.gb.Client.observe;olympe.H.Da.gb.Client.get=olympe.H.Da.gb.Client.get;olympe.H.Da.gb.Client.call=olympe.H.Da.gb.Client.call;olympe.H.Da.gb.la=class{constructor(a,b){this.request=a;this.D=b}Me(){return gh(this.D,this.request)}body(){return this.request.D}mu(){return this.D.Zg(this.request,olympe.H.Da.ic.Response.oa.Wm,void 0)}Zg(a){return this.D.Zg(this.request,olympe.H.Da.ic.Response.oa.si,a)}km(a){return this.D.Zg(this.request,olympe.H.Da.ic.Response.oa.zc,{errorMessage:a.message})}};olympe.H.Da.gb.la.prototype.fail=olympe.H.Da.gb.la.prototype.km;olympe.H.Da.gb.la.prototype.reply=olympe.H.Da.gb.la.prototype.Zg;
|
|
719
|
+
olympe.H.Da.gb.la.prototype.ack=olympe.H.Da.gb.la.prototype.mu;olympe.H.Da.gb.la.prototype.body=olympe.H.Da.gb.la.prototype.body;olympe.H.Da.gb.la.prototype.userTag=olympe.H.Da.gb.la.prototype.Me;olympe.H.Vb={};function hh(a,b,c,d){c.c=b;a.D.G(olympe.H.Ac.Ve,c,d)}
|
|
720
|
+
olympe.H.Vb.Ma=class{constructor(a,b,c,d,e,f){this.N=a;this.D=b;this.F=e;this.Ta=c;this.G=d;this.storage=f;const g=this.storage.D('AUTH');g&&(g.get('redirectTo',h=>{h&&(g.remove('redirectTo'),g.close(),this.F.redirect(h,null,olympe.auth.ji.D.Re))}),g.close())}P(a){this.D.Rg(a)}L(a){this.D.Sg(a)}La(a){this.D.gf(olympe.H.Ac.Ve,'logoutHandler');this.D.La(olympe.H.Ac.Ve,b=>{const c=b.c;c===olympe.H.Vb.Ma.D.Zs?(this.D.Gd(),a(olympe.auth.qa.F.$i,b)):c===olympe.H.Vb.Ma.D.Mt&&a(olympe.auth.qa.F.vo,b)},'logoutHandler')}W(a,
|
|
721
|
+
b){hh(this,olympe.H.Vb.Ma.D.Ve,{token:a.mf()},(c,d)=>{if(null!==c)b(c);else switch(d.c){case olympe.H.Vb.Ma.D.zc:b(Error('Invalid token'));break;case olympe.H.Vb.Ma.D.mi:c=null;var e=d.payload;if(e){d=e.userName;const f=e.userTag,g=e.rndCook,h=e.payload,k=e.protocol;'SAML'===k?(e=e.samlToken,c=new olympe.auth.Cp(d,f,g,h),c.D=e):'openid'===k&&(c=new olympe.auth.Bl(d,f,g,h))}b(null,c);break;default:b(Error('Unknown response from server'))}})}pa(a,b){hh(this,olympe.H.Vb.Ma.D.ls,{I:a.Oc()},(c,d)=>{if(null!==
|
|
722
722
|
c)b(c);else switch(d.c){case olympe.H.Vb.Ma.D.zc:b(Error(`Username '${a.Oc()}' invalid, or password does not match`));break;case olympe.H.Vb.Ma.D.Vt:c=d.payload;b(null,c.S,c.B);break;default:b(Error('Unknown response from server'))}})}Ga(a,b){hh(this,olympe.H.Vb.Ma.D.sr,{A:a.get('a'),M:a.get('m1'),I:a.Oc()},(c,d)=>{if(null!==c)b(c);else switch(d.c){case olympe.H.Vb.Ma.D.zc:this.N.debug('Login failed, invalid username or password');b(Error('Invalid username or password'));break;case olympe.H.Vb.Ma.D.mi:c=
|
|
723
|
-
d.payload;this.N.debug('Login successful, creating token');d=c.payload?JSON.parse(c.payload):void 0;b(null,new olympe.auth
|
|
724
|
-
e=>{const f=Object.create(null);f.url=e;f.olympe_token=b.mf();f.access_token=b.rj().access_token||null;this.F.redirect(`${this.G}/logout`,f)};a=this.F.D();const d=new URL(a);if(0!==d.hash.length||0!==d.search.length){const e=this.storage.D('AUTH');d.hash='';d.search='';e&&e.set('redirectTo',a,()=>{e.close();c(d.toString())})}else c(a)}else this.D.G(olympe.H.Ac.
|
|
725
|
-
!1,null,(d,e)=>{c(d,e)})}Nq(){return this.G}};olympe.H.Vb.Ma.D={
|
|
726
|
-
this.sb[P(olympe.dc.sb.String)]=a;this.aa[P(olympe.dc.aa.vd)]=new olympe.H.X.aa.vd;this.aa[P(olympe.dc.aa.ce)]=new olympe.H.X.aa.ce;this.aa[P(olympe.dc.aa.ke)]=new olympe.H.X.aa.ke;this.aa[P(olympe.dc.aa.Nd)]=new olympe.H.X.aa.Nd;this.aa[P(olympe.dc.aa.
|
|
727
|
-
this.ga[P(olympe.dc.ga.Rd)]=a;a=new olympe.H.X.ga.Ud;this.ga[P(olympe.dc.ga.Ud)]=a;a=new olympe.H.X.ga.$d;this.ga[P(olympe.dc.ga.$d)]=a;a=new olympe.H.X.ga.Od;this.ga[P(olympe.dc.ga.Od)]=a;this.ga[P(olympe.dc.ga.
|
|
723
|
+
d.payload;this.N.debug('Login successful, creating token');d=c.payload?JSON.parse(c.payload):void 0;b(null,new olympe.auth.$e(c.userName,c.userTag,c.rndCook,d));break;default:b(Error(`Unknown response from server (type ${d.c})`))}})}ka(a){hh(this,olympe.H.Vb.Ma.D.Ae,{},(b,c)=>{null!==b?a(b):c.url&&c.request?a(null,c.url,c.request.replace(/\s/g,''),c.id):a(Error('Missing parameters from server response'))})}ea(a){const b=olympe.C.Sa(olympe.auth.nc().D.ub())||null;if(b instanceof olympe.auth.Bl){const c=
|
|
724
|
+
e=>{const f=Object.create(null);f.url=e;f.olympe_token=b.mf();f.access_token=b.rj().access_token||null;this.F.redirect(`${this.G}/logout`,f)};a=this.F.D();const d=new URL(a);if(0!==d.hash.length||0!==d.search.length){const e=this.storage.D('AUTH');d.hash='';d.search='';e&&e.set('redirectTo',a,()=>{e.close();c(d.toString())})}else c(a)}else this.D.G(olympe.H.Ac.Ve,{c:olympe.H.Vb.Ma.D.$s},a)}Qh(a){this.D.G(olympe.H.Ac.Ve,{c:olympe.H.Vb.Ma.D.nh},a)}Ng(a,b,c){this.D.oe(this.Ta+'/'+a,olympe.H.Ac.Ve,b,
|
|
725
|
+
!1,null,(d,e)=>{c(d,e)})}Nq(){return this.G}};olympe.H.Vb.Ma.D={Ve:1,$s:2,zc:3,nh:5,mi:6,ls:10,Vt:11,sr:12,Ae:13,Mt:14,Zs:20};olympe.H.Vb.Ma.ja=[olympe.auth.Xt,olympe.auth.zb.Vb.fi,olympe.auth.zb.Vb.je,olympe.auth.zb.Vb.Ae];olympe.H.X={};olympe.H.X.Nc=function(){};olympe.H.X.Nc.prototype.ma=function(){};olympe.H.X.ve=function(){};olympe.H.X.ve.prototype.ma=function(){};olympe.H.X.Yb=function(){};olympe.H.X.Yb.prototype.ma=function(){};olympe.H.X.Ce=function(){};olympe.H.X.Ce.prototype.ma=function(){};olympe.H.X.Hl=function(){this.V={};this.sb={};this.aa={};this.ga=Object.create(null);var a=new olympe.H.X.V.Fb;this.V[P(olympe.dc.V.Fb)]=a;a=new olympe.H.X.V.ge;this.V[P(olympe.dc.V.ge)]=a;a=new olympe.H.X.V.Zb;this.V[P(olympe.dc.V.Zb)]=a;this.V[P(olympe.dc.V.yd)]=new olympe.H.X.V.yd;this.V[P(olympe.dc.V.ad)]=new olympe.H.X.V.ad;this.V[P(olympe.dc.V.Ed)]=new olympe.H.X.V.Ed;this.V[P(olympe.dc.V.$c)]=new olympe.H.X.V.$c;a=new olympe.H.X.sb.Number;this.sb[P(olympe.dc.sb.Number)]=a;a=new olympe.H.X.sb.String;
|
|
726
|
+
this.sb[P(olympe.dc.sb.String)]=a;this.aa[P(olympe.dc.aa.vd)]=new olympe.H.X.aa.vd;this.aa[P(olympe.dc.aa.ce)]=new olympe.H.X.aa.ce;this.aa[P(olympe.dc.aa.ke)]=new olympe.H.X.aa.ke;this.aa[P(olympe.dc.aa.Nd)]=new olympe.H.X.aa.Nd;this.aa[P(olympe.dc.aa.Xe)]=new olympe.H.X.aa.Xe;this.aa[P(olympe.dc.aa.xe)]=new olympe.H.X.aa.xe;a=new olympe.H.X.aa.Se;this.aa[P(olympe.dc.aa.Se)]=a;a=new olympe.H.X.aa.Te;this.aa[P(olympe.dc.aa.Te)]=a;this.ga[P(olympe.dc.ga.Qc)]=new olympe.H.X.ga.Qc;a=new olympe.H.X.ga.Rd;
|
|
727
|
+
this.ga[P(olympe.dc.ga.Rd)]=a;a=new olympe.H.X.ga.Ud;this.ga[P(olympe.dc.ga.Ud)]=a;a=new olympe.H.X.ga.$d;this.ga[P(olympe.dc.ga.$d)]=a;a=new olympe.H.X.ga.Od;this.ga[P(olympe.dc.ga.Od)]=a;this.ga[P(olympe.dc.ga.Ze)]=new olympe.H.X.ga.Ze};olympe.H.X.Hl.prototype.constructor=olympe.H.X.Hl;
|
|
728
728
|
function ch(a,b,c){var d='[';for(let k=0,m=b.length;k<m;k++){var e=0===k?'':',';var f=a;var g=b[k],h=c;const n=g.ia(),p=f.V[n];if(void 0===p)throw Error('No serializer registered for transformer: '+n);f=p.ma(g,h,f);d+=e+f}return d+']'}function ih(a,b,c){var d=b.ia(),e=a.aa[d];if(void 0===e)throw Error('No predicate registered for predicate: '+d);return e.ma(b,c,a)}function jh(a,b,c){var d=b.ia(),e=a.ga[d];if(void 0===e)throw Error('No valueDef registered for valueDef: '+d);return e.ma(b,c,a)}
|
|
729
729
|
function $g(a){var b='';a.forEach(function(c,d){c&&c.le&&(c=M(c));void 0!==c&&(c=JSON.stringify(c&&c.valueOf()),b+=(b?',':'')+'"'+d+'":'+c)});return b?'{'+b+'}':''}function bh(a,b){b&&b.le&&(b=M(b));return void 0!==b?'{"'+a+'":'+JSON.stringify(b&&b.valueOf())+'}':''}
|
|
730
|
-
function kh(a,b){return a&&a.le?'"$'+b.add(a)+'"':a instanceof olympe.C.fa||a instanceof olympe.C.da?String(a):a instanceof olympe.C.
|
|
731
|
-
'}':a instanceof olympe.dc.Bc?'{"c":8,"t":"'+a.R()+'"}':JSON.stringify(a)};olympe.H.X.nj=class{ma(a){const b=Object.create(null);b.i=a.ba();b.b=[a.D];b.m=!0;b.v=!0;b.f=a instanceof olympe.dc.query.kl?se(a.Og):olympe.dc.nb.NONE;b.q=Ke(a).map(this.D.bind(this));return b}D(a){const b=a.Hf,c=b.
|
|
730
|
+
function kh(a,b){return a&&a.le?'"$'+b.add(a)+'"':a instanceof olympe.C.fa||a instanceof olympe.C.da?String(a):a instanceof olympe.C.Ra?'"'+a+'"':a instanceof olympe.C.bb?(a=a.lr(),String(`{"c":4,"y":${a.getUTCFullYear()},"M":${a.getUTCMonth()+1},"d":${a.getUTCDate()},"h":${a.getUTCHours()},"m":${a.getUTCMinutes()},"s":${a.getUTCSeconds()},"S":${a.getUTCMilliseconds()},"z":0}`)):a instanceof olympe.C.Color?'{"c":7,"r":'+a.Lg().valueOf()+',"g":'+a.Jg().valueOf()+',"b":'+a.Fg().valueOf()+',"a":'+a.Eg().valueOf()+
|
|
731
|
+
'}':a instanceof olympe.dc.Bc?'{"c":8,"t":"'+a.R()+'"}':JSON.stringify(a)};olympe.H.X.nj=class{ma(a){const b=Object.create(null);b.i=a.ba();b.b=[a.D];b.m=!0;b.v=!0;b.f=a instanceof olympe.dc.query.kl?se(a.Og):olympe.dc.nb.NONE;b.q=Ke(a).map(this.D.bind(this));return b}D(a){const b=a.Hf,c=b.Qa()===olympe.dc.Ja.ORIGIN?olympe.H.X.V.Fb.D.oh:olympe.H.X.V.Fb.D.uh,d=Object.create(null);d.t=b.R();d.d=c;d.v=a.apply;d.r=b.recursive;d.q=a.Gg().map(this.D.bind(this));return d}};olympe.H.X.V={};olympe.H.X.V.$c=function(){};olympe.H.X.V.$c.prototype.constructor=olympe.H.X.V.$c;olympe.H.X.V.$c.prototype.ma=function(){return'{"y":15}'};olympe.H.X.V.$c.ja=[olympe.H.X.Nc];olympe.H.X.V.ad=function(){};olympe.H.X.V.ad.prototype.constructor=olympe.H.X.V.ad;olympe.H.X.V.ad.prototype.ma=function(a,b,c){return'{"y":21,"p":'+ih(c,a.D,b)+'}'};olympe.H.X.V.ad.ja=[olympe.H.X.Nc];olympe.H.X.V.ge=function(){};olympe.H.X.V.ge.prototype.constructor=olympe.H.X.V.ge;olympe.H.X.V.ge.prototype.ma=function(a){var b=null!==a.Qa()?a.Qa()===olympe.dc.Ja.ORIGIN?olympe.H.X.V.Fb.D.oh:olympe.H.X.V.Fb.D.uh:olympe.H.X.V.Fb.D.fn;return'{"y":12,"t":'+JSON.stringify(og(a))+',"d":'+b+'}'};olympe.H.X.V.ge.ja=[olympe.H.X.Nc];olympe.H.X.V.Zb=function(){};olympe.H.X.V.Zb.prototype.constructor=olympe.H.X.V.Zb;olympe.H.X.V.Zb.prototype.ma=function(a){const b=null!==a.Qa()?a.Qa()===olympe.dc.Ja.ORIGIN?olympe.H.X.V.Fb.D.oh:olympe.H.X.V.Fb.D.uh:olympe.H.X.V.Fb.D.fn;return'{"y":11,"t":"'+a.R()+'","d":'+b+',"s":'+a.F+',"e":'+a.D+'}'};olympe.H.X.V.Zb.ja=[olympe.H.X.Nc];olympe.H.X.V.Fb=function(){};olympe.H.X.V.Fb.D={fn:0,oh:1,uh:2};olympe.H.X.V.Fb.prototype.constructor=olympe.H.X.V.Fb;olympe.H.X.V.Fb.prototype.ma=function(a){const b=a.Qa()===olympe.dc.Ja.ORIGIN?olympe.H.X.V.Fb.D.oh:olympe.H.X.V.Fb.D.uh;return'{"y":10,"t":"'+a.R()+'","d":'+b+'}'};olympe.H.X.V.Fb.ja=[olympe.H.X.Nc];olympe.H.X.V.yd=function(){};olympe.H.X.V.yd.prototype.constructor=olympe.H.X.V.yd;olympe.H.X.V.yd.prototype.ma=function(a,b,c){var d=a.D;const e=d.ia();var f=c.sb[e];if(void 0===f)throw Error('No comparator registered for comparator: '+e);return'{"y":20,"o":'+f.ma(d,b,c)+(a.F?'':',"a":false')+'}'};olympe.H.X.V.yd.ja=[olympe.H.X.Nc];olympe.H.X.V.Ed=function(){};olympe.H.X.V.Ed.prototype.constructor=olympe.H.X.V.Ed;olympe.H.X.V.Ed.prototype.ma=function(a,b){var c=a.start;c=c&&c.le?'"$'+b.add(c)+'"':JSON.stringify(c);a=(a=a.D)&&a.le?'"$'+b.add(a)+'"':JSON.stringify(a);return'{"y":22,"s":'+c+',"n":'+a+'}'};olympe.H.X.V.Ed.ja=[olympe.H.X.Nc];olympe.H.X.sb={};olympe.H.X.sb.Number=class{constructor(){}ma(a,b,c){return`{"y":11,"v":${jh(c,a.D,b)}}`}};olympe.H.X.sb.Number.ja=[olympe.H.X.ve];olympe.H.X.sb.String=class{constructor(){}ma(a,b,c){return`{"y":10,"v":${jh(c,a.D,b)}}`}};olympe.H.X.sb.String.ja=[olympe.H.X.ve];olympe.H.X.aa={};olympe.H.X.aa.Nd=function(){};olympe.H.X.aa.Nd.prototype.constructor=olympe.H.X.aa.Nd;olympe.H.X.aa.Nd.prototype.ma=function(a,b,c){const d=jh(c,a.source,b);c=jh(c,a.value,b);a=kh(a.G,b);return'{"y":20,"s":'+d+',"v":'+c+',"a":'+a+'}'};olympe.H.X.aa.Nd.ja=[olympe.H.X.Yb];olympe.H.X.aa.vd=function(){};olympe.H.X.aa.vd.prototype.constructor=olympe.H.X.aa.vd;olympe.H.X.aa.vd.prototype.ma=function(a,b,c){const d=jh(c,a.G,b);a=jh(c,a.L,b);return'{"y":10,"l":'+d+',"r":'+a+'}'};olympe.H.X.aa.vd.ja=[olympe.H.X.Yb];olympe.H.X.aa.ce=function(){};olympe.H.X.aa.ce.prototype.constructor=olympe.H.X.aa.ce;olympe.H.X.aa.ce.prototype.ma=function(a,b,c){const d=jh(c,a.G,b);a=jh(c,a.L,b);return'{"y":11,"l":'+d+',"r":'+a+'}'};olympe.H.X.aa.ce.ja=[olympe.H.X.Yb];olympe.H.X.aa.Se=class{ma(a){const b=ig(a).map(d=>'"'+d+'"'),c=jg(a).map(d=>d===olympe.dc.Ja.DESTINATION?'2':'1');a=a.L;return'{"y":81,"r":['+b.toString()+'],"d":['+c.toString()+']'+(0!==a.length?',"t":"'+a.toString()+'"':'')+'}'}};olympe.H.X.aa.Se.ja=[olympe.H.X.Yb];olympe.H.X.aa.Te=class{ma(a){return'{"y":80,"m":['+Array.from(a.G).map(b=>'"'+b+'"').toString()+']}'}};olympe.H.X.aa.Te.ja=[olympe.H.X.Yb];olympe.H.X.aa.xe=class{ma(a,b,c){return'{"y":30,"p":'+ih(c,a.G,b)+'}'}};olympe.H.X.aa.xe.ja=[olympe.H.X.Yb];olympe.H.X.aa.Xe=class{ma(a,b,c){c=jh(c,a.source,b);const d=a.L;a=kh(a.G,b);return'{"y":23,"s":'+c+',"r":"'+d+'","a":'+a+'}'}};olympe.H.X.aa.Xe.ja=[olympe.H.X.Yb];olympe.H.X.aa.ke=function(){};olympe.H.X.aa.ke.prototype.constructor=olympe.H.X.aa.ke;olympe.H.X.aa.ke.prototype.ma=function(a,b,c){var d=jh(c,a.G,b);a=jh(c,a.L,b);return'{"y":12,"l":'+d+',"r":'+a+'}'};olympe.H.X.aa.ke.ja=[olympe.H.X.Yb];olympe.H.X.ga={};olympe.H.X.ga.Fc=function(){};olympe.H.X.ga.Fc.prototype.constructor=olympe.H.X.ga.Fc;olympe.H.X.ga.Fc.prototype.D=function(){};olympe.H.X.ga.Fc.prototype.ma=function(a,b,c){var d=kh(a.P,b),e=a.pd();e=e?',"b":'+kh(e,b):'';a=(a=a.nf())?',"q":'+ch(c,a,b):'';return'{"y":'+this.D()+',"t":'+d+e+a+'}'};olympe.H.X.ga.Fc.ja=[olympe.H.X.Ce];olympe.H.X.ga.$d=function(){olympe.H.X.ga.Fc.call(this)};olympe.H.X.ga.$d.prototype=Object.create(olympe.H.X.ga.Fc.prototype);olympe.H.X.ga.$d.prototype.constructor=olympe.H.X.ga.$d;olympe.H.X.ga.$d.prototype.D=function(){return 13};olympe.H.X.ga.Qc=function(){};olympe.H.X.ga.Qc.prototype.constructor=olympe.H.X.ga.Qc;olympe.H.X.ga.Qc.prototype.ma=function(a,b){return'{"y":10,"v":'+kh(a.value,b)+'}'};olympe.H.X.ga.Qc.ja=[olympe.H.X.Ce];olympe.H.X.ga.Od=function(){olympe.H.X.ga.Fc.call(this)};olympe.H.X.ga.Od.prototype=Object.create(olympe.H.X.ga.Fc.prototype);olympe.H.X.ga.Od.prototype.constructor=olympe.H.X.ga.Od;olympe.H.X.ga.Od.prototype.D=function(){return 14};olympe.H.X.ga.Rd=function(){olympe.H.X.ga.Fc.call(this)};olympe.H.X.ga.Rd.prototype=Object.create(olympe.H.X.ga.Fc.prototype);olympe.H.X.ga.Rd.prototype.constructor=olympe.H.X.ga.Rd;olympe.H.X.ga.Rd.prototype.D=function(){return 11};olympe.H.X.ga.Ud=function(){olympe.H.X.ga.Fc.call(this)};olympe.H.X.ga.Ud.prototype=Object.create(olympe.H.X.ga.Fc.prototype);olympe.H.X.ga.Ud.prototype.constructor=olympe.H.X.ga.Ud;olympe.H.X.ga.Ud.prototype.D=function(){return 12};olympe.H.X.ga.Ze=class{ma(){return'{"y":19}'}};olympe.H.X.ga.Ze.ja=[olympe.H.X.Ce];olympe.H.Uc={};function lh(a,b){a.N.info('Initializing SERVER layer');if(a.N.G()){const c=['Server layer parameters:'];b.forEach((d,e)=>{c.push(e+'="'+d+'"')});a.N.debug(c.join('\n\t'))}a.La(olympe.H.Ac.zc,c=>{switch(c.c){case olympe.H.oa.hu:a.N.error('Unknown message sent to the server:',olympe.H.qa.F[c.s]);break;case olympe.H.oa.Xr:a.N.error('Fatal error, the last message is probably too big according to the websocket config.'),a.P.forEach((d,e)=>{mh(a,e,c.i)})}});b.get('autoConnect')&&(a.N.debug('Connecting automatically'),
|
|
732
732
|
a.connect());olympe.C.ik(a.L.ub(),()=>{for(const c of a.Oi.values())c();cc(a.Dg.bind(a),a.Pg,'checkTimeoutMessages')},()=>{for(const c of a.Qg.values())c();dc('checkTimeoutMessages');a.Dg()});a.N.log('DONE initializing SERVER layer (waiting for NET layer connection to be opened)')}
|
|
733
|
-
function nh(a,b){if(a.D!==b)switch(a.N.log('State change '+a.D+' --\x3e '+b),a.D=b,b){case olympe.H.qa.D.CONNECTING:break;case olympe.H.qa.D.dh:a.L.update(olympe.C.fa.F);olympe.C.ik(a.
|
|
733
|
+
function nh(a,b){if(a.D!==b)switch(a.N.log('State change '+a.D+' --\x3e '+b),a.D=b,b){case olympe.H.qa.D.CONNECTING:break;case olympe.H.qa.D.dh:a.L.update(olympe.C.fa.F);olympe.C.ik(a.Kb.P().Wg(),a.Ub.bind(a,!0));break;case olympe.H.qa.D.zc:a.N.error('Connection to server',a.pa.D(),'aborted due to error');a.L.update(olympe.C.fa.D);break;case olympe.H.qa.D.Qe:a.L.update(olympe.C.fa.D);a.Vd&&(a.N.info('Disconnected, will try to auto reconnect in',a.zd,'ms'),ac(()=>{a.connect()},a.zd));break;default:throw Error('State machine error in server manager. Should not get in state '+
|
|
734
734
|
b);}}
|
|
735
735
|
function oh(a,b){const c=olympe.H.qa.L.mi,d=olympe.H.qa.L.jt;return e=>{if(null!==e&&void 0!==e){var f=null,g=e.s;if(g===d)a.N.debug(`Try to unsubscribe multiple times. This could be because you logged out before unsubscribe. ${e.info.error.reason}`);else if(void 0!==g&&g!==c){f=void 0!==olympe.H.qa.F[g]?`Status code = ${g} [${olympe.H.qa.F[g]}]`:`Status code = ${g}`;g=e.info;if(void 0!==g&&void 0!==g.error){var h=g.error.reason;'string'===typeof h&&0<h.length&&(f+=`\nReason:\n${g.error.reason}`);h=
|
|
736
736
|
g.error.detailedReason;'string'===typeof h&&0<h.length&&(f+=`\nDetails:\n${g.error.detailedReason}`)}f=Error('Rejected by orchestrator:\n'+f)}b(f,e)}}}
|
|
737
|
-
function ph(a){var b=JSON.parse(JSON.stringify(a));a=olympe.$.Lq;const c=b.messageFamily,d=a(olympe.H.Ac,c),e=b.payload;b='';switch(c){case olympe.H.Ac.eh:b=a(olympe.dc.la.oa,e.c);break;case olympe.H.Ac.zc:b=a(olympe.H.oa,e.c);break;case olympe.H.Ac.
|
|
737
|
+
function ph(a){var b=JSON.parse(JSON.stringify(a));a=olympe.$.Lq;const c=b.messageFamily,d=a(olympe.H.Ac,c),e=b.payload;b='';switch(c){case olympe.H.Ac.eh:b=a(olympe.dc.la.oa,e.c);break;case olympe.H.Ac.zc:b=a(olympe.H.oa,e.c);break;case olympe.H.Ac.Ve:b=a(olympe.H.Vb.Ma.D,e.c);break;case olympe.H.Ac.ci:2===e.c&&(b=a(olympe.H.qa.G,e.status))}a=`${d} message`;b&&0<b.length&&(a+=` with payload "${b}"`);return a}
|
|
738
738
|
function mh(a,b,c){if(a.P.delete(b)){c={s:23,info:c};const d=a.W.get(b);d&&d(c);a.W.delete(b)}}function qh(a,b){a.N.error(b);nh(a,olympe.H.qa.D.zc)}function rh(a,b,c){a.N.info('Connected to',a.pa.D(),' | ',b?'server version:'+b:'',null!==c?`activity timeout: ${c}s`:'');nh(a,olympe.H.qa.D.dh);null===c||a.Ya||sh(a,c);a.qb.forEach(d=>{const e=JSON.stringify(d);a.N.debug('>',ph(d));a.F.send(e);d=d.seqId;a.W.has(d)&&a.P.set(d,Date.now())});a.qb.length=0}
|
|
739
739
|
function sh(a,b){dc('keepAliveSubscription');const c=cc(()=>{a.Ga()?a.G(olympe.H.Ac.eh,{c:olympe.H.oa.nh,subIds:Array.from(a.ed)},(d,e)=>d&&a.N.error(e)):c.cancel()},1E3*b,'keepAliveSubscription')}
|
|
740
|
-
olympe.H.Uc.qa=class{constructor(a,b,c,d){this.N=a;this.
|
|
741
|
-
this.qb=[];this.P=new Map;this.ed=new Set;this.ka=0;this.
|
|
742
|
-
nh(this,olympe.H.qa.D.CONNECTING)}disconnect(){const a=olympe.H.qa.D.CONNECTING;if(this.D===olympe.H.qa.D.dh||this.D===a)this.Vd=!1,nh(this,olympe.H.qa.D.
|
|
743
|
-
{c:olympe.H.oa.ci,cv:Ha(this.ea),m:this.Ya?0:1},this.
|
|
744
|
-
e=d?e:{messageFamily:b,seqId:1,payload:e};const k=JSON.stringify(e);g.body=k;ic(g,{'Content-Type':'application/json'});this.N.log('HTTP POST >',ph(e))}else this.N.log('HTTP GET call to',a);g.F=olympe.Aa.Xb.ResponseType.Mj;ic(g,{Authorization:c});const h=()=>{this.
|
|
745
|
-
this.
|
|
746
|
-
var c=olympe.H.qa.G;a=b.sv||'undefined';var d=b.activityTimeout?Math.max(b.activityTimeout-60,5):null;switch(b.status){case c.ss:qh(this,`Framework version (${Ha(this.ea)}) provided to the orchestrator was not valid. See orchestrator logs for more info.`);return;case c.au:qh(this,`Framework version (${Ha(this.ea)}) is not compatible with the orchestrator in use. See orchestrator logs for more info.`);return;case c.cs:qh(this,'Handshake failed. See orchestrator logs for more info.');return}if(this.
|
|
747
|
-
a,'is invalid. Cannot check against it');else try{const f=Fa(a);var e=this.
|
|
748
|
-
d='onConnectionLost'+olympe.$.Sb();this.N.debug('Sending Ping');this.G(olympe.H.Ac.Hr,{c:1},()=>{bc(d);a&&!c.Bb()&&c.run(()=>{ac(this.Ub.bind(this),4*b,d)})});ac(()=>{this.N.debug('Force close websocket after offline for',b);olympe.C.$f().run(()=>{this.D!==olympe.H.qa.D.
|
|
749
|
-
ph(b));a=b.seqId;const c=b.messageFamily;b=b.payload;if(this.P.delete(a)){const d=this.W.get(a);d&&d(b);this.W.delete(a)}a=this.
|
|
750
|
-
olympe.H.qa.L={mi:0,jt:18,
|
|
740
|
+
olympe.H.Uc.qa=class{constructor(a,b,c,d){this.N=a;this.Kb=b;this.pa=c;this.F=null;this.config=d;this.zd=this.config.get('reconnectionDelay');this.wx=this.zd/4;this.Vd=d.get('autoConnect');this.yx=d.get('retryHttpOverload');this.Pg=d.get('messageTimeout');this.ea=Fa(d.get('clientVersion'));this.hb=Fa(d.get('serverVersion'));this.D=olympe.H.qa.D.INIT;this.Ya=d.get('getContextMode');this.Km=1;this.W=new Map;this.Ta=new Map;this.L=olympe.C.Jc(olympe.C.fa,'Server is online');this.Oi=new Map;this.Qg=new Map;
|
|
741
|
+
this.qb=[];this.P=new Map;this.ed=new Set;this.ka=0;this.vx=new Map;lh(this,d)}Ga(){return this.D===olympe.H.qa.D.dh}connect(){this.Vd=!0;this.N.log('Asking NET layer for a connection to',ec(this.pa)+':'+this.pa.port,'...');this.F=this.Kb.ka(this.pa);this.F.Ga(this.Gd.bind(this));this.F.pa(this.pe.bind(this));this.F.ka(()=>{this.F=null;this.D===olympe.H.qa.D.dh&&2>this.ka?(this.ka++,setTimeout(()=>{this.connect()},100)):this.D!==olympe.H.qa.D.zc&&(this.ka=0,nh(this,olympe.H.qa.D.Qe))});0===this.ka&&
|
|
742
|
+
nh(this,olympe.H.qa.D.CONNECTING)}disconnect(){const a=olympe.H.qa.D.CONNECTING;if(this.D===olympe.H.qa.D.dh||this.D===a)this.Vd=!1,nh(this,olympe.H.qa.D.Qe)}Rg(a){var b;void 0===b&&(b=olympe.$.Sb());this.Oi.set(b,a);olympe.C.Sa(this.L)===olympe.C.fa.F&&a()}Sg(a){var b;void 0===b&&(b=olympe.$.Sb());this.Qg.set(b,a);olympe.C.Sa(this.L)===olympe.C.fa.D&&a()}Gd(){this.ka=0;this.N.debug('Websocket connected, sending handshake. Client version:',Ha(this.ea),'subscribeEverything:',this.Ya?'NO':'YES');this.G(olympe.H.Ac.ci,
|
|
743
|
+
{c:olympe.H.oa.ci,cv:Ha(this.ea),m:this.Ya?0:1},this.sx.bind(this))}G(a,b,c){const d=this.Km;this.Km++;b={seqId:d,messageFamily:a,payload:b};void 0!==c&&this.W.set(d,oh(this,c));this.Ga()||a===olympe.H.Ac.ci&&this.D===olympe.H.qa.D.CONNECTING?(a=JSON.stringify(b),this.N.debug('>',ph(b)),this.F.send(a),void 0!==c&&this.P.set(d,Date.now())):this.qb.push(b)}oe(a,b,c,d,e,f){c&&''!==c||this.N.warn('Trying to send an http request with an invalid authorizationToken');const g=hc(a);if(e){g.method=olympe.Aa.Xb.hi.Cl;
|
|
744
|
+
e=d?e:{messageFamily:b,seqId:1,payload:e};const k=JSON.stringify(e);g.body=k;ic(g,{'Content-Type':'application/json'});this.N.log('HTTP POST >',ph(e))}else this.N.log('HTTP GET call to',a);g.F=olympe.Aa.Xb.ResponseType.Mj;ic(g,{Authorization:c});const h=()=>{this.Kb.D(g,k=>{switch(k.status){case olympe.Aa.Xb.Ye.xl:case olympe.Aa.Xb.Ye.tn:case olympe.Aa.Xb.Ye.$i:k=k.data;if(b!==olympe.H.Ac.eh||d){f&&f(null,k);break}k=this.pe(k);f&&f(k);k&&this.N.error(k.message);break;case olympe.Aa.Xb.Ye.Pt:ac(h,
|
|
745
|
+
this.yx);break;case olympe.Aa.Xb.Ye.Br:this.N.debug(`HTTP request canceled (${a}).`);f&&f(null);break;default:k=Error(`Server is currently not available, http status: ${k.status}`),f&&f(k)}})};h()}La(a,b,c){void 0===c&&(c=olympe.$.Sb());let d=this.Ta.get(a);void 0===d&&(d=new Map,this.Ta.set(a,d));d.set(c,b)}gf(a,b){a=this.Ta.get(a);void 0!==a&&a.delete(b)}Mm(a){this.ed.add(a)}br(a){this.ed.delete(a)}sx(a,b){if(a)qh(this,'Error in receiving handshake response: '+a.message);else{this.N.debug('Handshake response received');
|
|
746
|
+
var c=olympe.H.qa.G;a=b.sv||'undefined';var d=b.activityTimeout?Math.max(b.activityTimeout-60,5):null;switch(b.status){case c.ss:qh(this,`Framework version (${Ha(this.ea)}) provided to the orchestrator was not valid. See orchestrator logs for more info.`);return;case c.au:qh(this,`Framework version (${Ha(this.ea)}) is not compatible with the orchestrator in use. See orchestrator logs for more info.`);return;case c.cs:qh(this,'Handshake failed. See orchestrator logs for more info.');return}if(this.hb.tb(olympe.$.Ah.D))this.N.warn('Handshake successful but received server version',
|
|
747
|
+
a,'is invalid. Cannot check against it');else try{const f=Fa(a);var e=this.hb;if(f.D!==e.D?f.D<e.D:f.F!==e.F?f.F<e.F:f.G<e.G){qh(this,`Framework v${Ha(this.ea)} is expecting Orchestrator to be at least in v${Ha(this.hb)}`);return}this.N.log('Handshake successful. Orchestrator version: ',f,'required:',Ha(this.hb))}catch(f){qh(this,f);return}if(b=b.identityProviders)for(const [f,g]of Object.entries(b))this.vx.set(f,g);rh(this,a,d)}}Ub(a=!1){if(this.D===olympe.H.qa.D.dh){var b=this.wx,c=olympe.C.Ia(),
|
|
748
|
+
d='onConnectionLost'+olympe.$.Sb();this.N.debug('Sending Ping');this.G(olympe.H.Ac.Hr,{c:1},()=>{bc(d);a&&!c.Bb()&&c.run(()=>{ac(this.Ub.bind(this),4*b,d)})});ac(()=>{this.N.debug('Force close websocket after offline for',b);olympe.C.$f().run(()=>{this.D!==olympe.H.qa.D.Qe&&(this.F&&this.F.close(),nh(this,olympe.H.qa.D.Qe))})},b,d)}}pe(a){try{var b=JSON.parse(a)}catch(d){return this.N.error('Unable to parse response from server: '+d.toString()),Error('Unable to parse response from server')}this.N.debug('<',
|
|
749
|
+
ph(b));a=b.seqId;const c=b.messageFamily;b=b.payload;if(this.P.delete(a)){const d=this.W.get(a);d&&d(b);this.W.delete(a)}a=this.Ta.get(c);if(void 0!==a)for(const d of a.values())d(b);return null}Dg(){const a=Date.now();let b=!1;for(const [c,d]of this.P)a-d>this.Pg&&(this.N.warn(`No response was received from the server for the seqId = ${c}`),mh(this,c,{error:{reason:'Message timeout: never receive acknowledge'}}),b=!0);b&&this.Ub()}};olympe.H.Uc.qa.D='checkTimeoutMessages';
|
|
750
|
+
olympe.H.qa.L={mi:0,jt:18,rz:23};
|
|
751
751
|
olympe.H.qa.F={0:'OK',1:'SRP Authentication First Step Failed',2:'SRP Authentication Last Step Failed',3:'SRP Authentication Bad Credentials',4:'AutoLogin Authentication Failed',5:'AutoLogin Authentication Token Invalid',6:'Logout Failed',7:'SAML Request Generation Failed',8:'SAML Authentication Save Failed',9:'Invalid SAML Response',10:'SAML User Not Found',11:'Transaction Failed',12:'GetContext Failed',13:'Notification Failed',15:'FileService Clean Failed',17:'Try to subscribe multiple times',18:'Try to unsubscribe multiple times',
|
|
752
|
-
21:'GraphDef Query Failed',22:'Client Request Invalid',23:'Internal Server Error',24:'File Retrieval Error',25:'File Does Not Exists',26:'Restore Failed',27:'Permission Error',14:'Handshake Failed',28:'Client Version Too Old',29:'Client Version Invalid Format',34:'Server overloaded, retry later',35:'Add token error',36:'Keep token alive error',37:'Unknown client message',39:'Fetch data while concurrency transaction'};olympe.H.Uc.qa.ja=[olympe.H.qa];olympe.H.T={wa:'server.Manager',kn:'server.bus.Manager',Fa:'server.Logger',wh:'server.SourceFactory',Yn:'server.FileSvcHttpRequest',il:'server.ImportFileSvcHttpRequest',Gk:'server.BackupSvcHttpRequest',jp:'server.OpenIDSvcHttpRequest',ho:'server.GetContextSvcPathRequest',xo:'server.ImplicitGDSvcPathRequest',Sn:'server.ExplicitGDSvcPathRequest',Tp:'server.TransactionOverHttpPathRequest',Yp:'server.UserTokenRequest',kh:'server.IOUrlsProvider'};olympe.H.hd={Th:'server.connectors.Auth',
|
|
752
|
+
21:'GraphDef Query Failed',22:'Client Request Invalid',23:'Internal Server Error',24:'File Retrieval Error',25:'File Does Not Exists',26:'Restore Failed',27:'Permission Error',14:'Handshake Failed',28:'Client Version Too Old',29:'Client Version Invalid Format',34:'Server overloaded, retry later',35:'Add token error',36:'Keep token alive error',37:'Unknown client message',39:'Fetch data while concurrency transaction'};olympe.H.Uc.qa.ja=[olympe.H.qa];olympe.H.T={wa:'server.Manager',kn:'server.bus.Manager',Fa:'server.Logger',wh:'server.SourceFactory',Yn:'server.FileSvcHttpRequest',il:'server.ImportFileSvcHttpRequest',Gk:'server.BackupSvcHttpRequest',jp:'server.OpenIDSvcHttpRequest',ho:'server.GetContextSvcPathRequest',xo:'server.ImplicitGDSvcPathRequest',Sn:'server.ExplicitGDSvcPathRequest',Tp:'server.TransactionOverHttpPathRequest',Yp:'server.UserTokenRequest',kh:'server.IOUrlsProvider'};olympe.H.hd={Th:'server.connectors.Auth',aA:'server.connectors.Signaling'};
|
|
753
753
|
olympe.H.Z={Qd:'server.host',ie:'server.port',Td:'server.ssl',Ym:'server.autoConnect',up:'server.reconnectionDelay',vp:'server.reconnectionShortDelay',bq:'server.messageTimeout',zp:'server.retryHttpOnOverload',rn:'server.clientVersion',Ep:'server.serverVersion',jn:'bus.host',ln:'bus.path',mn:'bus.port',nn:'bus.vhost',nh:'bus.keepalive',Jt:'bus.reschedulePings',Fr:'bus.clientId',Dr:'bus.clean',Ft:'bus.reconnectPeriod',Ir:'bus.connectTimeout',Wp:'bus.username',lp:'bus.password',yt:'bus.queueQoSZero'};
|
|
754
754
|
olympe.H.Db={Zd:'server.basePath',cq:'server.wsPath',Wn:'server.filePath',zo:'server.importFilePath',en:'server.backupSvcPath',ip:'server.openIDSvcPath',fo:'server.GetContextSvcPath',yo:'server.ImplicitGraphdefSvcPath',Tn:'server.ExplicitGraphdefSvcPath',Sp:'server.TransactionOverHttpPath',Xp:'server.userTokenSvcPath'};
|
|
755
755
|
olympe.U.config(function(a){var b='object'===typeof window&&window.location&&window.location.hostname||'localhost';const c='localhost'===b;C(a,olympe.H.Z.Qd,b);C(a,olympe.H.Z.ie,c?8080:443);C(a,olympe.H.Z.Td,'localhost'!==b);C(a,olympe.H.Db.Zd,'OlympeServer');C(a,olympe.H.Db.cq,'websocket');C(a,olympe.H.Db.Wn,'rest/filesvc');C(a,olympe.H.Db.zo,'rest/importsvc');C(a,olympe.H.Db.en,'rest/backupsvc');C(a,olympe.H.Db.ip,'rest/openid');C(a,olympe.H.Db.fo,'rest/initialData');C(a,olympe.H.Db.yo,'rest/querysvc/graphDefImplicit');
|
|
@@ -762,77 +762,77 @@ new olympe.U.ha(olympe.H.Z.ie),new olympe.U.ha(olympe.H.Z.Td),new olympe.U.ha(ol
|
|
|
762
762
|
f=new Map;d.forEach((g,h)=>f.set(e[h],g));return f});A(a,'server.bus.ManagerConfig',[new olympe.U.ha(olympe.H.Z.Qd),new olympe.U.ha(olympe.H.Z.jn),new olympe.U.ha(olympe.H.Z.ln),new olympe.U.ha(olympe.H.Z.mn),new olympe.U.ha(olympe.H.Z.nn),new olympe.U.ha(olympe.H.Z.Wp),new olympe.U.ha(olympe.H.Z.Td),new olympe.U.ha(olympe.H.Z.nh),new olympe.U.ha(olympe.H.Z.Jt),new olympe.U.ha(olympe.H.Z.Fr),new olympe.U.ha(olympe.H.Z.Dr),new olympe.U.ha(olympe.H.Z.Ft),new olympe.U.ha(olympe.H.Z.Ir),new olympe.U.ha(olympe.H.Z.lp),
|
|
763
763
|
new olympe.U.ha(olympe.H.Z.yt)],(d,e,f,g,h,k,m,...n)=>{e=`${m?'wss://':'ws://'}${e||d}:${g}${f}/ws`;const p='keepalive reschedulePings clientId clean reconnectPeriod connectTimeout password queueQoSZero'.split(' ');n=n.reduce((q,r,t)=>{q[p[t]]=r;return q},{});n.username=`${h||d.split('.')[0]}:${k}`;d=new Map;d.set('url',e);d.set('connectionOptions',n);return d});y(a,olympe.H.T.wa,olympe.H.Uc.qa,olympe.H.T.Fa,olympe.Aa.T.wa,'server.WebSocketRequest','server.ManagerConfig');y(a,olympe.H.hd.Th,olympe.H.Vb.Ma,
|
|
764
764
|
olympe.H.T.Fa,olympe.H.T.wa,olympe.H.T.Yp,olympe.H.T.jp,olympe.auth.T.Ej,olympe.Wb.T.uj);y(a,olympe.H.T.kn,olympe.H.Da.qa,olympe.H.T.Fa,olympe.Aa.T.wa,olympe.auth.T.wa,'server.bus.ManagerConfig');B(a,olympe.auth.hd.wa,olympe.H.hd.Th);B(a,olympe.auth.hd.No,olympe.H.hd.Th);B(a,olympe.auth.hd.je,olympe.H.hd.Th);B(a,olympe.auth.hd.Ae,olympe.H.hd.Th);A(a,olympe.H.T.wh,[olympe.ua.T.wa,olympe.H.T.wa,olympe.Aa.T.wa,olympe.auth.T.wa,olympe.H.T.Yn,olympe.H.T.il,olympe.H.T.Gk,olympe.H.T.ho,olympe.H.T.xo,olympe.H.T.Sn,
|
|
765
|
-
olympe.H.T.Tp],(d,e,f,g,h,k,m,n,p,q,r)=>new olympe.H.Kj(d.Ic('server.source'),e,f,g,[h,k,m,n,p,q,r]));y(a,olympe.H.T.kh,olympe.H.qj,olympe.H.T.il,olympe.H.T.Gk);B(a,olympe.dc.Y.T.kh,olympe.H.T.kh);B(a,olympe.
|
|
766
|
-
this.F.run()):this.N.error('No app registered under name: '+this.D)}};olympe.oc.Vi=function(a,b,c){const d=a.vb();c?d.debug('Pre-registering application '+b+' under name '+c+' (use '+olympe.oc.Z.
|
|
767
|
-
olympe.dm.wb.Dg=N('12000000000000000GOO','PERMISSIONS_GOO');olympe.dm.wb.prototype.
|
|
768
|
-
olympe.C.fa.F:olympe.C.fa.D,olympe.C.fa)}Iu(){return olympe.C.va([this.ag()],a=>parseInt(a,10)&olympe.dm.Ha.L.Ws?olympe.C.fa.F:olympe.C.fa.D,olympe.C.fa)}Hs(){return this.
|
|
769
|
-
olympe.dm.Ha.ea=N('00000000000000000OPS','GUEST_ROLE_DEFAULT_OPERATION');olympe.dm.Ha.W=N('13000000000000000OPS','AUTHENTICATED_ROLE_DEFAULT_OPERATION');olympe.dm.Ha.D={NONE:0,Il:1,Dj:3,READ_WRITE:5,tp:9,Bt:7,
|
|
770
|
-
olympe.dm.
|
|
771
|
-
l.pv.K=new olympe.C.J(()=>olympe.dc.na,[]);l.
|
|
765
|
+
olympe.H.T.Tp],(d,e,f,g,h,k,m,n,p,q,r)=>new olympe.H.Kj(d.Ic('server.source'),e,f,g,[h,k,m,n,p,q,r]));y(a,olympe.H.T.kh,olympe.H.qj,olympe.H.T.il,olympe.H.T.Gk);B(a,olympe.dc.Y.T.kh,olympe.H.T.kh);B(a,olympe.fb.T.wh,olympe.H.T.wh)},'olympe.communication');olympe.U.run([olympe.H.T.kn],a=>{olympe.H.Da.nc=()=>a});olympe.oc={};olympe.oc.ur=class{run(){}};olympe.oc.qa=class{constructor(a,b){this.D=a;this.N=b;this.F=null;this.G='';this.N.info('HC Manager will execute application registered as:',this.D)}Vi(a,b,c=''){b||(b='default');b===this.D?(null===this.F?this.N.log('Application',c,'designated to be launched'):this.N.log('OVERRIDE: Application',c,'designated to be launched'),this.F=a,this.G=c):this.N.debug('ignoring application:'+c+' as it is registered under name '+b+' and not '+this.D)}run(){null!==this.F?(this.N.info('Running application:',this.G),
|
|
766
|
+
this.F.run()):this.N.error('No app registered under name: '+this.D)}};olympe.oc.Vi=function(a,b,c){const d=a.vb();c?d.debug('Pre-registering application '+b+' under name '+c+' (use '+olympe.oc.Z.Ne+'='+c+' to start it)'):d.debug('Pre-registering application '+b+' as default one');a.Bd(olympe.oc.T.wa).config([b],function(e,f){f.Vi(e,c,b)},'olympe.hc.registerApp')};olympe.oc.T={wa:'hc.Manager',Fa:'hc.Logger'};olympe.oc.Z={Ne:'hc.app',$k:'hc.globalToken'};olympe.U.config(function(a){C(a,olympe.oc.Z.Ne,'default');C(a,olympe.oc.Z.$k,!1);A(a,olympe.oc.T.Fa,[olympe.ua.T.wa],b=>b.Ic('hc'));A(a,olympe.auth.T.aj,[new olympe.U.ha(olympe.oc.Z.Ne),new olympe.U.ha(olympe.oc.Z.$k)],(b,c)=>new olympe.auth.Ek(c?'':b));y(a,olympe.oc.T.wa,olympe.oc.qa,new olympe.U.ha(olympe.oc.Z.Ne),olympe.oc.T.Fa)},'olympe.hc');olympe.U.run([olympe.oc.T.wa],a=>a.run(),'olympe.hc');olympe.dm={};olympe.dm.wb=class extends olympe.dc.Sync{Ta(){return this.cb(olympe.dm.wb.F,olympe.dm.Ha)}};olympe.dm.wb.O=olympe.dc.Ba.D('ff021000000000000007',olympe.dm.wb);olympe.dm.wb.F=olympe.dm.wb.O.Oa('ff022000000000000010');olympe.dm.wb.D=olympe.dm.wb.O.Oa('ff02200000000000000u');olympe.dm.wb.Km=Q(olympe.dm.wb.O,olympe.dc.Sync.G);olympe.dm.wb.Sg=Q(olympe.dm.wb.O,olympe.dm.wb.D);olympe.dm.wb.gf=N('00000000000000000GOO','MODELS_GOO');olympe.dm.wb.Kb=N('10000000000000000GOO','DEFAULT_GOO');
|
|
767
|
+
olympe.dm.wb.Dg=N('12000000000000000GOO','PERMISSIONS_GOO');olympe.dm.wb.prototype.Ta.K=new olympe.C.J(()=>olympe.dc.na,[]);olympe.dm.Ha=class extends olympe.dc.Sync{constructor(a,b){super(a,b)}ag(){return this.Wd(olympe.dm.Ha.F)}Ju(){return olympe.C.va([this.ag()],a=>parseInt(a,10)&olympe.dm.Ha.L.Il?olympe.C.fa.F:olympe.C.fa.D,olympe.C.fa)}Gu(){return olympe.C.va([this.ag()],a=>parseInt(a,10)&olympe.dm.Ha.L.Jr?olympe.C.fa.F:olympe.C.fa.D,olympe.C.fa)}Ku(){return olympe.C.va([this.ag()],a=>parseInt(a,10)&olympe.dm.Ha.L.ju?olympe.C.fa.F:olympe.C.fa.D,olympe.C.fa)}Hu(){return olympe.C.va([this.ag()],a=>parseInt(a,10)&olympe.dm.Ha.L.DELETE?
|
|
768
|
+
olympe.C.fa.F:olympe.C.fa.D,olympe.C.fa)}Iu(){return olympe.C.va([this.ag()],a=>parseInt(a,10)&olympe.dm.Ha.L.Ws?olympe.C.fa.F:olympe.C.fa.D,olympe.C.fa)}Hs(){return this.cb(olympe.dm.Ha.P,olympe.dm.Jb)}Kq(){return this.cb(olympe.dm.Ha.G,olympe.dm.wb)}};olympe.dm.Ha.O=olympe.dc.Ba.D('ff021000000000000008',olympe.dm.Ha);olympe.dm.Ha.F=olympe.dm.Ha.O.za('ff023000000000000021');olympe.dm.Ha.P=olympe.dm.Ha.O.Oa('ff022000000000000007');olympe.dm.Ha.G=Q(olympe.dm.Ha.O,olympe.dm.wb.F);
|
|
769
|
+
olympe.dm.Ha.ea=N('00000000000000000OPS','GUEST_ROLE_DEFAULT_OPERATION');olympe.dm.Ha.W=N('13000000000000000OPS','AUTHENTICATED_ROLE_DEFAULT_OPERATION');olympe.dm.Ha.D={NONE:0,Il:1,Dj:3,READ_WRITE:5,tp:9,Bt:7,Vz:15,vg:17,At:19,Et:21,Dt:25,Ct:23,Wz:29,bo:31};olympe.dm.Ha.L={Il:1,Jr:2,ju:4,DELETE:8,Ws:16};l=olympe.dm.Ha.prototype;l.ag.K=olympe.C.J.G;l.Ju.K=olympe.C.J.P;l.Gu.K=olympe.C.J.P;l.Ku.K=olympe.C.J.P;l.Hu.K=olympe.C.J.P;l.Iu.K=olympe.C.J.P;l.Hs.K=new olympe.C.J(()=>olympe.dc.na,[]);olympe.dm.Jb=class extends olympe.dc.Sync{constructor(a,b){super(a,b)}ia(){return this.xb(olympe.dc.Sync.nameProp)}Is(){return olympe.C.Ra.EMPTY}Kw(){return olympe.C.fa.D}zw(){return this.cb(olympe.dm.Jb.D,olympe.dm.User)}pv(){return this.cb(olympe.dm.Jb.W,olympe.dm.Jb)}dw(){return this.cb(olympe.dm.Jb.L,olympe.dm.Jb)}Js(){return this.cb(olympe.dm.Jb.F,olympe.dm.Ha)}};olympe.dm.Jb.O=olympe.dc.Ba.D('ff021000000000000002',olympe.dm.Jb);olympe.dm.Jb.pa=olympe.dm.Jb.O.za('ff023000000000000035');
|
|
770
|
+
olympe.dm.Jb.D=olympe.dm.Jb.O.Oa('ff022000000000000005');olympe.dm.Jb.L=olympe.dm.Jb.O.Oa('ff022000000000000006');olympe.dm.Jb.W=Q(olympe.dm.Jb.O,olympe.dm.Jb.L);olympe.dm.Jb.F=Q(olympe.dm.Jb.O,olympe.dm.Ha.P);olympe.dm.Jb.P=N('ff011000000000000001','AUTHENTICATED_USERS');olympe.dm.Jb.ea=N('ff011000000000000002','GUEST_USERS_ROLE');l=olympe.dm.Jb.prototype;l.ia.K=olympe.C.J.F;l.Is.K=olympe.C.J.F;l.Kw.K=olympe.C.J.P;l.zw.K=new olympe.C.J(()=>olympe.dc.na,[]);
|
|
771
|
+
l.pv.K=new olympe.C.J(()=>olympe.dc.na,[]);l.dw.K=new olympe.C.J(()=>olympe.dc.na,[]);l.Js.K=new olympe.C.J(()=>olympe.dc.na,[]);olympe.dm.User=class extends olympe.dc.Sync{constructor(a,b){super(a,b)}Jv(){return this.vm()}ia(){return this.vm()}vm(){return this.xb(olympe.dm.User.loginProp)}Ls(){return this.xb(olympe.dm.User.F)}Ks(){return olympe.C.Ra.EMPTY}qw(){return this.xb(olympe.dm.User.saltProp)}Bw(){return this.xb(olympe.dm.User.verifierProp)}Ms(){return this.cb(olympe.dm.User.D,olympe.dm.Jb)}};olympe.dm.User.O=olympe.dc.Ba.D('ff021000000000000003',olympe.dm.User);olympe.dm.User.loginProp=olympe.dm.User.O.za('ff023000000000000001');
|
|
772
772
|
v('olympe.dm.User.loginProp',olympe.dm.User.loginProp);olympe.dm.User.F=olympe.dm.User.O.za('ff023000000000000002');olympe.dm.User.saltProp=olympe.dm.User.O.za('ff023000000000000004');v('olympe.dm.User.saltProp',olympe.dm.User.saltProp);olympe.dm.User.verifierProp=olympe.dm.User.O.za('ff023000000000000005');v('olympe.dm.User.verifierProp',olympe.dm.User.verifierProp);olympe.dm.User.P=olympe.dm.User.O.za('ff023000000000000020');olympe.dm.User.SAMLnameIdProp=olympe.dm.User.O.za('ff023000000000000036');
|
|
773
|
-
v('olympe.dm.User.SAMLnameIdProp',olympe.dm.User.SAMLnameIdProp);olympe.dm.User.D=Q(olympe.dm.User.O,olympe.dm.
|
|
774
|
-
olympe.dm.BrickMetadata.ed={
|
|
775
|
-
Q(olympe.dc.Sync.O,olympe.dm.Qb.L);olympe.dm.Qb.prototype.L.K=new olympe.C.J(()=>olympe.dc.na,[]);olympe.dm.Qb.prototype.W.K=new olympe.C.J(()=>olympe.dc.na,[]);olympe.dm.Qb.prototype.P.K=new olympe.C.J(()=>olympe.dc.na,[]);olympe.dm.Module=class extends olympe.dc.Sync{
|
|
773
|
+
v('olympe.dm.User.SAMLnameIdProp',olympe.dm.User.SAMLnameIdProp);olympe.dm.User.D=Q(olympe.dm.User.O,olympe.dm.Jb.D);olympe.dm.User.L=N('0163d9653067b6237f62','GUEST_USER');l=olympe.dm.User.prototype;l.Jv.K=olympe.C.J.F;l.ia.K=olympe.C.J.F;l.vm.K=olympe.C.J.F;l.Ls.K=olympe.C.J.F;l.Ks.K=olympe.C.J.F;l.qw.K=olympe.C.J.F;l.Bw.K=olympe.C.J.F;l.Ms.K=new olympe.C.J(()=>olympe.dc.na,[]);olympe.dm.be=class extends olympe.dm.wb{ea(){return this.rm()}qb(){return this.xb(olympe.dm.be.Ya)}};olympe.dm.be.O=olympe.dc.Ba.D('01621fb84e3300000000',olympe.dm.be);olympe.dm.be.Ya=olympe.dm.be.O.za('01609de3f292e3c2c6ff');olympe.dm.be.prototype.ea.K=new olympe.C.J(()=>olympe.C.dd,[]);olympe.dm.be.prototype.qb.K=olympe.C.J.F;olympe.dm.BrickMetadata=class extends olympe.dm.be{Kb(){return this.xb(olympe.dm.BrickMetadata.qb)}hb(){return this.xb(olympe.dm.BrickMetadata.Ub)}D(){return null}};olympe.dm.BrickMetadata.O=Mc(olympe.dc.Ba.D('01621fb84e3500000000',olympe.dm.BrickMetadata));olympe.dm.BrickMetadata.qb=olympe.dm.BrickMetadata.O.za('01621fb84e320000f001');olympe.dm.BrickMetadata.Ub=olympe.dm.BrickMetadata.O.za('01703376c4a81c0e9d94');olympe.dm.BrickMetadata.Oi=olympe.dm.BrickMetadata.O.Oa('0161ae97622bb21f335b');
|
|
774
|
+
olympe.dm.BrickMetadata.ed={Oz:'private',wt:'public'};olympe.dm.BrickMetadata.oe=N('01703376c4a81c0e9d95','BRICK_STATUS');olympe.dm.BrickMetadata.Ye={Fy:'experimental',bA:'stable',wy:'deprecated'};olympe.dm.BrickMetadata.prototype.Kb.K=olympe.C.J.F;olympe.dm.BrickMetadata.prototype.hb.K=olympe.C.J.F;olympe.dm.BrickMetadata.prototype.D.K=new olympe.C.J(()=>String,[]);olympe.dm.Qb=class extends olympe.dm.BrickMetadata{L(){return new olympe.dc.na(this.R(),[new olympe.dc.V.Zb(olympe.dm.Qb.P.R(),olympe.dc.Ja.DESTINATION,olympe.dc.V.Hj.Ao,olympe.dc.V.Hj.ms),olympe.dm.Qb.L])}D(){return null}W(){return this.cb(olympe.dm.Qb.P,olympe.dm.Qb)}P(){return this.cb(olympe.dm.Qb.L)}};olympe.dm.Qb.O=olympe.dc.Ba.D('01612df1db9749227626',olympe.dm.Qb);olympe.dm.Qb.P=olympe.dm.Qb.O.Oa('016a697ef00ce7554691');olympe.dm.Qb.pa=Q(olympe.dm.Qb.O,olympe.dm.Qb.P);olympe.dm.Qb.L=olympe.dm.Qb.O.Oa('016a697ef00ce7554692');
|
|
775
|
+
Q(olympe.dc.Sync.O,olympe.dm.Qb.L);olympe.dm.Qb.prototype.L.K=new olympe.C.J(()=>olympe.dc.na,[]);olympe.dm.Qb.prototype.W.K=new olympe.C.J(()=>olympe.dc.na,[]);olympe.dm.Qb.prototype.P.K=new olympe.C.J(()=>olympe.dc.na,[]);olympe.dm.Module=class extends olympe.dc.Sync{Hv(){return this.xb(olympe.dm.Module.W)}Wv(){return this.Wd(olympe.dm.Module.ea)}Ns(){return this.xb(olympe.dm.Module.F)}cw(){return this.xb(olympe.dm.Module.pa)}rv(){return this.xb(olympe.dm.Module.L)}Xv(){return this.cb(olympe.dm.Module.P,olympe.dm.Module)}rw(){return this.cb(olympe.dm.Module.D,olympe.dm.wd)}};olympe.dm.Module.O=olympe.dc.Ba.D('ff021000000000000040',olympe.dm.Module);olympe.dm.Module.W=olympe.dm.Module.O.za('ff023000000000000042');
|
|
776
776
|
olympe.dm.Module.ea=olympe.dm.Module.O.za('ff023000000000000043');olympe.dm.Module.F=olympe.dm.Module.O.za('ff023000000000000044');olympe.dm.Module.pa=olympe.dm.Module.O.za('ff023000000000000045');olympe.dm.Module.L=olympe.dm.Module.O.za('ff023000000000000046');olympe.dm.Module.creationDateProp=olympe.dm.Module.O.za('ff023000000000000049');olympe.dm.Module.D=olympe.dm.Module.O.Oa('ff022000000000000013');olympe.dm.Module.P=olympe.dm.Module.O.Oa('ff022000000000000014');
|
|
777
|
-
olympe.dm.Module.
|
|
778
|
-
e||'application/data').setProperty(olympe.dm.File.D,!1);return a.R()}constructor(a,b,c,d,e){super(a,b);this.F=c;this.G=d;this.D=e}wm(){return this.xb(olympe.dm.File.mimeTypeProp)}ak(a,b){const c=olympe.C.Ia().rb(a),d=b&&olympe.C.Ia().rb(b);(a=this.db.
|
|
779
|
-
olympe.dm.File.D),e=this.db.
|
|
780
|
-
olympe.dm.File.prototype.saveAs=olympe.dm.File.prototype.
|
|
777
|
+
olympe.dm.Module.Ta=N('016a69b9bceabd815b77','OLYMPE_SERVER_MODULE');l=olympe.dm.Module.prototype;l.Hv.K=olympe.C.J.F;l.Wv.K=olympe.C.J.G;l.Ns.K=olympe.C.J.F;l.cw.K=olympe.C.J.F;l.rv.K=olympe.C.J.F;l.Xv.K=new olympe.C.J(()=>olympe.dc.na,[]);l.rw.K=new olympe.C.J(()=>olympe.dc.na,[]);olympe.dm.File=class extends olympe.dc.Sync{static ne(a,b,c,d,e,f){e=e||'application/data';d=olympe.$.Jh().L(new Blob([d],{type:e}));return olympe.dm.File.zq(a,b,c,d,e,f)}static zq(a,b,c,d,e,f){a=b.create(a,f);b=olympe.C.bb.now();a.setProperty(olympe.dm.File.nameProp,c||'file').setProperty(olympe.dc.Sync.nameProp,c||'file').setProperty(olympe.dm.File.urlProp,d).setProperty(olympe.dm.File.creationDateProp,b).setProperty(olympe.dm.File.modificationDateProp,b).setProperty(olympe.dm.File.mimeTypeProp,
|
|
778
|
+
e||'application/data').setProperty(olympe.dm.File.D,!1);return a.R()}constructor(a,b,c,d,e){super(a,b);this.F=c;this.G=d;this.D=e}wm(){return this.xb(olympe.dm.File.mimeTypeProp)}ak(a,b){const c=olympe.C.Ia().rb(a),d=b&&olympe.C.Ia().rb(b);(a=this.db.Ib(this,olympe.dm.File.urlProp,!0))&&a.startsWith('blob:')?this.D.F(a,e=>{this.D.G(e,c)},d):zc(this.F,this,e=>{this.D.G(e,c)},e=>{d&&d(e)})}qm(a,b){this.ak(c=>{a(Ba(c))},b)}bk(a,b){const c=olympe.C.Ia().rb(a);b=b&&olympe.C.Ia().rb(b);const d=this.db.Ib(this,
|
|
779
|
+
olympe.dm.File.D),e=this.db.Ib(this,olympe.dm.File.urlProp),f=g=>{const h=this.db.Ib(this,olympe.dm.File.mimeTypeProp);this.D.G(g,k=>{c(`data:${h};base64,${this.D.D(k)}`)})};d&&d.valueOf()?zc(this.F,this,f.bind(this),b):e&&e.startsWith('blob:')?this.D.F(e,f.bind(this),b):a(e)}rename(a,b){const c=b&&olympe.C.Ia().rb(b);olympe.C.er([a],d=>{const e=new olympe.dc.kb;e.update(this,olympe.dc.Sync.nameProp,d);e.update(this,olympe.dm.File.nameProp,d);e.gd(f=>{c&&c(f)})})}zx(){this.G.L(this.db.Ib(this,olympe.dm.File.mimeTypeProp))}ml(){return this.xb(olympe.dm.File.urlProp)}Io(){return this.xb(olympe.dm.File.nameProp)}vv(){return this.Ki(olympe.dm.File.creationDateProp)}Vv(){return this.Ki(olympe.dm.File.modificationDateProp)}Uq(){return this.Kg(olympe.dm.File.D)}};
|
|
780
|
+
olympe.dm.File.prototype.saveAs=olympe.dm.File.prototype.zx;olympe.dm.File.prototype.getContentUrl=olympe.dm.File.prototype.bk;olympe.dm.File.prototype.getContentAsString=olympe.dm.File.prototype.qm;olympe.dm.File.prototype.getContentAsBinary=olympe.dm.File.prototype.ak;olympe.dm.File.createFileFromURL=olympe.dm.File.zq;olympe.dm.File.createFile=olympe.dm.File.ne;olympe.dm.File.O=olympe.dc.Ba.D('ff021000000000000030',olympe.dm.File,olympe.dc.T.Xh,olympe.Aa.T.wa,olympe.$.T.$g);
|
|
781
781
|
olympe.dm.File.nameProp=olympe.dm.File.O.za('ff023000000000000050');v('olympe.dm.File.nameProp',olympe.dm.File.nameProp);olympe.dm.File.creationDateProp=olympe.dm.File.O.za('ff023000000000000051');v('olympe.dm.File.creationDateProp',olympe.dm.File.creationDateProp);olympe.dm.File.modificationDateProp=olympe.dm.File.O.za('ff023000000000000055');v('olympe.dm.File.modificationDateProp',olympe.dm.File.modificationDateProp);olympe.dm.File.mimeTypeProp=olympe.dm.File.O.za('ff023000000000000052');
|
|
782
782
|
v('olympe.dm.File.mimeTypeProp',olympe.dm.File.mimeTypeProp);olympe.dm.File.urlProp=olympe.dm.File.O.za('ff023000000000000053');v('olympe.dm.File.urlProp',olympe.dm.File.urlProp);olympe.dm.File.D=olympe.dm.File.O.za('ff023000000000000054');olympe.dm.File.O.D=olympe.dm.File.ne.bind(null,olympe.dm.File);olympe.dm.File.ja=[olympe.C.File];l=olympe.dm.File.prototype;l.wm.K=olympe.C.J.F;l.ak.K=new olympe.C.J(()=>{},[]);l.qm.K=new olympe.C.J(()=>{},[]);l.bk.K=new olympe.C.J(()=>{},[]);l.rename.K=olympe.C.J.D;
|
|
783
|
-
l.ml.K=olympe.C.J.F;l.Io.K=olympe.C.J.F;l.vv.K=new olympe.C.J(()=>olympe.C.
|
|
784
|
-
olympe.dm.wd.prototype.F.K=new olympe.C.J(()=>olympe.dc.na,[]);olympe.dm.lc=class extends olympe.dm.Qb{G(){return this.xb(olympe.dm.lc.ea)}ka(){return this.xb(olympe.dm.lc.zd)}F(){return this.
|
|
785
|
-
Q(olympe.dc.Sync.O,olympe.dm.lc.
|
|
786
|
-
olympe.dm.Property.typeRel=Q(olympe.dm.Property.O,olympe.dc.Sync.typeRel);v('olympe.dm.Property.typeRel',olympe.dm.Property.typeRel);olympe.dm.Property.prototype.F.K=new olympe.C.J(()=>olympe.dc.Sync,[]);olympe.dm.Property.prototype.D.K=new olympe.C.J(()=>olympe.dc.Sync,[]);olympe.dm.Relation=class extends olympe.dc.Sync{constructor(a,b){super(a,b)}
|
|
783
|
+
l.ml.K=olympe.C.J.F;l.Io.K=olympe.C.J.F;l.vv.K=new olympe.C.J(()=>olympe.C.bb,[]);l.Vv.K=new olympe.C.J(()=>olympe.C.bb,[]);l.Uq.K=olympe.C.J.P;olympe.dm.wd=class extends olympe.dc.Sync{D(){return this.xb(olympe.dm.wd.F)}G(){return this.Wd(olympe.dm.wd.L)}F(){return this.cb(olympe.dm.wd.D,olympe.dm.Module)}};olympe.dm.wd.O=olympe.dc.Ba.D('ff021000000000000041',olympe.dm.wd);olympe.dm.wd.F=olympe.dm.wd.O.za('ff023000000000000047');olympe.dm.wd.L=olympe.dm.wd.O.za('ff023000000000000048');olympe.dm.wd.D=olympe.dm.Module.D.Cd();olympe.dm.wd.prototype.D.K=olympe.C.J.F;olympe.dm.wd.prototype.G.K=olympe.C.J.G;
|
|
784
|
+
olympe.dm.wd.prototype.F.K=new olympe.C.J(()=>olympe.dc.na,[]);olympe.dm.lc=class extends olympe.dm.Qb{G(){return this.xb(olympe.dm.lc.ea)}ka(){return this.xb(olympe.dm.lc.zd)}F(){return this.cb(olympe.dm.lc.W,olympe.dm.lc)}};olympe.dm.lc.O=olympe.dc.Ba.D('0163d9594700fcf61e54',olympe.dm.lc);olympe.dm.lc.ea=olympe.dm.lc.O.za('017869c7d2833c9492c1');olympe.dm.lc.zd=olympe.dm.lc.O.za('017869c80bb9929c76d0');olympe.dm.lc.W=olympe.dm.lc.O.Oa('ff02200000000000002b');olympe.dm.lc.pe=Q(olympe.dm.lc.O,olympe.dm.lc.W);olympe.dm.lc.Ta=olympe.dm.lc.O.Oa('ff02200000000000002a');
|
|
785
|
+
Q(olympe.dc.Sync.O,olympe.dm.lc.Ta);olympe.dm.lc.Gd=N('100000000000000000dd','PRIMORDIAL');olympe.dm.lc.prototype.G.K=olympe.C.J.F;olympe.dm.lc.prototype.ka.K=olympe.C.J.F;olympe.dm.lc.prototype.F.K=new olympe.C.J(()=>olympe.dc.na,[]);olympe.dm.Property=class extends olympe.dc.Sync{constructor(a,b){super(a,b)}F(){return this.yc(olympe.dm.Property.definingModelRel,olympe.dc.Sync)}D(){return this.yc(olympe.dm.Property.typeRel,olympe.dc.Sync)}Wc(){return this.F().ia().xq(this.ia())}};olympe.dm.Property.O=olympe.dc.Ba.D('ff021000000000000005',olympe.dm.Property);olympe.dm.Property.definingModelRel=Q(olympe.dm.Property.O,olympe.dc.Sync.propertyRel);v('olympe.dm.Property.definingModelRel',olympe.dm.Property.definingModelRel);
|
|
786
|
+
olympe.dm.Property.typeRel=Q(olympe.dm.Property.O,olympe.dc.Sync.typeRel);v('olympe.dm.Property.typeRel',olympe.dm.Property.typeRel);olympe.dm.Property.prototype.F.K=new olympe.C.J(()=>olympe.dc.Sync,[]);olympe.dm.Property.prototype.D.K=new olympe.C.J(()=>olympe.dc.Sync,[]);olympe.dm.Relation=class extends olympe.dc.Sync{constructor(a,b){super(a,b)}Rv(){return olympe.C.Ra.EMPTY}ov(){return this.Wd(olympe.dm.Relation.$l)}ew(){return this.Wd(olympe.dm.Relation.Ui)}Hq(){return this.cb(olympe.dm.Relation.destinationModelRel,olympe.dc.Sync).qd()}Oq(){return this.cb(olympe.dm.Relation.originModelRel,olympe.dc.Sync).qd()}Wc(){return this.Oq().ia().concat(['-',this.ia(),'->',this.Hq().ia()])}};olympe.dm.Relation.O=olympe.dc.Ba.D('ff021000000000000006',olympe.dm.Relation);
|
|
787
787
|
olympe.dm.Relation.Ui=olympe.dm.Relation.O.za('ff023000000000000030');olympe.dm.Relation.$l=olympe.dm.Relation.O.za('ff023000000000000034');olympe.dm.Relation.jm=olympe.dm.Relation.O.za('ff023000000000000037');olympe.dm.Relation.im=olympe.dm.Relation.O.za('ff023000000000000137');olympe.dm.Relation.Qm=olympe.dm.Relation.O.za('ff023000000000000237');olympe.dm.Relation.originModelRel=Q(olympe.dm.Relation.O,olympe.dc.Sync.ka);v('olympe.dm.Relation.originModelRel',olympe.dm.Relation.originModelRel);
|
|
788
|
-
olympe.dm.Relation.destinationModelRel=Q(olympe.dm.Relation.O,olympe.dc.Sync.
|
|
789
|
-
l.Oq.K=new olympe.C.J(()=>olympe.dc.Sync,[]);olympe.dm.ki=class extends olympe.dm.Qb{};olympe.dm.ki.O=olympe.dc.Ba.D('ff021000000000000020',olympe.dm.ki);olympe.dm.ki.ea=N('10000000000000000000','ROOT_OF_ROOTS');olympe.dm.ki.W=N('10000000000000000001','OLYMPE_FOLDER');olympe.dm.Lf=class extends olympe.dc.Sync{D(){}};olympe.dm.Lf.O=olympe.dc.Ba.D('ff021000000000000019',olympe.dm.Lf);olympe.dm.String=class extends olympe.dm.Lf{D(){return this.xb(olympe.dm.String.valueProp)}};olympe.dm.String.O=olympe.dc.Ba.D('ff021000000000000011',olympe.dm.String);olympe.dm.String.valueProp=olympe.dm.String.O.za('ff023000000000000026');v('olympe.dm.String.valueProp',olympe.dm.String.valueProp);olympe.dm.String.prototype.D.K=olympe.C.J.F;olympe.dm.Boolean=class extends olympe.dm.Lf{D(){return this.Kg(olympe.dm.Boolean.valueProp)}};olympe.dm.Boolean.O=olympe.dc.Ba.D('ff021000000000000012',olympe.dm.Boolean);olympe.dm.Boolean.valueProp=olympe.dm.Boolean.O.za('ff023000000000000027');v('olympe.dm.Boolean.valueProp',olympe.dm.Boolean.valueProp);olympe.dm.Boolean.prototype.D.K=olympe.C.J.P;olympe.dm.Color=class extends olympe.dm.Lf{D(){return this.Qq()}};olympe.dm.Color.O=olympe.dc.Ba.D('ff021000000000000017',olympe.dm.Color);olympe.dm.Color.valueProp=olympe.dm.Color.O.za('ff023000000000000032');v('olympe.dm.Color.valueProp',olympe.dm.Color.valueProp);olympe.dm.Color.prototype.D.K=new olympe.C.J(()=>olympe.C.Color,[]);olympe.dm.DateTime=class extends olympe.dm.Lf{D(){return this.Ki(olympe.dm.DateTime.valueProp)}};olympe.dm.DateTime.O=olympe.dc.Ba.D('ff021000000000000014',olympe.dm.DateTime);olympe.dm.DateTime.valueProp=olympe.dm.DateTime.O.za('ff023000000000000029');v('olympe.dm.DateTime.valueProp',olympe.dm.DateTime.valueProp);olympe.dm.DateTime.prototype.D.K=new olympe.C.J(()=>olympe.C.
|
|
790
|
-
olympe.dm.Enum.O=olympe.dc.Ba.D('016cdd861b32d56c81f7',olympe.dm.Enum);olympe.dm.Enum.rankProp=olympe.dm.Enum.O.za('017a7690c915975ea995');olympe.dm.Enum.prototype.Id.K=olympe.C.J.G;olympe.dm.Df=class extends olympe.dm.BrickMetadata{static create(a,b){return ee(a,b||{},olympe.dm.Df,olympe.dm.Enum).R()}
|
|
788
|
+
olympe.dm.Relation.destinationModelRel=Q(olympe.dm.Relation.O,olympe.dc.Sync.hb);v('olympe.dm.Relation.destinationModelRel',olympe.dm.Relation.destinationModelRel);olympe.dm.Relation.D={wo:0,Jk:5,xp:1,Lt:4,Nj:2,Gj:8,Rn:10,Ht:6,It:9,jd:6,Kt:9};olympe.dm.Relation.L={ot:3,yl:4,ft:5,et:6};olympe.dm.Relation.F={Jl:0,Ml:1,Ll:2,sl:4,rl:8,Kk:5,Ik:10};l=olympe.dm.Relation.prototype;l.Rv.K=olympe.C.J.F;l.ov.K=olympe.C.J.G;l.ew.K=olympe.C.J.G;l.Hq.K=new olympe.C.J(()=>olympe.dc.Sync,[]);
|
|
789
|
+
l.Oq.K=new olympe.C.J(()=>olympe.dc.Sync,[]);olympe.dm.ki=class extends olympe.dm.Qb{};olympe.dm.ki.O=olympe.dc.Ba.D('ff021000000000000020',olympe.dm.ki);olympe.dm.ki.ea=N('10000000000000000000','ROOT_OF_ROOTS');olympe.dm.ki.W=N('10000000000000000001','OLYMPE_FOLDER');olympe.dm.Lf=class extends olympe.dc.Sync{D(){}};olympe.dm.Lf.O=olympe.dc.Ba.D('ff021000000000000019',olympe.dm.Lf);olympe.dm.String=class extends olympe.dm.Lf{D(){return this.xb(olympe.dm.String.valueProp)}};olympe.dm.String.O=olympe.dc.Ba.D('ff021000000000000011',olympe.dm.String);olympe.dm.String.valueProp=olympe.dm.String.O.za('ff023000000000000026');v('olympe.dm.String.valueProp',olympe.dm.String.valueProp);olympe.dm.String.prototype.D.K=olympe.C.J.F;olympe.dm.Boolean=class extends olympe.dm.Lf{D(){return this.Kg(olympe.dm.Boolean.valueProp)}};olympe.dm.Boolean.O=olympe.dc.Ba.D('ff021000000000000012',olympe.dm.Boolean);olympe.dm.Boolean.valueProp=olympe.dm.Boolean.O.za('ff023000000000000027');v('olympe.dm.Boolean.valueProp',olympe.dm.Boolean.valueProp);olympe.dm.Boolean.prototype.D.K=olympe.C.J.P;olympe.dm.Color=class extends olympe.dm.Lf{D(){return this.Qq()}};olympe.dm.Color.O=olympe.dc.Ba.D('ff021000000000000017',olympe.dm.Color);olympe.dm.Color.valueProp=olympe.dm.Color.O.za('ff023000000000000032');v('olympe.dm.Color.valueProp',olympe.dm.Color.valueProp);olympe.dm.Color.prototype.D.K=new olympe.C.J(()=>olympe.C.Color,[]);olympe.dm.DateTime=class extends olympe.dm.Lf{D(){return this.Ki(olympe.dm.DateTime.valueProp)}};olympe.dm.DateTime.O=olympe.dc.Ba.D('ff021000000000000014',olympe.dm.DateTime);olympe.dm.DateTime.valueProp=olympe.dm.DateTime.O.za('ff023000000000000029');v('olympe.dm.DateTime.valueProp',olympe.dm.DateTime.valueProp);olympe.dm.DateTime.prototype.D.K=new olympe.C.J(()=>olympe.C.bb,[]);olympe.dm.Enum=class extends olympe.dm.String{static create(a,b,c,d,e){const f=olympe.dc.Xa();e=void 0!==e?e:f.Hb(b)&&f.rd(b).length||0;return a.create(b).setProperty(olympe.dm.String.valueProp,c).setProperty(olympe.dc.Sync.nameProp,d||c).setProperty(olympe.dm.Enum.rankProp,e).R()}ia(){return olympe.C.va([super.ia(),super.D()],(a,b)=>''!==a.valueOf()?a:b,olympe.C.Ra)}Id(){return this.Wd(olympe.dm.Enum.rankProp)}};olympe.dm.Enum.create=olympe.dm.Enum.create;
|
|
790
|
+
olympe.dm.Enum.O=olympe.dc.Ba.D('016cdd861b32d56c81f7',olympe.dm.Enum);olympe.dm.Enum.rankProp=olympe.dm.Enum.O.za('017a7690c915975ea995');olympe.dm.Enum.prototype.Id.K=olympe.C.J.G;olympe.dm.Df=class extends olympe.dm.BrickMetadata{static create(a,b){return ee(a,b||{},olympe.dm.Df,olympe.dm.Enum).R()}Aw(){return this.cb(olympe.dc.Sync.instancesRel,olympe.dm.Enum)}};olympe.dm.Df.prototype.getValues=olympe.dm.Df.prototype.Aw;olympe.dm.Df.create=olympe.dm.Df.create;olympe.dm.Df.O=olympe.dc.Ba.D('017a768f966fc08ebb98',olympe.dm.Df);olympe.dm.Number=class extends olympe.dm.Lf{D(){return this.Wd(olympe.dm.Number.valueProp)}};olympe.dm.Number.O=olympe.dc.Ba.D('ff021000000000000013',olympe.dm.Number);olympe.dm.Number.valueProp=olympe.dm.Number.O.za('ff023000000000000028');v('olympe.dm.Number.valueProp',olympe.dm.Number.valueProp);olympe.dm.Number.prototype.D.K=olympe.C.J.G;olympe.sc={};olympe.sc.T={Fa:'sc.Logger',Nl:'sc.RootContext'};olympe.sc.Z={Af:'sc.debug',Pr:'sc.disableTheme',PRODUCTION:'sc.production',hp:'sc.onstartTimeout',yp:'sc.remoteActionTimeout',gt:'google.apikey'};
|
|
791
791
|
olympe.U.config(a=>{C(a,olympe.sc.Z.Af,!1);C(a,olympe.sc.Z.Pr,!1);C(a,olympe.sc.Z.PRODUCTION,!1);C(a,olympe.sc.Z.hp,2E4);C(a,olympe.sc.Z.gt,'AIzaSyD0rTnF3Tq-ZjgdaqyvC8Jg-RSgpZM2jBU');C(a,olympe.sc.Z.yp,1E4);A(a,olympe.sc.T.Fa,[olympe.ua.T.wa],b=>b.Ic('sc'));A(a,olympe.sc.T.Nl,[new olympe.U.ha(olympe.sc.Z.PRODUCTION),new olympe.U.ha(olympe.sc.Z.hp)],b=>{const c=new olympe.sc.Ka('root','root',null);olympe.sc.hr=c;c.set(olympe.sc.Ka.Yh.PRODUCTION,b);return c})},'olympe.sc');
|
|
792
|
-
olympe.U.run([olympe.sc.T.Nl],a=>{olympe.Ii().ctx=a});olympe.sc.
|
|
793
|
-
olympe.sc.Bm=()=>null!==olympe.dc.Xa().Dc(void 0,olympe.sc.Runnable.D.Cd());olympe.sc.
|
|
794
|
-
olympe.sc.
|
|
795
|
-
olympe.sc.
|
|
796
|
-
olympe.dm.Qb.pa));return[...f,...g,...h].reverse()};olympe.sc.
|
|
792
|
+
olympe.U.run([olympe.sc.T.Nl],a=>{olympe.Ii().ctx=a});olympe.sc.nC=(a,b,c)=>{a.sa(olympe.dc.Sync.containsRel,c,b);a.sa(olympe.dc.Sync.G,b,c);a.sa(olympe.dm.wb.D,b,c)};olympe.sc.lC=(a,b,c,d)=>{a.sa(olympe.dc.Sync.G,b,d);a.sa(olympe.dm.wb.D,b,d);a.sa(olympe.dc.Sync.containsRel,c,b);a.sa(olympe.sc.Runnable.F,c,b);a.sa(olympe.sc.Runnable.D,c,b)};olympe.sc.CC=(a,b,c,d)=>{a.mb(olympe.dc.Sync.G,b,d);a.mb(olympe.dm.wb.D,b,d);a.mb(olympe.dc.Sync.containsRel,c,b);a.mb(olympe.sc.Runnable.F,c,b);a.mb(olympe.sc.Runnable.D,c,b)};
|
|
793
|
+
olympe.sc.Bm=()=>null!==olympe.dc.Xa().Dc(void 0,olympe.sc.Runnable.D.Cd());olympe.sc.EC=(a,b,c)=>{a.mb(olympe.dc.Sync.containsRel,c,b);a.mb(olympe.dc.Sync.G,b,c);a.mb(olympe.dm.wb.D,b,c)};olympe.sc.Qw=(a,b,c)=>{a.sa(olympe.dc.Sync.G,b,c);a.sa(olympe.sc.Wa.ea,c,b)};olympe.sc.Yx=(a,b,c)=>{a.mb(olympe.dc.Sync.G,b,c);a.mb(olympe.sc.Wa.ea,c,b)};olympe.sc.mC=(a,b,c)=>{olympe.sc.Qw(a,b,c);a.sa(olympe.dc.Sync.containsRel,c,b);a.sa(olympe.dm.wb.D,b,c)};
|
|
794
|
+
olympe.sc.DC=(a,b,c)=>{olympe.sc.Yx(a,b,c);a.mb(olympe.dc.Sync.containsRel,c,b);a.mb(olympe.dm.wb.D,b,c)};olympe.sc.SB=(a,b,c,d,e)=>{d=a.create(olympe.sc.uc).setProperty(olympe.sc.uc.D,d||null).setProperty(olympe.sc.uc.L,e||null);a.sa(olympe.sc.uc.F,d,b);a.sa(olympe.dc.Sync.containsRel,b,d);a.sa(olympe.dc.Sync.G,d,c);return d.R()};olympe.sc.Dh=a=>{a=olympe.dc.$.Mb.Dh(a);return a instanceof olympe.sc.he?a.D():a};olympe.sc.gC=a=>{a=olympe.dc.Sync.Lb(a.tag);return a instanceof olympe.sc.he?a.D():a};
|
|
795
|
+
olympe.sc.dC=function(a){const b=olympe.dm.Qb.L.Cd(),c=olympe.dc.Sync.containsRel.Cd();var d=olympe.dc.Ea(a);if(void 0===d)return[];a=olympe.dc.Xa();var e=a.model(d);const f=[],g=[];let h=[];if(a.Fm(e,olympe.dm.Qb))h.push(d);else{for(e=[];null===a.Dc(d,b);){e.push(d);const k=a.Dc(d,c);k===a.Dc(d,olympe.dc.Sync.instancesRel)?(f.push(d),d=a.Dc(k,c)):d=k;if(e.includes(d))throw Error(`Instance ${d} (${a.name(d)}) is part of a cyclic contain pattern`);}g.push(d);h.push(a.Dc(g[0],b))}h=h.concat(a.fk(h[0],
|
|
796
|
+
olympe.dm.Qb.pa));return[...f,...g,...h].reverse()};olympe.sc.eC=a=>{a=a.valueOf();return a.startsWith('image/')?olympe.sc.lh:a.startsWith('video/')?olympe.sc.ti:a.startsWith('font/')||a.startsWith('application/font-woff')?olympe.sc.Lc:olympe.dm.File};let th=0,uh=0;function vh(a,b){if(a.children)for(const c of a.children.values())b(c)}function wh(a,b){a.children&&a.children.delete(b.ba())}function xh(a,b){if(null===a)return null;if(a.has(b))return a.get(b);for(const c of a.values())if(c.Yl&&c.Ni()&&(a=xh(c.children,b)))return a;return null}function yh(a,b){b=olympe.dc.Ea(b);return a.Tg&&(a.Tg.get('O#'+b)||a.Tg.get('IO#'+b))||b}
|
|
797
797
|
function zh(a,b,c,d){const e='$'+b;a.Hh.add(b);c.map(f=>'@'+f+'.'+b).forEach(f=>{(f=a.wc&&a.wc.get(f))&&f.forEach(g=>{g(d)})});vh(a,f=>{!f.fm&&f.Hh.has(b)||f.data.has(e)||zh(f,b,c,d)});a.Hh.delete(b)}function Ah(a,b){b=olympe.dc.Ea(b);return a.Tg&&(a.Tg.get('I#'+b)||a.Tg.get('IO#'+b))||b}function Bh(a,b,c){a.Hh.add(b);const d=a.wc&&a.wc.get('&'+b);if(d)for(const e of d.values())e(c);vh(a,e=>{e.Hh.has(b)||Bh(e,b,c)});a.Hh.delete(b)}
|
|
798
798
|
olympe.sc.Ka=class{constructor(a,b,c=olympe.sc.hr){++uh;this.id=a;this.Cg=new Set;this.parent=c;this.nd=b||null;this.Gb=new olympe.C.ec('SC Context');this.data=new Map;this.Fd=this.Pc=this.children=this.wc=null;this.uid=uh;this.tq=null;this.Yl=!1;this.Hh=new Set;this.fm=!1;this.N=olympe.ua.vb('sc');this.Tg=null;this.Gb.Vc(()=>{vh(this,d=>d.destroy())});this.Gb.onDestroy(()=>{this.Fd&&this.Fd.forEach((d,e)=>{for(let f=0;f<d;f++)this.Yj(e)});c&&wh(this.parent,this);this.Cg.clear();this.Gb=this.parent=
|
|
799
|
-
null;null!==this.Pc&&0<this.Pc.length&&this.N.warn(`The context ${this.id} destroys but still has unreleased transactions. You probably forgot to end a transaction.`);this.Pc=null})}ba(){return this.id}zm(){return this.uid}getParent(){return this.parent}$j(){return this.tq}
|
|
799
|
+
null;null!==this.Pc&&0<this.Pc.length&&this.N.warn(`The context ${this.id} destroys but still has unreleased transactions. You probably forgot to end a transaction.`);this.Pc=null})}ba(){return this.id}zm(){return this.uid}getParent(){return this.parent}$j(){return this.tq}Ge(){return this.Gb}Im(a){this.tq=olympe.dc.Ea(a);this.Yl=a.Bd().Bm();a.W().forEach(b=>{this.Cg.add(b)});this.Tg=a.P()}Vj(){this.fm=!0;vh(this,a=>{a.Vj()})}Ak(){this.fm=!1;vh(this,a=>{a.Ak()})}set(a,b){if(!this.Gb||this.Gb.Yd())return this;
|
|
800
800
|
a=yh(this,a);const c='$'+a;var d=this.data.get(c);d&&d.valueOf&&(d=d.valueOf());if(void 0===b||null===b)void 0!==d&&(this.data.delete(c),zh(this,a,['*',this.id,...this.Cg],null));else{var e;(e=void 0===d)||(e=!('function'===typeof b.tb?b.tb(d):b.valueOf()===d.valueOf()));e&&(this.data.set(c,b),zh(this,a,['*',this.id,...this.Cg],b))}return this}Sh(a){return this.set(a,Date.now())}remove(a){this.Gb&&!this.Gb.Yd()&&(a=yh(this,a),this.data.delete('$'+a)&&zh(this,a,['*',this.id,...this.Cg],null))}ub(a,
|
|
801
|
-
b,c=!1){const d=olympe.dc.Ea(a),e=olympe.C.Jc(b||Object,`Get context value flow source of ${d}`);e.node.onDestroy(this.on(a,f=>{null===f?e.clear():e.update(f)},c?this.id:void 0));return e.ub()}get(a,b=!1){a=this.
|
|
802
|
-
b||null!==e||d.next(e);const f=this.on(a,d.next.bind(d),c?void 0:this.id);this.onDestroy(()=>{f();d.complete()});return f})}repeat(a,b){const c=Ah(this,a);a=b.subscribe(d=>{null!==d?this.set(c,d):this.remove(c)});this.Xg(a.unsubscribe.bind(a));return this}wk(a){a=a instanceof olympe.sc.Runnable?a:this.get(a);if(!a)return null;const b=this.Fh(`Runner ${olympe.C.
|
|
803
|
-
b=!0){a='$'+Ah(this,a);let c=this.data.get(a),d=this.parent;if(b)for(;void 0===c&&null!==d;)c=d.data.get(a),d=d.parent;return c}on(a,b,c){if(!this.Gb||this.Gb.Yd())return()=>{};const d=Ah(this,a),e=c?olympe.dc.Ea(c):'*';a=this.De('@'+e+'.'+d,b);c=c?(c=this.Mh(e))?c.
|
|
801
|
+
b,c=!1){const d=olympe.dc.Ea(a),e=olympe.C.Jc(b||Object,`Get context value flow source of ${d}`);e.node.onDestroy(this.on(a,f=>{null===f?e.clear():e.update(f)},c?this.id:void 0));return e.ub()}get(a,b=!1){a=this.Sa(a,b);return void 0!==a?a:null}has(a,b=!1){a='$'+Ah(this,a);let c=this.data.has(a),d=this.parent;if(b)for(;!c&&d;)c=d.data.has(a),d=d.parent;return c}observe(a,b=!0,c=!1){return new rxjs.Observable(d=>{if(this.Bb())return d.error('Context is already destroyed'),()=>{};const e=this.get(a);
|
|
802
|
+
b||null!==e||d.next(e);const f=this.on(a,d.next.bind(d),c?void 0:this.id);this.onDestroy(()=>{f();d.complete()});return f})}repeat(a,b){const c=Ah(this,a);a=b.subscribe(d=>{null!==d?this.set(c,d):this.remove(c)});this.Xg(a.unsubscribe.bind(a));return this}wk(a){a=a instanceof olympe.sc.Runnable?a:this.get(a);if(!a)return null;const b=this.Fh(`Runner ${olympe.C.Sa(a.ia(),'')}`);a.run(b);return b}Vm(a,b=!0,c=!1){return rxjs.firstValueFrom(this.observe(a,b,c))}zk(a){this.set(olympe.sc.Ka.Yh.Oe,a);return this}Sa(a,
|
|
803
|
+
b=!0){a='$'+Ah(this,a);let c=this.data.get(a),d=this.parent;if(b)for(;void 0===c&&null!==d;)c=d.data.get(a),d=d.parent;return c}on(a,b,c){if(!this.Gb||this.Gb.Yd())return()=>{};const d=Ah(this,a),e=c?olympe.dc.Ea(c):'*';a=this.De('@'+e+'.'+d,b);c=c?(c=this.Mh(e))?c.Sa(d,!1):void 0:this.Sa(d);void 0!==c&&b(c);olympe.C.Ia().onDestroy(a);return a}Zl(a){a=olympe.dc.Ea(a);this.Fd||(this.Fd=new Map);const b=this.Fd.get(a)||0;this.Fd.set(a,b+1);0===b&&Rc(olympe.dc.Tc(),[a])}Yj(a){a=olympe.dc.Ea(a);if(this.Fd&&
|
|
804
804
|
this.Fd.has(a)){var b=this.Fd.get(a)-1;0===b?(this.Fd.delete(a),0===this.Fd.size&&(this.Fd=null),b=!0):(this.Fd.set(a,b),b=!1)}else b=!1;b&&Rc(olympe.dc.Tc(),void 0,[a])}Fh(a){const b='_'+olympe.$.Sb();null===this.children&&(this.children=new Map);const c=this.Gb.run(()=>new olympe.sc.Ka(b,a,this));this.children.set(b,c);return c}ek(a,b){a=olympe.dc.Ea(a);null===this.children&&(this.children=new Map);let c=this.children.get(a);if(!c){c=new olympe.sc.Ka(a,b,this);this.children.set(a,c);for(b=c.parent;b&&
|
|
805
|
-
b.Yl&&b.Ni();)b=b.parent;b&&Bh(b,a,c)}return c}uk(a){this.Pc||(this.Pc=[]);this.Pc.push({transaction:a,lk:!1})}gk(){var a=this;let b=null;for(;(!b||b&&b.lk)&&a;){const c=a.Pc;c&&0<c.length&&(b=c[c.length-1]);a=a.parent}if(b&&!b.lk)return b.transaction;this.Pc||(this.Pc=[]);a=new olympe.sc.
|
|
805
|
+
b.Yl&&b.Ni();)b=b.parent;b&&Bh(b,a,c)}return c}uk(a){this.Pc||(this.Pc=[]);this.Pc.push({transaction:a,lk:!1})}gk(){var a=this;let b=null;for(;(!b||b&&b.lk)&&a;){const c=a.Pc;c&&0<c.length&&(b=c[c.length-1]);a=a.parent}if(b&&!b.lk)return b.transaction;this.Pc||(this.Pc=[]);a=new olympe.sc.kb;this.Pc.push({transaction:a,lk:!0});return a}vk(a){if(null!==this.Pc){const b=this.Pc.pop();0===this.Pc.length&&(this.Pc=null);if(b&&b.lk){b.transaction.gd((c,d)=>{a&&a(!0,c,d)});return}}a&&a(!1,!0,null)}sk(){if(null===
|
|
806
806
|
this.Pc)return null;const a=this.Pc.pop();0===this.Pc.length&&(this.Pc=null);return a&&a.transaction||null}Si(a,b){const c=this.Mh(a);if(c)return b(c),()=>{};const d=this.De('&'+a,e=>{d&&d();b(e)});return d}Mh(a){if(a===this.id||this.Cg.has(a)||!a)return this;let b=this.parent;for(;b;){if(a===b.id||b.Cg.has(a))return b;const c=xh(b.children,a);if(c)return c;b=b.parent}return null}Ni(){return!this.id.startsWith('_')}Xg(a,b){return null!==this.Gb?this.Gb.Vc(a,b):b||'noId'}qk(a){null!==this.Gb&&this.Gb.cr(a)}onDestroy(a){return null===
|
|
807
|
-
this.Gb?(a(),'noId'):this.Gb.onDestroy(a)}re(a){null!==this.Gb&&this.Gb.re(a)}destroy(){this.Gb&&!this.Gb.Bb()&&this.Gb.destroy()}clear(){this.Gb&&!this.Gb.Bb()&&this.Gb.Wf()}Bb(){return null===this.Gb||this.Gb.Bb()}De(a,b){this.wc||(this.wc=new Map);let c=this.wc.get(a);void 0===c&&(c=new Map,this.wc.set(a,c));++th;const d=th;c.set(d,b);return()=>{const e=this.wc.get(a);e&&(e.delete(d),0===e.size&&this.wc.delete(a))}}Dm(){const a=this.
|
|
807
|
+
this.Gb?(a(),'noId'):this.Gb.onDestroy(a)}re(a){null!==this.Gb&&this.Gb.re(a)}destroy(){this.Gb&&!this.Gb.Bb()&&this.Gb.destroy()}clear(){this.Gb&&!this.Gb.Bb()&&this.Gb.Wf()}Bb(){return null===this.Gb||this.Gb.Bb()}De(a,b){this.wc||(this.wc=new Map);let c=this.wc.get(a);void 0===c&&(c=new Map,this.wc.set(a,c));++th;const d=th;c.set(d,b);return()=>{const e=this.wc.get(a);e&&(e.delete(d),0===e.size&&this.wc.delete(a))}}Dm(){const a=this.Sa(olympe.sc.Ka.Yh.EDITION);return a?a:!1}kk(){const a=this.Sa(olympe.sc.Ka.Yh.PRODUCTION);
|
|
808
808
|
return a?a:!1}};olympe.sc.Ka.prototype.clear=olympe.sc.Ka.prototype.clear;olympe.sc.Ka.prototype.destroy=olympe.sc.Ka.prototype.destroy;olympe.sc.Ka.prototype.offDestroy=olympe.sc.Ka.prototype.re;olympe.sc.Ka.prototype.onDestroy=olympe.sc.Ka.prototype.onDestroy;olympe.sc.Ka.prototype.offClear=olympe.sc.Ka.prototype.qk;olympe.sc.Ka.prototype.onClear=olympe.sc.Ka.prototype.Xg;olympe.sc.Ka.prototype.getOtherContext=olympe.sc.Ka.prototype.Mh;olympe.sc.Ka.prototype.onContext=olympe.sc.Ka.prototype.Si;
|
|
809
809
|
olympe.sc.Ka.prototype.popTransaction=olympe.sc.Ka.prototype.sk;olympe.sc.Ka.prototype.releaseTransaction=olympe.sc.Ka.prototype.vk;olympe.sc.Ka.prototype.getTransaction=olympe.sc.Ka.prototype.gk;olympe.sc.Ka.prototype.pushTransaction=olympe.sc.Ka.prototype.uk;olympe.sc.Ka.prototype.createChild=olympe.sc.Ka.prototype.Fh;olympe.sc.Ka.prototype.setParentElement=olympe.sc.Ka.prototype.zk;olympe.sc.Ka.prototype.waitFor=olympe.sc.Ka.prototype.Vm;olympe.sc.Ka.prototype.runner=olympe.sc.Ka.prototype.wk;
|
|
810
|
-
olympe.sc.Ka.prototype.repeat=olympe.sc.Ka.prototype.repeat;olympe.sc.Ka.prototype.observe=olympe.sc.Ka.prototype.observe;olympe.sc.Ka.prototype.has=olympe.sc.Ka.prototype.has;olympe.sc.Ka.prototype.get=olympe.sc.Ka.prototype.get;olympe.sc.Ka.prototype.remove=olympe.sc.Ka.prototype.remove;olympe.sc.Ka.prototype.trigger=olympe.sc.Ka.prototype.Sh;olympe.sc.Ka.prototype.set=olympe.sc.Ka.prototype.set;olympe.sc.Ka.prototype.getParent=olympe.sc.Ka.prototype.getParent;olympe.sc.Ka.Tb={qs:'I#',qt:'O#',
|
|
811
|
-
olympe.sc.Ka.Yh={PRODUCTION:'__production',EDITION:'__editionMode',
|
|
812
|
-
olympe.sc.cd.prototype.F.K=new olympe.C.J(()=>olympe.dc.na,[]);olympe.sc.cd.prototype.G.K=new olympe.C.J(()=>olympe.dc.na,[]);function Ch(a,b){[].forEach(c=>c.call(a,b,(d,e)=>{null===e?b.remove(d):b.set(d,e)}))}function Dh(a,b){const c=[];for(const d of b)b=a.db.
|
|
813
|
-
olympe.sc.Wa=class extends olympe.dm.BrickMetadata{Os(a,b,c,d,e=!0){e||olympe.ua.vb('sc').error('parameter own= false ignored, investigate');return olympe.C.
|
|
814
|
-
olympe.sc.logic.Cb)}};olympe.sc.Wa.O=olympe.dc.Ba.D('0112000000000000def0',olympe.sc.Wa);olympe.sc.Wa.zd=olympe.sc.Wa.O.za('01692aa71f3108454479');olympe.sc.Wa.Gd=olympe.sc.Wa.O.za('0166446c1f128ebc903a');olympe.sc.Wa.ea=olympe.sc.Wa.O.Oa('01692a4af82e8984742c');olympe.sc.Wa.
|
|
815
|
-
olympe.sc.Wa.Qg=olympe.sc.Wa.O.Oa('0171838bcfed0000a00a');l=olympe.sc.Wa.prototype;l.Os.K=olympe.C.J.D;l.
|
|
816
|
-
function Ih(a,b){var c=a.hc();const d=a.db.name(c),e=`Brick ${d} successfully run`,f=`Brick ${d} successfully cleared`,g=a.F(b);c=a.setupExecution(b).pipe(rxjs.operators.map(h=>b.Bb()||(b.clear(),null===h)?!1:(b.
|
|
810
|
+
olympe.sc.Ka.prototype.repeat=olympe.sc.Ka.prototype.repeat;olympe.sc.Ka.prototype.observe=olympe.sc.Ka.prototype.observe;olympe.sc.Ka.prototype.has=olympe.sc.Ka.prototype.has;olympe.sc.Ka.prototype.get=olympe.sc.Ka.prototype.get;olympe.sc.Ka.prototype.remove=olympe.sc.Ka.prototype.remove;olympe.sc.Ka.prototype.trigger=olympe.sc.Ka.prototype.Sh;olympe.sc.Ka.prototype.set=olympe.sc.Ka.prototype.set;olympe.sc.Ka.prototype.getParent=olympe.sc.Ka.prototype.getParent;olympe.sc.Ka.Tb={qs:'I#',qt:'O#',qz:'IO#'};
|
|
811
|
+
olympe.sc.Ka.Yh={PRODUCTION:'__production',EDITION:'__editionMode',Oe:'__htmlContainer',yy:'__dockableElement'};olympe.sc.Metadata=class extends olympe.dc.Sync{constructor(a,b){super(a,b)}};olympe.sc.Metadata.O=olympe.dc.Ba.D('0161ae936c62f9fcd131',olympe.sc.Metadata);olympe.sc.uc=class extends olympe.dc.Sync{F(){return this.xb(olympe.sc.uc.L)}D(){return this.xb(olympe.sc.uc.D)}};olympe.sc.uc.O=olympe.dc.Ba.D('01703376c4a81c0e9d90',olympe.sc.uc);olympe.sc.uc.L=olympe.sc.uc.O.za('01703376c4a81c0e9d91');olympe.sc.uc.D=olympe.sc.uc.O.za('01703376c4a81c0e9d92');olympe.sc.uc.F=olympe.sc.uc.O.Oa('01703376c4a81c0e9d93');Q(olympe.dc.Sync.O,olympe.sc.uc.F);olympe.sc.uc.prototype.F.K=olympe.C.J.F;olympe.sc.uc.prototype.D.K=olympe.C.J.F;olympe.sc.Ke={};olympe.sc.Ke.Bg={py:null,Nt:'screenflow',fu:'ui-design',Fp:'software-intelligence',Qk:'data-management'};olympe.sc.cd=class extends olympe.dm.BrickMetadata{D(){return olympe.sc.Ke.Bg.Fp}F(){return this.cb(olympe.sc.cd.L,olympe.sc.logic.ug)}G(){return this.cb(olympe.sc.cd.P,olympe.sc.logic.Kf)}};olympe.sc.cd.O=olympe.dc.Ba.D('011100000000000adef0',olympe.sc.cd);olympe.sc.cd.L=olympe.sc.cd.O.Oa('016ac4f59a2917fdef01');olympe.sc.cd.P=olympe.sc.cd.O.Oa('016ac4f59a2917fdef02');olympe.sc.cd.O.D=(a,b)=>ee(a,b||'New function signature',olympe.sc.cd,olympe.sc.logic.we).R();
|
|
812
|
+
olympe.sc.cd.prototype.F.K=new olympe.C.J(()=>olympe.dc.na,[]);olympe.sc.cd.prototype.G.K=new olympe.C.J(()=>olympe.dc.na,[]);function Ch(a,b){[].forEach(c=>c.call(a,b,(d,e)=>{null===e?b.remove(d):b.set(d,e)}))}function Dh(a,b){const c=[];for(const d of b)b=a.db.Ib(d,olympe.sc.logic.mc.D,!0),c[b]=d;return c}
|
|
813
|
+
olympe.sc.Wa=class extends olympe.dm.BrickMetadata{Os(a,b,c,d,e=!0){e||olympe.ua.vb('sc').error('parameter own= false ignored, investigate');return olympe.C.Le(L(this.bg(a,olympe.dc.$.Mb.Dh,c)),d)}ow(){return this.cb(olympe.sc.Wa.ea,olympe.sc.Runnable)}tv(){return this.cb(olympe.sc.Wa.Ta,olympe.sc.Runnable)}Gm(){return this.db.Ib(this,olympe.sc.Wa.zd)}Bm(){return null!==this.db.Dc(this.tag,olympe.sc.Runnable.D.Cd())}ol(){return this.cb(olympe.sc.Wa.L,olympe.sc.logic.yb)}tj(){return this.cb(olympe.sc.Wa.P,
|
|
814
|
+
olympe.sc.logic.Cb)}};olympe.sc.Wa.O=olympe.dc.Ba.D('0112000000000000def0',olympe.sc.Wa);olympe.sc.Wa.zd=olympe.sc.Wa.O.za('01692aa71f3108454479');olympe.sc.Wa.Gd=olympe.sc.Wa.O.za('0166446c1f128ebc903a');olympe.sc.Wa.ea=olympe.sc.Wa.O.Oa('01692a4af82e8984742c');olympe.sc.Wa.Ta=olympe.sc.Wa.O.Oa('01692a4af82e8984742d');olympe.sc.Wa.L=olympe.sc.Wa.O.Oa('01621fb84e320000f00a');olympe.sc.Wa.P=olympe.sc.Wa.O.Oa('01621fb84e320000f00b');olympe.sc.Wa.Rg=olympe.sc.Wa.O.Oa('0171838bcfed0000e00e');
|
|
815
|
+
olympe.sc.Wa.Qg=olympe.sc.Wa.O.Oa('0171838bcfed0000a00a');l=olympe.sc.Wa.prototype;l.Os.K=olympe.C.J.D;l.ow.K=new olympe.C.J(()=>olympe.dc.na,[]);l.tv.K=new olympe.C.J(()=>olympe.dc.na,[]);l.Gm.K=olympe.C.J.D;l.Bm.K=olympe.C.J.D;l.ol.K=new olympe.C.J(()=>olympe.dc.na,[]);l.tj.K=new olympe.C.J(()=>olympe.dc.na,[]);function Eh(a){const b=new olympe.dc.kb,c=b.create(a).persist(!1).R();b.gd();olympe.C.Ia().onDestroy(()=>{const d=new olympe.dc.kb;d.delete(c);d.gd()});return olympe.dc.Sync.Lb(c)}function Fh(a,b){b.Im(a);Ch(a.Bd(),b);const c=a.G(),d=Gh(b,c),e=[];c.forEach((f,g)=>{f===a.pa?e[0]=g:f===a.ka&&(e[1]=g)});void 0!==e[0]&&void 0!==e[1]&&(Hh(a,d[e[0]],d[e[1]]),c[e[0]]=null,c[e[1]]=null);c.forEach((f,g)=>{f&&f.call(a,b,d[g])})}
|
|
816
|
+
function Ih(a,b){var c=a.hc();const d=a.db.name(c),e=`Brick ${d} successfully run`,f=`Brick ${d} successfully cleared`,g=a.F(b);c=a.setupExecution(b).pipe(rxjs.operators.map(h=>b.Bb()||(b.clear(),null===h)?!1:(b.Ge().run(a.update.bind(a,new olympe.sc.Pa(b),Array.isArray(h)?h:[h],g)),!0))).subscribe(rxjs.Subscriber.create(h=>h?a.N.debug(e):a.N.debug(f),a.Ga.bind(a,b),()=>a.N.debug(`Brick ${d} completed`)));b.onDestroy(c.unsubscribe.bind(c))}
|
|
817
817
|
function Gh(a,b){if(1===b.length)return[(d,e)=>{null!==e?a.set(d,e):a.remove(d)}];const c=b.map(()=>new Map);return c.map(d=>(e,f)=>{null!==f?d.set(e,f):d.delete(e);a:{for(const g of c)if(f=g.get(e),void 0!==f){a.set(e,f);break a}a.remove(e)}})}
|
|
818
818
|
function Hh(a,b,c){const d=olympe.C.Ia(),e=zd(a.db,a.tag,d.rb((f,g,h)=>{const k=h?c:b;null!==k&&(h&&b&&b(f,null),null===g||void 0===g?k(f,null):k(f,olympe.sc.Dh(g)))}));d.onDestroy(()=>{var f=a.db;const g=V(f,a.tag);null!==g&&(g.P(ud,e),f.D.getState()===vd.zf&&f.D.P(e))})}
|
|
819
|
-
olympe.sc.Runnable=class extends olympe.dm.BrickMetadata{constructor(a,b,c){super(a,b);this.N=c}run(a){const b=()=>{Fh(this,a);this.init(a);this.Bd().Gm()?Ih(this,a):a.
|
|
820
|
-
b=olympe.C.Ia();c=olympe.sc.Wa.ea;var e=Ad(this.db,d,c,b.rb((f,g)=>{const h=a.ek(g);f?olympe.dc.Sync.
|
|
821
|
-
this.Bd();return Dh(a,a.db.
|
|
819
|
+
olympe.sc.Runnable=class extends olympe.dm.BrickMetadata{constructor(a,b,c){super(a,b);this.N=c}run(a){const b=()=>{Fh(this,a);this.init(a);this.Bd().Gm()?Ih(this,a):a.Ge().run(this.update.bind(this,new olympe.sc.Pa(a),[],[]));a.Sh(olympe.sc.Wa.Gd);a.Xg(this.clear.bind(this,a));a.onDestroy(this.destroy.bind(this,a))},c=a.getParent();c?c.Ge().run(b):b()}init(a){this.onInit(a)}update(a,b,c){const d=this.Bd();if(d.Gm())this.onUpdate(a,b,c);else{this.N.debug(`Softcoded runnable ${this.db.name(this)} with tag ${this.tag} running in context ${a.zm()}`);
|
|
820
|
+
b=olympe.C.Ia();c=olympe.sc.Wa.ea;var e=Ad(this.db,d,c,b.rb((f,g)=>{const h=a.ek(g);f?olympe.dc.Sync.Lb(g).run(h):h.destroy()}));b.Vc(this.db.F.bind(this.db,d,c,e,!0))}}clear(){}destroy(a){this.onDestroy(a)}setupExecution(){return rxjs.of([])}F(){return[]}onInit(){}onUpdate(){this.N.error(`Brick ${this.db.name(this.hc())} (${this.hc()}) is flagged as hardcoded, but method update() has not been overridden.`)}onDestroy(){}getInputs(){var a=this.Bd();return Dh(a,a.db.cb(a.tag,olympe.sc.Wa.L))}getOutputs(){var a=
|
|
821
|
+
this.Bd();return Dh(a,a.db.cb(a.tag,olympe.sc.Wa.P))}W(){return[]}P(){return new Map}Ho(a,b,c,d){a=b.ub(a,c,!0);void 0!==d&&olympe.C.Le(a,d);return a}jw(a,b,c,d,e){olympe.C.Om([d],f=>{b.set(a,olympe.C.Vq(f)?f.valueOf():f)});return this.Ho(a,b,c,e)}nw(){return this.yc(olympe.sc.Runnable.F,olympe.sc.Wa)}Bd(){return this.dk()}pw(){return this.yc(olympe.sc.Runnable.P,olympe.sc.Wa)}G(){return[this.pa,this.ka]}pa(a,b){Hh(this,b,null)}ka(a,b){Hh(this,null,b)}Ub(a,b){const c=this.db,d=olympe.sc.logic.ob.L.Cd(),
|
|
822
822
|
e=olympe.sc.logic.ob.F,f=olympe.sc.logic.ob.D;this.Dq(d,g=>{var h=g.R();if(h=c.Dc(h,e)||c.Dc(h,f))g=Jh(g,a,b.bind(null,h)),olympe.C.Ia().onDestroy(g)})}Ga(a,b){const c=this.hc();let d=this.db.name(c);try{const e=[a.$j()];let f=a.getParent();for(;null!==f&&f!==olympe.sc.hr;)e.unshift(f.$j()),f=f.getParent();d=e.map(g=>{if(null!==g){const h=this.db.model(g);return this.db.name(g)||h&&this.db.name(h)||g}return'?'}).join(' > ')}catch(e){this.N.warn(`Impossible to retrieve the stack for brick ${this.db.name(c)}.`)}this.N.error(`An error occurred in brick ${d} (${c}): ${b}\n${b.stack}`)}};
|
|
823
|
-
olympe.sc.Runnable.O=Mc(olympe.dc.Ba.D('01130000000000ca1100',olympe.sc.Runnable));olympe.sc.Runnable.F=olympe.sc.Runnable.O.Oa('01692a4af82e8984742b');olympe.sc.Runnable.D=olympe.sc.Runnable.O.Oa('01756a18d4921c103111');olympe.sc.Runnable.P=Q(olympe.sc.Runnable.O,olympe.sc.Wa.ea);olympe.sc.Runnable.W=Q(olympe.sc.Runnable.O,olympe.sc.Wa.
|
|
824
|
-
l.
|
|
825
|
-
Q(olympe.dc.Sync.O,olympe.sc.he.D);olympe.sc.he.prototype.F.K=new olympe.C.J(()=>String,[]);olympe.sc.he.prototype.D.K=new olympe.C.J(()=>olympe.dc.Sync,[]);olympe.sc.Jn=class extends olympe.dm.Qb{D(){return olympe.sc.
|
|
826
|
-
function Mh(a,b){Lh=a;ue(ue(new olympe.dc.Ef(a,olympe.dc.Pd.Cj),olympe.sc.Ca.ue.W),olympe.sc.Yc.F.Cd()).gd((c,d)=>{if(c)olympe.ua.vb('sc').error('Error while loading business container:',c.message),b(olympe.sc.Yc.D.zc);else{c=null;for(const [e,f]of d.pc.Xd())e===olympe.sc.Yc.F.R()&&(c=f);null!==c?Ae(te(new olympe.dc.Ef(c),olympe.dc.nb.RUNTIME),(e,f)=>{const g=olympe.dc.Hc.fe,h=olympe.dc.Hc.gh,k=f.R();f=f.
|
|
827
|
-
b(olympe.sc.Yc.D.Lo)):(olympe.ua.vb('sc').error('No container found for the application',a),b(olympe.sc.Yc.D.vl))}})}olympe.sc.Yc=class extends olympe.dc.Sync{};olympe.sc.Yc.D={Lo:0,vl:1,zc:2};olympe.sc.Yc.O=olympe.dc.Ba.D('017b3aa8fae1e3d044dc',olympe.sc.Yc);olympe.sc.Yc.F=olympe.sc.Yc.O.Oa('017b3aa8fd1659291b92');olympe.sc.Yc.L=olympe.sc.Yc.O.Oa('017b3aa8fe7ec3fd52f2');olympe.sc.Map=class extends olympe.dc.Sync{};olympe.sc.Map.O=olympe.dc.Ba.D('01631aacd5c1f9d61c5d',olympe.sc.Map);olympe.sc.ei=class extends olympe.sc.Map{};olympe.sc.ei.O=olympe.dc.Ba.D('01631aacd8276ea98490',olympe.sc.ei);olympe.sc.lh=class extends olympe.dm.File{L(){const a=olympe.C.Jc(olympe.C.
|
|
823
|
+
olympe.sc.Runnable.O=Mc(olympe.dc.Ba.D('01130000000000ca1100',olympe.sc.Runnable));olympe.sc.Runnable.F=olympe.sc.Runnable.O.Oa('01692a4af82e8984742b');olympe.sc.Runnable.D=olympe.sc.Runnable.O.Oa('01756a18d4921c103111');olympe.sc.Runnable.P=Q(olympe.sc.Runnable.O,olympe.sc.Wa.ea);olympe.sc.Runnable.W=Q(olympe.sc.Runnable.O,olympe.sc.Wa.Ta);Q(olympe.sc.Wa.O,olympe.sc.Runnable.F);Q(olympe.sc.Wa.O,olympe.sc.Runnable.D);l=olympe.sc.Runnable.prototype;l.Ho.K=new olympe.C.J(()=>Object,[]);l.jw.K=olympe.C.J.D;
|
|
824
|
+
l.nw.K=new olympe.C.J(()=>olympe.sc.Wa,[]);l.Bd.K=new olympe.C.J(()=>olympe.sc.Wa,[]);l.pw.K=new olympe.C.J(()=>olympe.sc.Wa,[]);function Kh(a){if(a){if('string'===typeof a)return a;if(a instanceof olympe.sc.he)return(a=a.F())?a.valueOf():null;if('function'===typeof a.R)return a.R()}return null}olympe.sc.he=class extends olympe.dc.Sync{F(){return this.db.cb(this,olympe.sc.he.D)[0]}D(){return olympe.dc.Sync.Lb(Kh(this))}toString(){const a=Kh(this);let b;a&&(b=this.db.name(a));return b||super.toString()}};olympe.sc.he.O=olympe.dc.Ba.D('0163c9ae01f2d6e9ca49',olympe.sc.he);olympe.sc.he.D=olympe.sc.he.O.Oa('0169b5a8a33144fb0b49');
|
|
825
|
+
Q(olympe.dc.Sync.O,olympe.sc.he.D);olympe.sc.he.prototype.F.K=new olympe.C.J(()=>String,[]);olympe.sc.he.prototype.D.K=new olympe.C.J(()=>olympe.dc.Sync,[]);olympe.sc.Jn=class extends olympe.dm.Qb{D(){return olympe.sc.Ke.Bg.Qk}};olympe.sc.Jn.O=olympe.dc.Ba.D('0163a68ce44f3d1fa84c',olympe.sc.Jn);olympe.sc.bh=class extends olympe.dm.BrickMetadata{};olympe.sc.bh.O=olympe.dc.Ba.D('016324fde11a836f76c2',olympe.sc.bh);olympe.sc.bh.O.D=function(a,b){return ee(a,b||'New model',olympe.sc.bh).R()};let Lh=null;
|
|
826
|
+
function Mh(a,b){Lh=a;ue(ue(new olympe.dc.Ef(a,olympe.dc.Pd.Cj),olympe.sc.Ca.ue.W),olympe.sc.Yc.F.Cd()).gd((c,d)=>{if(c)olympe.ua.vb('sc').error('Error while loading business container:',c.message),b(olympe.sc.Yc.D.zc);else{c=null;for(const [e,f]of d.pc.Xd())e===olympe.sc.Yc.F.R()&&(c=f);null!==c?Ae(te(new olympe.dc.Ef(c),olympe.dc.nb.RUNTIME),(e,f)=>{const g=olympe.dc.Hc.fe,h=olympe.dc.Hc.gh,k=f.R();f=f.Qa();return olympe.dc.Xa().dg(e,olympe.sc.bh)&&f===olympe.dc.Ja.ORIGIN&&(k===g||k===h)}).gd(()=>
|
|
827
|
+
b(olympe.sc.Yc.D.Lo)):(olympe.ua.vb('sc').error('No container found for the application',a),b(olympe.sc.Yc.D.vl))}})}olympe.sc.Yc=class extends olympe.dc.Sync{};olympe.sc.Yc.D={Lo:0,vl:1,zc:2};olympe.sc.Yc.O=olympe.dc.Ba.D('017b3aa8fae1e3d044dc',olympe.sc.Yc);olympe.sc.Yc.F=olympe.sc.Yc.O.Oa('017b3aa8fd1659291b92');olympe.sc.Yc.L=olympe.sc.Yc.O.Oa('017b3aa8fe7ec3fd52f2');olympe.sc.Map=class extends olympe.dc.Sync{};olympe.sc.Map.O=olympe.dc.Ba.D('01631aacd5c1f9d61c5d',olympe.sc.Map);olympe.sc.ei=class extends olympe.sc.Map{};olympe.sc.ei.O=olympe.dc.Ba.D('01631aacd8276ea98490',olympe.sc.ei);olympe.sc.lh=class extends olympe.dm.File{L(){const a=olympe.C.Jc(olympe.C.Ra);this.bk(b=>{a.update(olympe.C.pb(b))});return a.ub()}};olympe.sc.lh.O=Hc('01644b6297305d62fca2',olympe.sc.lh);olympe.sc.lh.O.D=olympe.dm.File.ne.bind(null,olympe.sc.lh);olympe.sc.lh.prototype.L.K=olympe.C.J.F;olympe.sc.Lc=class extends olympe.dm.File{L(){return this.xb(olympe.sc.Lc.F)}P(){return this.xb(olympe.sc.Lc.L)}W(){return this.Wd(olympe.sc.Lc.P)}};olympe.sc.Lc.O=Hc('01647e113043c637b541',olympe.sc.Lc);olympe.sc.Lc.F=olympe.sc.Lc.O.za('01647e35ecd24ef0b88d');olympe.sc.Lc.L=olympe.sc.Lc.O.za('01647e677f5d1cfbdf42');olympe.sc.Lc.P=olympe.sc.Lc.O.za('01647e6780999bf8bd25');olympe.sc.Lc.O.D=(a,b,c,d)=>{c=olympe.dm.File.ne(olympe.sc.Lc,a,b,c,d);a.update(c,olympe.sc.Lc.F,b.split('.')[0]);return c};
|
|
828
828
|
olympe.sc.Lc.prototype.L.K=olympe.C.J.F;olympe.sc.Lc.prototype.P.K=olympe.C.J.F;olympe.sc.Lc.prototype.W.K=olympe.C.J.G;olympe.sc.ti=class extends olympe.dm.File{};olympe.sc.ti.O=Hc('0164643c432146a71d5c',olympe.sc.ti);olympe.sc.ti.O.D=olympe.dm.File.ne.bind(null,olympe.sc.ti);olympe.sc.aq=class extends olympe.dc.Sync{};olympe.sc.aq.O=olympe.dc.Ba.D('016421bb3797e22d1c4e',olympe.sc.aq);olympe.sc.logic={};olympe.sc.logic.oo=(a,b)=>a===b?0:a>b?1:-1;
|
|
829
|
-
olympe.sc.logic.
|
|
830
|
-
return}let n;if('<'===f)n=(p,q)=>olympe.sc.logic.oo(q,p);else if('>'===f)n=(p,q)=>olympe.sc.logic.oo(p,q);else{g.error(`Unknown inequality ${f}. Please use '<' or '>'`);return}e(a.Uf().filter(p=>olympe.C.va([m(p)],q=>{q=n(q.valueOf(),k);return olympe.C.rc(d.valueOf()?1===q:0<=q)},olympe.C.fa,'FilterList ListDefBuilder Filter TransformFlows')).
|
|
831
|
-
olympe.sc.logic.
|
|
832
|
-
olympe.sc.logic.Ba=class{constructor(){}static D(a,b,...c){if(Oh[a])throw c=Qh(a),Error(`Tag: ${a} - overwriting already defined function "${c.name}" with "${b.name}"`);b=new olympe.sc.logic.xa.co(a,b,[olympe.sc.T.Fa].concat(c));return Oh[a]=b}};olympe.sc.logic.
|
|
833
|
-
olympe.sc.logic.lj=class extends olympe.sc.logic.gj{static create(a,b){return new olympe.sc.logic.Error(b,a)}};olympe.sc.logic.lj.O=olympe.dc.Ba.D('016eeb5ede9f3094d8f0',olympe.sc.logic.lj);olympe.sc.logic.bd=class extends olympe.dc.Sync{D(){return this.yc(olympe.sc.logic.bd.D,olympe.dc.Sync)}};olympe.sc.logic.bd.O=olympe.dc.Ba.D('016ac4f59ee8ea2081ba',olympe.sc.logic.bd);olympe.sc.logic.bd.F=olympe.sc.logic.bd.O.za('017bc044aeacce7ffc8f');olympe.sc.logic.bd.D=olympe.sc.logic.bd.O.Oa('016ac4f5a0091c4790e2');Q(olympe.dc.Sync.O,olympe.sc.logic.bd.D);olympe.sc.logic.bd.prototype.D.K=new olympe.C.J(()=>olympe.dc.Sync,[]);olympe.sc.logic.ug=class extends olympe.sc.logic.bd{};olympe.sc.logic.ug.O=olympe.dc.Ba.D('016ac4f59c592b862457',olympe.sc.logic.ug);olympe.sc.logic.ug.L=olympe.sc.cd.L.Cd();olympe.sc.logic.ug.O.D=(a,b,c,d,e)=>{b=ee(a,b||'New Predefined Input',olympe.sc.logic.ug,olympe.sc.logic.yb);b.setProperty(olympe.sc.logic.bd.F,e);a.sa(olympe.sc.logic.bd.D,b,c);a.sa(olympe.sc.cd.L,d,b);return b.R()};olympe.sc.logic.Kf=class extends olympe.sc.logic.bd{};olympe.sc.logic.Kf.O=olympe.dc.Ba.D('016ac4f59dd99f5df3e1',olympe.sc.logic.Kf);olympe.sc.logic.Kf.L=Q(olympe.sc.logic.Kf.O,olympe.sc.cd.P);olympe.sc.logic.Kf.O.D=(a,b,c,d,e)=>{b=ee(a,b||'New Predefined Output',olympe.sc.logic.Kf,olympe.sc.logic.Cb);b.setProperty(olympe.sc.logic.bd.F,e);a.sa(olympe.sc.logic.bd.D,b,c);a.sa(olympe.sc.cd.P,d,b);return b.R()};olympe.sc.logic.we=class extends olympe.sc.Wa{D(){return olympe.sc.
|
|
834
|
-
[olympe.sc.Wa.P],c=>this.db.model(c)===olympe.dc.Ea(a));return b?olympe.dc.Sync.
|
|
835
|
-
l.Ig.K=new olympe.C.J(()=>olympe.sc.logic.Cb,[]);l.
|
|
829
|
+
olympe.sc.logic.vz=(a,b,c,d,e,f,g)=>{const h=b.R();b=olympe.C.Sa(b.D().R());let k,m;if(b===olympe.dc.Ea(olympe.dm.String))k=c.valueOf().toLowerCase(),m=p=>p.xb(h).toLowerCase();else if(b===olympe.dc.Ea(olympe.dm.Number))k=c.valueOf(),m=p=>p.Wd(h);else if(b===olympe.dc.Ea(olympe.dm.DateTime))k=c.getTime(),m=p=>olympe.C.va([p.Ki(h)],q=>q.getTime(),Number,'FilterList Date&DateTime TransformFlows');else{c=olympe.dc.Xa().name(b);g.warn(`Properties of type ${c} are not supported. List will not be filtered.`);e(a);
|
|
830
|
+
return}let n;if('<'===f)n=(p,q)=>olympe.sc.logic.oo(q,p);else if('>'===f)n=(p,q)=>olympe.sc.logic.oo(p,q);else{g.error(`Unknown inequality ${f}. Please use '<' or '>'`);return}e(a.Uf().filter(p=>olympe.C.va([m(p)],q=>{q=n(q.valueOf(),k);return olympe.C.rc(d.valueOf()?1===q:0<=q)},olympe.C.fa,'FilterList ListDefBuilder Filter TransformFlows')).Ue())};
|
|
831
|
+
olympe.sc.logic.QB=(a,b)=>{if(a instanceof olympe.C.da)return a;if(a instanceof olympe.C.Ra)return a.mr();if(a instanceof olympe.C.fa)return a.Mq();if('string'===typeof a||'number'===typeof a)return olympe.C.ta(Number(a));b.error(`Could not parse provided value ${a} into a number`);return olympe.C.da.Yo};olympe.sc.logic.xa={};function Nh(a){Lc(a.O,(b,c)=>{b=b.create(a.O.F);b.setProperty(olympe.dc.Sync.nameProp,c);return b.R()})}olympe.sc.logic.xa.co=class{constructor(a,b,c){this.O=olympe.dc.Ba.D(a,b,...c);Nh(this)}R(){return this.O.R()}};olympe.sc.logic.xa.co.ja=[olympe.dc.de];const Oh=Object.create(null),Ph=new Map;function Qh(a){if(void 0===Oh[a])throw Error(`Tag: ${a} - does not correspond to a registered function`);return Ic(a)}function Rh(a,b,c=olympe.sc.logic.Function){if(Ph.has(a))throw c=Qh(a),Error(`Tag: ${a} - overwriting existing function definition "${c.name}" with "${b.name}"`);const d=olympe.dc.Ba.D(a,b,...[]);Ph.set(a,{O:d,aC:b,PB:c});return d}
|
|
832
|
+
olympe.sc.logic.Ba=class{constructor(){}static D(a,b,...c){if(Oh[a])throw c=Qh(a),Error(`Tag: ${a} - overwriting already defined function "${c.name}" with "${b.name}"`);b=new olympe.sc.logic.xa.co(a,b,[olympe.sc.T.Fa].concat(c));return Oh[a]=b}};olympe.sc.logic.uy=class{};olympe.sc.logic.gj=class extends olympe.dc.Sync{};olympe.sc.logic.gj.O=olympe.dc.Ba.D('01621fb84e320000cf00',olympe.sc.logic.gj);olympe.sc.logic.Error=class{constructor(a,b){this.code=a;this.$q=b}static create(a,b){return new olympe.sc.logic.Error(b,a)}Tv(){return this.$q}qv(){return this.code}};v('olympe.sc.logic.Error',olympe.sc.logic.Error);olympe.sc.logic.Error.prototype.getCode=olympe.sc.logic.Error.prototype.qv;olympe.sc.logic.Error.prototype.getMessage=olympe.sc.logic.Error.prototype.Tv;olympe.sc.logic.Error.create=olympe.sc.logic.Error.create;
|
|
833
|
+
olympe.sc.logic.lj=class extends olympe.sc.logic.gj{static create(a,b){return new olympe.sc.logic.Error(b,a)}};olympe.sc.logic.lj.O=olympe.dc.Ba.D('016eeb5ede9f3094d8f0',olympe.sc.logic.lj);olympe.sc.logic.bd=class extends olympe.dc.Sync{D(){return this.yc(olympe.sc.logic.bd.D,olympe.dc.Sync)}};olympe.sc.logic.bd.O=olympe.dc.Ba.D('016ac4f59ee8ea2081ba',olympe.sc.logic.bd);olympe.sc.logic.bd.F=olympe.sc.logic.bd.O.za('017bc044aeacce7ffc8f');olympe.sc.logic.bd.D=olympe.sc.logic.bd.O.Oa('016ac4f5a0091c4790e2');Q(olympe.dc.Sync.O,olympe.sc.logic.bd.D);olympe.sc.logic.bd.prototype.D.K=new olympe.C.J(()=>olympe.dc.Sync,[]);olympe.sc.logic.ug=class extends olympe.sc.logic.bd{};olympe.sc.logic.ug.O=olympe.dc.Ba.D('016ac4f59c592b862457',olympe.sc.logic.ug);olympe.sc.logic.ug.L=olympe.sc.cd.L.Cd();olympe.sc.logic.ug.O.D=(a,b,c,d,e)=>{b=ee(a,b||'New Predefined Input',olympe.sc.logic.ug,olympe.sc.logic.yb);b.setProperty(olympe.sc.logic.bd.F,e);a.sa(olympe.sc.logic.bd.D,b,c);a.sa(olympe.sc.cd.L,d,b);return b.R()};olympe.sc.logic.Kf=class extends olympe.sc.logic.bd{};olympe.sc.logic.Kf.O=olympe.dc.Ba.D('016ac4f59dd99f5df3e1',olympe.sc.logic.Kf);olympe.sc.logic.Kf.L=Q(olympe.sc.logic.Kf.O,olympe.sc.cd.P);olympe.sc.logic.Kf.O.D=(a,b,c,d,e)=>{b=ee(a,b||'New Predefined Output',olympe.sc.logic.Kf,olympe.sc.logic.Cb);b.setProperty(olympe.sc.logic.bd.F,e);a.sa(olympe.sc.logic.bd.D,b,c);a.sa(olympe.sc.cd.P,d,b);return b.R()};olympe.sc.logic.we=class extends olympe.sc.Wa{D(){return olympe.sc.Ke.Bg.Fp}ea(){return this.rm().Uf().dg([olympe.sc.logic.Function]).and().Wg().dg([olympe.sc.logic.Xc,olympe.sc.logic.Zc]).Ue()}Kv(){return this.ol().Uf().Li([olympe.dc.Sync.modelRel,olympe.sc.logic.ug.L]).Ue()}Lv(){return this.tj().Uf().Li([olympe.dc.Sync.modelRel,olympe.sc.logic.Kf.L]).Ue()}Zf(a){const b=this.db.nm(this,[olympe.sc.Wa.L],c=>this.db.model(c)===olympe.dc.Ea(a));return b?olympe.dc.Sync.Lb(b):null}Ig(a){const b=this.db.nm(this,
|
|
834
|
+
[olympe.sc.Wa.P],c=>this.db.model(c)===olympe.dc.Ea(a));return b?olympe.dc.Sync.Lb(b):null}xw(){return this.ol().Uf().Li([olympe.dc.Sync.modelRel],olympe.sc.logic.yb).Ue()}yw(){return this.tj().Uf().Li([olympe.dc.Sync.modelRel],olympe.sc.logic.Cb).Ue()}};Rh('01621fb84e320000f000',olympe.sc.logic.we,olympe.sc.logic.Function);l=olympe.sc.logic.we.prototype;l.Kv.K=new olympe.C.J(()=>olympe.dc.na,[]);l.Lv.K=new olympe.C.J(()=>olympe.dc.na,[]);l.Zf.K=new olympe.C.J(()=>olympe.sc.logic.yb,[]);
|
|
835
|
+
l.Ig.K=new olympe.C.J(()=>olympe.sc.logic.Cb,[]);l.xw.K=new olympe.C.J(()=>olympe.dc.na,[]);l.yw.K=new olympe.C.J(()=>olympe.dc.na,[]);olympe.sc.logic.yf=class extends olympe.sc.logic.we{F(){return this.Zf('016ac63229782039429f')}G(){return this.Ig('016ac6322acf67eebfe7')}L(){return this.tj().Uf().sj(olympe.sc.logic.mc.typeRel).hk(olympe.sc.logic.lj).Ue().Cc().Cm(olympe.C.da.ZERO)}};olympe.sc.logic.yf.W='016ac63229782039429f';olympe.sc.logic.yf.pa='016ac6322acf67eebfe7';olympe.sc.logic.yf.O=Rh('01621fb84e320000a000',olympe.sc.logic.yf,olympe.sc.logic.Action);
|
|
836
836
|
olympe.sc.logic.yf.prototype.F.K=new olympe.C.J(()=>olympe.sc.logic.yb,[]);olympe.sc.logic.yf.prototype.G.K=new olympe.C.J(()=>olympe.sc.logic.Cb,[]);olympe.sc.logic.yf.prototype.L.K=olympe.C.J.P;olympe.sc.logic.zn=class extends olympe.sc.logic.we{};olympe.sc.logic.zn.O=Rh('01621fb84e320000f011',olympe.sc.logic.zn);olympe.sc.logic.yn=class extends olympe.sc.logic.yf{};olympe.sc.logic.yn.O=Rh('01621fb84e320000f012',olympe.sc.logic.yn);olympe.sc.logic.Function=class extends olympe.sc.Runnable{G(){return[this.Ub]}P(){const a=olympe.sc.Ka.Tb.qs,b=olympe.sc.Ka.Tb.qt,c=this.db,d=new Map;this.getInputs().forEach(e=>{d.set(a+c.name(e),e)});this.getOutputs().forEach(e=>{d.set(b+c.name(e),e)});return d}F(a){return this.getOutputs().map(b=>this.db.Hm(b,olympe.sc.logic.mc.typeRel,olympe.sc.logic.gj)?a.Sh.bind(a,b):a.set.bind(a,b))}setupExecution(a){const b=this.getInputs();return 0<b.length?rxjs.combineLatest(b.map(c=>a.observe(c))).pipe(rxjs.operators.map(c=>
|
|
837
837
|
c.includes(null)?null:c)):rxjs.of([])}};olympe.sc.logic.Function.O=olympe.dc.Ba.D('0168c6f020f2a96f0000',olympe.sc.logic.Function,olympe.sc.T.Fa);olympe.sc.logic.mc=class extends olympe.dc.Sync{D(){return this.yc(olympe.sc.logic.mc.typeRel,olympe.dc.Sync)}F(){return this.Wd(olympe.sc.logic.mc.D)}};olympe.sc.logic.mc.O=olympe.dc.Ba.D('0168a431d25001540000',olympe.sc.logic.mc);olympe.sc.logic.mc.D=olympe.sc.logic.mc.O.za('01740c5d4ae4b520dd01');olympe.sc.logic.mc.typeRel=olympe.sc.logic.mc.O.Oa('0168a431d3b9b7438424');Q(olympe.dc.Sync.O,olympe.sc.logic.mc.typeRel);olympe.sc.logic.mc.prototype.D.K=new olympe.C.J(()=>olympe.dc.Sync,[]);
|
|
838
838
|
olympe.sc.logic.mc.prototype.F.K=olympe.C.J.G;olympe.sc.logic.yb=class extends olympe.sc.logic.mc{};olympe.sc.logic.yb.O=olympe.dc.Ba.D('0168a431d25001540001',olympe.sc.logic.yb);olympe.sc.logic.yb.ea=olympe.sc.logic.mc.O.za('01740c5d4ae4b520dd02');olympe.sc.logic.yb.W=Q(olympe.sc.logic.yb.O,olympe.sc.Wa.L);olympe.sc.logic.yb.F=olympe.sc.logic.yb.O.Oa('0168a431d91f2578000b',olympe.dc.Ja.ORIGIN);olympe.sc.logic.yb.L=olympe.sc.logic.yb.O.Oa('01621fb84e32000000a1',olympe.dc.Ja.ORIGIN);
|
|
@@ -840,46 +840,47 @@ olympe.sc.logic.yb.P=olympe.sc.logic.yb.O.Oa('01621fb84e32000000d1',olympe.dc.Ja
|
|
|
840
840
|
olympe.sc.logic.Cb.O.D=function(a,b,c,d,e,f=olympe.sc.logic.Cb){f=a.create(f);f.setProperty(olympe.dc.Sync.nameProp,b||'New output');a.sa(olympe.sc.logic.mc.typeRel,f,c);void 0!==e&&f.setProperty(olympe.sc.logic.mc.D,e);d&&a.sa(olympe.sc.Wa.P,d,f);return f.R()};olympe.sc.logic.Action=class extends olympe.sc.logic.Function{setupExecution(a){const b=this.Bd().F().R();return a.observe(b).pipe(rxjs.operators.map(c=>null===c?null:this.getInputs().filter(d=>d!==b).map(d=>a.get(d))))}};olympe.sc.logic.Action.O=olympe.dc.Ba.D('0168c6f020f2a96a0000',olympe.sc.logic.Action,olympe.sc.T.Fa);olympe.sc.logic.Xc=class extends olympe.sc.logic.Function{run(a){Fh(this,a);const b=a.getParent(),c=this.db.Dc(this,olympe.sc.logic.Xc.L),d=this.db.Dc(this,olympe.sc.logic.Xc.G);a.on(c,e=>b.set(d,e),this.tag)}L(){return this.yc(olympe.sc.logic.Xc.L,olympe.sc.logic.yb)}Ya(){return this.yc(olympe.sc.logic.Xc.G,olympe.sc.logic.Cb)}};olympe.sc.logic.Xc.O=olympe.dc.Ba.D('01621fb84e32000000a0',olympe.sc.logic.Xc,olympe.sc.T.Fa);olympe.sc.logic.Xc.L=Q(olympe.sc.logic.Xc.O,olympe.sc.logic.yb.L);
|
|
841
841
|
olympe.sc.logic.Xc.G=Q(olympe.sc.logic.Xc.O,olympe.sc.logic.Cb.P);olympe.sc.logic.Xc.O.D=function(a,b,c){b=a.create(olympe.sc.logic.Xc);a.sa(olympe.sc.logic.Xc.G,b,c);a.sa(olympe.dc.Sync.containsRel,b,c);return b.R()};olympe.sc.logic.Xc.prototype.L.K=new olympe.C.J(()=>olympe.sc.logic.yb,[]);olympe.sc.logic.Xc.prototype.Ya.K=new olympe.C.J(()=>olympe.sc.logic.Cb,[]);olympe.sc.logic.Zc=class extends olympe.sc.logic.Function{run(a){const b=a.getParent(),c=this.db.Dc(this,olympe.sc.logic.Zc.G),d=this.db.Dc(this,olympe.sc.logic.Zc.L);b.on(c,e=>a.set(d,e),b.ba())}Ya(){return this.yc(olympe.sc.logic.Zc.G,olympe.sc.logic.yb)}L(){return this.yc(olympe.sc.logic.Zc.L,olympe.sc.logic.Cb)}};olympe.sc.logic.Zc.O=olympe.dc.Ba.D('01621fb84e32000000d0',olympe.sc.logic.Zc,olympe.sc.T.Fa);olympe.sc.logic.Zc.G=Q(olympe.sc.logic.Zc.O,olympe.sc.logic.yb.P);
|
|
842
842
|
olympe.sc.logic.Zc.L=Q(olympe.sc.logic.Zc.O,olympe.sc.logic.Cb.L);olympe.sc.logic.Zc.O.D=function(a,b,c){b=a.create(olympe.sc.logic.Zc);a.sa(olympe.sc.logic.Zc.G,b,c);a.sa(olympe.dc.Sync.containsRel,b,c);return b.R()};olympe.sc.logic.Zc.prototype.Ya.K=new olympe.C.J(()=>olympe.sc.logic.yb,[]);olympe.sc.logic.Zc.prototype.L.K=new olympe.C.J(()=>olympe.sc.logic.Cb,[]);function Jh(a,b,c){const d=a.db.Dc(a,olympe.sc.logic.ob.ea)||a.db.Dc(a,olympe.sc.logic.ob.P),e=a.db.Dc(a,olympe.sc.logic.ob.W),f=a.D.bind(a,b,c);if(null!==d&&null!==e){let h;const k=b.Si(e,m=>{h&&h();h=m.on(d,f,e)});return()=>{f(null);k();h&&h()}}const g=yd(a.db,a,olympe.sc.logic.ob.valueProp,f);return()=>{f(null);a.db.L(a,olympe.sc.logic.ob.valueProp,g)}}
|
|
843
|
-
olympe.sc.logic.ob=class extends olympe.dc.Sync{constructor(a,b,c){super(a,b);this.N=c}D(a,b,c){const d='detachInstance'+this.tag,e=a.
|
|
843
|
+
olympe.sc.logic.ob=class extends olympe.dc.Sync{constructor(a,b,c){super(a,b);this.N=c}D(a,b,c){const d='detachInstance'+this.tag,e=a.Sa(d);e&&(e(),a.remove(d));const f=olympe.sc.Dh(c);if(f instanceof olympe.dc.Sync){const g=a.getParent();g.Zl(f);a.set(d,()=>g.Yj(f))}b(f)}Ps(){const a=this.transform(olympe.sc.logic.ob.D,olympe.sc.logic.mc.typeRel);a.kd(olympe.dc.Sync);return a.qd()}vw(){return this.yc(olympe.sc.logic.ob.W,olympe.dc.Sync)}tw(){return this.yc(olympe.sc.logic.ob.ea,olympe.sc.logic.Cb)}uw(){return this.yc(olympe.sc.logic.ob.P,
|
|
844
844
|
olympe.dm.Property)}Cv(){return this.yc(olympe.sc.logic.ob.L,olympe.dc.Sync)}Av(){return this.yc(olympe.sc.logic.ob.D,olympe.sc.logic.yb)}Bv(){return this.yc(olympe.sc.logic.ob.F,olympe.dm.Property)}};olympe.sc.logic.ob.O=olympe.dc.Ba.D('0168a431d91f25780000',olympe.sc.logic.ob,olympe.sc.T.Fa);olympe.sc.logic.ob.valueProp=olympe.sc.logic.ob.O.za('0168a431d91f25780001');olympe.sc.logic.ob.W=olympe.sc.logic.ob.O.Oa('0168a431d91f25780002');olympe.sc.logic.ob.ea=Q(olympe.sc.logic.ob.O,olympe.sc.logic.Cb.F);
|
|
845
845
|
olympe.sc.logic.ob.P=olympe.sc.logic.ob.O.Oa('0168a431d91f25780004');olympe.sc.logic.ob.L=olympe.sc.logic.ob.O.Oa('0168a431d91f2578000a');olympe.sc.logic.ob.D=Q(olympe.sc.logic.ob.O,olympe.sc.logic.yb.F);olympe.sc.logic.ob.F=olympe.sc.logic.ob.O.Oa('0168a431d91f2578000c');Q(olympe.dc.Sync.O,olympe.sc.logic.ob.W);Q(olympe.dm.Property.O,olympe.sc.logic.ob.P);Q(olympe.dc.Sync.O,olympe.sc.logic.ob.L);Q(olympe.dm.Property.O,olympe.sc.logic.ob.F);l=olympe.sc.logic.ob.prototype;
|
|
846
|
-
l.Ps.K=new olympe.C.J(()=>olympe.dc.Sync,[]);l.
|
|
846
|
+
l.Ps.K=new olympe.C.J(()=>olympe.dc.Sync,[]);l.vw.K=new olympe.C.J(()=>olympe.dc.Sync,[]);l.tw.K=new olympe.C.J(()=>olympe.sc.logic.Cb,[]);l.uw.K=new olympe.C.J(()=>olympe.dm.Property,[]);l.Cv.K=new olympe.C.J(()=>olympe.dc.Sync,[]);l.Av.K=new olympe.C.J(()=>olympe.sc.logic.yb,[]);l.Bv.K=new olympe.C.J(()=>olympe.dm.Property,[]);function Sh(a,b){const c=a.Bd(),d=c.pl().R(),e=c.ql().R(),f=c.tm().R();b.on(d,g=>{g&&(g=new Map(a.getInputs().map(h=>[h,b.get(h)])),g=olympe.sc.logic.Ij.ma(g),olympe.H.Da.gb.Client.get(a.hc(),g).then(h=>{h=Th(h,a.L.bind(a,b));for(const [k,m]of h)k!==e&&k!==f&&b.set(k,m);b.set(e,h.get(e));b.set(f,h.get(f))}).catch(h=>{b.set(f,olympe.sc.logic.lj.create(h.toString(),1))}))},b.ba())}
|
|
847
847
|
function Uh(a,b,c,d,e,f){const g=n=>{if(null!==n){e.cancel();k&&k();m&&m();try{const p=new Map(a.getOutputs().map(r=>[r,b.get(r)])),q=olympe.sc.logic.Ij.ma(p);f.Zg(q).finally(()=>b.destroy())}catch(p){n=Error(`Error while serializing the response from remote action ${a.hc()}: ${p.message}`),f.km(n).finally(()=>b.destroy())}}},h=b.ba(),k=b.on(c,g,h),m=b.on(d,g,h)}
|
|
848
|
-
olympe.sc.logic.vh=class extends olympe.sc.logic.Function{constructor(a,b,c,d,e){super(a,b,c);this.Ya=d;this.timeout=e}run(a){a.Dm()||(this.db.
|
|
849
|
-
a.Fh('remote call'),n=Th(k.body(),this.L.bind(this,m)),p=ac(()=>{k.km(Error(`Timeout reached on remote action ${this.db.name(this)} (${this.tag})`));m.destroy()},this.timeout);Uh(this,m,g,h,p,k);super.run(m);for(const [q,r]of n)q!==f&&m.set(q,r);k.
|
|
850
|
-
this.N.error(`Error while listening on remote action ${this.db.name(m)} (${m}): ${k.message}`)}))})}L(a,b){const c=Array.from(b.rd()).map(d=>d.tag());Nc(this.Ya,a.
|
|
851
|
-
function Vh(a,b){if(null===b||void 0===b)return null;switch(b.t){case 1:return new Date(b.d);case 2:return olympe.C.Color.create(b.r,b.g,b.b,b.a);case 3:return olympe.sc.logic.Error.create(b.m,b.c);case 4:return olympe.dc.Sync.
|
|
852
|
-
function Xh(a,b){var c=a.db;a=a.pc;if(c.Hb(b)){a.xc(b,c.Hd(b,!0),0);a.sa(olympe.dc.Hc.fe,b,c.model(b),0);for(const [d,e,f]of Cd(c,b))(c=a.
|
|
853
|
-
olympe.sc.logic.Ij=class{constructor(){this.db=olympe.dc.Xa();Wh(this)}static ma(a){const b=new olympe.sc.logic.Ij;for(const [c,d]of a)null!==d&&void 0!==d&&(b.values[c]=b.D(d));return b.flush()}flush(){const a=Object.create(null),b=new olympe.dc.transaction.ye;this.pc.md(b);a.p=ce(b);a.v=this.values;Wh(this);return a}D(a){switch(!0){case a instanceof olympe.C.
|
|
848
|
+
olympe.sc.logic.vh=class extends olympe.sc.logic.Function{constructor(a,b,c,d,e){super(a,b,c);this.Ya=d;this.timeout=e}run(a){a.Dm()||(this.db.Ib(this,olympe.sc.logic.vh.G)?this.ed(a):(Fh(this,a),Sh(this,a)))}ed(a){const b=this.hc(),c=new olympe.H.Da.gb.po(b);a.onDestroy(()=>{c.stop().catch(d=>this.N.error(`Error while stopping remote service ${b}: ${d}`))});c.start().then(()=>{const d=this.Bd(),e=d.Sq().R(),f=d.pl().R(),g=d.ql().R(),h=d.tm().R();c.listen().subscribe(rxjs.Subscriber.create(k=>{const m=
|
|
849
|
+
a.Fh('remote call'),n=Th(k.body(),this.L.bind(this,m)),p=ac(()=>{k.km(Error(`Timeout reached on remote action ${this.db.name(this)} (${this.tag})`));m.destroy()},this.timeout);Uh(this,m,g,h,p,k);super.run(m);for(const [q,r]of n)q!==f&&m.set(q,r);k.Me().then(q=>{var r=m.get(e);null!==r&&olympe.dc.Ea(r)!==q&&(r=this.hc(),this.N.warn(`Remote action ${this.db.name(r)} ${r}: try to run it with an input user that is not the real authenticated user.`));m.set(e,q);m.set(f,n.get(f))})},k=>{const m=this.hc();
|
|
850
|
+
this.N.error(`Error while listening on remote action ${this.db.name(m)} (${m}): ${k.message}`)}))})}L(a,b){const c=Array.from(b.rd()).map(d=>d.tag());Nc(this.Ya,a.Ge(),b,[],c)}};olympe.sc.logic.vh.O=olympe.dc.Ba.D('017a7b0c5dcbd8964c5d',olympe.sc.logic.vh,olympe.sc.T.Fa,olympe.dc.db.T.wa,new olympe.U.ha(olympe.sc.Z.yp));olympe.sc.logic.vh.G=olympe.sc.logic.vh.O.za('017a7b0c62a02a89444f');function Th(a,b){const c=(new olympe.dc.$.kp(olympe.dc.Na.ld)).F(a.p||[]);b&&b(c);b=new Map;for(const [d,e]of Object.entries(a.v||{}))b.set(d,Vh(olympe.sc.logic.Ij,e));return b}function Wh(a){a.pc=new olympe.dc.db.Gc;a.values=Object.create(null)}
|
|
851
|
+
function Vh(a,b){if(null===b||void 0===b)return null;switch(b.t){case 1:return new Date(b.d);case 2:return olympe.C.Color.create(b.r,b.g,b.b,b.a);case 3:return olympe.sc.logic.Error.create(b.m,b.c);case 4:return olympe.dc.Sync.Lb(b.v);case 5:return new Map(Object.entries(b.m).map(([c,d])=>[c,Vh(a,d)]));default:return Array.isArray(b)?b.map(c=>Vh(a,c)):'object'===typeof b?Object.entries(b).reduce((c,[d,e])=>{c[d]=Vh(a,e);return c},{}):b}}
|
|
852
|
+
function Xh(a,b){var c=a.db;a=a.pc;if(c.Hb(b)){a.xc(b,c.Hd(b,!0),0);a.sa(olympe.dc.Hc.fe,b,c.model(b),0);for(const [d,e,f]of Cd(c,b))(c=a.Lb(f))&&c.Je()&&(e===olympe.dc.Ja.DESTINATION?a.sa(d,b,f,0):a.sa(d,f,b,0))}else olympe.ua.vb('Remote Action').error(`Try to serialize an instance ${b} that does not exist in the local datacloud.`)}
|
|
853
|
+
olympe.sc.logic.Ij=class{constructor(){this.db=olympe.dc.Xa();Wh(this)}static ma(a){const b=new olympe.sc.logic.Ij;for(const [c,d]of a)null!==d&&void 0!==d&&(b.values[c]=b.D(d));return b.flush()}flush(){const a=Object.create(null),b=new olympe.dc.transaction.ye;this.pc.md(b);a.p=ce(b);a.v=this.values;Wh(this);return a}D(a){switch(!0){case a instanceof olympe.C.bb:return{t:1,d:a.valueOf().toISOString()};case a instanceof Date:return{t:1,d:a.toISOString()};case a instanceof olympe.C.Color:return{t:2,
|
|
854
854
|
r:a.Lg().valueOf(),g:a.Jg().valueOf(),b:a.Fg().valueOf(),a:a.Eg().valueOf()};case a instanceof olympe.sc.logic.Error:return{t:3,c:a.code,m:a.$q};case a&&'function'===typeof a.R:return a=a.R(),Xh(this,a),{t:4,v:a};case Array.isArray(a):return a.map(this.D.bind(this));case a instanceof Map:const b=Object.create(null);for(const [c,d]of a)'string'===typeof c&&(b[c]=this.D(d));return{t:5,m:b};case null===a:case void 0===a:return null;case 'object'===typeof a:return Object.entries(a).reduce((c,[d,e])=>
|
|
855
|
-
{c[d]=this.D(e);return c},{});default:return a}}};olympe.sc.logic.controllers={};olympe.sc.logic.controllers.jl=class{constructor(a){this.db=olympe.dc.Xa();this.typeRel=a}};olympe.sc.logic.controllers.jl.D={
|
|
855
|
+
{c[d]=this.D(e);return c},{});default:return a}}};olympe.sc.logic.controllers={};olympe.sc.logic.controllers.jl=class{constructor(a){this.db=olympe.dc.Xa();this.typeRel=a}};olympe.sc.logic.controllers.jl.D={vy:-1,pz:1};olympe.sc.logic.controllers.Sz=class extends olympe.sc.logic.controllers.jl{constructor(){super(olympe.sc.logic.bd.D)}};olympe.sc.logic.controllers.Xz=class extends olympe.sc.logic.controllers.jl{constructor(){super(olympe.sc.logic.mc.typeRel)}};olympe.sc.logic.Zj={};olympe.sc.logic.Zj.Yt=class extends olympe.sc.logic.Function{update(a,[b,c],[d]){const e=olympe.dc.Ea(b);e?Be(te(new olympe.dc.Ef(e),olympe.dc.nb.RUNTIME),c).gd(()=>{d(olympe.dc.Sync.Lb(e))}):this.N.warn('Cannot subscribe to an instance with no tag: '+e)}};olympe.sc.logic.Ba.D('0174bf4b7e006e4b788a',olympe.sc.logic.Zj.Yt);olympe.sc.logic.actions={};olympe.sc.logic.Zj.bt=class extends olympe.sc.logic.Function{run(a){Fh(this,a);const [b,c,d]=this.F(a);let e,f=null,g=null;const h=a.getParent(),k=()=>{null===g||0===e?(this.N.warn('No list to iter upon'),this.N.info(a.ba())):f<e?(b(g.qe(f)),f++,c((new Date).getTime())):(h.Ak(),d((new Date).getTime()))};this.getInputs().forEach((m,n)=>a.on(m,p=>{if(p)switch(n){case 0:g=p;break;case 1:e=g.Yf();f=0;h.Vj();k();break;case 2:k();break;default:this.N.error('Unhandled input')}},this.tag))}};
|
|
856
856
|
olympe.sc.logic.Ba.D('0171889b060b6cd54300',olympe.sc.logic.Zj.bt);olympe.sc.logic.fc={};olympe.sc.logic.fc.ll=class extends olympe.sc.logic.we{F(){return this.Zf('016ac63808535703691c')}};olympe.sc.logic.fc.ll.O=Rh('0169b6876a03f139d50a',olympe.sc.logic.fc.ll);olympe.sc.logic.fc.ll.prototype.F.K=new olympe.C.J(()=>olympe.sc.logic.yb,[]);olympe.sc.logic.fc.zl=class extends olympe.sc.logic.we{F(){return this.Zf('016ac63809a9a8e6db96')}G(){return this.Ig('016ac6380ab003363b3e')}};Rh('01646ad602f933b8caaf',olympe.sc.logic.fc.zl);olympe.sc.logic.fc.zl.prototype.F.K=new olympe.C.J(()=>olympe.sc.logic.yb,[]);olympe.sc.logic.fc.zl.prototype.G.K=new olympe.C.J(()=>olympe.sc.logic.Cb,[]);olympe.sc.logic.fc.Bj=class extends olympe.sc.logic.we{F(){return this.Zf('016ac6380bd98f1d91a0')}L(){return this.Ig('016ac63c589ae38ca3ae')}G(){return this.Ig('016ac63c5a377fceabaa')}};Rh('0168ec42fc01747a98b6',olympe.sc.logic.fc.Bj);olympe.sc.logic.fc.Bj.prototype.F.K=new olympe.C.J(()=>olympe.sc.logic.yb,[]);olympe.sc.logic.fc.Bj.prototype.L.K=new olympe.C.J(()=>olympe.sc.logic.Cb,[]);olympe.sc.logic.fc.Bj.prototype.G.K=new olympe.C.J(()=>olympe.sc.logic.Cb,[]);olympe.sc.logic.fc.wg=class extends olympe.sc.logic.we{pl(){return this.Zf('017a7b07b09e3b22c8b4')}Sq(){return this.Zf('017a7b07ba05807a74b0')}ql(){return this.Ig('017a7b0818c12388d731')}tm(){return this.Ig('017a7b085146d5e69aec')}Qs(){return olympe.C.fa.F}};olympe.sc.logic.fc.wg.pa='017a7b07b09e3b22c8b4';olympe.sc.logic.fc.wg.Pg='017a7b07ba05807a74b0';olympe.sc.logic.fc.wg.pe='017a7b0818c12388d731';olympe.sc.logic.fc.wg.W='017a7b085146d5e69aec';
|
|
857
|
-
olympe.sc.logic.fc.wg.O=Rh('017a7b07a948e30508fa',olympe.sc.logic.fc.wg,olympe.sc.logic.vh);l=olympe.sc.logic.fc.wg.prototype;l.pl.K=new olympe.C.J(()=>olympe.sc.logic.yb,[]);l.Sq.K=new olympe.C.J(()=>olympe.sc.logic.yb,[]);l.ql.K=new olympe.C.J(()=>olympe.sc.logic.Cb,[]);l.tm.K=new olympe.C.J(()=>olympe.sc.logic.Cb,[]);l.Qs.K=olympe.C.J.P;olympe.sc.logic.fc.Np=class extends olympe.sc.logic.we{F(){return this.Zf('016ac63c5b3ed0562740')}};Rh('016a9766c230916ea5ec',olympe.sc.logic.fc.Np);olympe.sc.logic.fc.Np.prototype.F.K=new olympe.C.J(()=>olympe.sc.logic.yb,[]);olympe.sc.Ca={};olympe.sc.Ca.ue=class extends olympe.sc.Wa{D(){return olympe.sc.
|
|
858
|
-
olympe.sc.Ca.
|
|
859
|
-
olympe.sc.Ca.
|
|
860
|
-
l.nv.K=olympe.C.J.F;l.
|
|
861
|
-
olympe.sc.Ca.Be.O.D=(a,b,c)=>{b=ee(a,b||'New Service Application model',olympe.sc.Ca.Be,olympe.sc.Ca.el);a.sa(olympe.sc.Ca.ue.W,b,c);c=a.create(olympe.sc.Ca.
|
|
862
|
-
this.get(a);b||null!==e||d.next(e);const f=this.on(a,d.next.bind(d),c?void 0:this.ba());this.Xg(()=>{f();d.complete()});return f})}repeat(a,b){this.
|
|
863
|
-
b){return this.
|
|
864
|
-
|
|
865
|
-
olympe.sc.
|
|
866
|
-
olympe.sc.
|
|
857
|
+
olympe.sc.logic.fc.wg.O=Rh('017a7b07a948e30508fa',olympe.sc.logic.fc.wg,olympe.sc.logic.vh);l=olympe.sc.logic.fc.wg.prototype;l.pl.K=new olympe.C.J(()=>olympe.sc.logic.yb,[]);l.Sq.K=new olympe.C.J(()=>olympe.sc.logic.yb,[]);l.ql.K=new olympe.C.J(()=>olympe.sc.logic.Cb,[]);l.tm.K=new olympe.C.J(()=>olympe.sc.logic.Cb,[]);l.Qs.K=olympe.C.J.P;olympe.sc.logic.fc.Np=class extends olympe.sc.logic.we{F(){return this.Zf('016ac63c5b3ed0562740')}};Rh('016a9766c230916ea5ec',olympe.sc.logic.fc.Np);olympe.sc.logic.fc.Np.prototype.F.K=new olympe.C.J(()=>olympe.sc.logic.yb,[]);olympe.sc.Ca={};olympe.sc.Ca.ue=class extends olympe.sc.Wa{D(){return olympe.sc.Ke.Bg.Nt}};olympe.sc.Ca.ue.O=Mc(olympe.dc.Ba.D('01120300000000adef00',olympe.sc.Ca.ue));olympe.sc.Ca.ue.W=olympe.sc.Ca.ue.O.Oa('0171bc1f15da96dfdb89');Q(olympe.dm.ki.O,olympe.sc.Ca.ue.W);olympe.sc.Ca.cj=class extends olympe.sc.Runnable{W(){return[this.hc()]}L(){const a=this.db.Dc(this.hc(),olympe.sc.Ca.ue.W);return olympe.dc.Sync.Lb(a)}};olympe.sc.Ca.cj.O=Mc(olympe.dc.Ba.D('0113030000000aca1100',olympe.sc.Ca.cj));olympe.sc.Ca.cj.prototype.L.K=new olympe.C.J(()=>olympe.dm.lc,[]);olympe.sc.Ca.ib=class extends olympe.dc.Sync{Ts(){return this.Kg(olympe.sc.Ca.ib.F)}ax(){return this.Kg(olympe.sc.Ca.ib.Kb)}Ss(){return this.Wd(olympe.sc.Ca.ib.D)}Ev(){return this.xb(olympe.sc.Ca.ib.W)}hw(){return this.xb(olympe.sc.Ca.ib.qb)}gw(){return this.xb(olympe.sc.Ca.ib.Ta)}pm(){this.xb(olympe.sc.Ca.ib.Ya)}Sv(){return this.xb(olympe.sc.Ca.ib.ea)}nv(){return this.xb(olympe.sc.Ca.ib.L)}fw(){return this.xb(olympe.sc.Ca.ib.pa)}Rs(){return this.xb(olympe.sc.Ca.ib.P)}};
|
|
858
|
+
olympe.sc.Ca.ib.O=olympe.dc.Ba.D('011203300000000adef5',olympe.sc.Ca.ib);olympe.sc.Ca.ib.F=olympe.sc.Ca.ib.O.za('011203300000000adef6');olympe.sc.Ca.ib.Kb=olympe.sc.Ca.ib.O.za('011203300000000adef7');olympe.sc.Ca.ib.D=olympe.sc.Ca.ib.O.za('011203300000000adef8');olympe.sc.Ca.ib.W=olympe.sc.Ca.ib.O.za('011203300000000adef9');olympe.sc.Ca.ib.qb=olympe.sc.Ca.ib.O.za('011203300000000adefa');olympe.sc.Ca.ib.Ta=olympe.sc.Ca.ib.O.za('011203300000000adefb');olympe.sc.Ca.ib.L=olympe.sc.Ca.ib.O.za('011203300000000adefc');
|
|
859
|
+
olympe.sc.Ca.ib.Ya=olympe.sc.Ca.ib.O.za('011203300000000adefd');olympe.sc.Ca.ib.ea=olympe.sc.Ca.ib.O.za('011203300000000adefe');olympe.sc.Ca.ib.pa=olympe.sc.Ca.ib.O.za('011203300000000adeff');olympe.sc.Ca.ib.P=olympe.sc.Ca.ib.O.za('011203300000000adee0');olympe.sc.Ca.ib.Ub={INIT:0,my:1,uA:2,dA:3,cA:4,vA:5,zc:9};l=olympe.sc.Ca.ib.prototype;l.Ts.K=olympe.C.J.P;l.ax.K=olympe.C.J.P;l.Ss.K=olympe.C.J.G;l.Ev.K=olympe.C.J.F;l.hw.K=olympe.C.J.F;l.gw.K=olympe.C.J.F;l.pm.K=olympe.C.J.F;l.Sv.K=olympe.C.J.F;
|
|
860
|
+
l.nv.K=olympe.C.J.F;l.fw.K=olympe.C.J.F;l.Rs.K=olympe.C.J.F;olympe.sc.Ca.el=class extends olympe.sc.Ca.cj{};olympe.sc.Ca.el.O=olympe.dc.Ba.D('0113032000000aca1102',olympe.sc.Ca.el,olympe.sc.T.Fa);olympe.sc.Ca.Be=class extends olympe.sc.Ca.ue{F(){return(new olympe.dc.wj(this.R(),olympe.sc.Ca.ib)).sj(olympe.sc.Ca.Be.pa).Ue().qd()}};olympe.sc.Ca.Be.O=olympe.dc.Ba.D('011203300000000adef3',olympe.sc.Ca.Be);olympe.sc.Ca.Be.pa=olympe.sc.Ca.Be.O.Oa('011203300000000adef4');Q(olympe.sc.Ca.ib.O,olympe.sc.Ca.Be.pa);
|
|
861
|
+
olympe.sc.Ca.Be.O.D=(a,b,c)=>{b=ee(a,b||'New Service Application model',olympe.sc.Ca.Be,olympe.sc.Ca.el);a.sa(olympe.sc.Ca.ue.W,b,c);c=a.create(olympe.sc.Ca.ib).R();a.sa(olympe.sc.Ca.Be.pa,b,c);return b.R()};olympe.sc.Ca.Be.prototype.F.K=new olympe.C.J(()=>olympe.sc.Ca.ib,[]);olympe.sc.zg=class extends olympe.dc.Sync{static get(){return olympe.dc.Sync.Lb('011203300000000adf0f')}};olympe.sc.zg.O=olympe.dc.Ba.D('011203300000000adf00',olympe.sc.zg);olympe.sc.zg.F=olympe.sc.zg.O.za('011203300000000adf01');olympe.sc.zg.D=olympe.sc.zg.O.za('011203300000000adf02');olympe.sc.zg.L='011203300000000adf0f';olympe.sc.ty=class{};olympe.sc.Pa=class{constructor(a){this.$a=a}ba(){return this.$a.ba()}zm(){return this.$a.zm()}getParent(){return this.$a.getParent()}$j(){return this.$a.$j()}Ge(){return this.$a.Ge()}Im(a){this.$a.Im(a)}Vj(){this.$a.Vj()}Ak(){this.$a.Ak()}set(a,b){this.$a.set(a,b);return this}Sh(a){this.$a.Sh(a);return this}remove(a){this.$a.remove(a)}ub(a,b,c=!1){return this.$a.ub(a,b,c)}get(a,b=!1){return this.$a.get(a,b)}has(a,b=!1){return this.$a.has(a,b)}observe(a,b=!0,c=!1){return new rxjs.Observable(d=>{const e=
|
|
862
|
+
this.get(a);b||null!==e||d.next(e);const f=this.on(a,d.next.bind(d),c?void 0:this.ba());this.Xg(()=>{f();d.complete()});return f})}repeat(a,b){this.$a.repeat(a,b);return this}wk(a){return this.$a.wk(a)}Vm(a,b=!0,c=!1){return rxjs.firstValueFrom(this.observe(a,b,c))}zk(a){this.$a.zk(a);return this}Sa(a,b=!0){return this.$a.Sa(a,b)}on(a,b,c){return this.$a.on(a,b,c)}Zl(a){this.$a.Zl(a)}Yj(a){this.$a.Yj(a)}Fh(a){return this.$a.Fh(a)}ek(a,b){return this.$a.ek(a,b)}uk(a){this.$a.uk(a)}gk(){return this.$a.gk()}vk(a){this.$a.vk(a)}sk(){return this.$a.sk()}Si(a,
|
|
863
|
+
b){return this.$a.Si(a,b)}Mh(a){return this.$a.Mh(a)}Ni(){return this.$a.Ni()}Xg(a,b){return this.$a.Xg(a,b)}qk(a){this.$a.qk(a)}onDestroy(a){return this.$a.onDestroy(a)}re(a){this.$a.re(a)}destroy(){this.$a.destroy()}clear(){this.$a.clear()}Bb(){return this.$a.Bb()}Dm(){return this.$a.Dm()}kk(){return this.$a.kk()}Ib(a){if('function'!==typeof this.$a.getProperty)throw Error('Trying to call deprecated method $.getProperty() in a non-UI brick');return this.$a.getProperty(a)}Fv(a){if('function'!==typeof this.$a.getEvent)throw Error('Trying to call deprecated method $.getEvent() in a non-UI brick');
|
|
864
|
+
return this.$a.getEvent(a)}kx(...a){if('function'!==typeof this.$a.observeMany)throw Error('Trying to call deprecated method $.observeMany() in a non-UI brick');return this.$a.observeMany(a)}};olympe.sc.Pa.prototype.observeMany=olympe.sc.Pa.prototype.kx;olympe.sc.Pa.prototype.getEvent=olympe.sc.Pa.prototype.Fv;olympe.sc.Pa.prototype.getProperty=olympe.sc.Pa.prototype.Ib;olympe.sc.Pa.prototype.clear=olympe.sc.Pa.prototype.clear;olympe.sc.Pa.prototype.destroy=olympe.sc.Pa.prototype.destroy;
|
|
865
|
+
olympe.sc.Pa.prototype.offDestroy=olympe.sc.Pa.prototype.re;olympe.sc.Pa.prototype.onDestroy=olympe.sc.Pa.prototype.onDestroy;olympe.sc.Pa.prototype.offClear=olympe.sc.Pa.prototype.qk;olympe.sc.Pa.prototype.onClear=olympe.sc.Pa.prototype.Xg;olympe.sc.Pa.prototype.getOtherContext=olympe.sc.Pa.prototype.Mh;olympe.sc.Pa.prototype.onContext=olympe.sc.Pa.prototype.Si;olympe.sc.Pa.prototype.popTransaction=olympe.sc.Pa.prototype.sk;olympe.sc.Pa.prototype.releaseTransaction=olympe.sc.Pa.prototype.vk;
|
|
866
|
+
olympe.sc.Pa.prototype.getTransaction=olympe.sc.Pa.prototype.gk;olympe.sc.Pa.prototype.pushTransaction=olympe.sc.Pa.prototype.uk;olympe.sc.Pa.prototype.createChild=olympe.sc.Pa.prototype.Fh;olympe.sc.Pa.prototype.setParentElement=olympe.sc.Pa.prototype.zk;olympe.sc.Pa.prototype.waitFor=olympe.sc.Pa.prototype.Vm;olympe.sc.Pa.prototype.runner=olympe.sc.Pa.prototype.wk;olympe.sc.Pa.prototype.repeat=olympe.sc.Pa.prototype.repeat;olympe.sc.Pa.prototype.observe=olympe.sc.Pa.prototype.observe;
|
|
867
|
+
olympe.sc.Pa.prototype.has=olympe.sc.Pa.prototype.has;olympe.sc.Pa.prototype.get=olympe.sc.Pa.prototype.get;olympe.sc.Pa.prototype.remove=olympe.sc.Pa.prototype.remove;olympe.sc.Pa.prototype.trigger=olympe.sc.Pa.prototype.Sh;olympe.sc.Pa.prototype.set=olympe.sc.Pa.prototype.set;olympe.sc.Pa.prototype.getParent=olympe.sc.Pa.prototype.getParent;olympe.sc.Kn=class extends olympe.dm.BrickMetadata{D(){return olympe.sc.Ke.Bg.Qk}};olympe.sc.Kn.O=olympe.dc.Ba.D('01645fe6873aeea59e64',olympe.sc.Kn);olympe.sc.ae=class extends olympe.sc.Runnable{Ya(){return this.cb(olympe.sc.ae.L,olympe.sc.Runnable)}L(){return this.cb(olympe.sc.ae.G,olympe.dm.Property)}};olympe.sc.ae.O=Mc(olympe.dc.Ba.D('016c2d996d9ca27fa9d8',olympe.sc.ae));olympe.sc.ae.L=olympe.sc.ae.O.Oa('016c3cb7742ec9309e0b');olympe.sc.ae.G=olympe.sc.ae.O.Oa('016c42d3454636f90533');olympe.sc.ae.prototype.Ya.K=new olympe.C.J(()=>olympe.dc.na,[]);olympe.sc.ae.prototype.L.K=new olympe.C.J(()=>olympe.dc.na,[]);olympe.sc.Un=class extends olympe.dm.Qb{D(){return olympe.sc.Ke.Bg.Qk}};olympe.sc.Un.O=olympe.dc.Ba.D('017a7a9ff057958e5678',olympe.sc.Un);olympe.sc.Wo=class extends olympe.dm.Qb{D(){return olympe.sc.Ke.Bg.fu}};olympe.sc.Wo.O=olympe.dc.Ba.D('01644b6d4543b344b857',olympe.sc.Wo);olympe.sc.Xo=class extends olympe.dc.Sync{};olympe.sc.Xo.O=olympe.dc.Ba.D('0162f672366be5ca7a86',olympe.sc.Xo);olympe.sc.Op=class extends olympe.sc.ae{};olympe.sc.Op.O=olympe.dc.Ba.D('016d3f37610ae4fc3962',olympe.sc.Op);olympe.sc.Text=class extends olympe.dm.String{};olympe.sc.Text.O=olympe.dc.Ba.D('016cfca73e63f9ab5ba4',olympe.sc.Text);olympe.sc.kb=class extends olympe.dc.kb{create(a,b){b=super.create(a,b);var c=null===Lh?null:olympe.dc.Xa().Ji(Lh,[olympe.sc.Ca.ue.W,olympe.sc.Yc.F.Cd()])[0]||null;null!==c?olympe.dc.Xa().dg(a,olympe.sc.bh)&&this.sa(olympe.sc.Yc.L,c,b):olympe.ua.vb('sc').warn('No business container for new instance of',olympe.dc.Ea(a));return b}};olympe.sc.Ke.BrickMetadata=olympe.dm.BrickMetadata;olympe.sc.Ke.be=olympe.dm.be;olympe.sc.td={};function Yh(a){a.N.info('Starting application '+a.D);let b=!1;const c=olympe.dc.Xa();if(0<a.D.length){const d=xc(c,a.D,(e,f)=>{if(e){const g=Eh(f);g.run?(a.N.debug('application retrieved: running'),(new olympe.C.ec('Application execution context',a.F.Ge())).run(()=>{b=!0;g.run(a.F.ek(g.R()))})):a.N.error('application retrieved: not an Application with a run() method')}else Zh(a)});olympe.C.Ia().onDestroy(()=>{yc(c,a.D,d)});ac(()=>{b||a.N.warn(`requested application ${a.D} may not be available (it may not exist or the logged user may not have the correct permissions)`)},
|
|
867
868
|
1E4)}}
|
|
868
869
|
function $h(a,b){if(a.L)a.N.debug('Sending getContext request'),of(a.P,d=>{d?a.N.error('failed to synchronise (authenticated) with server: '+d.message):(a.N.debug('synchronisation request successful'),b())});else{var c=olympe.dc.Pd.xg;const d=olympe.dc.Pd.Cj,e=a.F.kk()?d:c;a.N.debug((a.F.kk()?'PULLING':'SUBSCRIBING')+' application '+a.D);const f=olympe.C.Ia();c=new olympe.async.Jj(f);c.add((g,h)=>{te(new olympe.dc.Ef(a.D,e),olympe.dc.nb.RUNTIME).gd(k=>{k?h(k.message):g()})});c.add(g=>{olympe.C.tc([a.G.pf()],h=>
|
|
869
|
-
{(new olympe.dc.na(h)).uf(f.rb(g))})});c.add((g,h)=>{const k=olympe.sc.Yc.D.Lo,m=olympe.sc.Yc.D.vl;Mh(a.D,n=>{switch(n){case k:case m:g();break;default:h('Error while loading the business container')}})});Ab(c,(g,h)=>{if(h)throw Error(h);b()});c.start()}}function Zh(a){a.N.debug('Stop the application');a.F.
|
|
870
|
-
olympe.sc.td.Ol=class{constructor(a,b,c,d,e,f,g){this.G=a;this.P=b;this.N=c;this.F=d;this.D=e;this.L=f;this.W=g||!1}run(){const a=olympe.auth.qa.D.kg,b=olympe.auth.qa.D.
|
|
871
|
-
this.W&&!e&&$h(this,f);break;case d:this.N.debug('waiting for authentication');break;default:this.N.debug('No server session available, waiting for connection'),e=!1,Zh(this)}},'Runtime initial auth state listener')}};olympe.sc.td.Ol.D='app_instance';olympe.sc.td.Ol.ja=[olympe.oc.ur];olympe.sc.td.dj={RUNTIME:'sc.runtime.Main'};olympe.sc.td.Z={
|
|
872
|
-
olympe.U.config(function(a){C(a,olympe.sc.td.Z.
|
|
870
|
+
{(new olympe.dc.na(h)).uf(f.rb(g))})});c.add((g,h)=>{const k=olympe.sc.Yc.D.Lo,m=olympe.sc.Yc.D.vl;Mh(a.D,n=>{switch(n){case k:case m:g();break;default:h('Error while loading the business container')}})});Ab(c,(g,h)=>{if(h)throw Error(h);b()});c.start()}}function Zh(a){a.N.debug('Stop the application');a.F.Ge().Wf()}
|
|
871
|
+
olympe.sc.td.Ol=class{constructor(a,b,c,d,e,f,g){this.G=a;this.P=b;this.N=c;this.F=d;this.D=e;this.L=f;this.W=g||!1}run(){const a=olympe.auth.qa.D.kg,b=olympe.auth.qa.D.Qe,c=olympe.auth.qa.D.jh,d=olympe.auth.qa.D.Uh;this.N.debug('runtime starting for app #'+this.D);let e=!1;const f=()=>{e||(Yh(this),e=!0)};olympe.C.tc([this.G.getState()],g=>{switch(g){case a:case c:this.N.debug('Server session opened, calling once connected callback');$h(this,f);break;case b:this.N.debug('Disconnected, working offline.');
|
|
872
|
+
this.W&&!e&&$h(this,f);break;case d:this.N.debug('waiting for authentication');break;default:this.N.debug('No server session available, waiting for connection'),e=!1,Zh(this)}},'Runtime initial auth state listener')}};olympe.sc.td.Ol.D='app_instance';olympe.sc.td.Ol.ja=[olympe.oc.ur];olympe.sc.td.dj={RUNTIME:'sc.runtime.Main'};olympe.sc.td.Z={Ne:'sc.app',fp:'sc.offlineStart'};
|
|
873
|
+
olympe.U.config(function(a){C(a,olympe.sc.td.Z.Ne,'');C(a,olympe.sc.td.Z.fp,!1);A(a,olympe.auth.T.aj,[new olympe.U.ha(olympe.oc.Z.Ne),new olympe.U.ha(olympe.sc.td.Z.Ne),new olympe.U.ha(olympe.oc.Z.$k)],(b,c,d)=>new olympe.auth.Ek(d?'':b+(c?'-'+c:'')));y(a,olympe.sc.td.dj.RUNTIME,olympe.sc.td.Ol,olympe.auth.T.wa,olympe.dc.query.T.wa,olympe.sc.T.Fa,olympe.sc.T.Nl,new olympe.U.ha(olympe.sc.td.Z.Ne),new olympe.U.ha(olympe.dc.Z.yg),new olympe.U.ha(olympe.sc.td.Z.fp));olympe.oc.Vi(a,olympe.sc.td.dj.RUNTIME,
|
|
873
874
|
'sc.runtime');olympe.oc.Vi(a,olympe.sc.td.dj.RUNTIME,'sc.headless');olympe.oc.Vi(a,olympe.sc.td.dj.RUNTIME)},'olympe.sc.runtime');olympe.public={};function ai(a,b){const c=new olympe.auth.Request;for(const [d,e]of a)c.set(d,e);return new Promise(d=>{Kb(olympe.public.Ma.get(),c,b,()=>{d()})})}
|
|
874
|
-
olympe.public.Ma=class{static lv(a,b){return olympe.auth.zb.je.Ei(a,b)}static getState(){return Pb(olympe.public.Ma.get())}static xv(){return olympe.C.
|
|
875
|
-
void 0}static Qh(){olympe.public.Ma.get().Qh()}static Ng(a){return new Promise((b,c)=>{olympe.public.Ma.get().Ng(a,d=>d?c(d):b())})}static
|
|
876
|
-
olympe.public.Ma.logout=olympe.public.Ma.Jm;olympe.public.Ma.loginOpenID=olympe.public.Ma.
|
|
877
|
-
olympe.public.Ma.getCurrentUser=olympe.public.Ma.xv;olympe.public.Ma.getState=olympe.public.Ma.getState;olympe.public.Ma.generateSRPData=olympe.public.Ma.lv;olympe.public.Yb=class{static create(a){return new class extends olympe.dc.aa.lg{D(b,c){b=a(olympe.dc.Sync.
|
|
878
|
-
olympe.public.ve=class{static create(a){return new class extends olympe.dc.sb.lg{L(b,c){return olympe.dc.Sync.
|
|
875
|
+
olympe.public.Ma=class{static lv(a,b){return olympe.auth.zb.je.Ei(a,b)}static getState(){return Pb(olympe.public.Ma.get())}static xv(){return olympe.C.Sa(olympe.public.Ma.get().pf())}static ox(a){const b=new olympe.C.ec('Observe user tag','function'===typeof a.Ge?a.Ge():a);return new rxjs.Observable(c=>{b.run(()=>olympe.C.tc([olympe.public.Ma.get().pf()],d=>{c.next(d);olympe.C.Ia().onDestroy(()=>c.complete())}));return()=>b.destroy()})}static Jd(){return olympe.C.Sa(Sb(olympe.public.Ma.get()))}static Mv(){return olympe.C.Sa(olympe.public.Ma.get().Kh())||
|
|
876
|
+
void 0}static Qh(){olympe.public.Ma.get().Qh()}static Ng(a){return new Promise((b,c)=>{olympe.public.Ma.get().Ng(a,d=>d?c(d):b())})}static Vw(a,b){return ai((new Map).set('username',a).set('password',b),'srp')}static Uw(){return ai(new Map,'saml')}static Ww(a,b){return ai((new Map).set('username',a).set('nonce',b),'localToken')}static Tw(){return ai(new Map,'openID')}static Jm(){return new Promise(a=>{Rb(()=>{olympe.public.Ma.get().pa.delete('logoutCallback');a()});olympe.public.Ma.get().Jm()})}static get(){return olympe.auth.nc()}};
|
|
877
|
+
olympe.public.Ma.logout=olympe.public.Ma.Jm;olympe.public.Ma.loginOpenID=olympe.public.Ma.Tw;olympe.public.Ma.loginToken=olympe.public.Ma.Ww;olympe.public.Ma.loginSAML=olympe.public.Ma.Uw;olympe.public.Ma.loginSRP=olympe.public.Ma.Vw;olympe.public.Ma.getUserFromToken=olympe.public.Ma.Ng;olympe.public.Ma.sendKeepAlive=olympe.public.Ma.Qh;olympe.public.Ma.getIDPToken=olympe.public.Ma.Mv;olympe.public.Ma.getToken=olympe.public.Ma.Jd;olympe.public.Ma.observeUser=olympe.public.Ma.ox;
|
|
878
|
+
olympe.public.Ma.getCurrentUser=olympe.public.Ma.xv;olympe.public.Ma.getState=olympe.public.Ma.getState;olympe.public.Ma.generateSRPData=olympe.public.Ma.lv;olympe.public.Yb=class{static create(a){return new class extends olympe.dc.aa.lg{D(b,c){b=a(olympe.dc.Sync.Lb(c));if('boolean'===typeof b)return b;const d=olympe.C.Jc(olympe.C.fa),e=b.subscribe(f=>d.update(olympe.C.rc(f)));olympe.C.Ia().Vc(()=>e.unsubscribe());return d.ub()}}}};
|
|
879
|
+
olympe.public.ve=class{static create(a){return new class extends olympe.dc.sb.lg{L(b,c){return olympe.dc.Sync.Lb(c)}G(b,c){b=a(b,c);if('number'===typeof b)return b;const d=olympe.C.Jc(olympe.C.da),e=b.subscribe(f=>d.update(olympe.C.ta(f)));olympe.C.Ia().Vc(()=>e.unsubscribe());return d.ub()}}}};'object'===typeof exports&&(exports={Brick:olympe.sc.logic.Function,BrickContext:olympe.sc.Ka,FunctionBrick:olympe.sc.logic.Function,ActionBrick:olympe.sc.logic.Action,Context:olympe.sc.Ka,GlobalProperties:olympe.sc.Ka.Yh,registerBrick:olympe.sc.logic.Ba.D,ErrorFlow:olympe.sc.logic.Error,Entry:olympe.dc.xa.Entry,Color:olympe.C.Color,Parameter:olympe.U.ha,Auth:olympe.public.Ma,AuthState:{INIT:olympe.auth.qa.D.INIT,DISCONNECTED:olympe.auth.qa.D.Qe,GUEST:olympe.auth.qa.D.jh,AUTHENTICATING:olympe.auth.qa.D.Uh,
|
|
879
880
|
ERROR:olympe.auth.qa.D.zc,AUTHENTICATED:olympe.auth.qa.D.kg},Config:class{static getParameter(a){return olympe.U.getParameter(a)}},Sync:olympe.dc.Sync,StringPrimitive:olympe.dm.String,NumberPrimitive:olympe.dm.Number,BooleanPrimitive:olympe.dm.Boolean,DatetimePrimitive:olympe.dm.DateTime,ColorPrimitive:olympe.dm.Color,Enum:olympe.dm.Df,EnumValue:olympe.dm.Enum,File:olympe.dm.File,User:olympe.dm.User,BusinessObject:olympe.dc.Sync,PropertyPrimitive:olympe.dm.Property,RelationPrimitive:olympe.dm.Relation,
|
|
880
|
-
DBView:class extends olympe.dc
|
|
881
|
-
Or:olympe.dc.aa.sg,Not:olympe.dc.aa.xe,Equals:olympe.dc.aa.vd,Contains:olympe.dc.aa.Nd,Greater:olympe.dc.aa.ce,Smaller:olympe.dc.aa.ke,HasRelated:olympe.dc.aa.
|
|
882
|
-
Tag:olympe.dc.ga.
|
|
881
|
+
DBView:class extends olympe.dc.ab{static get(){return olympe.dc.Xa()}},ListDef:olympe.dc.na,instanceToTag:olympe.dc.Ea,registerSync:olympe.dc.Ba.D,onDestroy:a=>olympe.C.Ia().onDestroy(a),offDestroy:a=>olympe.C.Ia().re(a),Direction:olympe.dc.Ja,FollowRules:olympe.dc.nb,transformers:{Related:olympe.dc.V.Fb,RecursiveRelated:olympe.dc.V.Zb,Distinct:olympe.dc.V.$c,Filter:olympe.dc.V.ad,Limit:olympe.dc.V.Ed,Sort:olympe.dc.V.yd,Union:olympe.dc.V.af},Predicate:olympe.public.Yb,predicates:{And:olympe.dc.aa.ng,
|
|
882
|
+
Or:olympe.dc.aa.sg,Not:olympe.dc.aa.xe,Equals:olympe.dc.aa.vd,Contains:olympe.dc.aa.Nd,Greater:olympe.dc.aa.ce,Smaller:olympe.dc.aa.ke,HasRelated:olympe.dc.aa.Se,InstanceOf:olympe.dc.aa.Te,Regex:olympe.dc.aa.Xe},Comparator:olympe.public.ve,comparators:{Number:olympe.dc.sb.Number,String:olympe.dc.sb.String,DateTime:olympe.dc.sb.DateTime},valuedefs:{BooleanProperty:olympe.dc.ga.$d,StringProperty:olympe.dc.ga.Ud,NumberProperty:olympe.dc.ga.Rd,DateTimeProperty:olympe.dc.ga.Od,Constant:olympe.dc.ga.Qc,
|
|
883
|
+
Tag:olympe.dc.ga.Ze},Transaction:olympe.sc.kb,CreateInstance:olympe.dc.transaction.ra.ud,UpdateInstance:olympe.dc.transaction.ra.zh,BurstTransaction:olympe.dc.Wh,ServiceClient:olympe.H.Da.gb.Client,ServiceMessage:olympe.H.Da.gb.la,Service:olympe.H.Da.gb.vc,GetService:olympe.H.Da.gb.po,CallService:olympe.H.Da.gb.Kr,SubscribeService:olympe.H.Da.gb.oi});
|
|
883
884
|
|
|
884
885
|
|
|
885
886
|
}.bind(this))();
|