@olympeio/runtime-node 9.2.0 → 9.2.1

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
@@ -211,317 +211,317 @@ ea('String.prototype.padStart',function(a){return a?a:function(b,c){var d=ha(thi
211
211
  ea('Array.prototype.flatMap',function(a){return a?a:function(b,c){for(var d=[],e=0;e<this.length;e++){var f=b.call(c,this[e],e,this);Array.isArray(f)?d.push.apply(d,f):d.push(f)}return d}});ea('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}});ea('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}});
212
212
  ea('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;})})}});
213
213
  ea('Object.fromEntries',function(a){return a?a:function(b){var c={};if(!(Symbol.iterator in b))throw new TypeError(''+b+' is not iterable');b=b[Symbol.iterator].call(b);for(var d=b.next();!d.done;d=b.next()){d=d.value;if(Object(d)!==d)throw new TypeError('iterable for fromEntries should yield objects');c[d[0]]=d[1]}return c}});var ja=this||self;
214
- function z(a,b){a=a.split('.');let c=ja;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={dj:()=>'object'===typeof window?window:'object'===typeof global?global:self};olympe.dj().olympe=olympe;olympe.SC=(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.ka={};olympe.ka.node={};'function'!==typeof require||global.Blob||(global.Blob=require('cross-blob'));olympe.U={};olympe.U.Cf={};olympe.U.Cf.$n=class{process(a){const b=Object.keys(a.Be);let c,d;c=0;for(d=b.length;c<d;c++)if(a.Md(b[c]).ij())throw Error('Service "'+b[c]+'" is defined as abstract and needs to be overridden');}};olympe.U.Cf.$n.ma=[olympe.U.Cf.hq];olympe.U.Cf.ao=class{process(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.Md(g),c(g.bj(),h),g=g.Di,null!==g))for(let k=0,l=g.length;k<l;k++)c(g[k].bj(),h)}function c(g,h){for(let k=0,l=g.length,n;k<l;k++)n=g[k],n instanceof olympe.U.tb&&b(n.Z(),h)}function d(){for(const g in f)if(Object.prototype.hasOwnProperty.call(f,g))return g}var e=Object.keys(a.Be);const f={};for(let g=0,h=e.length;g<h;g++)f[e[g]]=
215
- !0;for(;void 0!==(e=d());)b(e,[])}};olympe.U.Cf.ao.ma=[olympe.U.Cf.hq];olympe.U.Cf.hq=class{process(){}};const ka=[],la=[];olympe.U.eo=class{constructor(){}static C(a,b){ka.push(new olympe.U.kl(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');});la.push(new olympe.U.kl(b,c,a))}};olympe.U.config=olympe.U.eo.C;olympe.U.run=olympe.U.eo.F;olympe.U.cl=class{constructor(){}getValue(){}};olympe.U.kl=class{constructor(a,b,c){this.F=a;this.G=[];this.C=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.tb(c[d]))}}bj(){return this.G}};function ma(a,b,c){let d=a.C[b];if(void 0===d){const e=a.F[b];if(void 0===e){if(c===olympe.U.gf.C.Eh)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.C[b]=d)}return d}function na(a,b){const c=b.length,d=Array(c);let e,f;for(e=0;e<c;e++)a.N.C++,f=b[e],d[e]=f instanceof olympe.U.cl?f.getValue(a):f,oa(a.N);return d}
216
- olympe.U.gf=class{constructor(a,b,c=2){this.F=a;this.parameters=b;this.C=Object.create(null);this.N=new olympe.U.Gp(c);a=olympe.U.P.dg;if(void 0!==this.C[a])throw Error('Service "'+a+'" has already been instantiated');this.C[a]=this}Ya(){return this.N}getParameter(a){return this.parameters[a.toLowerCase()]}};olympe.U.gf.C={Rs:'exception',Eh:'null'};function pa(a,b,c){function d(f,g){let h,k,l;for(h in f)Object.prototype.hasOwnProperty.call(f,h)&&(k=f[h],l=g.concat((h.startsWith('#')?h.substring(1):h).toLowerCase()),'object'!==typeof k||null===k||h.startsWith('#')?e[l.join('.')]=k:d(k,l))}const e=a.parameters;d(b,c?[c]:[])}function A(a,b,c,...d){qa(a.N,'Defining service '+b);a.C(b,c,d,!1,!1)}function ra(a,b,c,...d){qa(a.N,'Defining service '+b);a.C(b,c,d,!1,!0)}
217
- function C(a,b,c,d,e=!1){qa(a.N,'Defining service (as a factory) '+b);a.C(b,d,c,!0,e)}function sa(a,b,c,d=!1){qa(a.N,'Defining service alias '+b);a.C(b,e=>e,[c],!0,d)}function ta(a,b){qa(a.N,'Defining abstract service '+b);a.C(b).Ti=!0}function ua(a,b){a.parameters[olympe.H.Config.Wn.toLowerCase()]=b}function D(a,b,c){b=b.toLowerCase();Object.prototype.hasOwnProperty.call(a.parameters,b)||(a.parameters[b]=c)}
218
- olympe.U.Ds=class{constructor(a){var b=va,c=wa;this.Be=Object.create(null);this.parameters=Object.create(null);this.L=[new olympe.U.Cf.$n,new olympe.U.Cf.ao];this.F=[];b&&pa(this,b);c&&pa(this,c,'version');a&&pa(this,a);a=this.getParameter(olympe.U.Config.Ut);this.G=void 0!==a?a:3;this.N=new olympe.U.Gp(this.G)}Ya(){return this.N}C(a,b,c,d,e){const f=a instanceof olympe.U.tb?a.Z():a;if(3<=arguments.length&&c){const h=c.indexOf(f);if(-1!==h){if(void 0===this.Be[f])throw Error(`ContainerBuilder.define: Service ${f} references itself and is not an override definition!`);
219
- var g=this.Be[f];g.id=g.id+'!!'+ ++olympe.U.pl.C;g.F=!0;g=g.id;c[h]=g;this.Be[g]=this.Be[f]}}this.Be[f]=new olympe.U.pl(b,c,d||!1,f);return this.Be[f]}Md(a){a=this.Be[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.C++;for(let b=0,c=a.length;b<c;b++)qa(this.N,'Calling callback'),this.N.C++,a[b].call(null,this),oa(this.N);oa(this.N);this.N.debug('Configuration summary: '+
220
- Object.keys(this.Be).length+' definitions');this.N.debug('Compiling...');this.N.C++;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].process(this);oa(this.N);this.N.debug('Compilation done, returning container');return new olympe.U.gf(this.Be,this.parameters,this.G)}};olympe.U.pl=class{constructor(a,b,c,d){this.G=a||null;this.L=!!c;this.C=[];this.Ti=!1;this.Di=null;if(b){this.C=b;for(let e=0,f=b.length;e<f;e++)'string'===typeof b[e]&&(b[e]=new olympe.U.tb(b[e]))}this.id=d||'';this.F=!1}Z(){return this.id}instantiate(a){const b=a.Ya();b.debug('Resolving arguments for '+this.id);const c=this.G;let d=na(a,this.C);const e=()=>{if(this.L)return c.apply(null,d);d.unshift(null);return new (c.bind.apply(c,d))};qa(b,'Instantiating '+this.id);const f=olympe.D?olympe.D.lh().run(()=>
221
- e()):e(),g=this.Di;let h,k,l;if(null!==g&&0<g.length){b.C++;qa(b,'Calling configuration callbacks:');k=0;for(l=g.length;k<l;k++)b.C++,h=g[k],qa(b,'Calling additional configuration callback '+h.C),d=na(a,h.bj()),d.push(f),h.F.apply(null,d),oa(b);oa(b)}qa(b,'Done instantiating '+this.id);return f}bj(){return this.C}ij(){return this.Ti}config(a,b,c){null===this.Di&&(this.Di=[]);this.Di.push(new olympe.U.kl(b,c,a))}};olympe.U.pl.C=0;function oa(a){0<a.C&&a.C--}function qa(a,b){1>=a.F&&xa(a,'log','DI: '+b)}function xa(a,b,c){if(console&&console[b]){var d='';for(let e=0;e<a.C;e++)d+=' ';console[b](d+c)}}olympe.U.Gp=class{constructor(a){this.F=a;this.C=0}debug(a){2>=this.F&&xa(this,'log','DI: '+a)}info(a){3>=this.F&&xa(this,'info','DI: '+a)}warn(a){4>=this.F&&xa(this,'warn','DI: '+a)}error(a){5>=this.F&&xa(this,'error','DI: '+a)}};olympe.U.fa=class extends olympe.U.cl{constructor(a){super();this.id=a}Z(){return this.id}getValue(a){return a.getParameter(this.id)}};olympe.U.tb=class extends olympe.U.cl{constructor(a,b){super();this.id=a;this.C=b||olympe.U.gf.C.Rs}Z(){return this.id}getValue(a){return ma(a,this.id,this.C)}};olympe.U.P={dg:'di.Container',LA:'di.PublicContainer'};olympe.U.Config={Ut:'logging.di'};olympe.U.run([olympe.U.P.dg],a=>{olympe.U.getParameter=b=>a.getParameter(b)});olympe.X={};function ya(a){a='0'.repeat(12)+a.toString(16);return a.substring(a.length-12,a.length)}function za(){var a=Math.random();return ya((new Date).getTime())+(a.toString(16)+'0'.repeat(8)).substr(2,8)}let Aa=Math.pow(2,32)-1;olympe.X.ec=function(){return za()};olympe.X.ih=function(){return za()};olympe.X.Ik=function(a,b=1){const c=a.substr(12,a.length-12);return ya(parseInt(a.substr(0,12),16)+b)+c};
222
- olympe.X.Xw=function(a){return ya(parseInt(a.substr(0,12),16)+1)+(Math.random().toString(16)+'00000000').substr(2,8)};let Ba=0,Ca=0;olympe.X.fw=function(){var a=(new Date).getTime();a<=Ba?4294967295===Ca?(Ca=Math.floor(Math.random()/4*Aa),Ba+=1):Ca=Math.floor(Ca+(4294967295-Ca)/2):(Ca=Math.floor(Math.random()/4*Aa),Ba=a);a='00000000'+Ca.toString(16);return ya(Ba)+a.substr(a.length-8,8)};olympe.X.rD=function(){for(let a=0;1E4>a;a++)console.log(olympe.X.fw())};
223
- olympe.X.yg=function(){let a='';for(let b=0;19>b;b++)a+='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'.charAt(Math.floor(62*Math.random()));return'@'+a};olympe.X.XC=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.X.UC=function(a,b){return(b?b:'UI')+'-'+a};olympe.X.rp=class{constructor(a){this.id=a||olympe.X.rp.C++}mb(a){return a?this.id===a.id:!1}toJSON(){return this.id.toString()}toString(){return this.id.toString()}};olympe.X.rp.C=0;olympe.X.xA=class{constructor(a,b,c,d,e,f){this.C=[a||0,b||0,0,c||0,d||0,0,e||0,f||0,1]}set(a,b,c){this.C[3*a+b]=c}get(a,b){return this.C[3*a+b]}};olympe.X.Ch=function(a,b,c,d,e,f,g,h,k,l,n,p,q){this.values=[a,b,c,0,0,d,e,f,0,0,g,h,k,0,0,l,n,p,q,0]};olympe.X.Ch.F=function(a){return new olympe.X.Ch(.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.X.Ch.C=function(){return new olympe.X.Ch(0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0)};olympe.X.Ch.prototype.set=function(a,b,c){this.values[5*a+b]=c};olympe.X.Ch.prototype.get=function(a,b){return this.values[5*a+b]};function Da(a){return(new TextEncoder).encode(a).buffer}function Ea(a){return(new TextDecoder('utf8')).decode(a)}olympe.X.gl=class{R(){}C(){}G(){}L(){}F(){}W(){}};olympe.X.rr=a=>a.replace('+','-').replace('/','_');olympe.X.Dv=a=>a.replace('-','+').replace('_','/');function Fa(a){a.C=setTimeout(()=>{const b=Date.now(),c=a.timeout;for(const [d,e]of a.values)b-e>c&&(a.delete(d),a.G&&a.G(d));0<a.values.size?Fa(a):a.F&&a.F()},a.L)}function Ga(a,b){a.values.has(b)&&a.values.set(b,Date.now())}function Ha(a,b){a.G=b;return a}
224
- olympe.X.nm=class{constructor(a,b=a/2){this.timeout=a;this.L=b;this.values=new Map;this.F=this.G=this.C=null}add(a){this.values.set(a,Date.now());null===this.C&&Fa(this)}has(a){return this.values.has(a)}delete(a){a=this.values.delete(a);0===this.values.size&&(this.C&&clearTimeout(this.C),this.C=null,this.F&&this.F());return a}clear(){this.C&&clearTimeout(this.C);this.C=null;this.values.clear();return this}};olympe.X.mm=class{constructor(a){this.F=Ha(new olympe.X.nm(a,void 0),b=>{const c=this.values.get(b);this.values.delete(b);this.C&&this.C(b,c)});this.values=new Map;this.C=null}set(a,b){this.values.set(a,b);this.F.add(a);return this}has(a){return this.values.has(a)}get(a){return this.values.get(a)}delete(a){this.values.delete(a);return this.F.delete(a)}clear(){this.F.clear();this.values.clear();return this}};function Ia(a,b){return a+b&4294967295}
214
+ function z(a,b){a=a.split('.');let c=ja;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={dj:()=>'object'===typeof window?window:'object'===typeof global?global:self};olympe.dj().olympe=olympe;olympe.RC=(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.ka={};olympe.ka.node={};'function'!==typeof require||global.Blob||(global.Blob=require('cross-blob'));olympe.U={};olympe.U.Cf={};olympe.U.Cf.Zn=class{process(a){const b=Object.keys(a.Be);let c,d;c=0;for(d=b.length;c<d;c++)if(a.Md(b[c]).ij())throw Error('Service "'+b[c]+'" is defined as abstract and needs to be overridden');}};olympe.U.Cf.Zn.ma=[olympe.U.Cf.gq];olympe.U.Cf.$n=class{process(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.Md(g),c(g.bj(),h),g=g.Di,null!==g))for(let k=0,l=g.length;k<l;k++)c(g[k].bj(),h)}function c(g,h){for(let k=0,l=g.length,n;k<l;k++)n=g[k],n instanceof olympe.U.tb&&b(n.Z(),h)}function d(){for(const g in f)if(Object.prototype.hasOwnProperty.call(f,g))return g}var e=Object.keys(a.Be);const f={};for(let g=0,h=e.length;g<h;g++)f[e[g]]=
215
+ !0;for(;void 0!==(e=d());)b(e,[])}};olympe.U.Cf.$n.ma=[olympe.U.Cf.gq];olympe.U.Cf.gq=class{process(){}};const ka=[],la=[];olympe.U.co=class{constructor(){}static C(a,b){ka.push(new olympe.U.jl(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');});la.push(new olympe.U.jl(b,c,a))}};olympe.U.config=olympe.U.co.C;olympe.U.run=olympe.U.co.F;olympe.U.bl=class{constructor(){}getValue(){}};olympe.U.jl=class{constructor(a,b,c){this.F=a;this.G=[];this.C=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.tb(c[d]))}}bj(){return this.G}};function ma(a,b,c){let d=a.C[b];if(void 0===d){const e=a.F[b];if(void 0===e){if(c===olympe.U.gf.C.Eh)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.C[b]=d)}return d}function na(a,b){const c=b.length,d=Array(c);let e,f;for(e=0;e<c;e++)a.N.C++,f=b[e],d[e]=f instanceof olympe.U.bl?f.getValue(a):f,oa(a.N);return d}
216
+ olympe.U.gf=class{constructor(a,b,c=2){this.F=a;this.parameters=b;this.C=Object.create(null);this.N=new olympe.U.Fp(c);a=olympe.U.P.dg;if(void 0!==this.C[a])throw Error('Service "'+a+'" has already been instantiated');this.C[a]=this}Ya(){return this.N}getParameter(a){return this.parameters[a.toLowerCase()]}};olympe.U.gf.C={Qs:'exception',Eh:'null'};function pa(a,b,c){function d(f,g){let h,k,l;for(h in f)Object.prototype.hasOwnProperty.call(f,h)&&(k=f[h],l=g.concat((h.startsWith('#')?h.substring(1):h).toLowerCase()),'object'!==typeof k||null===k||h.startsWith('#')?e[l.join('.')]=k:d(k,l))}const e=a.parameters;d(b,c?[c]:[])}function A(a,b,c,...d){qa(a.N,'Defining service '+b);a.C(b,c,d,!1,!1)}function ra(a,b,c,...d){qa(a.N,'Defining service '+b);a.C(b,c,d,!1,!0)}
217
+ function C(a,b,c,d,e=!1){qa(a.N,'Defining service (as a factory) '+b);a.C(b,d,c,!0,e)}function sa(a,b,c,d=!1){qa(a.N,'Defining service alias '+b);a.C(b,e=>e,[c],!0,d)}function ta(a,b){qa(a.N,'Defining abstract service '+b);a.C(b).Ti=!0}function ua(a,b){a.parameters[olympe.H.Config.Vn.toLowerCase()]=b}function D(a,b,c){b=b.toLowerCase();Object.prototype.hasOwnProperty.call(a.parameters,b)||(a.parameters[b]=c)}
218
+ olympe.U.Cs=class{constructor(a){var b=va,c=wa;this.Be=Object.create(null);this.parameters=Object.create(null);this.L=[new olympe.U.Cf.Zn,new olympe.U.Cf.$n];this.F=[];b&&pa(this,b);c&&pa(this,c,'version');a&&pa(this,a);a=this.getParameter(olympe.U.Config.Tt);this.G=void 0!==a?a:3;this.N=new olympe.U.Fp(this.G)}Ya(){return this.N}C(a,b,c,d,e){const f=a instanceof olympe.U.tb?a.Z():a;if(3<=arguments.length&&c){const h=c.indexOf(f);if(-1!==h){if(void 0===this.Be[f])throw Error(`ContainerBuilder.define: Service ${f} references itself and is not an override definition!`);
219
+ var g=this.Be[f];g.id=g.id+'!!'+ ++olympe.U.ol.C;g.F=!0;g=g.id;c[h]=g;this.Be[g]=this.Be[f]}}this.Be[f]=new olympe.U.ol(b,c,d||!1,f);return this.Be[f]}Md(a){a=this.Be[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.C++;for(let b=0,c=a.length;b<c;b++)qa(this.N,'Calling callback'),this.N.C++,a[b].call(null,this),oa(this.N);oa(this.N);this.N.debug('Configuration summary: '+
220
+ Object.keys(this.Be).length+' definitions');this.N.debug('Compiling...');this.N.C++;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].process(this);oa(this.N);this.N.debug('Compilation done, returning container');return new olympe.U.gf(this.Be,this.parameters,this.G)}};olympe.U.ol=class{constructor(a,b,c,d){this.G=a||null;this.L=!!c;this.C=[];this.Ti=!1;this.Di=null;if(b){this.C=b;for(let e=0,f=b.length;e<f;e++)'string'===typeof b[e]&&(b[e]=new olympe.U.tb(b[e]))}this.id=d||'';this.F=!1}Z(){return this.id}instantiate(a){const b=a.Ya();b.debug('Resolving arguments for '+this.id);const c=this.G;let d=na(a,this.C);const e=()=>{if(this.L)return c.apply(null,d);d.unshift(null);return new (c.bind.apply(c,d))};qa(b,'Instantiating '+this.id);const f=olympe.D?olympe.D.lh().run(()=>
221
+ e()):e(),g=this.Di;let h,k,l;if(null!==g&&0<g.length){b.C++;qa(b,'Calling configuration callbacks:');k=0;for(l=g.length;k<l;k++)b.C++,h=g[k],qa(b,'Calling additional configuration callback '+h.C),d=na(a,h.bj()),d.push(f),h.F.apply(null,d),oa(b);oa(b)}qa(b,'Done instantiating '+this.id);return f}bj(){return this.C}ij(){return this.Ti}config(a,b,c){null===this.Di&&(this.Di=[]);this.Di.push(new olympe.U.jl(b,c,a))}};olympe.U.ol.C=0;function oa(a){0<a.C&&a.C--}function qa(a,b){1>=a.F&&xa(a,'log','DI: '+b)}function xa(a,b,c){if(console&&console[b]){var d='';for(let e=0;e<a.C;e++)d+=' ';console[b](d+c)}}olympe.U.Fp=class{constructor(a){this.F=a;this.C=0}debug(a){2>=this.F&&xa(this,'log','DI: '+a)}info(a){3>=this.F&&xa(this,'info','DI: '+a)}warn(a){4>=this.F&&xa(this,'warn','DI: '+a)}error(a){5>=this.F&&xa(this,'error','DI: '+a)}};olympe.U.fa=class extends olympe.U.bl{constructor(a){super();this.id=a}Z(){return this.id}getValue(a){return a.getParameter(this.id)}};olympe.U.tb=class extends olympe.U.bl{constructor(a,b){super();this.id=a;this.C=b||olympe.U.gf.C.Qs}Z(){return this.id}getValue(a){return ma(a,this.id,this.C)}};olympe.U.P={dg:'di.Container',KA:'di.PublicContainer'};olympe.U.Config={Tt:'logging.di'};olympe.U.run([olympe.U.P.dg],a=>{olympe.U.getParameter=b=>a.getParameter(b)});olympe.X={};function ya(a){a='0'.repeat(12)+a.toString(16);return a.substring(a.length-12,a.length)}function za(){var a=Math.random();return ya((new Date).getTime())+(a.toString(16)+'0'.repeat(8)).substr(2,8)}let Aa=Math.pow(2,32)-1;olympe.X.ec=function(){return za()};olympe.X.ih=function(){return za()};olympe.X.Hk=function(a,b=1){const c=a.substr(12,a.length-12);return ya(parseInt(a.substr(0,12),16)+b)+c};
222
+ olympe.X.Ww=function(a){return ya(parseInt(a.substr(0,12),16)+1)+(Math.random().toString(16)+'00000000').substr(2,8)};let Ba=0,Ca=0;olympe.X.ew=function(){var a=(new Date).getTime();a<=Ba?4294967295===Ca?(Ca=Math.floor(Math.random()/4*Aa),Ba+=1):Ca=Math.floor(Ca+(4294967295-Ca)/2):(Ca=Math.floor(Math.random()/4*Aa),Ba=a);a='00000000'+Ca.toString(16);return ya(Ba)+a.substr(a.length-8,8)};olympe.X.qD=function(){for(let a=0;1E4>a;a++)console.log(olympe.X.ew())};
223
+ olympe.X.yg=function(){let a='';for(let b=0;19>b;b++)a+='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'.charAt(Math.floor(62*Math.random()));return'@'+a};olympe.X.WC=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.X.TC=function(a,b){return(b?b:'UI')+'-'+a};olympe.X.pp=class{constructor(a){this.id=a||olympe.X.pp.C++}mb(a){return a?this.id===a.id:!1}toJSON(){return this.id.toString()}toString(){return this.id.toString()}};olympe.X.pp.C=0;olympe.X.wA=class{constructor(a,b,c,d,e,f){this.C=[a||0,b||0,0,c||0,d||0,0,e||0,f||0,1]}set(a,b,c){this.C[3*a+b]=c}get(a,b){return this.C[3*a+b]}};olympe.X.Ch=function(a,b,c,d,e,f,g,h,k,l,n,p,q){this.values=[a,b,c,0,0,d,e,f,0,0,g,h,k,0,0,l,n,p,q,0]};olympe.X.Ch.F=function(a){return new olympe.X.Ch(.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.X.Ch.C=function(){return new olympe.X.Ch(0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0)};olympe.X.Ch.prototype.set=function(a,b,c){this.values[5*a+b]=c};olympe.X.Ch.prototype.get=function(a,b){return this.values[5*a+b]};function Da(a){return(new TextEncoder).encode(a).buffer}function Ea(a){return(new TextDecoder('utf8')).decode(a)}olympe.X.fl=class{R(){}C(){}G(){}L(){}F(){}W(){}};olympe.X.qr=a=>a.replace('+','-').replace('/','_');olympe.X.Cv=a=>a.replace('-','+').replace('_','/');function Fa(a){a.C=setTimeout(()=>{const b=Date.now(),c=a.timeout;for(const [d,e]of a.values)b-e>c&&(a.delete(d),a.G&&a.G(d));0<a.values.size?Fa(a):a.F&&a.F()},a.L)}function Ga(a,b){a.values.has(b)&&a.values.set(b,Date.now())}function Ha(a,b){a.G=b;return a}
224
+ olympe.X.mm=class{constructor(a,b=a/2){this.timeout=a;this.L=b;this.values=new Map;this.F=this.G=this.C=null}add(a){this.values.set(a,Date.now());null===this.C&&Fa(this)}has(a){return this.values.has(a)}delete(a){a=this.values.delete(a);0===this.values.size&&(this.C&&clearTimeout(this.C),this.C=null,this.F&&this.F());return a}clear(){this.C&&clearTimeout(this.C);this.C=null;this.values.clear();return this}};olympe.X.lm=class{constructor(a){this.F=Ha(new olympe.X.mm(a,void 0),b=>{const c=this.values.get(b);this.values.delete(b);this.C&&this.C(b,c)});this.values=new Map;this.C=null}set(a,b){this.values.set(a,b);this.F.add(a);return this}has(a){return this.values.has(a)}get(a){return this.values.get(a)}delete(a){this.values.delete(a);return this.F.delete(a)}clear(){this.F.clear();this.values.clear();return this}};function Ia(a,b){return a+b&4294967295}
225
225
  function Ja(a,b){let c=a[0],d=a[1],e=a[2],f=a[3];c=F(c,d,e,f,b[0],7,-680876936);f=F(f,c,d,e,b[1],12,-389564586);e=F(e,f,c,d,b[2],17,606105819);d=F(d,e,f,c,b[3],22,-1044525330);c=F(c,d,e,f,b[4],7,-176418897);f=F(f,c,d,e,b[5],12,1200080426);e=F(e,f,c,d,b[6],17,-1473231341);d=F(d,e,f,c,b[7],22,-45705983);c=F(c,d,e,f,b[8],7,1770035416);f=F(f,c,d,e,b[9],12,-1958414417);e=F(e,f,c,d,b[10],17,-42063);d=F(d,e,f,c,b[11],22,-1990404162);c=F(c,d,e,f,b[12],7,1804603682);f=F(f,c,d,e,b[13],12,-40341101);e=F(e,f,
226
226
  c,d,b[14],17,-1502002290);d=F(d,e,f,c,b[15],22,1236535329);c=G(c,d,e,f,b[1],5,-165796510);f=G(f,c,d,e,b[6],9,-1069501632);e=G(e,f,c,d,b[11],14,643717713);d=G(d,e,f,c,b[0],20,-373897302);c=G(c,d,e,f,b[5],5,-701558691);f=G(f,c,d,e,b[10],9,38016083);e=G(e,f,c,d,b[15],14,-660478335);d=G(d,e,f,c,b[4],20,-405537848);c=G(c,d,e,f,b[9],5,568446438);f=G(f,c,d,e,b[14],9,-1019803690);e=G(e,f,c,d,b[3],14,-187363961);d=G(d,e,f,c,b[8],20,1163531501);c=G(c,d,e,f,b[13],5,-1444681467);f=G(f,c,d,e,b[2],9,-51403784);
227
227
  e=G(e,f,c,d,b[7],14,1735328473);d=G(d,e,f,c,b[12],20,-1926607734);c=H(d^e^f,c,d,b[5],4,-378558);f=H(c^d^e,f,c,b[8],11,-2022574463);e=H(f^c^d,e,f,b[11],16,1839030562);d=H(e^f^c,d,e,b[14],23,-35309556);c=H(d^e^f,c,d,b[1],4,-1530992060);f=H(c^d^e,f,c,b[4],11,1272893353);e=H(f^c^d,e,f,b[7],16,-155497632);d=H(e^f^c,d,e,b[10],23,-1094730640);c=H(d^e^f,c,d,b[13],4,681279174);f=H(c^d^e,f,c,b[0],11,-358537222);e=H(f^c^d,e,f,b[3],16,-722521979);d=H(e^f^c,d,e,b[6],23,76029189);c=H(d^e^f,c,d,b[9],4,-640364487);
228
228
  f=H(c^d^e,f,c,b[12],11,-421815835);e=H(f^c^d,e,f,b[15],16,530742520);d=H(e^f^c,d,e,b[2],23,-995338651);c=J(c,d,e,f,b[0],6,-198630844);f=J(f,c,d,e,b[7],10,1126891415);e=J(e,f,c,d,b[14],15,-1416354905);d=J(d,e,f,c,b[5],21,-57434055);c=J(c,d,e,f,b[12],6,1700485571);f=J(f,c,d,e,b[3],10,-1894986606);e=J(e,f,c,d,b[10],15,-1051523);d=J(d,e,f,c,b[1],21,-2054922799);c=J(c,d,e,f,b[8],6,1873313359);f=J(f,c,d,e,b[15],10,-30611744);e=J(e,f,c,d,b[6],15,-1560198380);d=J(d,e,f,c,b[13],21,1309151649);c=J(c,d,e,f,
229
229
  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]=Ia(c,a[0]);a[1]=Ia(d,a[1]);a[2]=Ia(e,a[2]);a[3]=Ia(f,a[3])}function H(a,b,c,d,e,f){b=Ia(Ia(b,a),Ia(d,f));return Ia(b<<e|b>>>32-e,c)}function F(a,b,c,d,e,f,g){return H(b&c|~b&d,a,b,e,f,g)}function G(a,b,c,d,e,f,g){return H(b&d|c&~d,a,b,e,f,g)}function J(a,b,c,d,e,f,g){return H(c^(b|~d),a,b,e,f,g)}
230
230
  function Ka(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);Ja(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(Ja(a,g),f=0;16>f;f++)g[f]=0;g[14]=8*e;
231
- Ja(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'!==Ka('hello')&&(Ia=(a,b)=>{const c=(a&65535)+(b&65535);return(a>>16)+(b>>16)+(c>>16)<<16|c&65535});olympe.X.ob=Ka;olympe.X.jy=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 l=null,n=null;var p=null;g&&(p=g.match(b),l=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:r.startsWith('"')&&r.endsWith('"')?r=r.substring(1,r.length-1):d.test(r)?r='true'===r.toLowerCase():e.test(r)?r=parseFloat(r):
232
- r=decodeURIComponent(r);b[q[1]]=r}return{scheme:a||null,IC:g||null,ds:l||null,host:n||null,port:p&&parseInt(p,10)||null,path:h&&'/'!==h?h:null,query:k||null,VC:f||null,parameters:b}};olympe.X.mD=function(a){a=a.substring(1);return''===a?new Map:new Map(a.split('&').map(b=>b.split('=')))};olympe.X.pD=function(a){let b='';for(let c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b+=(b?'&':'?')+c+'='+encodeURIComponent(a[c]));return b};
233
- olympe.X.Hr=(a,b)=>{const c=Object.keys(a).find(d=>a[d]===b);return void 0===c?null:c};olympe.X.gn=(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.X.gn(a[c],d):a[c]=d}};olympe.X.Qm=(a,b,c)=>{const d=Object.create(null);b(a,e=>{olympe.X.gn(d,e);b(`conf.d/${a}`,f=>{olympe.X.gn(d,f);c(d)})})};olympe.X.FC=class a{constructor(b,c){this.x=b;this.y=c}add(b){return new a(this.x+b.x,this.y+b.y)}Ag(){return Math.sqrt(this.x*this.x+this.y*this.y)}toString(){return`Vector(${this.x}, ${this.y})`}};olympe.X.fz=class{constructor(a,b,c,d){this.from=a;this.target=b;this.C=c;this.F=d}toString(){return`(${this.from.toString()}, ${this.target.toString()}, ${this.C.toString()}, ${this.F.toString()})`}};olympe.X.Xt=class{constructor(a,b){this.start=a;this.end=b}};olympe.X.Xt.C={Ei:'left',Mi:'right',dz:'bottom',aC:'top'};function La(a){a=/([0-9]*)\.([0-9]*)\.([0-9]*)-?([A-z\-_0-9]*)/.exec(a);if(null===a||4>a.length)return olympe.X.Sh.C;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.X.Sh.C:new olympe.X.Sh(b,c,d,a[4])}function Ma(a){return`${a.C}.${a.F}.${a.G}`}
234
- olympe.X.Sh=class{constructor(a,b,c,d){this.C=a;this.F=b;this.G=c;this.L=d||null}Jk(a){return this.C!==a.C?this.C>a.C:this.F!==a.F?this.F>a.F:this.G>a.G}uj(a){return this.C!==a.C?this.C<a.C:this.F!==a.F?this.F<a.F:this.G<a.G}mb(a){return this.C===a.C&&this.F===a.F&&this.G===a.G}toString(){return`${this.C}.${this.F}.${this.G}`+(null!==this.L?`-${this.L}`:'')}};olympe.X.Sh.C=new olympe.X.Sh(Number.NaN,Number.NaN,Number.NaN);olympe.X.P={th:'utils.binaryConverter',ns:'utils.base64Converter'};olympe.U.config(a=>{ta(a,olympe.X.P.th);sa(a,olympe.X.P.ns,olympe.X.P.th,!0)},'Utils services');olympe.U.run([olympe.X.P.th],a=>{olympe.X.ai=()=>a});olympe.ra={};olympe.ra.Ob=class{L(){}ja(){}G(){}$(){}da(){}ta(){}R(){}W(){}trace(){}debug(){}log(){}info(){}warn(){}error(){}fatal(){}};olympe.ra.Ob.prototype.fatal=olympe.ra.Ob.prototype.fatal;olympe.ra.Ob.prototype.error=olympe.ra.Ob.prototype.error;olympe.ra.Ob.prototype.warn=olympe.ra.Ob.prototype.warn;olympe.ra.Ob.prototype.info=olympe.ra.Ob.prototype.info;olympe.ra.Ob.prototype.log=olympe.ra.Ob.prototype.log;olympe.ra.Ob.prototype.debug=olympe.ra.Ob.prototype.debug;olympe.ra.Ob.prototype.trace=olympe.ra.Ob.prototype.trace;
235
- olympe.ra.Ob.C={$u:0,eg:1,Tt:2,mp:3,jv:4,ac:5,Us:6,Pl:7};olympe.ra.Ob.F={0:'TRACE',1:'DEBUG',2:'LOG',3:'INFO',4:'WARN',5:'ERROR',6:'FATAL',7:'NOTHING'};olympe.ra.pa=class{Oc(){}};olympe.ra.pd={};function Na(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.Ua?`%c[${g}] [${f.toUpperCase()}] ${c}:%c`:`%c[${g}] ${c}:%c`;for(const h of d)f+=' '+h;a.Va[b](f,'color: '+e,'color: #444');for(const h of a.Ka.values())h(g,c,b,...d)}
236
- olympe.ra.pd.Ob=class{constructor(a,b,c){this.name=a;this.C=b;this.Ua=c;this.F=a.toUpperCase();this.Ka=new Map;this.Va=console}L(){return this.C}ja(){return this.C<=olympe.ra.Ob.C.$u}G(){return this.C<=olympe.ra.Ob.C.eg}da(){return this.C<=olympe.ra.Ob.C.Tt}$(){return this.C<=olympe.ra.Ob.C.mp}ta(){return this.C<=olympe.ra.Ob.C.jv}R(){return this.C<=olympe.ra.Ob.C.ac}W(){return this.C<=olympe.ra.Ob.C.Us}trace(...a){this.ja()&&Na(this,'log',this.F,a,'#99b','trace')}debug(...a){this.G()&&Na(this,'log',
237
- this.F,a,'#888','debug')}log(...a){this.da()&&Na(this,'log',this.F,a,'#000','log')}info(...a){this.$()&&Na(this,'info',this.F,a,'#00f','info')}warn(...a){this.ta()&&Na(this,'warn',this.F,a,'#684911','warn')}error(...a){this.R()&&Na(this,'error',this.F,a,'#f00','error')}fatal(...a){this.W()&&Na(this,'error',this.F,a,'#f00','fatal')}};olympe.ra.pd.Ob.ma=[olympe.ra.Ob];olympe.ra.pd.pa=class{constructor(a,b,c){this.C=a;this.F=parseInt(b,10);this.G=c;this.channels=new Map;this.N=this.Oc('logging');this.N.info('Logging initialized, global log level is '+olympe.ra.Ob.F[b])}Oc(a){var b=this.channels.get(a);if(!b){b=this.F;var c=`${olympe.ra.Config.us}.${a}`;Object.prototype.hasOwnProperty.call(this.C.parameters,c.toLowerCase())&&(b=parseInt(this.C.getParameter(c),10));let d=this.G;c=`${c}.${olympe.ra.Config.Ou}`;Object.prototype.hasOwnProperty.call(this.C.parameters,
238
- c.toLowerCase())&&(d=!0===this.C.getParameter(c));b=new olympe.ra.pd.Ob(a,b,d);this.channels.set(a,b)}return b}};olympe.ra.pd.pa.ma=[olympe.ra.pa];olympe.ra.P={Aa:'logging.Manager'};olympe.ra.Config={Oo:'logging',Po:'logging.showLogLevel',us:'logging',Ou:'showLogLevel'};olympe.U.config(function(a){D(a,olympe.ra.Config.Oo,olympe.ra.Ob.C.mp);D(a,olympe.ra.Config.Po,!0);ra(a,olympe.ra.P.Aa,olympe.ra.pd.pa,olympe.U.P.dg,new olympe.U.fa(olympe.ra.Config.Oo),new olympe.U.fa(olympe.ra.Config.Po))},'olympe.logging');olympe.U.run([olympe.ra.P.Aa],a=>{olympe.ra.Ya=b=>a.Oc(b)},'Logging singleton getter initialization');olympe.D={};olympe.D.Config={Mp:'df.nodeCreationThreshold'};const Oa=[];function Pa(){}function Qa(){}olympe.D.J=class a{constructor(b,c,d){this.C=void 0===b?Pa:b;this.F=void 0===c?Oa:c;this.$=d}static L(){var b=[];return void 0===b||0===b.length?olympe.D.J.da:new a(Qa,b)}L(){return this.C?this.C():void 0}G(){return this.F?this.F:Oa}R(){return null===this.C&&null===this.F}W(){return this.C===Qa}};olympe.D.J.$=new olympe.D.J;olympe.D.J.C=new olympe.D.J(null,null);olympe.D.J.da=new olympe.D.J(Qa);olympe.D.J.G=new olympe.D.J(()=>olympe.D.ga);
239
- olympe.D.J.F=new olympe.D.J(()=>olympe.D.Za);olympe.D.J.R=new olympe.D.J(()=>olympe.D.sa);olympe.D.J.W=new olympe.D.J(()=>olympe.D.kc);olympe.D.wh=class{Z(){return''}Xc(){return''}destroy(){}G(){return!1}$(){return!1}run(a,...b){return a(...b)}F(a){return a}getParent(){return null}We(){}jh(){}$d(){}Kd(){}Ck(){}Ka(){}onDestroy(){return''}Xe(){}R(){return''}be(){}};olympe.D.wh.prototype.offDestroy=olympe.D.wh.prototype.Xe;olympe.D.wh.prototype.onDestroy=olympe.D.wh.prototype.onDestroy;let Ra=0;olympe.U.run([new olympe.U.fa(olympe.D.Config.Mp)],()=>{});
240
- olympe.D.Zb=class{constructor(a='SimpleContext',b){++Ra;this.Ab=new Map;this.Hb=new Map;this.qb=new Map;this.zc=0;this.name=a;this.id=String(Ra);this.Hc=this.Vb=!1;(this.ja=void 0===b?olympe.D.La():b)&&this.ja.$d(this);this.debug=!1}Z(){return this.id}Xc(){return this.name}run(a,...b){if(!this.Vb){var c=olympe.D.Xr(this);a=a(...b);c&&olympe.D.Xr(c);return a}}F(a){return(...b)=>this.run(a,...b)}destroy(){if(!this.Vb&&!this.Hc){this.Hc=!0;this.Ka();for(const a of this.Hb.keys())this.Hb.has(a)&&this.Hb.get(a)();
241
- this.Hb.clear();this.qb.clear();this.ja&&(this.ja.Kd(this,!1),this.ja=null);this.Vb=!0;this.Hc=!1;this.Ka()}}G(){return this.Vb}$(){return this.Hc}$d(a){if(!this.Vb){var b;olympe.D.nb(a)?b=a.Pa:olympe.D.an(a)&&(b=a);b&&this.Ab.set(b.Z(),b)}}Kd(a,b=!0){let c;olympe.D.nb(a)?c=a.Pa:olympe.D.an(a)&&(c=a);c&&this.Ab.has(c.Z())&&(b&&c.Ck(this),this.Ab.delete(c.Z()))}Ck(){this.ja=null;this.destroy()}Ka(){const a=this.Ab;for(const b of a.keys())a.has(b)&&a.get(b).Ck(this);this.Ab.clear();for(const b of this.qb.keys())this.qb.has(b)&&
242
- this.qb.get(b)();this.qb.clear()}onDestroy(a,b){void 0===b&&(++this.zc,b=String(this.zc));this.Hb.set(b,a);return b}Xe(a){this.Hb.delete(a)}R(a){if(void 0===b){++this.zc;var b=String(this.zc)}this.qb.set(b,a);return b}be(a){this.qb.delete(a)}We(a){this.ja&&this.ja.Kd(this,!1);(this.ja=a||null)&&this.ja.$d(this)}getParent(){return this.ja}jh(){return this.Ab}};olympe.D.yq=class extends olympe.D.Zb{constructor(){super('Root',null)}destroy(){}onDestroy(){return''}Xe(){}};olympe.D.wh.ma=[olympe.D.wh];let Sa=0;
243
- function Ta(a,b){a.ta||(a.ta=new Map);a.ta.set(b.Z(),b);switch(b.Od()){case olympe.D.Node.C.Dh:break;case olympe.D.Node.C.Rh:break;case olympe.D.Node.C.bk:case olympe.D.Node.C.gg:olympe.D.N.warn('Not bad as such but should not happen!');break;case olympe.D.Node.C.xh:Ua(a,olympe.D.Node.C.xh);break;case olympe.D.Node.C.OBSOLETE:a.od=!0;a.L!==olympe.D.Node.C.xh&&Ua(a,olympe.D.Node.C.OBSOLETE);break;case olympe.D.Node.C.fg:olympe.D.N.warn('Adding a destroyed node as upstream => should never happen!');break;
231
+ Ja(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'!==Ka('hello')&&(Ia=(a,b)=>{const c=(a&65535)+(b&65535);return(a>>16)+(b>>16)+(c>>16)<<16|c&65535});olympe.X.ob=Ka;olympe.X.iy=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 l=null,n=null;var p=null;g&&(p=g.match(b),l=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:r.startsWith('"')&&r.endsWith('"')?r=r.substring(1,r.length-1):d.test(r)?r='true'===r.toLowerCase():e.test(r)?r=parseFloat(r):
232
+ r=decodeURIComponent(r);b[q[1]]=r}return{scheme:a||null,HC:g||null,cs:l||null,host:n||null,port:p&&parseInt(p,10)||null,path:h&&'/'!==h?h:null,query:k||null,UC:f||null,parameters:b}};olympe.X.lD=function(a){a=a.substring(1);return''===a?new Map:new Map(a.split('&').map(b=>b.split('=')))};olympe.X.oD=function(a){let b='';for(let c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b+=(b?'&':'?')+c+'='+encodeURIComponent(a[c]));return b};
233
+ olympe.X.Gr=(a,b)=>{const c=Object.keys(a).find(d=>a[d]===b);return void 0===c?null:c};olympe.X.fn=(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.X.fn(a[c],d):a[c]=d}};olympe.X.Pm=(a,b,c)=>{const d=Object.create(null);b(a,e=>{olympe.X.fn(d,e);b(`conf.d/${a}`,f=>{olympe.X.fn(d,f);c(d)})})};olympe.X.EC=class a{constructor(b,c){this.x=b;this.y=c}add(b){return new a(this.x+b.x,this.y+b.y)}Ag(){return Math.sqrt(this.x*this.x+this.y*this.y)}toString(){return`Vector(${this.x}, ${this.y})`}};olympe.X.ez=class{constructor(a,b,c,d){this.from=a;this.target=b;this.C=c;this.F=d}toString(){return`(${this.from.toString()}, ${this.target.toString()}, ${this.C.toString()}, ${this.F.toString()})`}};olympe.X.Wt=class{constructor(a,b){this.start=a;this.end=b}};olympe.X.Wt.C={Ei:'left',Mi:'right',cz:'bottom',$B:'top'};function La(a){a=/([0-9]*)\.([0-9]*)\.([0-9]*)-?([A-z\-_0-9]*)/.exec(a);if(null===a||4>a.length)return olympe.X.Sh.C;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.X.Sh.C:new olympe.X.Sh(b,c,d,a[4])}function Ma(a){return`${a.C}.${a.F}.${a.G}`}
234
+ olympe.X.Sh=class{constructor(a,b,c,d){this.C=a;this.F=b;this.G=c;this.L=d||null}Ik(a){return this.C!==a.C?this.C>a.C:this.F!==a.F?this.F>a.F:this.G>a.G}tj(a){return this.C!==a.C?this.C<a.C:this.F!==a.F?this.F<a.F:this.G<a.G}mb(a){return this.C===a.C&&this.F===a.F&&this.G===a.G}toString(){return`${this.C}.${this.F}.${this.G}`+(null!==this.L?`-${this.L}`:'')}};olympe.X.Sh.C=new olympe.X.Sh(Number.NaN,Number.NaN,Number.NaN);olympe.X.P={th:'utils.binaryConverter',ms:'utils.base64Converter'};olympe.U.config(a=>{ta(a,olympe.X.P.th);sa(a,olympe.X.P.ms,olympe.X.P.th,!0)},'Utils services');olympe.U.run([olympe.X.P.th],a=>{olympe.X.ai=()=>a});olympe.ra={};olympe.ra.Ob=class{L(){}ja(){}G(){}$(){}da(){}ta(){}R(){}W(){}trace(){}debug(){}log(){}info(){}warn(){}error(){}fatal(){}};olympe.ra.Ob.prototype.fatal=olympe.ra.Ob.prototype.fatal;olympe.ra.Ob.prototype.error=olympe.ra.Ob.prototype.error;olympe.ra.Ob.prototype.warn=olympe.ra.Ob.prototype.warn;olympe.ra.Ob.prototype.info=olympe.ra.Ob.prototype.info;olympe.ra.Ob.prototype.log=olympe.ra.Ob.prototype.log;olympe.ra.Ob.prototype.debug=olympe.ra.Ob.prototype.debug;olympe.ra.Ob.prototype.trace=olympe.ra.Ob.prototype.trace;
235
+ olympe.ra.Ob.C={Zu:0,eg:1,St:2,kp:3,hv:4,ac:5,Ts:6,Ol:7};olympe.ra.Ob.F={0:'TRACE',1:'DEBUG',2:'LOG',3:'INFO',4:'WARN',5:'ERROR',6:'FATAL',7:'NOTHING'};olympe.ra.pa=class{Oc(){}};olympe.ra.pd={};function Na(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.Sa?`%c[${g}] [${f.toUpperCase()}] ${c}:%c`:`%c[${g}] ${c}:%c`;for(const h of d)f+=' '+h;a.Va[b](f,'color: '+e,'color: #444');for(const h of a.Ka.values())h(g,c,b,...d)}
236
+ olympe.ra.pd.Ob=class{constructor(a,b,c){this.name=a;this.C=b;this.Sa=c;this.F=a.toUpperCase();this.Ka=new Map;this.Va=console}L(){return this.C}ja(){return this.C<=olympe.ra.Ob.C.Zu}G(){return this.C<=olympe.ra.Ob.C.eg}da(){return this.C<=olympe.ra.Ob.C.St}$(){return this.C<=olympe.ra.Ob.C.kp}ta(){return this.C<=olympe.ra.Ob.C.hv}R(){return this.C<=olympe.ra.Ob.C.ac}W(){return this.C<=olympe.ra.Ob.C.Ts}trace(...a){this.ja()&&Na(this,'log',this.F,a,'#99b','trace')}debug(...a){this.G()&&Na(this,'log',
237
+ this.F,a,'#888','debug')}log(...a){this.da()&&Na(this,'log',this.F,a,'#000','log')}info(...a){this.$()&&Na(this,'info',this.F,a,'#00f','info')}warn(...a){this.ta()&&Na(this,'warn',this.F,a,'#684911','warn')}error(...a){this.R()&&Na(this,'error',this.F,a,'#f00','error')}fatal(...a){this.W()&&Na(this,'error',this.F,a,'#f00','fatal')}};olympe.ra.pd.Ob.ma=[olympe.ra.Ob];olympe.ra.pd.pa=class{constructor(a,b,c){this.C=a;this.F=parseInt(b,10);this.G=c;this.channels=new Map;this.N=this.Oc('logging');this.N.info('Logging initialized, global log level is '+olympe.ra.Ob.F[b])}Oc(a){var b=this.channels.get(a);if(!b){b=this.F;var c=`${olympe.ra.Config.ss}.${a}`;Object.prototype.hasOwnProperty.call(this.C.parameters,c.toLowerCase())&&(b=parseInt(this.C.getParameter(c),10));let d=this.G;c=`${c}.${olympe.ra.Config.Nu}`;Object.prototype.hasOwnProperty.call(this.C.parameters,
238
+ c.toLowerCase())&&(d=!0===this.C.getParameter(c));b=new olympe.ra.pd.Ob(a,b,d);this.channels.set(a,b)}return b}};olympe.ra.pd.pa.ma=[olympe.ra.pa];olympe.ra.P={Aa:'logging.Manager'};olympe.ra.Config={No:'logging',Oo:'logging.showLogLevel',ss:'logging',Nu:'showLogLevel'};olympe.U.config(function(a){D(a,olympe.ra.Config.No,olympe.ra.Ob.C.kp);D(a,olympe.ra.Config.Oo,!0);ra(a,olympe.ra.P.Aa,olympe.ra.pd.pa,olympe.U.P.dg,new olympe.U.fa(olympe.ra.Config.No),new olympe.U.fa(olympe.ra.Config.Oo))},'olympe.logging');olympe.U.run([olympe.ra.P.Aa],a=>{olympe.ra.Ya=b=>a.Oc(b)},'Logging singleton getter initialization');olympe.D={};olympe.D.Config={Lp:'df.nodeCreationThreshold'};const Oa=[];function Pa(){}function Qa(){}olympe.D.J=class a{constructor(b,c,d){this.C=void 0===b?Pa:b;this.F=void 0===c?Oa:c;this.$=d}static L(){var b=[];return void 0===b||0===b.length?olympe.D.J.da:new a(Qa,b)}L(){return this.C?this.C():void 0}G(){return this.F?this.F:Oa}R(){return null===this.C&&null===this.F}W(){return this.C===Qa}};olympe.D.J.$=new olympe.D.J;olympe.D.J.C=new olympe.D.J(null,null);olympe.D.J.da=new olympe.D.J(Qa);olympe.D.J.G=new olympe.D.J(()=>olympe.D.ga);
239
+ olympe.D.J.F=new olympe.D.J(()=>olympe.D.Za);olympe.D.J.R=new olympe.D.J(()=>olympe.D.sa);olympe.D.J.W=new olympe.D.J(()=>olympe.D.kc);olympe.D.wh=class{Z(){return''}Xc(){return''}destroy(){}G(){return!1}$(){return!1}run(a,...b){return a(...b)}F(a){return a}getParent(){return null}We(){}jh(){}$d(){}Kd(){}Bk(){}Ka(){}onDestroy(){return''}Xe(){}R(){return''}be(){}};olympe.D.wh.prototype.offDestroy=olympe.D.wh.prototype.Xe;olympe.D.wh.prototype.onDestroy=olympe.D.wh.prototype.onDestroy;let Ra=0;olympe.U.run([new olympe.U.fa(olympe.D.Config.Lp)],()=>{});
240
+ olympe.D.Zb=class{constructor(a='SimpleContext',b){++Ra;this.Ab=new Map;this.Hb=new Map;this.qb=new Map;this.zc=0;this.name=a;this.id=String(Ra);this.Hc=this.Vb=!1;(this.ja=void 0===b?olympe.D.La():b)&&this.ja.$d(this);this.debug=!1}Z(){return this.id}Xc(){return this.name}run(a,...b){if(!this.Vb){var c=olympe.D.Wr(this);a=a(...b);c&&olympe.D.Wr(c);return a}}F(a){return(...b)=>this.run(a,...b)}destroy(){if(!this.Vb&&!this.Hc){this.Hc=!0;this.Ka();for(const a of this.Hb.keys())this.Hb.has(a)&&this.Hb.get(a)();
241
+ this.Hb.clear();this.qb.clear();this.ja&&(this.ja.Kd(this,!1),this.ja=null);this.Vb=!0;this.Hc=!1;this.Ka()}}G(){return this.Vb}$(){return this.Hc}$d(a){if(!this.Vb){var b;olympe.D.nb(a)?b=a.Pa:olympe.D.$m(a)&&(b=a);b&&this.Ab.set(b.Z(),b)}}Kd(a,b=!0){let c;olympe.D.nb(a)?c=a.Pa:olympe.D.$m(a)&&(c=a);c&&this.Ab.has(c.Z())&&(b&&c.Bk(this),this.Ab.delete(c.Z()))}Bk(){this.ja=null;this.destroy()}Ka(){const a=this.Ab;for(const b of a.keys())a.has(b)&&a.get(b).Bk(this);this.Ab.clear();for(const b of this.qb.keys())this.qb.has(b)&&
242
+ this.qb.get(b)();this.qb.clear()}onDestroy(a,b){void 0===b&&(++this.zc,b=String(this.zc));this.Hb.set(b,a);return b}Xe(a){this.Hb.delete(a)}R(a){if(void 0===b){++this.zc;var b=String(this.zc)}this.qb.set(b,a);return b}be(a){this.qb.delete(a)}We(a){this.ja&&this.ja.Kd(this,!1);(this.ja=a||null)&&this.ja.$d(this)}getParent(){return this.ja}jh(){return this.Ab}};olympe.D.xq=class extends olympe.D.Zb{constructor(){super('Root',null)}destroy(){}onDestroy(){return''}Xe(){}};olympe.D.wh.ma=[olympe.D.wh];let Sa=0;
243
+ function Ta(a,b){a.ta||(a.ta=new Map);a.ta.set(b.Z(),b);switch(b.Od()){case olympe.D.Node.C.Dh:break;case olympe.D.Node.C.Rh:break;case olympe.D.Node.C.ak:case olympe.D.Node.C.gg:olympe.D.N.warn('Not bad as such but should not happen!');break;case olympe.D.Node.C.xh:Ua(a,olympe.D.Node.C.xh);break;case olympe.D.Node.C.OBSOLETE:a.od=!0;a.L!==olympe.D.Node.C.xh&&Ua(a,olympe.D.Node.C.OBSOLETE);break;case olympe.D.Node.C.fg:olympe.D.N.warn('Adding a destroyed node as upstream => should never happen!');break;
244
244
  default:olympe.D.N.warn('Unknown state, investigate: ',b.Od())}Va(b,a)}
245
- function Wa(a){if(a.zd){var b=[],c=[];if(a.Yf)if(a.Yf instanceof olympe.D.Node)if(Xa(a.Yf))b=a.Yf.Kb;else return;else b=a.Yf;else b=null;if(null!==a.Va){const e=a.ug;for(let f=0,g=a.Va.length;f<g;f++)if(null!==e&&-1<e.indexOf(f)){const h=a.Va[f];if(Xa(h))c.push(h.Kb);else return}else c.push(a.Va[f])}if(a.zd instanceof Function)var d=a.zd;else b&&(b[a.zd]||olympe.D.N.warn('looks like you forget a cast somewhere around '+a.zd),d=b[a.zd]);a.run(()=>{a.Ka();if(void 0!==d){const e=d.apply(b,c);e&&e.jr?
245
+ function Wa(a){if(a.zd){var b=[],c=[];if(a.Yf)if(a.Yf instanceof olympe.D.Node)if(Xa(a.Yf))b=a.Yf.Kb;else return;else b=a.Yf;else b=null;if(null!==a.Va){const e=a.ug;for(let f=0,g=a.Va.length;f<g;f++)if(null!==e&&-1<e.indexOf(f)){const h=a.Va[f];if(Xa(h))c.push(h.Kb);else return}else c.push(a.Va[f])}if(a.zd instanceof Function)var d=a.zd;else b&&(b[a.zd]||olympe.D.N.warn('looks like you forget a cast somewhere around '+a.zd),d=b[a.zd]);a.run(()=>{a.Ka();if(void 0!==d){const e=d.apply(b,c);e&&e.ir?
246
246
  Ya(a,e.Pa):e instanceof olympe.D.Node?Ya(a,e):(K(a,e),void 0===e&&void 0===a.valueType&&Ua(a,olympe.D.Node.C.Rh))}else Za(a)})}}function L(a){void 0===a.vd&&(a.vd=a.valueType===olympe.D.Proxy?$a(void 0,a.fe):$a(a.valueType,a.fe),a.vd.Pa=a);return a.vd}function ab(a){void 0!==a.W&&(bb(a.W,a),a.W=void 0)}function cb(a){if(a.L===olympe.D.Node.C.OBSOLETE&&(a.L=olympe.D.Node.C.Rh,null!==a.da))for(const b of a.da.values())db(b)}function Ua(a,b){b!==a.L&&(a.L=b)}
247
- function eb(a){if(a.L!==olympe.D.Node.C.OBSOLETE&&a.L!==olympe.D.Node.C.bk&&a.L!==olympe.D.Node.C.Dh&&a.L!==olympe.D.Node.C.xh){Ua(a,olympe.D.Node.C.bk);var b=a.da;if(b)for(const c of b.values())b.has(c.Z())&&eb(c);Ua(a,olympe.D.Node.C.OBSOLETE)}}function fb(a,b,c){if(a.L!==olympe.D.Node.C.gg)if(b===a.W)K(a,c,!0);else{if(a.L===olympe.D.Node.C.OBSOLETE||a.L===olympe.D.Node.C.bk)a.od=!0;Wa(a)}}
247
+ function eb(a){if(a.L!==olympe.D.Node.C.OBSOLETE&&a.L!==olympe.D.Node.C.ak&&a.L!==olympe.D.Node.C.Dh&&a.L!==olympe.D.Node.C.xh){Ua(a,olympe.D.Node.C.ak);var b=a.da;if(b)for(const c of b.values())b.has(c.Z())&&eb(c);Ua(a,olympe.D.Node.C.OBSOLETE)}}function fb(a,b,c){if(a.L!==olympe.D.Node.C.gg)if(b===a.W)K(a,c,!0);else{if(a.L===olympe.D.Node.C.OBSOLETE||a.L===olympe.D.Node.C.ak)a.od=!0;Wa(a)}}
248
248
  function K(a,b,c){b instanceof olympe.D.Node&&(olympe.D.N.warn('We are setting the value of a node as a node, that should never happen?'),b=b.Kb);a.bc||c||void 0===a.W||ab(a);if(void 0!==b){if((a.bc||a.L===olympe.D.Node.C.Rh||a.L===olympe.D.Node.C.OBSOLETE)&&!olympe.D.nb(b)&&void 0!==a.Kb){if(null===b&&null===a.Kb){cb(a);return}if(null!==b&&null!==a.Kb&&(b.valueOf()===a.Kb.valueOf()||a.Kb.mb&&a.Kb.mb(b))){cb(a);return}}if(!0===a.bc)olympe.D.N.error("Circular dependency detected: updating a downstream node caused this node's (#"+
249
249
  a.Z()+') value to get updated !');else{a.L===olympe.D.Node.C.fg&&olympe.D.N.warn(`trying to set a value on a destroyed node (#${a.Z()} ${a.wd?', '+a.wd:''})`);a.L===olympe.D.Node.C.gg&&olympe.D.N.warn(`trying to set a value on a node being destroyed (#${a.Z()} ${a.wd?', '+a.wd:''})`);a.bc=!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,c instanceof
250
250
  Object?d=!0:b.toLowerCase()!==e.toLowerCase()&&a.valueType!==Object&&(d=!0),d&&('string'===b.toLowerCase()&&a.valueType===olympe.D.Za?(c=olympe.D.yb(c),d=!1):'number'===b.toLowerCase()&&a.valueType===olympe.D.ga?(c=olympe.D.Ba(c),d=!1):'boolean'===b.toLowerCase()&&a.valueType===olympe.D.sa&&(c=olympe.D.wc(c),d=!1)));a.Kb=c;Ua(a,olympe.D.Node.C.Rh);if(b=a.da){d=0;for(const f of b.values())0<d&&eb(f),d++;for(const f of b.values())fb(f,a,c)}a.bc=!1}}}
251
251
  function gb(a,b){if(a.L!==olympe.D.Node.C.gg&&a.L!==olympe.D.Node.C.fg&&(a.L!==olympe.D.Node.C.Dh||a.zd)){var c=void 0!==a.defaultValue;a.zd&&b!==a.W&&a.Ka();if(c)K(a,a.defaultValue,!0);else if(a.Kb=void 0,Ua(a,olympe.D.Node.C.Dh),b=a.da)for(const d of b.values())gb(d,a)}}function Za(a){if(a.L!==olympe.D.Node.C.xh){Ua(a,olympe.D.Node.C.xh);var b=a.da;if(b)for(const c of b.values())Za(c);a.Ka();void 0!==a.W&&ab(a);a.Kb=a.defaultValue}}function Xa(a){return a.L===olympe.D.Node.C.Rh}
252
252
  function Ya(a,b){b===a?olympe.D.N.error('Setting a node as provider of itself. Ignoring'):(a.W&&a.W!==b&&ab(a),Va(b,a),Xa(b)?K(a,b.Kb,!0):void 0!==a.defaultValue?K(a,a.defaultValue,!0):gb(a),a.W=b)}function hb(a,b){a.zd&&(a.zd=void 0);a.wd='Repeater';Ya(a,b)}function db(a){a.W?cb(a):null!==a.ta&&0===Array.from(a.ta.values()).filter(b=>!Xa(b)).length&&(a.od&&(a.od=!1,Wa(a)),cb(a))}
253
253
  function Va(a,b){a.da||(a.da=new Map);a.da.set(b.Z(),b);a.L===olympe.D.Node.C.fg&&olympe.D.N.warn('adding a downstream node on a deleted one (#'+a.Z()+') !')}function bb(a,b){a.da&&(b=b.Z(),a.da.has(b)&&(a.da.delete(b),ib(a)))}function ib(a){if(null===a.getParent()){var b=a.da;b&&0<b.size||a.destroy()}}
254
- olympe.D.Node=class extends olympe.D.Zb{constructor({valueType:a,zd:b,my:c=!0,Yf:d,Ym:e,debug:f=!1,ug:g=null,wd:h='Node',Ui:k}={}){++Sa;super(String(Sa));this.debug=!!f;this.wd=h;h&&'string'===typeof h||(b?this.wd=b.name?b.name:'anon()':this.wd='Node');this.Va=e&&0<e.length?e:null;this.ug=g&&0<g.length?g:null;this.valueType=a;this.Kb=void 0;this.bc=!1;this.L=olympe.D.Node.C.Dh;this.od=!1;this.da=this.ta=null;this.zd=b;this.Yf=d||null;this.defaultValue=this.vd=this.W=void 0;this.Ui=k;d&&d instanceof
254
+ olympe.D.Node=class extends olympe.D.Zb{constructor({valueType:a,zd:b,ly:c=!0,Yf:d,Xm:e,debug:f=!1,ug:g=null,wd:h='Node',Ui:k}={}){++Sa;super(String(Sa));this.debug=!!f;this.wd=h;h&&'string'===typeof h||(b?this.wd=b.name?b.name:'anon()':this.wd='Node');this.Va=e&&0<e.length?e:null;this.ug=g&&0<g.length?g:null;this.valueType=a;this.Kb=void 0;this.bc=!1;this.L=olympe.D.Node.C.Dh;this.od=!1;this.da=this.ta=null;this.zd=b;this.Yf=d||null;this.defaultValue=this.vd=this.W=void 0;this.Ui=k;d&&d instanceof
255
255
  olympe.D.Node&&Ta(this,d);if(g)for(b=0;b<g.length;b++)a=e[g[b]],Ta(this,a);c&&Wa(this)}bf(a){this.defaultValue=a;this.L===olympe.D.Node.C.Dh&&K(this,a,!0);return this}Xi(a){this.valueType=a}Wb(){return this.valueType||Object}Od(){return this.L}G(){return this.L===olympe.D.Node.C.fg}$(){return this.L===olympe.D.Node.C.gg}fe(...a){if(this.Ui instanceof Function)return this.Ui(...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.Od();a!==olympe.D.Node.C.gg&&
256
- a!==olympe.D.Node.C.fg||olympe.D.N.warn('Calling a function on a destroyed node!!!',this);a=d.G();b=[];if(1===a.length&&-1===a[0])for(var g of e)olympe.D.nb(g)&&b.push(g.Pa);else for(let h=0,k=a.length;h<k;h++)g=a[h],f=e[g],void 0!==f&&null!==f&&f.zf&&(e[g]=f.Pa,b.push(g));return L(new olympe.D.Node({valueType:d.L(),zd:c,Yf:this,Ym:e,debug:!1,ug:b,wd:'Proxy.'+c+'()'}))}Ck(a){if(null===this.getParent())olympe.D.N.warn('context is undefined, investigate');else if(this.getParent()!==a){olympe.D.N.warn('Investigate a potential issue in creator-createe link: create node mismatch',
256
+ a!==olympe.D.Node.C.fg||olympe.D.N.warn('Calling a function on a destroyed node!!!',this);a=d.G();b=[];if(1===a.length&&-1===a[0])for(var g of e)olympe.D.nb(g)&&b.push(g.Pa);else for(let h=0,k=a.length;h<k;h++)g=a[h],f=e[g],void 0!==f&&null!==f&&f.zf&&(e[g]=f.Pa,b.push(g));return L(new olympe.D.Node({valueType:d.L(),zd:c,Yf:this,Xm:e,debug:!1,ug:b,wd:'Proxy.'+c+'()'}))}Bk(a){if(null===this.getParent())olympe.D.N.warn('context is undefined, investigate');else if(this.getParent()!==a){olympe.D.N.warn('Investigate a potential issue in creator-createe link: create node mismatch',
257
257
  a,this.getParent());return}this.We(null);ib(this)}destroy(){var a=this.L;if(a!==olympe.D.Node.C.gg&&a!==olympe.D.Node.C.fg){Ua(this,olympe.D.Node.C.gg);if(a=this.da){for(const c of a.values())if(a.has(c.Z())){var b=c;b.ta&&b.ta.delete(this.Z());b.W&&b.W.Z()===this.Z()?b.W=void 0:b.destroy()}a.clear()}this.da=null;super.destroy();if(this.ta){for(const c of this.ta.values())this.ta.has(c.Z())&&bb(c,this);this.ta.clear()}this.ta=null;this.W&&(bb(this.W,this),this.W=void 0);this.Kb=void 0;this.Va&&(this.Va.length=
258
- 0,this.Va=null);this.ug&&(this.ug.length=0,this.ug=null);this.Ui=this.zd=void 0;this.defaultValue=this.Yf=null;this.wd=`** Destroyed ** ${this.wd}`;Ua(this,olympe.D.Node.C.fg)}}Xc(){return this.wd}};olympe.D.Node.F='rootNode';olympe.D.Node.C={Dh:0,Rh:1,xh:3,bk:4,OBSOLETE:5,gg:6,fg:7};function $a(a,b){if('function'!==typeof a)return new olympe.D.Proxy(a,b);var c=olympe.D.Proxy.prototype;void 0===a.prototype&&olympe.D.N.error('investigate');c=Object.create(jb(c,a.prototype));c.yk=a;c.kr=b;return c}function jb(a,b){Object.prototype.hasOwnProperty.call(b,olympe.D.Proxy.Xl)||Object.defineProperty(b,olympe.D.Proxy.Xl,{enumerable:!1,configurable:!1,writable:!1,value:kb(a,b)});return b[olympe.D.Proxy.Xl]}
259
- function lb(a,b){if(a.yk!==b){a.yk=b;b.prototype||olympe.D.N.error('Cast not possible, provided type is not a valid type!');var c=jb(a,b.prototype);Object.setPrototypeOf?Object.setPrototypeOf(a,c):a.__proto__=c;a.Pa&&a.Pa.Xi(b)}}
260
- function kb(a,b){let c={};if(b.prototype)olympe.D.N.error('first level of prototyping, investigate');else if(b.__proto__)c=Object.create(jb(a,b.__proto__));else return olympe.D.Proxy.prototype;Object.getOwnPropertyNames(b).forEach(d=>{if('function'===typeof b[d]&&'__getReplacementFunction'!==d){var e=b[d].K;null===e||e&&e.R()?c[d]=function(...f){var g=this.Pa;if(g&&Xa(g)&&(g=g.Kb)&&g[d]&&'function'===typeof g[d])return g[d].apply(g,f)}:(e=e||b[d].__oSig__||olympe.D.J.$,c[d]=function(...f){f=this.kr.call(this.Pa,
258
+ 0,this.Va=null);this.ug&&(this.ug.length=0,this.ug=null);this.Ui=this.zd=void 0;this.defaultValue=this.Yf=null;this.wd=`** Destroyed ** ${this.wd}`;Ua(this,olympe.D.Node.C.fg)}}Xc(){return this.wd}};olympe.D.Node.F='rootNode';olympe.D.Node.C={Dh:0,Rh:1,xh:3,ak:4,OBSOLETE:5,gg:6,fg:7};function $a(a,b){if('function'!==typeof a)return new olympe.D.Proxy(a,b);var c=olympe.D.Proxy.prototype;void 0===a.prototype&&olympe.D.N.error('investigate');c=Object.create(jb(c,a.prototype));c.xk=a;c.jr=b;return c}function jb(a,b){Object.prototype.hasOwnProperty.call(b,olympe.D.Proxy.Wl)||Object.defineProperty(b,olympe.D.Proxy.Wl,{enumerable:!1,configurable:!1,writable:!1,value:kb(a,b)});return b[olympe.D.Proxy.Wl]}
259
+ function lb(a,b){if(a.xk!==b){a.xk=b;b.prototype||olympe.D.N.error('Cast not possible, provided type is not a valid type!');var c=jb(a,b.prototype);Object.setPrototypeOf?Object.setPrototypeOf(a,c):a.__proto__=c;a.Pa&&a.Pa.Xi(b)}}
260
+ function kb(a,b){let c={};if(b.prototype)olympe.D.N.error('first level of prototyping, investigate');else if(b.__proto__)c=Object.create(jb(a,b.__proto__));else return olympe.D.Proxy.prototype;Object.getOwnPropertyNames(b).forEach(d=>{if('function'===typeof b[d]&&'__getReplacementFunction'!==d){var e=b[d].K;null===e||e&&e.R()?c[d]=function(...f){var g=this.Pa;if(g&&Xa(g)&&(g=g.Kb)&&g[d]&&'function'===typeof g[d])return g[d].apply(g,f)}:(e=e||b[d].__oSig__||olympe.D.J.$,c[d]=function(...f){f=this.jr.call(this.Pa,
261
261
  ...f,e,d);const g=e.$;if(g){const h=this.Pa.Kb;h&&h[g]&&lb(f,h[g])}return e.W()?this:f})}});return c}function mb(a,b){K(a.Pa,b)}function nb(a){gb(a.Pa)}function ob(a){olympe.D.yc([olympe.D.sa.C],b=>{a.Pa.bf(b)},'setDefaultValue');return a}function pb(a,b){hb(a.Pa,olympe.D.Uf(b)?b:b.Pa)}function qb(a,b){olympe.D.nb(b)||olympe.D.Uf(b)?pb(a,b):mb(a,b)}
262
- olympe.D.Proxy=class{constructor(a,b){this.Pa=null;this.yk=a;this.kr=b}static nb(a){return!(!a||!a.zf)}mb(a){return olympe.D.Fa([this,a],(b,c)=>b===c,Boolean)}Pd(a){return olympe.D.Fa([this,a],(b,c)=>null===b||null===c?b===c?olympe.D.sa.F:olympe.D.sa.C:b.valueOf()===c.valueOf()?olympe.D.sa.F:olympe.D.sa.C,olympe.D.sa)}jr(){return this.Pa}};olympe.D.Proxy.Xl='__opp__';olympe.D.Proxy.prototype.zf=!0;function rb(a,b){a.node.bf(b);return a}olympe.D.Oj=class{constructor(a,b='FlowSource'){this.node=olympe.D.createNode(a,void 0,void 0,void 0,void 0,b)}update(a){olympe.D.nb(a)?K(this.node,olympe.D.$a(a)):K(this.node,a);return this}repeat(a){hb(this.node,olympe.D.nb(a)?a.Pa:a);return this}clear(){gb(this.node);return this}Ib(){return L(this.node)}};function sb(a,b,c=1E3,d,e){const f=olympe.D.Qc(olympe.D.ga),g=d||olympe.D.ga.uo.Cp;let h,k,l,n;f.update(olympe.D.Ba(a));const p=window.performance.now(),q=b.valueOf();l=q-a.valueOf();if(0!==l&&void 0===n){const r=()=>{f.node.G()||(l=q-a.valueOf(),k=(window.performance.now()-p)/c,1<=k&&(k=1,n=void 0),h=a.valueOf()+l*g(k,0,1,1),f.update(olympe.D.Ba(h)),1===k&&void 0!==e&&e(h),1>k&&(n=window.requestAnimationFrame(r)))};n=window.requestAnimationFrame(r)}return f.Ib()}
263
- olympe.D.ga=class{constructor(a){this.value=void 0===a||null===a?0:a}toJSON(){return'{ "type": "number", "value": '+JSON.stringify(this.value)+' }'}static lc(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return olympe.D.Ba(b.value)}xn(){return'number'===typeof this.value&&!isNaN(this.value)}isNaN(){return olympe.D.wc(!this.xn())}Rc(){return null===this.value||void 0===this.value||void 0===this.value.toString||isNaN(this.value)?olympe.D.yb(''):olympe.D.yb(this.value.toString())}toString(a,b){return void 0!==
264
- 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.xn()?this.valueOf().toFixed(a):''}static max(a){const b=new Map;let c=-Infinity;const d=olympe.D.Qc(olympe.D.ga,'ONumber.max result'),e=()=>{c=-Infinity;for(const f of b.values())f>c&&(c=f);d.update(olympe.D.Ba(c))};a.forEach((f,g)=>{olympe.D.yc([f],h=>{b.set(g,h.valueOf());e()})},f=>{if(!d.node.G()){var g=b.get(f);b.delete(f);g===c&&e()}});
265
- return d.Ib()}he(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.Ba(b.valueOf()+c.valueOf()),olympe.D.ga,'ONumber.plus')}qh(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.Ba(b.valueOf()-c.valueOf()),olympe.D.ga,'ONumber.minus')}round(){return olympe.D.Ba(Math.round(this.valueOf()))}vj(){return olympe.D.Ba(-this.valueOf())}Qk(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.Ba(b.valueOf()*c.valueOf()),olympe.D.ga,'ONumber.mul')}Yi(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.Ba(b.valueOf()/c.valueOf()),
266
- olympe.D.ga,'ONumber.div')}Jx(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.Ba(b.valueOf()%c.valueOf()),olympe.D.ga,'ONumber.div')}floor(){return olympe.D.Ba(Math.floor(this.valueOf()))}ceil(){return olympe.D.Ba(Math.ceil(this.valueOf()))}trunc(){return olympe.D.Ba(Math.trunc(this.valueOf()))}log(){return olympe.D.Ba(Math.log(this.valueOf()))}pow(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.Ba(Math.pow(b.valueOf(),c.valueOf())),olympe.D.ga,'ONumber.pow')}exp(){return olympe.D.Ba(Math.exp(this.valueOf()))}Pd(a){return olympe.D.Fa([this,
267
- a],(b,c)=>olympe.D.wc(b.mb(c)),olympe.D.sa,'ONumber.oEquals')}mb(a){return this.valueOf()===(void 0!==a&&null!==a?a.valueOf():void 0)}valueOf(){return void 0!==this.value?this.value.valueOf():void 0}Ow(){return this.valueOf()}$m(a){return olympe.D.Fa([this,a],(b,c)=>b.valueOf()>c.valueOf()?olympe.D.sa.F:olympe.D.sa.C,olympe.D.sa,'ONumber.isBiggerThan')}py(a){return olympe.D.Fa([this,a],(b,c)=>b.valueOf()>=c.valueOf()?b:olympe.D.Ba(c),olympe.D.ga,'ONumber.returnsBiggest')}Wr(a){return olympe.D.Fa([this,
268
- a],(b,c)=>b.valueOf()<=c.valueOf()?b:olympe.D.Ba(c),olympe.D.ga,'ONumber.returnsSmallest')}yx(a){return olympe.D.Fa([this,a],(b,c)=>b.valueOf()<c.valueOf()?olympe.D.sa.F:olympe.D.sa.C,olympe.D.sa,'ONumber.isSmallerThan')}sin(){return olympe.D.Ba(Math.sin(this.valueOf()))}cos(){return olympe.D.Ba(Math.cos(this.valueOf()))}atan2(a){return olympe.D.nb(a)?olympe.D.ie([a],b=>olympe.D.Ba(Math.atan2(this.valueOf(),b.valueOf())),olympe.D.ga):olympe.D.Ba(Math.atan2(this.valueOf(),a.valueOf()))}abs(){return olympe.D.Ba(Math.abs(this.valueOf()))}mj(a,
269
- b){return olympe.D.nb(a)||olympe.D.nb(b)?olympe.D.ie([a,b],(c,d)=>olympe.D.Ba(this.valueOf()*d.valueOf()+c.valueOf()*(1-d.valueOf())),olympe.D.ga):olympe.D.Ba(this.valueOf()*b.valueOf()+a.valueOf()*(1-b.valueOf()))}static mv(a,b,c,d){'number'===typeof a&&(a=olympe.D.ge(a));'number'===typeof b&&(b=olympe.D.ge(b));'number'===typeof c&&(c=olympe.D.ge(c));let e=0;const f=olympe.D.ge(0);let g,h;void 0!==b&&void 0!==c&&olympe.D.Xm(b.$m(c),()=>{olympe.ra.Ya('df').warn('You have a min bigger than max, cap your inputs')});
270
- const k=(l,n)=>{n=olympe.D.ge(n);const p=olympe.D.ga.animate(n,500);pb(f,p);mb(n,olympe.D.Ba(l));e=l};olympe.D.ie([a],l=>{e+=l.valueOf();e>h?k(h,e):e<g?k(g,e):pb(f,olympe.D.ge(e))},olympe.D.ga);void 0!==b&&olympe.D.Uk(b.valueOf(),l=>{if(g!==l&&(g=l,g>e)){const n=olympe.D.ge(e),p=olympe.D.ga.animate(n,400,d);l=olympe.D.Ba(g);K(n.Pa,l);e=g;pb(f,p)}});void 0!==c&&olympe.D.Uk(c.valueOf(),l=>{if(h!==l&&(h=l,h<e)){const n=olympe.D.ge(e),p=olympe.D.ga.animate(n,400,d);l=olympe.D.Ba(h);K(n.Pa,l);e=h;pb(f,
271
- p)}});return f}static offset(a){let b;return olympe.D.ie([a],c=>{void 0===b&&(b=c);return olympe.D.Ba(c-b)},olympe.D.ga,'offset')}static Ar(a){let b,c,d;return olympe.D.Fa([a],e=>{if(void 0===b)return b=e,c=window.performance.now(),olympe.D.Ba(0);d=window.performance.now();const f=olympe.D.Ba((e.valueOf()-b.valueOf())/(d-c));b=e;c=d;return f},olympe.D.ga,'derivative')}static tx(a){let b=olympe.D.Ba(0),c,d,e;return olympe.D.Fa([a],f=>{if(void 0===c)return c=f,d=window.performance.now(),olympe.D.Ba(0);
272
- e=window.performance.now();b=b.he((f.valueOf()+c.valueOf())/2*(e-d));c=f;d=e;return b},olympe.D.ga,'integrate')}static Sv(a){let b;return olympe.D.Fa([a],c=>{void 0===b&&(b=c.valueOf());const d=olympe.D.Ba(c.valueOf()-b.valueOf());b=c;return d},olympe.D.ga,'diff')}static Gv(a,b,c){return olympe.D.ie([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.D.Ba(d>=e?d<=f?d:f:e)},olympe.D.ga)}static animate(a,b,c,d){let e;
273
- return e=olympe.D.Fa([a],f=>{const g=olympe.D.$a(b,1E3),h=olympe.D.$a(e);return void 0===h?olympe.D.Ba(f):sb(h,f,g,c,k=>{d&&d(k)})},olympe.D.ga)}static yv(a,b,c){let d,e,f,g,h,k,l=olympe.D.ge(),n;olympe.D.yc([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);mb(l,olympe.D.Ba(g));1===h&&(clearTimeout(n),n=void 0)},0))});return l}static Rc(a){return olympe.D.nb(a)?
274
- olympe.D.Fa([a],b=>olympe.D.yb(b.valueOf().toString()),olympe.D.Za):olympe.D.yb(a)}static vj(a){return olympe.D.nb(a)?olympe.D.Fa([a],b=>olympe.D.Ba(-b.valueOf()),olympe.D.ga):olympe.D.Ba(-a.valueOf())}static he(a,b){return olympe.D.nb(a)||olympe.D.nb(b)?olympe.D.Fa([a,b],(c,d)=>olympe.D.Ba(c.valueOf()+d.valueOf()),olympe.D.ga,'plus'):olympe.D.Ba(a.valueOf()+b.valueOf())}static qh(a,b){return olympe.D.nb(a)||olympe.D.nb(b)?olympe.D.ie([a,b],(c,d)=>olympe.D.Ba(c.valueOf()-d.valueOf()),olympe.D.ga,
275
- 'minus'):olympe.D.Ba(a.valueOf()-b.valueOf())}static Yi(a,b){return olympe.D.nb(a)||olympe.D.nb(b)?olympe.D.ie([a,b],(c,d)=>olympe.D.Ba(c.valueOf()/d.valueOf()),olympe.D.ga,'div'):olympe.D.Ba(a.valueOf()/b.valueOf())}static ky(a,b){if(void 0===b)return a;olympe.D.yc([b],c=>{c=olympe.D.Ba(a.Pa.Kb.valueOf()+c.valueOf());K(a.Pa,c)},'plusEqual');return a}};olympe.D.ga.ZERO=new olympe.D.ga(0);olympe.D.ga.ONE=new olympe.D.ga(1);olympe.D.ga.bv=new olympe.D.ga(2);olympe.D.ga.PI=new olympe.D.ga(Math.PI);
276
- olympe.D.ga.kt=new olympe.D.ga(Infinity);olympe.D.ga.du=new olympe.D.ga(-Infinity);olympe.D.ga.Lp=new olympe.D.ga(NaN);olympe.D.ga.NA=olympe.D.ga.ky;olympe.D.ga.Uy=olympe.D.ga.mv;olympe.D.ga.DA=olympe.D.ga.offset;olympe.D.ga.wz=olympe.D.ga.Ar;olympe.D.ga.PC=olympe.D.ga.Ar;olympe.D.ga.nA=olympe.D.ga.tx;olympe.D.ga.xz=olympe.D.ga.Sv;olympe.D.ga.iz=olympe.D.ga.Gv;olympe.D.ga.Vy=olympe.D.ga.animate;olympe.D.ga.Wy=olympe.D.ga.yv;olympe.D.ga.bC=olympe.D.ga.Rc;olympe.D.ga.cC=olympe.D.ga.vj;
277
- olympe.D.ga.MA=olympe.D.ga.he;olympe.D.ga.yA=olympe.D.ga.qh;olympe.D.ga.yz=olympe.D.ga.Yi;
278
- olympe.D.ga.uo={Cp:function(a,b,c,d){return c*a/d+b},Rz:function(a,b,c,d){a/=d;return c*a*a+b},aA:function(a,b,c,d){a/=d;return-c*a*(a-2)+b},Nz: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},Gz:function(a,b,c,d){a/=d;return c*a*a*a+b},Xz:function(a,b,c,d){a/=d;a--;return c*(a*a*a+1)+b},Lz: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},Sz:function(a,b,c,d){a/=d;return c*a*a*a*a+b},bA:function(a,b,c,d){a/=d;a--;return-c*(a*a*a*a-1)+b},
279
- Oz: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},Tz:function(a,b,c,d){a/=d;return c*a*a*a*a*a+b},cA:function(a,b,c,d){a/=d;a--;return c*(a*a*a*a*a+1)+b},Pz: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},Uz:function(a,b,c,d){return-c*Math.cos(a/d*(Math.PI/2))+c+b},dA:function(a,b,c,d){return c*Math.sin(a/d*(Math.PI/2))+b},Qz:function(a,b,c,d){return-c/2*(Math.cos(Math.PI*a/d)-1)+b},Jz:function(a,b,c,d){return c*Math.pow(2,
280
- 10*(a/d-1))+b},$z:function(a,b,c,d){return c*(-Math.pow(2,-10*a/d)+1)+b},Mz: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},Fz:function(a,b,c,d){a/=d;return-c*(Math.sqrt(1-a*a)-1)+b},Wz:function(a,b,c,d){a/=d;a--;return c*Math.sqrt(1-a*a)+b},Kz: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},Az:function(a,b,c,d){d=(a/=d)*a;return b+c*(4*d*a+-3*d)},Bz:function(a,b,c,d){d=(a/=d)*a;return b+
281
- c*(2*d*d+2*d*a+-3*d)},Cz:function(a,b,c,d){d=(a/=d)*a;return b+c*(4*d*a+-9*d+6*a)},Dz:function(a,b,c,d){d=(a/=d)*a;return b+c*(-2*d*d+10*d*a+-15*d+8*a)},Zz: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)},Yz: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)},Iz:function(a,b,c,d){d=(a/=d)*a;a*=d;return b+c*(33*a*d+-59*d*d+32*a+-5*d)},Hz:function(a,b,c,d){d=(a/=d)*a;a*=d;return b+c*(56*a*d+-105*d*d+60*a+-10*d)},Vz:function(a,
282
- 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},Ez: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}};m=olympe.D.ga.prototype;m.toJSON.K=olympe.D.J.C;m.xn.K=olympe.D.J.C;m.isNaN.K=olympe.D.J.R;m.Rc.K=olympe.D.J.F;
283
- m.toString.K=new olympe.D.J(()=>String,[]);m.toFixed.K=new olympe.D.J(()=>String,[]);m.he.K=new olympe.D.J(()=>olympe.D.ga,[0]);m.qh.K=new olympe.D.J(()=>olympe.D.ga,[0]);m.round.K=olympe.D.J.G;m.vj.K=olympe.D.J.G;m.Qk.K=new olympe.D.J(()=>olympe.D.ga,[0]);m.Yi.K=new olympe.D.J(()=>olympe.D.ga,[0]);m.Jx.K=new olympe.D.J(()=>olympe.D.ga,[0]);m.floor.K=olympe.D.J.G;m.ceil.K=olympe.D.J.G;m.trunc.K=olympe.D.J.G;m.log.K=olympe.D.J.G;m.pow.K=new olympe.D.J(()=>olympe.D.ga,[0]);m.exp.K=olympe.D.J.G;
284
- m.Pd.K=new olympe.D.J(()=>olympe.D.sa,[0]);m.mb.K=olympe.D.J.C;m.valueOf.K=olympe.D.J.C;m.Ow.K=olympe.D.J.C;m.$m.K=new olympe.D.J(()=>olympe.D.sa,[0]);m.py.K=new olympe.D.J(()=>olympe.D.ga,[0]);m.Wr.K=new olympe.D.J(()=>olympe.D.ga,[0]);m.yx.K=new olympe.D.J(()=>olympe.D.sa,[0]);m.sin.K=olympe.D.J.G;m.cos.K=olympe.D.J.G;m.atan2.K=new olympe.D.J(()=>olympe.D.ga,[0]);m.abs.K=olympe.D.J.G;m.mj.K=new olympe.D.J(()=>olympe.D.ga,[0,1]);olympe.D.Za=class{constructor(a){this.value=a}toJSON(){return'{ "type": "string", "value": '+JSON.stringify(this.value)+' }'}static lc(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return olympe.D.yb(b.value)}vr(a){return olympe.D.Za.concat(this,'.',a)}concat(...a){let b;Array.isArray(a[0])?b=a[0]:b=a;return olympe.D.Fa([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.D.yb(d)},olympe.D.Za,'OString.concat')}Rc(){return this}Ny(a){return olympe.D.Ba(parseInt(this.value,
285
- a))}bs(){return olympe.D.Ba(parseFloat(this.value))}toString(){return this.value}valueOf(){return this.value.valueOf()}mb(a){return this.value===(void 0===a||null===a?void 0:a.valueOf())}Pd(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.wc(c&&b.valueOf()===c.valueOf()),olympe.D.sa,'OString.oEquals')}Sf(){return olympe.D.wc(!this.value||0===this.value.length)}contains(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.wc((c instanceof olympe.D.Za||'string'===typeof c)&&b.valueOf().includes(c.valueOf())),
262
+ olympe.D.Proxy=class{constructor(a,b){this.Pa=null;this.xk=a;this.jr=b}static nb(a){return!(!a||!a.zf)}mb(a){return olympe.D.Fa([this,a],(b,c)=>b===c,Boolean)}Pd(a){return olympe.D.Fa([this,a],(b,c)=>null===b||null===c?b===c?olympe.D.sa.F:olympe.D.sa.C:b.valueOf()===c.valueOf()?olympe.D.sa.F:olympe.D.sa.C,olympe.D.sa)}ir(){return this.Pa}};olympe.D.Proxy.Wl='__opp__';olympe.D.Proxy.prototype.zf=!0;function rb(a,b){a.node.bf(b);return a}olympe.D.Nj=class{constructor(a,b='FlowSource'){this.node=olympe.D.createNode(a,void 0,void 0,void 0,void 0,b)}update(a){olympe.D.nb(a)?K(this.node,olympe.D.$a(a)):K(this.node,a);return this}repeat(a){hb(this.node,olympe.D.nb(a)?a.Pa:a);return this}clear(){gb(this.node);return this}Ib(){return L(this.node)}};function sb(a,b,c=1E3,d,e){const f=olympe.D.Qc(olympe.D.ga),g=d||olympe.D.ga.to.Bp;let h,k,l,n;f.update(olympe.D.Ba(a));const p=window.performance.now(),q=b.valueOf();l=q-a.valueOf();if(0!==l&&void 0===n){const r=()=>{f.node.G()||(l=q-a.valueOf(),k=(window.performance.now()-p)/c,1<=k&&(k=1,n=void 0),h=a.valueOf()+l*g(k,0,1,1),f.update(olympe.D.Ba(h)),1===k&&void 0!==e&&e(h),1>k&&(n=window.requestAnimationFrame(r)))};n=window.requestAnimationFrame(r)}return f.Ib()}
263
+ olympe.D.ga=class{constructor(a){this.value=void 0===a||null===a?0:a}toJSON(){return'{ "type": "number", "value": '+JSON.stringify(this.value)+' }'}static lc(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return olympe.D.Ba(b.value)}wn(){return'number'===typeof this.value&&!isNaN(this.value)}isNaN(){return olympe.D.wc(!this.wn())}Rc(){return null===this.value||void 0===this.value||void 0===this.value.toString||isNaN(this.value)?olympe.D.yb(''):olympe.D.yb(this.value.toString())}toString(a,b){return void 0!==
264
+ 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.wn()?this.valueOf().toFixed(a):''}static max(a){const b=new Map;let c=-Infinity;const d=olympe.D.Qc(olympe.D.ga,'ONumber.max result'),e=()=>{c=-Infinity;for(const f of b.values())f>c&&(c=f);d.update(olympe.D.Ba(c))};a.forEach((f,g)=>{olympe.D.yc([f],h=>{b.set(g,h.valueOf());e()})},f=>{if(!d.node.G()){var g=b.get(f);b.delete(f);g===c&&e()}});
265
+ return d.Ib()}he(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.Ba(b.valueOf()+c.valueOf()),olympe.D.ga,'ONumber.plus')}qh(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.Ba(b.valueOf()-c.valueOf()),olympe.D.ga,'ONumber.minus')}round(){return olympe.D.Ba(Math.round(this.valueOf()))}uj(){return olympe.D.Ba(-this.valueOf())}Pk(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.Ba(b.valueOf()*c.valueOf()),olympe.D.ga,'ONumber.mul')}Yi(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.Ba(b.valueOf()/c.valueOf()),
266
+ olympe.D.ga,'ONumber.div')}Ix(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.Ba(b.valueOf()%c.valueOf()),olympe.D.ga,'ONumber.div')}floor(){return olympe.D.Ba(Math.floor(this.valueOf()))}ceil(){return olympe.D.Ba(Math.ceil(this.valueOf()))}trunc(){return olympe.D.Ba(Math.trunc(this.valueOf()))}log(){return olympe.D.Ba(Math.log(this.valueOf()))}pow(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.Ba(Math.pow(b.valueOf(),c.valueOf())),olympe.D.ga,'ONumber.pow')}exp(){return olympe.D.Ba(Math.exp(this.valueOf()))}Pd(a){return olympe.D.Fa([this,
267
+ a],(b,c)=>olympe.D.wc(b.mb(c)),olympe.D.sa,'ONumber.oEquals')}mb(a){return this.valueOf()===(void 0!==a&&null!==a?a.valueOf():void 0)}valueOf(){return void 0!==this.value?this.value.valueOf():void 0}Nw(){return this.valueOf()}Zm(a){return olympe.D.Fa([this,a],(b,c)=>b.valueOf()>c.valueOf()?olympe.D.sa.F:olympe.D.sa.C,olympe.D.sa,'ONumber.isBiggerThan')}oy(a){return olympe.D.Fa([this,a],(b,c)=>b.valueOf()>=c.valueOf()?b:olympe.D.Ba(c),olympe.D.ga,'ONumber.returnsBiggest')}Vr(a){return olympe.D.Fa([this,
268
+ a],(b,c)=>b.valueOf()<=c.valueOf()?b:olympe.D.Ba(c),olympe.D.ga,'ONumber.returnsSmallest')}xx(a){return olympe.D.Fa([this,a],(b,c)=>b.valueOf()<c.valueOf()?olympe.D.sa.F:olympe.D.sa.C,olympe.D.sa,'ONumber.isSmallerThan')}sin(){return olympe.D.Ba(Math.sin(this.valueOf()))}cos(){return olympe.D.Ba(Math.cos(this.valueOf()))}atan2(a){return olympe.D.nb(a)?olympe.D.ie([a],b=>olympe.D.Ba(Math.atan2(this.valueOf(),b.valueOf())),olympe.D.ga):olympe.D.Ba(Math.atan2(this.valueOf(),a.valueOf()))}abs(){return olympe.D.Ba(Math.abs(this.valueOf()))}mj(a,
269
+ b){return olympe.D.nb(a)||olympe.D.nb(b)?olympe.D.ie([a,b],(c,d)=>olympe.D.Ba(this.valueOf()*d.valueOf()+c.valueOf()*(1-d.valueOf())),olympe.D.ga):olympe.D.Ba(this.valueOf()*b.valueOf()+a.valueOf()*(1-b.valueOf()))}static kv(a,b,c,d){'number'===typeof a&&(a=olympe.D.ge(a));'number'===typeof b&&(b=olympe.D.ge(b));'number'===typeof c&&(c=olympe.D.ge(c));let e=0;const f=olympe.D.ge(0);let g,h;void 0!==b&&void 0!==c&&olympe.D.Wm(b.Zm(c),()=>{olympe.ra.Ya('df').warn('You have a min bigger than max, cap your inputs')});
270
+ const k=(l,n)=>{n=olympe.D.ge(n);const p=olympe.D.ga.animate(n,500);pb(f,p);mb(n,olympe.D.Ba(l));e=l};olympe.D.ie([a],l=>{e+=l.valueOf();e>h?k(h,e):e<g?k(g,e):pb(f,olympe.D.ge(e))},olympe.D.ga);void 0!==b&&olympe.D.Tk(b.valueOf(),l=>{if(g!==l&&(g=l,g>e)){const n=olympe.D.ge(e),p=olympe.D.ga.animate(n,400,d);l=olympe.D.Ba(g);K(n.Pa,l);e=g;pb(f,p)}});void 0!==c&&olympe.D.Tk(c.valueOf(),l=>{if(h!==l&&(h=l,h<e)){const n=olympe.D.ge(e),p=olympe.D.ga.animate(n,400,d);l=olympe.D.Ba(h);K(n.Pa,l);e=h;pb(f,
271
+ p)}});return f}static offset(a){let b;return olympe.D.ie([a],c=>{void 0===b&&(b=c);return olympe.D.Ba(c-b)},olympe.D.ga,'offset')}static zr(a){let b,c,d;return olympe.D.Fa([a],e=>{if(void 0===b)return b=e,c=window.performance.now(),olympe.D.Ba(0);d=window.performance.now();const f=olympe.D.Ba((e.valueOf()-b.valueOf())/(d-c));b=e;c=d;return f},olympe.D.ga,'derivative')}static sx(a){let b=olympe.D.Ba(0),c,d,e;return olympe.D.Fa([a],f=>{if(void 0===c)return c=f,d=window.performance.now(),olympe.D.Ba(0);
272
+ e=window.performance.now();b=b.he((f.valueOf()+c.valueOf())/2*(e-d));c=f;d=e;return b},olympe.D.ga,'integrate')}static Rv(a){let b;return olympe.D.Fa([a],c=>{void 0===b&&(b=c.valueOf());const d=olympe.D.Ba(c.valueOf()-b.valueOf());b=c;return d},olympe.D.ga,'diff')}static Fv(a,b,c){return olympe.D.ie([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.D.Ba(d>=e?d<=f?d:f:e)},olympe.D.ga)}static animate(a,b,c,d){let e;
273
+ return e=olympe.D.Fa([a],f=>{const g=olympe.D.$a(b,1E3),h=olympe.D.$a(e);return void 0===h?olympe.D.Ba(f):sb(h,f,g,c,k=>{d&&d(k)})},olympe.D.ga)}static xv(a,b,c){let d,e,f,g,h,k,l=olympe.D.ge(),n;olympe.D.yc([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);mb(l,olympe.D.Ba(g));1===h&&(clearTimeout(n),n=void 0)},0))});return l}static Rc(a){return olympe.D.nb(a)?
274
+ olympe.D.Fa([a],b=>olympe.D.yb(b.valueOf().toString()),olympe.D.Za):olympe.D.yb(a)}static uj(a){return olympe.D.nb(a)?olympe.D.Fa([a],b=>olympe.D.Ba(-b.valueOf()),olympe.D.ga):olympe.D.Ba(-a.valueOf())}static he(a,b){return olympe.D.nb(a)||olympe.D.nb(b)?olympe.D.Fa([a,b],(c,d)=>olympe.D.Ba(c.valueOf()+d.valueOf()),olympe.D.ga,'plus'):olympe.D.Ba(a.valueOf()+b.valueOf())}static qh(a,b){return olympe.D.nb(a)||olympe.D.nb(b)?olympe.D.ie([a,b],(c,d)=>olympe.D.Ba(c.valueOf()-d.valueOf()),olympe.D.ga,
275
+ 'minus'):olympe.D.Ba(a.valueOf()-b.valueOf())}static Yi(a,b){return olympe.D.nb(a)||olympe.D.nb(b)?olympe.D.ie([a,b],(c,d)=>olympe.D.Ba(c.valueOf()/d.valueOf()),olympe.D.ga,'div'):olympe.D.Ba(a.valueOf()/b.valueOf())}static jy(a,b){if(void 0===b)return a;olympe.D.yc([b],c=>{c=olympe.D.Ba(a.Pa.Kb.valueOf()+c.valueOf());K(a.Pa,c)},'plusEqual');return a}};olympe.D.ga.ZERO=new olympe.D.ga(0);olympe.D.ga.ONE=new olympe.D.ga(1);olympe.D.ga.av=new olympe.D.ga(2);olympe.D.ga.PI=new olympe.D.ga(Math.PI);
276
+ olympe.D.ga.jt=new olympe.D.ga(Infinity);olympe.D.ga.cu=new olympe.D.ga(-Infinity);olympe.D.ga.Kp=new olympe.D.ga(NaN);olympe.D.ga.MA=olympe.D.ga.jy;olympe.D.ga.Ty=olympe.D.ga.kv;olympe.D.ga.CA=olympe.D.ga.offset;olympe.D.ga.vz=olympe.D.ga.zr;olympe.D.ga.OC=olympe.D.ga.zr;olympe.D.ga.mA=olympe.D.ga.sx;olympe.D.ga.wz=olympe.D.ga.Rv;olympe.D.ga.hz=olympe.D.ga.Fv;olympe.D.ga.Uy=olympe.D.ga.animate;olympe.D.ga.Vy=olympe.D.ga.xv;olympe.D.ga.aC=olympe.D.ga.Rc;olympe.D.ga.bC=olympe.D.ga.uj;
277
+ olympe.D.ga.LA=olympe.D.ga.he;olympe.D.ga.xA=olympe.D.ga.qh;olympe.D.ga.xz=olympe.D.ga.Yi;
278
+ olympe.D.ga.to={Bp:function(a,b,c,d){return c*a/d+b},Qz:function(a,b,c,d){a/=d;return c*a*a+b},$z:function(a,b,c,d){a/=d;return-c*a*(a-2)+b},Mz: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},Fz:function(a,b,c,d){a/=d;return c*a*a*a+b},Wz:function(a,b,c,d){a/=d;a--;return c*(a*a*a+1)+b},Kz: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},Rz:function(a,b,c,d){a/=d;return c*a*a*a*a+b},aA:function(a,b,c,d){a/=d;a--;return-c*(a*a*a*a-1)+b},
279
+ Nz: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},Sz:function(a,b,c,d){a/=d;return c*a*a*a*a*a+b},bA:function(a,b,c,d){a/=d;a--;return c*(a*a*a*a*a+1)+b},Oz: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},Tz:function(a,b,c,d){return-c*Math.cos(a/d*(Math.PI/2))+c+b},cA:function(a,b,c,d){return c*Math.sin(a/d*(Math.PI/2))+b},Pz:function(a,b,c,d){return-c/2*(Math.cos(Math.PI*a/d)-1)+b},Iz:function(a,b,c,d){return c*Math.pow(2,
280
+ 10*(a/d-1))+b},Zz:function(a,b,c,d){return c*(-Math.pow(2,-10*a/d)+1)+b},Lz: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},Ez:function(a,b,c,d){a/=d;return-c*(Math.sqrt(1-a*a)-1)+b},Vz:function(a,b,c,d){a/=d;a--;return c*Math.sqrt(1-a*a)+b},Jz: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},zz:function(a,b,c,d){d=(a/=d)*a;return b+c*(4*d*a+-3*d)},Az:function(a,b,c,d){d=(a/=d)*a;return b+
281
+ c*(2*d*d+2*d*a+-3*d)},Bz:function(a,b,c,d){d=(a/=d)*a;return b+c*(4*d*a+-9*d+6*a)},Cz:function(a,b,c,d){d=(a/=d)*a;return b+c*(-2*d*d+10*d*a+-15*d+8*a)},Yz: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)},Xz: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)},Hz:function(a,b,c,d){d=(a/=d)*a;a*=d;return b+c*(33*a*d+-59*d*d+32*a+-5*d)},Gz:function(a,b,c,d){d=(a/=d)*a;a*=d;return b+c*(56*a*d+-105*d*d+60*a+-10*d)},Uz:function(a,
282
+ 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},Dz: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}};m=olympe.D.ga.prototype;m.toJSON.K=olympe.D.J.C;m.wn.K=olympe.D.J.C;m.isNaN.K=olympe.D.J.R;m.Rc.K=olympe.D.J.F;
283
+ m.toString.K=new olympe.D.J(()=>String,[]);m.toFixed.K=new olympe.D.J(()=>String,[]);m.he.K=new olympe.D.J(()=>olympe.D.ga,[0]);m.qh.K=new olympe.D.J(()=>olympe.D.ga,[0]);m.round.K=olympe.D.J.G;m.uj.K=olympe.D.J.G;m.Pk.K=new olympe.D.J(()=>olympe.D.ga,[0]);m.Yi.K=new olympe.D.J(()=>olympe.D.ga,[0]);m.Ix.K=new olympe.D.J(()=>olympe.D.ga,[0]);m.floor.K=olympe.D.J.G;m.ceil.K=olympe.D.J.G;m.trunc.K=olympe.D.J.G;m.log.K=olympe.D.J.G;m.pow.K=new olympe.D.J(()=>olympe.D.ga,[0]);m.exp.K=olympe.D.J.G;
284
+ m.Pd.K=new olympe.D.J(()=>olympe.D.sa,[0]);m.mb.K=olympe.D.J.C;m.valueOf.K=olympe.D.J.C;m.Nw.K=olympe.D.J.C;m.Zm.K=new olympe.D.J(()=>olympe.D.sa,[0]);m.oy.K=new olympe.D.J(()=>olympe.D.ga,[0]);m.Vr.K=new olympe.D.J(()=>olympe.D.ga,[0]);m.xx.K=new olympe.D.J(()=>olympe.D.sa,[0]);m.sin.K=olympe.D.J.G;m.cos.K=olympe.D.J.G;m.atan2.K=new olympe.D.J(()=>olympe.D.ga,[0]);m.abs.K=olympe.D.J.G;m.mj.K=new olympe.D.J(()=>olympe.D.ga,[0,1]);olympe.D.Za=class{constructor(a){this.value=a}toJSON(){return'{ "type": "string", "value": '+JSON.stringify(this.value)+' }'}static lc(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return olympe.D.yb(b.value)}ur(a){return olympe.D.Za.concat(this,'.',a)}concat(...a){let b;Array.isArray(a[0])?b=a[0]:b=a;return olympe.D.Fa([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.D.yb(d)},olympe.D.Za,'OString.concat')}Rc(){return this}My(a){return olympe.D.Ba(parseInt(this.value,
285
+ a))}$r(){return olympe.D.Ba(parseFloat(this.value))}toString(){return this.value}valueOf(){return this.value.valueOf()}mb(a){return this.value===(void 0===a||null===a?void 0:a.valueOf())}Pd(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.wc(c&&b.valueOf()===c.valueOf()),olympe.D.sa,'OString.oEquals')}Sf(){return olympe.D.wc(!this.value||0===this.value.length)}contains(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.wc((c instanceof olympe.D.Za||'string'===typeof c)&&b.valueOf().includes(c.valueOf())),
286
286
  olympe.D.sa,'OString.contains')}startsWith(a,b){return olympe.D.Fa([this,a,b||0],(c,d,e)=>olympe.D.wc(c.valueOf().startsWith(d.valueOf(),e.valueOf())),olympe.D.sa,'OString.startsWith')}endsWith(a,b){return olympe.D.Fa([this,a,b||-1],(c,d,e)=>{e=0<=e.valueOf()?e.valueOf():this.Ag().valueOf()+e.valueOf()+1;return olympe.D.wc(c.valueOf().endsWith(d.valueOf(),e))},olympe.D.sa,'OString.endsWith')}indexOf(a,b){return olympe.D.Fa([this,a,b||0],(c,d,e)=>olympe.D.Ba(c.valueOf().indexOf(d.valueOf(),e.valueOf())),
287
287
  olympe.D.ga,'OString.indexOf')}lastIndexOf(a,b){return olympe.D.Fa([this,a,b||Infinity],(c,d,e)=>olympe.D.Ba(c.valueOf().lastIndexOf(d.valueOf(),e.valueOf())),olympe.D.ga,'OString.lastIndexOf')}slice(a,b){return olympe.D.Fa([this,a,b],(c,d,e)=>olympe.D.yb(c.valueOf().slice(d.valueOf(),e?e.valueOf():void 0)),olympe.D.Za,'OString.slice')}Ag(){return olympe.D.Ba(this.value.length)}threshold(a){return olympe.D.Fa([this,a],(b,c)=>b.valueOf().length>=c.valueOf()?b:olympe.D.Za.EMPTY,olympe.D.Za,'OString.threshold')}toLowerCase(){return olympe.D.yb(this.value.toLowerCase())}toUpperCase(){return olympe.D.yb(this.value.toUpperCase())}trim(){return olympe.D.yb(this.value.trim())}padStart(a,
288
- b){return olympe.D.Fa([this,a,b],(c,d,e)=>olympe.D.yb(c.valueOf().padStart(d.valueOf(),e.valueOf())),olympe.D.Za,'OString.padStart')}padEnd(a,b){return olympe.D.Fa([this,a,b],(c,d,e)=>olympe.D.yb(c.valueOf().padEnd(d.valueOf(),e.valueOf())),olympe.D.Za,'OString.padEnd')}replace(a,b){return olympe.D.Fa([this,a,b],(c,d,e)=>olympe.D.yb(c.valueOf().replace(d.valueOf(),e.valueOf())),olympe.D.Za,'OString.replace')}Ky(a,b){return olympe.D.Fa([this,a,b],(c,d,e)=>olympe.D.yb(c.valueOf().substr(d.valueOf(),
289
- e.valueOf())),olympe.D.Za,'OString.subOStr')}static concat(...a){return olympe.D.yb('').concat(...a)}};olympe.D.Za.EMPTY=new olympe.D.Za('');olympe.D.Za.Pu=new olympe.D.Za(' ');m=olympe.D.Za.prototype;m.toJSON.K=olympe.D.J.C;m.vr.K=new olympe.D.J(()=>olympe.D.Za,[0,1]);m.concat.K=olympe.D.J.F;m.Rc.K=olympe.D.J.F;m.Ny.K=olympe.D.J.G;m.bs.K=olympe.D.J.G;m.toString.K=olympe.D.J.C;m.valueOf.K=olympe.D.J.C;m.mb.K=olympe.D.J.C;m.Pd.K=new olympe.D.J(()=>olympe.D.sa,[0]);m.Sf.K=olympe.D.J.R;
288
+ b){return olympe.D.Fa([this,a,b],(c,d,e)=>olympe.D.yb(c.valueOf().padStart(d.valueOf(),e.valueOf())),olympe.D.Za,'OString.padStart')}padEnd(a,b){return olympe.D.Fa([this,a,b],(c,d,e)=>olympe.D.yb(c.valueOf().padEnd(d.valueOf(),e.valueOf())),olympe.D.Za,'OString.padEnd')}replace(a,b){return olympe.D.Fa([this,a,b],(c,d,e)=>olympe.D.yb(c.valueOf().replace(d.valueOf(),e.valueOf())),olympe.D.Za,'OString.replace')}Jy(a,b){return olympe.D.Fa([this,a,b],(c,d,e)=>olympe.D.yb(c.valueOf().substr(d.valueOf(),
289
+ e.valueOf())),olympe.D.Za,'OString.subOStr')}static concat(...a){return olympe.D.yb('').concat(...a)}};olympe.D.Za.EMPTY=new olympe.D.Za('');olympe.D.Za.Ou=new olympe.D.Za(' ');m=olympe.D.Za.prototype;m.toJSON.K=olympe.D.J.C;m.ur.K=new olympe.D.J(()=>olympe.D.Za,[0,1]);m.concat.K=olympe.D.J.F;m.Rc.K=olympe.D.J.F;m.My.K=olympe.D.J.G;m.$r.K=olympe.D.J.G;m.toString.K=olympe.D.J.C;m.valueOf.K=olympe.D.J.C;m.mb.K=olympe.D.J.C;m.Pd.K=new olympe.D.J(()=>olympe.D.sa,[0]);m.Sf.K=olympe.D.J.R;
290
290
  m.contains.K=new olympe.D.J(()=>olympe.D.sa,[0]);m.startsWith.K=new olympe.D.J(()=>olympe.D.sa,[0,1]);m.endsWith.K=new olympe.D.J(()=>olympe.D.sa,[0,1]);m.indexOf.K=new olympe.D.J(()=>olympe.D.ga,[0,1]);m.lastIndexOf.K=new olympe.D.J(()=>olympe.D.ga,[0,1]);m.slice.K=new olympe.D.J(()=>olympe.D.Za,[0,1]);m.Ag.K=olympe.D.J.G;m.threshold.K=new olympe.D.J(()=>olympe.D.Za,[0]);m.toLowerCase.K=olympe.D.J.F;m.toUpperCase.K=olympe.D.J.F;m.trim.K=olympe.D.J.F;m.padStart.K=olympe.D.J.F;m.padEnd.K=olympe.D.J.F;
291
- m.replace.K=olympe.D.J.F;m.Ky.K=olympe.D.J.F;olympe.D.sa=class{constructor(a){this.value=a}toJSON(){return`{ "type": "boolean", "value": ${this.value.valueOf()}}`}static lc(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return b.value?olympe.D.sa.F:olympe.D.sa.C}and(a){if(void 0!==a)return olympe.D.nb(a)?olympe.D.ie([a],b=>new olympe.D.sa(this.valueOf()&&b.valueOf()),olympe.D.sa,'and'):this.value&&a.valueOf()?olympe.D.sa.F:olympe.D.sa.C}mb(a){return this.valueOf()===(void 0!==a?a.valueOf():void 0)}Pd(a){if(void 0!==a)return olympe.D.nb(a)?
292
- olympe.D.ie([a],b=>new olympe.D.sa(this.valueOf()===b.valueOf()),olympe.D.sa,'oEquals'):this.mb(a)?olympe.D.sa.F:olympe.D.sa.C}not(){return this.value?olympe.D.sa.C:olympe.D.sa.F}xv(a){if(void 0!==a)return olympe.D.nb(a)?olympe.D.ie([a],b=>new olympe.D.sa(!(this.valueOf()&&b.valueOf())),olympe.D.sa,'andNot'):this.value&&!a.valueOf()?olympe.D.sa.F:olympe.D.sa.C}or(a){if(void 0!==a)return olympe.D.nb(a)?olympe.D.ie([a],b=>new olympe.D.sa(this.valueOf()||b.valueOf()),olympe.D.sa,'or'):this.value||a.valueOf()?
293
- olympe.D.sa.F:olympe.D.sa.C}xor(a){return olympe.D.Fa([this,a],(b,c)=>{b=b.valueOf();c=c.valueOf();return olympe.D.wc(b&&!c||!b&&c)},olympe.D.sa,'OBoolean.xor')}hw(){return this.value}Ir(){return!0===this.value?olympe.D.ga.ONE:olympe.D.ga.ZERO}Rc(){return olympe.D.yb(this.toString())}toString(){return this.value?'true':'false'}valueOf(){return this.value}};olympe.D.sa.F=new olympe.D.sa(!0);olympe.D.sa.C=new olympe.D.sa(!1);m=olympe.D.sa.prototype;m.toJSON.K=olympe.D.J.C;
294
- m.and.K=new olympe.D.J(()=>olympe.D.sa,[0]);m.mb.K=olympe.D.J.C;m.Pd.K=new olympe.D.J(()=>olympe.D.sa,[0]);m.not.K=olympe.D.J.R;m.xv.K=new olympe.D.J(()=>olympe.D.sa,[0]);m.or.K=new olympe.D.J(()=>olympe.D.sa,[0]);m.xor.K=new olympe.D.J(()=>olympe.D.sa,[0]);m.hw.K=new olympe.D.J(()=>Boolean,[]);m.Ir.K=olympe.D.J.G;m.Rc.K=olympe.D.J.F;m.toString.K=olympe.D.J.C;m.valueOf.K=olympe.D.J.C;function tb(a){return new olympe.D.ib(new Date(a))}
295
- olympe.D.ib=class{constructor(a){this.xb=a}toJSON(){return'{ "type": "dateTime", "value": "'+this.xb.toJSON()+'" }'}static lc(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return new olympe.D.ib(new Date(b.value.valueOf()))}static now(){return new olympe.D.ib(new Date)}kj(){return this.xb&&!isNaN(this.xb.getTime())?olympe.D.sa.F:olympe.D.sa.C}st(){return olympe.D.Ba(this.xb.getMilliseconds())}ut(){return olympe.D.Ba(this.xb.getSeconds())}tt(){return olympe.D.Ba(this.xb.getMinutes())}rt(){return olympe.D.Ba(this.xb.getHours())}sw(){return olympe.D.Ba(this.xb.getDate())}getMonth(){return olympe.D.Ba(this.xb.getMonth()+1)}vt(){return olympe.D.Ba(this.xb.getFullYear())}getTime(){return this.xb.getTime()}Hy(){var a=
291
+ m.replace.K=olympe.D.J.F;m.Jy.K=olympe.D.J.F;olympe.D.sa=class{constructor(a){this.value=a}toJSON(){return`{ "type": "boolean", "value": ${this.value.valueOf()}}`}static lc(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return b.value?olympe.D.sa.F:olympe.D.sa.C}and(a){if(void 0!==a)return olympe.D.nb(a)?olympe.D.ie([a],b=>new olympe.D.sa(this.valueOf()&&b.valueOf()),olympe.D.sa,'and'):this.value&&a.valueOf()?olympe.D.sa.F:olympe.D.sa.C}mb(a){return this.valueOf()===(void 0!==a?a.valueOf():void 0)}Pd(a){if(void 0!==a)return olympe.D.nb(a)?
292
+ olympe.D.ie([a],b=>new olympe.D.sa(this.valueOf()===b.valueOf()),olympe.D.sa,'oEquals'):this.mb(a)?olympe.D.sa.F:olympe.D.sa.C}not(){return this.value?olympe.D.sa.C:olympe.D.sa.F}wv(a){if(void 0!==a)return olympe.D.nb(a)?olympe.D.ie([a],b=>new olympe.D.sa(!(this.valueOf()&&b.valueOf())),olympe.D.sa,'andNot'):this.value&&!a.valueOf()?olympe.D.sa.F:olympe.D.sa.C}or(a){if(void 0!==a)return olympe.D.nb(a)?olympe.D.ie([a],b=>new olympe.D.sa(this.valueOf()||b.valueOf()),olympe.D.sa,'or'):this.value||a.valueOf()?
293
+ olympe.D.sa.F:olympe.D.sa.C}xor(a){return olympe.D.Fa([this,a],(b,c)=>{b=b.valueOf();c=c.valueOf();return olympe.D.wc(b&&!c||!b&&c)},olympe.D.sa,'OBoolean.xor')}gw(){return this.value}Hr(){return!0===this.value?olympe.D.ga.ONE:olympe.D.ga.ZERO}Rc(){return olympe.D.yb(this.toString())}toString(){return this.value?'true':'false'}valueOf(){return this.value}};olympe.D.sa.F=new olympe.D.sa(!0);olympe.D.sa.C=new olympe.D.sa(!1);m=olympe.D.sa.prototype;m.toJSON.K=olympe.D.J.C;
294
+ m.and.K=new olympe.D.J(()=>olympe.D.sa,[0]);m.mb.K=olympe.D.J.C;m.Pd.K=new olympe.D.J(()=>olympe.D.sa,[0]);m.not.K=olympe.D.J.R;m.wv.K=new olympe.D.J(()=>olympe.D.sa,[0]);m.or.K=new olympe.D.J(()=>olympe.D.sa,[0]);m.xor.K=new olympe.D.J(()=>olympe.D.sa,[0]);m.gw.K=new olympe.D.J(()=>Boolean,[]);m.Hr.K=olympe.D.J.G;m.Rc.K=olympe.D.J.F;m.toString.K=olympe.D.J.C;m.valueOf.K=olympe.D.J.C;function tb(a){return new olympe.D.ib(new Date(a))}
295
+ olympe.D.ib=class{constructor(a){this.xb=a}toJSON(){return'{ "type": "dateTime", "value": "'+this.xb.toJSON()+'" }'}static lc(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return new olympe.D.ib(new Date(b.value.valueOf()))}static now(){return new olympe.D.ib(new Date)}kj(){return this.xb&&!isNaN(this.xb.getTime())?olympe.D.sa.F:olympe.D.sa.C}rt(){return olympe.D.Ba(this.xb.getMilliseconds())}tt(){return olympe.D.Ba(this.xb.getSeconds())}st(){return olympe.D.Ba(this.xb.getMinutes())}qt(){return olympe.D.Ba(this.xb.getHours())}rw(){return olympe.D.Ba(this.xb.getDate())}getMonth(){return olympe.D.Ba(this.xb.getMonth()+1)}ut(){return olympe.D.Ba(this.xb.getFullYear())}getTime(){return this.xb.getTime()}Gy(){var a=
296
296
  olympe.D,b=a.yb;var c=this.xb.getDate();c=10>c?'0'+c:c;var d=this.xb.getMonth()+1;return b.call(a,`${c}.${10>d?'0'+d:d}.${this.xb.getFullYear()}`)}toLocaleString(a){return void 0===a||'string'===typeof a?olympe.D.yb(this.xb.toLocaleString(a)):olympe.D.Fa([this,a],(b,c)=>olympe.D.yb(b.xb.toLocaleString(c.valueOf())),olympe.D.Za)}toLocaleDateString(a){return void 0===a||'string'===typeof a?olympe.D.yb(this.xb.toLocaleDateString(a)):olympe.D.Fa([this,a],(b,c)=>olympe.D.yb(b.xb.toLocaleDateString(c.valueOf())),
297
- olympe.D.Za)}toLocaleTimeString(a){return void 0===a||'string'===typeof a?olympe.D.yb(this.xb.toLocaleTimeString(a)):olympe.D.Fa([this,a],(b,c)=>olympe.D.yb(b.xb.toLocaleTimeString(c.valueOf())),olympe.D.Za)}Rc(){return olympe.D.yb(this.xb.toISOString())}$r(){return new Date(this.getTime())}My(){return this}Oy(){return this}kg(a,b){return olympe.D.Fa([b],c=>{const d=new olympe.D.ib(new Date(this.xb.getTime()));d.xb['set'+a](this.xb['get'+a]()+c.valueOf());return d},olympe.D.ib)}ov(a){return this.kg('Milliseconds',
298
- a)}uv(a){return this.kg('Seconds',a)}pv(a){return this.kg('Minutes',a)}nv(a){return this.kg('Hours',a)}ym(a){return this.kg('Date',a)}vv(a){return'number'===typeof a?this.ym(7*a):this.ym(a.Qk(7))}qv(a){return this.kg('Month',a)}wv(a){return this.kg('FullYear',a)}Iy(){let a=this.xb.getDay();a=0===a?6:a-1;return new olympe.D.ib(new Date(this.xb.getFullYear(),this.xb.getMonth(),this.xb.getDate()-a))}Jy(){return new olympe.D.ib(new Date(this.xb.getFullYear(),this.xb.getMonth()))}Pd(a){return olympe.D.Fa([a],
299
- b=>olympe.D.wc(this.mb(b)),olympe.D.sa)}mb(a){return a instanceof olympe.D.ib?this.getTime()===a.getTime()||isNaN(this.getTime())&&isNaN(a.getTime()):!1}Hw(){let a=this.xb.getDay();0===a&&(a=7);return olympe.D.Ba(a)}ww(a,b){return olympe.D.Fa([a,b],(c,d)=>{d=d.valueOf();'years'===d?c=this.xb.getFullYear()-c.xb.getFullYear():'months'===d?c=12*(this.xb.getFullYear()-c.xb.getFullYear())+(this.xb.getMonth()-c.xb.getMonth()):(d={milliseconds:1,seconds:1E3,minutes:6E4,hours:36E5,days:864E5,weeks:6048E5}[d],
300
- void 0===d&&(olympe.ra.Ya('df').warn("[getDiff] '_unit' is not a valid unit! Defaulting to milliseconds"),d=1),c=Math.trunc((this.xb.getTime()-c.xb.getTime())/d));return olympe.D.Ba(c)},olympe.D.ga)}wx(a){return olympe.D.Fa([a],b=>olympe.D.wc(this.getTime()<b.getTime()),olympe.D.sa)}ux(a){return olympe.D.Fa([a],b=>olympe.D.wc(this.getTime()>b.getTime()),olympe.D.sa)}xx(a,b){return olympe.D.Fa([a,b],(c,d)=>olympe.D.wc(this.getTime()>c.getTime()&&this.getTime()<d.getTime()),olympe.D.sa)}valueOf(){return this.kj().valueOf()?
301
- new Date(this.getTime()):new Date(0)}};olympe.D.ib.C=tb(0);olympe.D.ib.F=tb(Number.NaN);m=olympe.D.ib.prototype;m.kj.K=olympe.D.J.R;m.st.K=olympe.D.J.G;m.ut.K=olympe.D.J.G;m.tt.K=olympe.D.J.G;m.rt.K=olympe.D.J.G;m.sw.K=olympe.D.J.G;m.getMonth.K=olympe.D.J.G;m.vt.K=olympe.D.J.G;m.getTime.K=olympe.D.J.C;m.Hy.K=new olympe.D.J(()=>olympe.D.Za,[0]);m.toLocaleString.K=olympe.D.J.F;m.toLocaleDateString.K=olympe.D.J.F;m.toLocaleTimeString.K=olympe.D.J.F;m.Rc.K=olympe.D.J.F;m.$r.K=olympe.D.J.C;
302
- m.My.K=new olympe.D.J(()=>olympe.D.ib,[]);m.Oy.K=new olympe.D.J(()=>olympe.D.ib,[]);m.kg.K=new olympe.D.J(()=>olympe.D.ib,[]);m.ov.K=new olympe.D.J(()=>olympe.D.ib,[]);m.uv.K=new olympe.D.J(()=>olympe.D.ib,[]);m.pv.K=new olympe.D.J(()=>olympe.D.ib,[]);m.nv.K=new olympe.D.J(()=>olympe.D.ib,[]);m.ym.K=new olympe.D.J(()=>olympe.D.ib,[0]);m.vv.K=new olympe.D.J(()=>olympe.D.ib,[]);m.qv.K=new olympe.D.J(()=>olympe.D.ib,[]);m.wv.K=new olympe.D.J(()=>olympe.D.ib,[0]);
303
- m.Iy.K=new olympe.D.J(()=>olympe.D.ib,[]);m.Jy.K=new olympe.D.J(()=>olympe.D.ib,[]);m.Pd.K=olympe.D.J.R;m.mb.K=olympe.D.J.C;m.Hw.K=olympe.D.J.G;m.ww.K=new olympe.D.J(()=>olympe.D.ga,[0,1]);m.wx.K=new olympe.D.J(()=>olympe.D.sa,[0]);m.ux.K=new olympe.D.J(()=>olympe.D.sa,[0]);m.xx.K=new olympe.D.J(()=>olympe.D.sa,[0,1]);m.valueOf.K=olympe.D.J.C;const ub=new Map,vb=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i,wb=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i;function xb(a){const b=c=>{let d;c=c.valueOf();6>c.length?(d=17,c=wb.exec(c)):(d=1,c=vb.exec(c));c=c?c.slice(1).map(e=>parseInt(e,16)*d):[0,0,0];return olympe.D.Color.create(c[0],c[1],c[2],isNaN(c[3])?1:c[3]/255)};return olympe.D.Vf(a)?olympe.D.ie([a],b,olympe.D.Color):b(a)}
297
+ olympe.D.Za)}toLocaleTimeString(a){return void 0===a||'string'===typeof a?olympe.D.yb(this.xb.toLocaleTimeString(a)):olympe.D.Fa([this,a],(b,c)=>olympe.D.yb(b.xb.toLocaleTimeString(c.valueOf())),olympe.D.Za)}Rc(){return olympe.D.yb(this.xb.toISOString())}Zr(){return new Date(this.getTime())}Ly(){return this}Ny(){return this}kg(a,b){return olympe.D.Fa([b],c=>{const d=new olympe.D.ib(new Date(this.xb.getTime()));d.xb['set'+a](this.xb['get'+a]()+c.valueOf());return d},olympe.D.ib)}nv(a){return this.kg('Milliseconds',
298
+ a)}tv(a){return this.kg('Seconds',a)}ov(a){return this.kg('Minutes',a)}mv(a){return this.kg('Hours',a)}xm(a){return this.kg('Date',a)}uv(a){return'number'===typeof a?this.xm(7*a):this.xm(a.Pk(7))}pv(a){return this.kg('Month',a)}vv(a){return this.kg('FullYear',a)}Hy(){let a=this.xb.getDay();a=0===a?6:a-1;return new olympe.D.ib(new Date(this.xb.getFullYear(),this.xb.getMonth(),this.xb.getDate()-a))}Iy(){return new olympe.D.ib(new Date(this.xb.getFullYear(),this.xb.getMonth()))}Pd(a){return olympe.D.Fa([a],
299
+ b=>olympe.D.wc(this.mb(b)),olympe.D.sa)}mb(a){return a instanceof olympe.D.ib?this.getTime()===a.getTime()||isNaN(this.getTime())&&isNaN(a.getTime()):!1}Gw(){let a=this.xb.getDay();0===a&&(a=7);return olympe.D.Ba(a)}vw(a,b){return olympe.D.Fa([a,b],(c,d)=>{d=d.valueOf();'years'===d?c=this.xb.getFullYear()-c.xb.getFullYear():'months'===d?c=12*(this.xb.getFullYear()-c.xb.getFullYear())+(this.xb.getMonth()-c.xb.getMonth()):(d={milliseconds:1,seconds:1E3,minutes:6E4,hours:36E5,days:864E5,weeks:6048E5}[d],
300
+ void 0===d&&(olympe.ra.Ya('df').warn("[getDiff] '_unit' is not a valid unit! Defaulting to milliseconds"),d=1),c=Math.trunc((this.xb.getTime()-c.xb.getTime())/d));return olympe.D.Ba(c)},olympe.D.ga)}vx(a){return olympe.D.Fa([a],b=>olympe.D.wc(this.getTime()<b.getTime()),olympe.D.sa)}tx(a){return olympe.D.Fa([a],b=>olympe.D.wc(this.getTime()>b.getTime()),olympe.D.sa)}wx(a,b){return olympe.D.Fa([a,b],(c,d)=>olympe.D.wc(this.getTime()>c.getTime()&&this.getTime()<d.getTime()),olympe.D.sa)}valueOf(){return this.kj().valueOf()?
301
+ new Date(this.getTime()):new Date(0)}};olympe.D.ib.C=tb(0);olympe.D.ib.F=tb(Number.NaN);m=olympe.D.ib.prototype;m.kj.K=olympe.D.J.R;m.rt.K=olympe.D.J.G;m.tt.K=olympe.D.J.G;m.st.K=olympe.D.J.G;m.qt.K=olympe.D.J.G;m.rw.K=olympe.D.J.G;m.getMonth.K=olympe.D.J.G;m.ut.K=olympe.D.J.G;m.getTime.K=olympe.D.J.C;m.Gy.K=new olympe.D.J(()=>olympe.D.Za,[0]);m.toLocaleString.K=olympe.D.J.F;m.toLocaleDateString.K=olympe.D.J.F;m.toLocaleTimeString.K=olympe.D.J.F;m.Rc.K=olympe.D.J.F;m.Zr.K=olympe.D.J.C;
302
+ m.Ly.K=new olympe.D.J(()=>olympe.D.ib,[]);m.Ny.K=new olympe.D.J(()=>olympe.D.ib,[]);m.kg.K=new olympe.D.J(()=>olympe.D.ib,[]);m.nv.K=new olympe.D.J(()=>olympe.D.ib,[]);m.tv.K=new olympe.D.J(()=>olympe.D.ib,[]);m.ov.K=new olympe.D.J(()=>olympe.D.ib,[]);m.mv.K=new olympe.D.J(()=>olympe.D.ib,[]);m.xm.K=new olympe.D.J(()=>olympe.D.ib,[0]);m.uv.K=new olympe.D.J(()=>olympe.D.ib,[]);m.pv.K=new olympe.D.J(()=>olympe.D.ib,[]);m.vv.K=new olympe.D.J(()=>olympe.D.ib,[0]);
303
+ m.Hy.K=new olympe.D.J(()=>olympe.D.ib,[]);m.Iy.K=new olympe.D.J(()=>olympe.D.ib,[]);m.Pd.K=olympe.D.J.R;m.mb.K=olympe.D.J.C;m.Gw.K=olympe.D.J.G;m.vw.K=new olympe.D.J(()=>olympe.D.ga,[0,1]);m.vx.K=new olympe.D.J(()=>olympe.D.sa,[0]);m.tx.K=new olympe.D.J(()=>olympe.D.sa,[0]);m.wx.K=new olympe.D.J(()=>olympe.D.sa,[0,1]);m.valueOf.K=olympe.D.J.C;const ub=new Map,vb=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i,wb=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i;function xb(a){const b=c=>{let d;c=c.valueOf();6>c.length?(d=17,c=wb.exec(c)):(d=1,c=vb.exec(c));c=c?c.slice(1).map(e=>parseInt(e,16)*d):[0,0,0];return olympe.D.Color.create(c[0],c[1],c[2],isNaN(c[3])?1:c[3]/255)};return olympe.D.Vf(a)?olympe.D.ie([a],b,olympe.D.Color):b(a)}
304
304
  olympe.D.Color=class{constructor(a,b,c,d){this.C=olympe.D.Ba(void 0!==a?Math.min(255,Math.max(0,Math.round(a))):0);this.F=olympe.D.Ba(void 0!==b?Math.min(255,Math.max(0,Math.round(b))):0);this.b=olympe.D.Ba(void 0!==c?Math.min(255,Math.max(0,Math.round(c))):0);this.a=olympe.D.Ba(void 0!==d?Math.min(1,Math.max(0,d)):1)}toJSON(){return`{ "type": "color", "r": ${this.C.valueOf()}, "g": ${this.F.valueOf()}, "b": ${this.b.valueOf()}, "a": ${this.a.valueOf()} }`}static lc(a){let b;'string'===typeof a?b=
305
305
  JSON.parse(a):b=a;return olympe.D.Color.create(b.r,b.g,b.b,b.a)}static create(a,b,c,d=1){return olympe.D.Fa([a,b,c,d],(e,f,g,h)=>{e=olympe.D.Ba(void 0!==e?Math.min(255,Math.max(0,Math.round(e.valueOf()))):0);f=olympe.D.Ba(void 0!==f?Math.min(255,Math.max(0,Math.round(f.valueOf()))):0);g=olympe.D.Ba(void 0!==g?Math.min(255,Math.max(0,Math.round(g.valueOf()))):0);h=olympe.D.Ba(void 0!==h?Math.min(1,Math.max(0,h.valueOf())):1);for(let k of ub.values())if(k&&k.C.mb(e)&&k.F.mb(f)&&k.b.mb(g)&&k.a.mb(h))return k;
306
- return new olympe.D.Color(e,f,g,h)},olympe.D.Color)}Qf(){return this.C}Ff(){return this.b}Kf(){return this.F}Ef(){return this.a}Ev(a,b){return olympe.D.Color.create(this.C.mj(a.Qf(),b),this.F.mj(a.Kf(),b),this.b.mj(a.Ff(),b),this.a.mj(a.Ef(),b))}$v(a){return olympe.D.Color.create(this.C,this.F,this.b,a)}cs(){return`rgba(${this.C},${this.F},${this.b},${this.a})`}vn(){const a=(16777216|this.b|this.F<<8|this.C<<16).toString(16).slice(1),b=1===this.a.valueOf()?'':(256|255*this.a).toString(16).slice(1);
307
- return'#'+(a+b).toUpperCase()}toString(){return this.vn()}mb(a){return a instanceof olympe.D.Color?this.C.valueOf()===a.C.valueOf()&&this.F.valueOf()===a.F.valueOf()&&this.b.valueOf()===a.b.valueOf()&&this.a.valueOf()===a.a.valueOf():!1}};olympe.D.Color.prototype.equals=olympe.D.Color.prototype.mb;olympe.D.Color.prototype.toHexString=olympe.D.Color.prototype.vn;olympe.D.Color.prototype.toRGBString=olympe.D.Color.prototype.cs;olympe.D.Color.prototype.getAlpha=olympe.D.Color.prototype.Ef;
308
- olympe.D.Color.prototype.getGreen=olympe.D.Color.prototype.Kf;olympe.D.Color.prototype.getBlue=olympe.D.Color.prototype.Ff;olympe.D.Color.prototype.getRed=olympe.D.Color.prototype.Qf;olympe.D.Color.create=olympe.D.Color.create;m=olympe.D.Color.prototype;m.toJSON.K=olympe.D.J.C;m.Qf.K=olympe.D.J.G;m.Ff.K=olympe.D.J.G;m.Kf.K=olympe.D.J.G;m.Ef.K=olympe.D.J.G;m.Ev.K=new olympe.D.J(()=>olympe.D.Color,[]);m.$v.K=new olympe.D.J(()=>olympe.D.Color,[]);m.cs.K=new olympe.D.J(()=>String,[]);
309
- m.vn.K=new olympe.D.J(()=>String,[]);m.mb.K=olympe.D.J.C;olympe.D.File=class{na(){}sp(){}Fl(){}Vm(){}Fk(){}Rm(){}Gk(){}rename(){}};olympe.D.kc=class{constructor(a,b){this.x=olympe.D.ge(a);this.y=olympe.D.ge(b)}toJSON(){return'{ "type": "vector2", "x": '+JSON.stringify(olympe.D.$a(this.x).valueOf())+', "y": '+JSON.stringify(olympe.D.$a(this.y).valueOf())+' }'}static lc(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return new olympe.D.kc(b.x,b.y)}px(){return this.x}Fy(a){qb(this.x,a)}qx(){return this.y}Gy(a){qb(this.y,a)}ex(){return this.x.Wr(this.y)}he(a){return olympe.D.Fa([this,a],(b,c)=>new olympe.D.kc(b.x.he(c.x),b.y.he(c.y)),
310
- olympe.D.kc,'Vector2.plus')}qh(a){return olympe.D.Fa([this,a],(b,c)=>new olympe.D.kc(b.x.qh(c.x),b.y.qh(c.y)),olympe.D.kc,'Vector2.minus')}Mx(a){return new olympe.D.kc(this.x.Qk(a),this.y.Qk(a))}Vv(a){return new olympe.D.kc(this.x.Yi(a),this.y.Yi(a))}Px(){return new olympe.D.kc(this.x.vj(),this.y.vj())}Wv(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.Fa([b.x,b.y,c.x,c.y],(d,e,f,g)=>olympe.D.Ba(d*f+e*g),olympe.D.ga),olympe.D.ga)}length(){return olympe.D.Fa([this.x,this.y],(a,b)=>olympe.D.Ba(Math.sqrt(a*
311
- a+b*b)),olympe.D.ga)}normalize(){return olympe.D.Fa([this.x,this.y],(a,b)=>{const c=Math.sqrt(a*a+b*b);return new olympe.D.kc(a/c,b/c)},olympe.D.kc)}floor(){return olympe.D.Fa([this.x,this.y],(a,b)=>new olympe.D.kc(Math.floor(a),Math.floor(b)),olympe.D.kc)}ceil(){return olympe.D.Fa([this.x,this.y],(a,b)=>new olympe.D.kc(Math.ceil(a),Math.ceil(b)),olympe.D.kc)}round(){return olympe.D.Fa([this.x,this.y],(a,b)=>new olympe.D.kc(Math.round(a),Math.round(b)),olympe.D.kc)}rv(a){return new olympe.D.kc(this.x.he(a),
312
- this.y.he(a))}tv(a,b){return new olympe.D.kc(this.x.he(a),this.y.he(b))}Rc(){return olympe.D.Fa([this.x,this.y],(a,b)=>olympe.D.yb(`Vector2[${a.valueOf()}, ${b.valueOf()}]`),olympe.D.Za)}toString(){return`Vector2[${this.x.Pa.Kb}, ${this.y.Pa.Kb}]`}mb(a){return this===a?!0:!1}};m=olympe.D.kc.prototype;m.toJSON.K=olympe.D.J.C;m.px.K=olympe.D.J.G;m.Fy.K=olympe.D.J.C;m.qx.K=olympe.D.J.G;m.Gy.K=olympe.D.J.C;m.ex.K=olympe.D.J.G;m.he.K=new olympe.D.J(()=>olympe.D.kc,[0]);
313
- m.qh.K=new olympe.D.J(()=>olympe.D.kc,[0]);m.Mx.K=olympe.D.J.W;m.Vv.K=olympe.D.J.W;m.Px.K=olympe.D.J.W;m.Wv.K=new olympe.D.J(()=>olympe.D.ga,[0]);m.length.K=olympe.D.J.G;m.normalize.K=olympe.D.J.W;m.floor.K=olympe.D.J.W;m.ceil.K=olympe.D.J.W;m.round.K=olympe.D.J.W;m.rv.K=olympe.D.J.W;m.tv.K=olympe.D.J.W;m.Rc.K=olympe.D.J.F;m.toString.K=olympe.D.J.C;m.mb.K=olympe.D.J.C;olympe.D.Pg=class{constructor(){}Wb(){}Ed(){}get(){}kh(){}has(){}Eg(){}Pc(){}If(){}nf(){}zg(){}forEach(){}ae(){}};olympe.D.Pg.prototype.forEachCurrentValue=olympe.D.Pg.prototype.ae;olympe.D.Pg.prototype.forEach=olympe.D.Pg.prototype.forEach;m=olympe.D.Pg.prototype;m.has.K=olympe.D.J.R;m.Eg.K=olympe.D.J.C;m.Pc.K=new olympe.D.J(()=>Object,[]);m.If.K=new olympe.D.J(()=>String,[]);m.nf.K=olympe.D.J.G;m.zg.K=olympe.D.J.C;m.forEach.K=new olympe.D.J(()=>{},[]);m.ae.K=olympe.D.J.C;olympe.D.md=class extends olympe.D.Pg{constructor(){super()}ee(){}Hf(){}Ue(){}Gf(){}qe(){}Te(){}$i(){}ci(){}};olympe.D.md.prototype.getCurrentAt=olympe.D.md.prototype.Te;olympe.D.md.prototype.getAt=olympe.D.md.prototype.qe;olympe.D.md.prototype.getCurrentKeyAt=olympe.D.md.prototype.Gf;olympe.D.md.prototype.getKeyAt=olympe.D.md.prototype.Ue;olympe.D.md.prototype.getCurrentRank=olympe.D.md.prototype.Hf;olympe.D.md.prototype.getRank=olympe.D.md.prototype.ee;m=olympe.D.md.prototype;m.ee.K=olympe.D.J.G;
306
+ return new olympe.D.Color(e,f,g,h)},olympe.D.Color)}Qf(){return this.C}Ff(){return this.b}Kf(){return this.F}Ef(){return this.a}Dv(a,b){return olympe.D.Color.create(this.C.mj(a.Qf(),b),this.F.mj(a.Kf(),b),this.b.mj(a.Ff(),b),this.a.mj(a.Ef(),b))}Zv(a){return olympe.D.Color.create(this.C,this.F,this.b,a)}bs(){return`rgba(${this.C},${this.F},${this.b},${this.a})`}un(){const a=(16777216|this.b|this.F<<8|this.C<<16).toString(16).slice(1),b=1===this.a.valueOf()?'':(256|255*this.a).toString(16).slice(1);
307
+ return'#'+(a+b).toUpperCase()}toString(){return this.un()}mb(a){return a instanceof olympe.D.Color?this.C.valueOf()===a.C.valueOf()&&this.F.valueOf()===a.F.valueOf()&&this.b.valueOf()===a.b.valueOf()&&this.a.valueOf()===a.a.valueOf():!1}};olympe.D.Color.prototype.equals=olympe.D.Color.prototype.mb;olympe.D.Color.prototype.toHexString=olympe.D.Color.prototype.un;olympe.D.Color.prototype.toRGBString=olympe.D.Color.prototype.bs;olympe.D.Color.prototype.getAlpha=olympe.D.Color.prototype.Ef;
308
+ olympe.D.Color.prototype.getGreen=olympe.D.Color.prototype.Kf;olympe.D.Color.prototype.getBlue=olympe.D.Color.prototype.Ff;olympe.D.Color.prototype.getRed=olympe.D.Color.prototype.Qf;olympe.D.Color.create=olympe.D.Color.create;m=olympe.D.Color.prototype;m.toJSON.K=olympe.D.J.C;m.Qf.K=olympe.D.J.G;m.Ff.K=olympe.D.J.G;m.Kf.K=olympe.D.J.G;m.Ef.K=olympe.D.J.G;m.Dv.K=new olympe.D.J(()=>olympe.D.Color,[]);m.Zv.K=new olympe.D.J(()=>olympe.D.Color,[]);m.bs.K=new olympe.D.J(()=>String,[]);
309
+ m.un.K=new olympe.D.J(()=>String,[]);m.mb.K=olympe.D.J.C;olympe.D.File=class{na(){}rp(){}El(){}Um(){}Ek(){}Qm(){}Fk(){}rename(){}};olympe.D.kc=class{constructor(a,b){this.x=olympe.D.ge(a);this.y=olympe.D.ge(b)}toJSON(){return'{ "type": "vector2", "x": '+JSON.stringify(olympe.D.$a(this.x).valueOf())+', "y": '+JSON.stringify(olympe.D.$a(this.y).valueOf())+' }'}static lc(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return new olympe.D.kc(b.x,b.y)}ox(){return this.x}Ey(a){qb(this.x,a)}px(){return this.y}Fy(a){qb(this.y,a)}bx(){return this.x.Vr(this.y)}he(a){return olympe.D.Fa([this,a],(b,c)=>new olympe.D.kc(b.x.he(c.x),b.y.he(c.y)),
310
+ olympe.D.kc,'Vector2.plus')}qh(a){return olympe.D.Fa([this,a],(b,c)=>new olympe.D.kc(b.x.qh(c.x),b.y.qh(c.y)),olympe.D.kc,'Vector2.minus')}Lx(a){return new olympe.D.kc(this.x.Pk(a),this.y.Pk(a))}Uv(a){return new olympe.D.kc(this.x.Yi(a),this.y.Yi(a))}Ox(){return new olympe.D.kc(this.x.uj(),this.y.uj())}Vv(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.Fa([b.x,b.y,c.x,c.y],(d,e,f,g)=>olympe.D.Ba(d*f+e*g),olympe.D.ga),olympe.D.ga)}length(){return olympe.D.Fa([this.x,this.y],(a,b)=>olympe.D.Ba(Math.sqrt(a*
311
+ a+b*b)),olympe.D.ga)}normalize(){return olympe.D.Fa([this.x,this.y],(a,b)=>{const c=Math.sqrt(a*a+b*b);return new olympe.D.kc(a/c,b/c)},olympe.D.kc)}floor(){return olympe.D.Fa([this.x,this.y],(a,b)=>new olympe.D.kc(Math.floor(a),Math.floor(b)),olympe.D.kc)}ceil(){return olympe.D.Fa([this.x,this.y],(a,b)=>new olympe.D.kc(Math.ceil(a),Math.ceil(b)),olympe.D.kc)}round(){return olympe.D.Fa([this.x,this.y],(a,b)=>new olympe.D.kc(Math.round(a),Math.round(b)),olympe.D.kc)}qv(a){return new olympe.D.kc(this.x.he(a),
312
+ this.y.he(a))}rv(a,b){return new olympe.D.kc(this.x.he(a),this.y.he(b))}Rc(){return olympe.D.Fa([this.x,this.y],(a,b)=>olympe.D.yb(`Vector2[${a.valueOf()}, ${b.valueOf()}]`),olympe.D.Za)}toString(){return`Vector2[${this.x.Pa.Kb}, ${this.y.Pa.Kb}]`}mb(a){return this===a?!0:!1}};m=olympe.D.kc.prototype;m.toJSON.K=olympe.D.J.C;m.ox.K=olympe.D.J.G;m.Ey.K=olympe.D.J.C;m.px.K=olympe.D.J.G;m.Fy.K=olympe.D.J.C;m.bx.K=olympe.D.J.G;m.he.K=new olympe.D.J(()=>olympe.D.kc,[0]);
313
+ m.qh.K=new olympe.D.J(()=>olympe.D.kc,[0]);m.Lx.K=olympe.D.J.W;m.Uv.K=olympe.D.J.W;m.Ox.K=olympe.D.J.W;m.Vv.K=new olympe.D.J(()=>olympe.D.ga,[0]);m.length.K=olympe.D.J.G;m.normalize.K=olympe.D.J.W;m.floor.K=olympe.D.J.W;m.ceil.K=olympe.D.J.W;m.round.K=olympe.D.J.W;m.qv.K=olympe.D.J.W;m.rv.K=olympe.D.J.W;m.Rc.K=olympe.D.J.F;m.toString.K=olympe.D.J.C;m.mb.K=olympe.D.J.C;olympe.D.Pg=class{constructor(){}Wb(){}Ed(){}get(){}kh(){}has(){}Eg(){}Pc(){}If(){}nf(){}zg(){}forEach(){}ae(){}};olympe.D.Pg.prototype.forEachCurrentValue=olympe.D.Pg.prototype.ae;olympe.D.Pg.prototype.forEach=olympe.D.Pg.prototype.forEach;m=olympe.D.Pg.prototype;m.has.K=olympe.D.J.R;m.Eg.K=olympe.D.J.C;m.Pc.K=new olympe.D.J(()=>Object,[]);m.If.K=new olympe.D.J(()=>String,[]);m.nf.K=olympe.D.J.G;m.zg.K=olympe.D.J.C;m.forEach.K=new olympe.D.J(()=>{},[]);m.ae.K=olympe.D.J.C;olympe.D.md=class extends olympe.D.Pg{constructor(){super()}ee(){}Hf(){}Ue(){}Gf(){}qe(){}Te(){}$i(){}ci(){}};olympe.D.md.prototype.getCurrentAt=olympe.D.md.prototype.Te;olympe.D.md.prototype.getAt=olympe.D.md.prototype.qe;olympe.D.md.prototype.getCurrentKeyAt=olympe.D.md.prototype.Gf;olympe.D.md.prototype.getKeyAt=olympe.D.md.prototype.Ue;olympe.D.md.prototype.getCurrentRank=olympe.D.md.prototype.Hf;olympe.D.md.prototype.getRank=olympe.D.md.prototype.ee;m=olympe.D.md.prototype;m.ee.K=olympe.D.J.G;
314
314
  m.Hf.K=olympe.D.J.C;m.Ue.K=new olympe.D.J(()=>String,[]);m.Gf.K=olympe.D.J.C;m.qe.K=new olympe.D.J(()=>Object,[]);m.Te.K=olympe.D.J.C;m.$i.K=olympe.D.J.C;m.ci.K=new olympe.D.J(()=>Array,[]);olympe.D.li=class{constructor(a,b){this.R=b||olympe.D.La();this.valueType=a||Object;this.values={};this.qb=this.Ka=null;this.fe=0;this.$=Object.create(null);this.Hb=Object.create(null);this.size=0;this.L=null;this.R.onDestroy(()=>{const c=this.$;if(c){const d=Object.keys(c),e=d.length;for(let f=0;f<e;f++){const g=c[d[f]],h=Object.keys(g);for(let k=h.length,l=0;l<k;l++)g[h[l]].destroy()}}})}Bh(){return this.R}Wb(){return this.valueType}Ed(a){this.valueType=a;const b=this.Ka;if(null!==b)for(const c in b)Object.prototype.hasOwnProperty.call(b,
315
315
  c)&&lb(b[c],a)}get(a){const b=c=>{null===this.Ka&&(this.Ka={});return this.cj(this.Ka,c,this.values[c],this.valueType,'Map.get('+c+')')};return olympe.D.Fa([a],c=>b(c),this.valueType)}kh(a){a=this.values[a];return olympe.D.nb(a)?Xa(a.Pa)?a.Pa.Kb:void 0:a}has(a){const b=c=>{null===this.qb&&(this.qb={});return this.cj(this.qb,c,c in this.values?olympe.D.sa.F:olympe.D.sa.C,olympe.D.sa,'Map.has('+c+')')};return olympe.D.Fa([a],c=>b(c),olympe.D.sa)}Eg(a){return a in this.values}cj(a,b,c,d,e){let f=a[b];
316
- f||this.R.run(()=>{f=olympe.D.Jd(d,void 0,e);a[b]=f;f.Pa.onDestroy(()=>delete a[b]);olympe.D.nb(c)?pb(f,c):mb(f,c)});return f}Pc(){throw Error('Abstract method getFirstKey needs to be overridden');}If(){throw Error('Abstract method getFirstKey needs to be overridden');}nf(){null===this.L&&this.R.run(()=>{this.L=olympe.D.Jd(olympe.D.ga,olympe.D.Ba(this.size));this.L.Pa.onDestroy(()=>{this.L=null})});return this.L}zg(){return this.size}forEach(a,b){const c=this.um();a=this.lr(c,a,b);this.tm(c,a)}um(){return String(++this.fe)}tm(a,
317
- b){this.Hb[a]=b;olympe.D.La().R(()=>{const c=this.$;for(const d in c)Object.prototype.hasOwnProperty.call(c,d)&&delete c[d][a];delete this.Hb[a]});this.ae(b)}lr(a,b,c){const d=olympe.D.La();return(e,f)=>{d.run(()=>{const g=olympe.D.createNode(void 0,b,null,[e,f,this],null,`forEach-${a}-${f}`);if(void 0!==c)g.onDestroy(()=>{c(f)});this.xm(a,f,g)})}}xm(a,b,c){void 0===this.$[b]&&(this.$[b]={});this.$[b][a]=c}ae(a){const b=this.values;for(const c in b)if(Object.prototype.hasOwnProperty.call(b,c)&&!1===
318
- a(b[c],c,this))break}Ak(a,b){void 0!==this.values[a]&&this.Si(a,!0);this.values[a]=b;var c=this.Ka;null!==c&&void 0!==c[a]&&(b&&b instanceof olympe.D.Proxy?pb(c[a],b):mb(c[a],b));c=this.qb;null!==c&&void 0!==c[a]&&qb(c[a],!0);this.size++;c=this.Hb;for(const d in c)if(Object.prototype.hasOwnProperty.call(c,d))c[d](b,a,this)}Si(a,b){const c=this.values;if(Object.prototype.hasOwnProperty.call(c,a)){var d=(d=c[a])&&d.zf?d.Pa.Kb:d;var e=this.Ka;null!==e&&void 0!==e[a]&&nb(e[a]);e=this.qb;null!==e&&void 0!==
316
+ f||this.R.run(()=>{f=olympe.D.Jd(d,void 0,e);a[b]=f;f.Pa.onDestroy(()=>delete a[b]);olympe.D.nb(c)?pb(f,c):mb(f,c)});return f}Pc(){throw Error('Abstract method getFirstKey needs to be overridden');}If(){throw Error('Abstract method getFirstKey needs to be overridden');}nf(){null===this.L&&this.R.run(()=>{this.L=olympe.D.Jd(olympe.D.ga,olympe.D.Ba(this.size));this.L.Pa.onDestroy(()=>{this.L=null})});return this.L}zg(){return this.size}forEach(a,b){const c=this.tm();a=this.kr(c,a,b);this.sm(c,a)}tm(){return String(++this.fe)}sm(a,
317
+ b){this.Hb[a]=b;olympe.D.La().R(()=>{const c=this.$;for(const d in c)Object.prototype.hasOwnProperty.call(c,d)&&delete c[d][a];delete this.Hb[a]});this.ae(b)}kr(a,b,c){const d=olympe.D.La();return(e,f)=>{d.run(()=>{const g=olympe.D.createNode(void 0,b,null,[e,f,this],null,`forEach-${a}-${f}`);if(void 0!==c)g.onDestroy(()=>{c(f)});this.wm(a,f,g)})}}wm(a,b,c){void 0===this.$[b]&&(this.$[b]={});this.$[b][a]=c}ae(a){const b=this.values;for(const c in b)if(Object.prototype.hasOwnProperty.call(b,c)&&!1===
318
+ a(b[c],c,this))break}zk(a,b){void 0!==this.values[a]&&this.Si(a,!0);this.values[a]=b;var c=this.Ka;null!==c&&void 0!==c[a]&&(b&&b instanceof olympe.D.Proxy?pb(c[a],b):mb(c[a],b));c=this.qb;null!==c&&void 0!==c[a]&&qb(c[a],!0);this.size++;c=this.Hb;for(const d in c)if(Object.prototype.hasOwnProperty.call(c,d))c[d](b,a,this)}Si(a,b){const c=this.values;if(Object.prototype.hasOwnProperty.call(c,a)){var d=(d=c[a])&&d.zf?d.Pa.Kb:d;var e=this.Ka;null!==e&&void 0!==e[a]&&nb(e[a]);e=this.qb;null!==e&&void 0!==
319
319
  e[a]&&qb(e[a],!1);delete c[a];this.size--;b||this.Af()}a=this.$[a];if(void 0!==a)for(const f in a)Object.prototype.hasOwnProperty.call(a,f)&&a[f].destroy();return d}Af(){null!==this.L&&qb(this.L,this.size)}Vh(){var a=this.Ka;if(null!==a)for(const c in a)Object.prototype.hasOwnProperty.call(a,c)&&nb(a[c]);a=this.qb;if(null!==a)for(var b in a)Object.prototype.hasOwnProperty.call(a,b)&&qb(a[b],!1);for(const c in this.values)Object.prototype.hasOwnProperty.call(this.values,c)&&delete this.values[c];for(const c in this.$)if(Object.prototype.hasOwnProperty.call(this.$,
320
320
  c)){b=this.$[c];for(const d in b)Object.prototype.hasOwnProperty.call(b,d)&&b[d].destroy()}this.size=0;null!==this.L&&qb(this.L,this.size)}Ug(){const a=this.values;let b='\n';for(const c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b+=a[c]+'\n');return b}};olympe.D.li.ma=[olympe.D.Pg];m=olympe.D.li.prototype;m.Bh.K=olympe.D.J.C;m.Wb.K=olympe.D.J.C;m.Ed.K=olympe.D.J.C;m.get.K=new olympe.D.J(()=>Object,[],'valueType');m.kh.K=olympe.D.J.C;m.has.K=olympe.D.J.R;m.Eg.K=olympe.D.J.C;m.cj.K=olympe.D.J.C;
321
- m.nf.K=olympe.D.J.G;m.zg.K=olympe.D.J.C;m.forEach.K=new olympe.D.J(()=>{},[]);m.um.K=olympe.D.J.C;m.tm.K=olympe.D.J.C;m.lr.K=olympe.D.J.C;m.xm.K=olympe.D.J.C;m.ae.K=olympe.D.J.C;m.Ak.K=olympe.D.J.C;m.Si.K=olympe.D.J.C;m.Af.K=olympe.D.J.C;m.Vh.K=olympe.D.J.C;m.Ug.K=olympe.D.J.C;olympe.D.zj=class extends olympe.D.li{constructor(a,b){super(a,b);this.F=Object.create(null);this.C=[];this.ta=this.Va=this.Ua=this.ja=null}Ed(a){super.Ed(a);if(null!==this.ta)for(let b of this.ta.values())lb(b,a)}Pc(){return this.qe(0)}If(){return this.Ue(0)}ee(a){const b=c=>{null===this.Ua&&(this.Ua=Object.create(null));let d=this.Hf(a);d=void 0!==d?olympe.D.Ba(d):void 0;return this.cj(this.Ua,c,d,olympe.D.ga,`List.getRank(${c})`)};return olympe.D.nb(a)?L(olympe.D.createNode(olympe.D.ga,b,null,
321
+ m.nf.K=olympe.D.J.G;m.zg.K=olympe.D.J.C;m.forEach.K=new olympe.D.J(()=>{},[]);m.tm.K=olympe.D.J.C;m.sm.K=olympe.D.J.C;m.kr.K=olympe.D.J.C;m.wm.K=olympe.D.J.C;m.ae.K=olympe.D.J.C;m.zk.K=olympe.D.J.C;m.Si.K=olympe.D.J.C;m.Af.K=olympe.D.J.C;m.Vh.K=olympe.D.J.C;m.Ug.K=olympe.D.J.C;olympe.D.yj=class extends olympe.D.li{constructor(a,b){super(a,b);this.F=Object.create(null);this.C=[];this.ta=this.Va=this.Sa=this.ja=null}Ed(a){super.Ed(a);if(null!==this.ta)for(let b of this.ta.values())lb(b,a)}Pc(){return this.qe(0)}If(){return this.Ue(0)}ee(a){const b=c=>{null===this.Sa&&(this.Sa=Object.create(null));let d=this.Hf(a);d=void 0!==d?olympe.D.Ba(d):void 0;return this.cj(this.Sa,c,d,olympe.D.ga,`List.getRank(${c})`)};return olympe.D.nb(a)?L(olympe.D.createNode(olympe.D.ga,b,null,
322
322
  [a.Pa],[0],'onResolved('+(b.name||'')+')')):b(a)}Hf(a){return this.F[a]}Ue(a){const b=c=>{const d=c.valueOf(),e=this.Gf(d);null===this.Va&&(this.Va=Object.create(null));return this.cj(this.Va,String(d),e,String,'List.getKeyAt('+c+')')};return olympe.D.Fa([a],c=>b(c),String)}Gf(a){return this.C[a.valueOf()]}qe(a){if(olympe.D.nb(a))return this.get(olympe.D.Fa([a],c=>{c=this.Ue(c);if(!Xa(c.Pa)){const d=olympe.D.La();olympe.D.Uf(d)&&gb(d)}return c},String));null===this.ta&&(this.ta=new Map);let b=this.ta.get(a);
323
- b||this.R.run(()=>{b=this.get(this.Ue(a));this.ta.set(a,b);b.Pa.onDestroy(()=>this.ta.delete(a))});return b}Te(a){return this.kh(this.Gf(a))}$i(a,b,c,d){let e=this.um();a=this.Sr(e,a,b,c,d);this.tm(e,a)}Sr(a,b,c,d,e){return olympe.D.La().F((f,g)=>{let h=!1,k=olympe.D.cf([b,c,this.ee(g)],(l,n,p)=>{p>=l&&p<l+n?h||(d(f,g,this),h=!0):h&&(e(g),h=!1)});if(void 0!==e)k.onDestroy(e.bind(null,g));this.xm(a,g,k)})}ci(){null===this.ja&&this.R.run(()=>{this.ja=olympe.D.Jd(Array,this.C.filter(a=>void 0!==a));
324
- this.ja.Pa.onDestroy(()=>{this.L=null})});return this.ja}ae(a){if(this.C.length!==this.size)super.ae(a);else{var b=this.values;for(let c of this.C.filter(d=>void 0!==d))if(Object.prototype.hasOwnProperty.call(b,c)&&!1===a(b[c],c,this))break}}wm(a,b){const c=this.Ua,d=this.Va,e=this.F[a],f=b.valueOf();if(e!==f||this.C[e]!==a){var g=this.C[f];void 0!==g&&delete this.F[g];void 0!==e&&null!==e&&this.C[e]===a&&(this.C[e]=void 0);this.F[a]=f;this.C[f]=a;null!==c&&(void 0!==g&&void 0!==c[g]&&nb(c[g]),void 0!==
325
- c[a]&&mb(c[a],olympe.D.Ba(f)));null!==d&&(void 0!==e&&null!==e&&void 0!==d[e]&&nb(d[e]),void 0!==d[b]&&mb(d[b],a))}}vm(a){var b=this.Va,c=this.F[a];null!==c&&void 0!==c&&null!==b&&(b=b[c],void 0!==b&&b.Pa.Kb===a&&nb(b));delete this.F[a];this.C.splice(c,1);c=this.Ua;null!==c&&void 0!==c[a]&&nb(c[a])}mr(){if(null!==this.ja){const a=this.C,b=this.ja.Pa.Kb;b&&a.join(',')!==b.join(',')&&mb(this.ja,a)}}Af(){this.mr();super.Af()}Vh(){var a=this.F;for(b in a)delete a[b];this.C.length=0;a=this.Ua;if(null!==
326
- a)for(b in a)nb(a[b]);a=this.Va;if(null!==a)for(b in a)nb(a[parseInt(b,10)]);var b=this.ja;null!==b&&(eb(b.Pa),mb(b,this.C));return olympe.D.li.prototype.Vh.call(this)}Ug(){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.D.zj.ma=[olympe.D.md];m=olympe.D.zj.prototype;m.Ed.K=olympe.D.J.C;m.Pc.K=new olympe.D.J(()=>Object,[]);m.If.K=new olympe.D.J(()=>String,[]);m.ee.K=olympe.D.J.G;m.Hf.K=olympe.D.J.C;
327
- m.Ue.K=new olympe.D.J(()=>String,[]);m.Gf.K=olympe.D.J.C;m.qe.K=new olympe.D.J(()=>Object,[]);m.Te.K=olympe.D.J.C;m.$i.K=new olympe.D.J(()=>{},[]);m.Sr.K=olympe.D.J.C;m.ci.K=new olympe.D.J(()=>Array,[]);m.ae.K=olympe.D.J.C;m.wm.K=olympe.D.J.C;m.vm.K=olympe.D.J.C;m.mr.K=olympe.D.J.C;m.Af.K=olympe.D.J.C;m.Vh.K=olympe.D.J.C;m.Ug.K=olympe.D.J.C;olympe.D.Map=class extends olympe.D.li{constructor(a){a===olympe.D.Proxy&&(a=Object);super(a);this.C=this.F=null}Ed(a){a===olympe.D.Proxy&&(a=Object);null!==this.F&&lb(this.F,a);super.Ed(a)}Pc(){null===this.F&&this.Hm();return this.F}If(){null===this.C&&this.Hm();return this.C}Hm(){this.Bh().run(()=>{this.F=olympe.D.Jd(this.Wb());this.C=olympe.D.Jd(String);this.tj(this.Mm())})}Mm(){const a=this.values;let b,c;for(b in a)if(Object.prototype.hasOwnProperty.call(a,b)){c=b;break}return c}tj(a){if(void 0!==
328
- a){const b=this.values[a];b&&b instanceof olympe.D.Proxy?pb(this.F,b):mb(this.F,b);mb(this.C,a)}else void 0!==this.F.Pa.Kb&&(nb(this.F),nb(this.C))}set(a,b){this.Ak(a,b);1===this.size&&null!==this.C&&this.tj(a);this.Af()}remove(a){const b=this.Si(a);null!==this.C&&this.C.Pa.Kb===a&&this.tj(this.Mm());return b}clear(){this.Vh();null!==this.C&&this.tj()}};m=olympe.D.Map.prototype;m.Ed.K=olympe.D.J.C;m.Pc.K=new olympe.D.J(()=>Object,[]);m.If.K=new olympe.D.J(()=>String,[]);m.Hm.K=olympe.D.J.C;
329
- m.Mm.K=olympe.D.J.C;m.tj.K=olympe.D.J.C;m.set.K=olympe.D.J.C;m.remove.K=new olympe.D.J(()=>Object,[]);m.clear.K=olympe.D.J.C;olympe.D.Vg=class extends olympe.D.zj{constructor(a){super(a)}set(a,b,c){this.Ak(a,b);void 0!==c&&olympe.D.yc([c],d=>{this.wm(a,d)});this.Af()}remove(a){this.vm(a);return this.Si(a)}clear(){this.Vh()}};olympe.D.Vg.prototype.remove.K=olympe.D.J.C;olympe.D.Vg.prototype.clear.K=olympe.D.J.C;olympe.D.ls=class extends olympe.D.Oj{constructor(a,b){super(olympe.D.ga,'animatedFlowSource');this.duration=a;this.C=b||olympe.D.ga.uo.Cp}Ib(){return olympe.D.Tx(this.node,this.duration,this.C,void 0)}};let yb=null;olympe.D.N=void 0;olympe.D.nn=void 0;olympe.D.Zh=void 0;olympe.D.Uh=new Map;olympe.D.Uh.set(0,olympe.D.ga.ZERO);olympe.D.Uh.set(1,olympe.D.ga.ONE);olympe.D.Uh.set(2,olympe.D.ga.bv);olympe.D.zk=new Map;olympe.D.zk.set('',olympe.D.Za.EMPTY);olympe.D.zk.set(' ',olympe.D.Za.Pu);olympe.D.createNode=function(a,b,c,d,e,f,g,h){return new olympe.D.Node({valueType:a,zd:b,Yf:c,Ym:d,debug:g,ug:e,wd:f,Ui:h})};olympe.D.Uf=function(a){return!!(a&&a instanceof olympe.D.Node)};
330
- olympe.D.Jd=function(a,b,c){a=olympe.D.createNode(a,void 0,void 0,void 0,void 0,c);olympe.D.Uf(b)?hb(a,b):olympe.D.nb(b)?hb(a,b.Pa):K(a,b);return L(a)};olympe.D.nb=function(a){return!(!a||!a.zf)};olympe.D.Vf=function(a){return!(!a||!(a instanceof olympe.D.Node||a.zf))};olympe.D.an=function(a){return olympe.D.Uf(a)||a instanceof olympe.D.Zb||a instanceof olympe.D.yq};olympe.D.ei=function(a){return a instanceof olympe.D.Oj};
331
- olympe.D.Uk=function(a,b){if(void 0!==a){olympe.D.ei(a)&&(a=a.Ib().Pa);if(!olympe.D.Vf(a))return b(a);var c=[];olympe.D.nb(a)?c.push(a.Pa):c.push(a);return olympe.D.createNode(void 0,b,null,c,[0],'onResolved')}};olympe.D.$a=function(a,b){let c=a;olympe.D.nb(a)?c=a.Pa.Kb:olympe.D.Uf(a)?c=a.Kb:olympe.D.ei(a)&&(c=a.Ib().Pa.Kb);return void 0===c?b:c};
332
- olympe.D.bf=function(a,b){let c;olympe.D.nb(a)?c=a.Pa:olympe.D.Uf(a)?c=a:olympe.D.ei(a)&&(c=a.Ib().Pa);c&&olympe.D.yc([b],d=>{c.bf(d)},'setDefaultValue');return a};olympe.D.cf=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.jr?(h=h.Pa,g.push(k)):h instanceof olympe.D.Node?g.push(k):olympe.D.ei(h)&&(h=h.Ib().Pa,g.push(k))),f[k]=h;return olympe.D.createNode(c,b,null,f,g,d||'syncNodes')};
323
+ b||this.R.run(()=>{b=this.get(this.Ue(a));this.ta.set(a,b);b.Pa.onDestroy(()=>this.ta.delete(a))});return b}Te(a){return this.kh(this.Gf(a))}$i(a,b,c,d){let e=this.tm();a=this.Rr(e,a,b,c,d);this.sm(e,a)}Rr(a,b,c,d,e){return olympe.D.La().F((f,g)=>{let h=!1,k=olympe.D.cf([b,c,this.ee(g)],(l,n,p)=>{p>=l&&p<l+n?h||(d(f,g,this),h=!0):h&&(e(g),h=!1)});if(void 0!==e)k.onDestroy(e.bind(null,g));this.wm(a,g,k)})}ci(){null===this.ja&&this.R.run(()=>{this.ja=olympe.D.Jd(Array,this.C.filter(a=>void 0!==a));
324
+ this.ja.Pa.onDestroy(()=>{this.L=null})});return this.ja}ae(a){if(this.C.length!==this.size)super.ae(a);else{var b=this.values;for(let c of this.C.filter(d=>void 0!==d))if(Object.prototype.hasOwnProperty.call(b,c)&&!1===a(b[c],c,this))break}}vm(a,b){const c=this.Sa,d=this.Va,e=this.F[a],f=b.valueOf();if(e!==f||this.C[e]!==a){var g=this.C[f];void 0!==g&&delete this.F[g];void 0!==e&&null!==e&&this.C[e]===a&&(this.C[e]=void 0);this.F[a]=f;this.C[f]=a;null!==c&&(void 0!==g&&void 0!==c[g]&&nb(c[g]),void 0!==
325
+ c[a]&&mb(c[a],olympe.D.Ba(f)));null!==d&&(void 0!==e&&null!==e&&void 0!==d[e]&&nb(d[e]),void 0!==d[b]&&mb(d[b],a))}}um(a){var b=this.Va,c=this.F[a];null!==c&&void 0!==c&&null!==b&&(b=b[c],void 0!==b&&b.Pa.Kb===a&&nb(b));delete this.F[a];this.C.splice(c,1);c=this.Sa;null!==c&&void 0!==c[a]&&nb(c[a])}lr(){if(null!==this.ja){const a=this.C,b=this.ja.Pa.Kb;b&&a.join(',')!==b.join(',')&&mb(this.ja,a)}}Af(){this.lr();super.Af()}Vh(){var a=this.F;for(b in a)delete a[b];this.C.length=0;a=this.Sa;if(null!==
326
+ a)for(b in a)nb(a[b]);a=this.Va;if(null!==a)for(b in a)nb(a[parseInt(b,10)]);var b=this.ja;null!==b&&(eb(b.Pa),mb(b,this.C));return olympe.D.li.prototype.Vh.call(this)}Ug(){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.D.yj.ma=[olympe.D.md];m=olympe.D.yj.prototype;m.Ed.K=olympe.D.J.C;m.Pc.K=new olympe.D.J(()=>Object,[]);m.If.K=new olympe.D.J(()=>String,[]);m.ee.K=olympe.D.J.G;m.Hf.K=olympe.D.J.C;
327
+ m.Ue.K=new olympe.D.J(()=>String,[]);m.Gf.K=olympe.D.J.C;m.qe.K=new olympe.D.J(()=>Object,[]);m.Te.K=olympe.D.J.C;m.$i.K=new olympe.D.J(()=>{},[]);m.Rr.K=olympe.D.J.C;m.ci.K=new olympe.D.J(()=>Array,[]);m.ae.K=olympe.D.J.C;m.vm.K=olympe.D.J.C;m.um.K=olympe.D.J.C;m.lr.K=olympe.D.J.C;m.Af.K=olympe.D.J.C;m.Vh.K=olympe.D.J.C;m.Ug.K=olympe.D.J.C;olympe.D.Map=class extends olympe.D.li{constructor(a){a===olympe.D.Proxy&&(a=Object);super(a);this.C=this.F=null}Ed(a){a===olympe.D.Proxy&&(a=Object);null!==this.F&&lb(this.F,a);super.Ed(a)}Pc(){null===this.F&&this.Gm();return this.F}If(){null===this.C&&this.Gm();return this.C}Gm(){this.Bh().run(()=>{this.F=olympe.D.Jd(this.Wb());this.C=olympe.D.Jd(String);this.sj(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}sj(a){if(void 0!==
328
+ a){const b=this.values[a];b&&b instanceof olympe.D.Proxy?pb(this.F,b):mb(this.F,b);mb(this.C,a)}else void 0!==this.F.Pa.Kb&&(nb(this.F),nb(this.C))}set(a,b){this.zk(a,b);1===this.size&&null!==this.C&&this.sj(a);this.Af()}remove(a){const b=this.Si(a);null!==this.C&&this.C.Pa.Kb===a&&this.sj(this.Lm());return b}clear(){this.Vh();null!==this.C&&this.sj()}};m=olympe.D.Map.prototype;m.Ed.K=olympe.D.J.C;m.Pc.K=new olympe.D.J(()=>Object,[]);m.If.K=new olympe.D.J(()=>String,[]);m.Gm.K=olympe.D.J.C;
329
+ m.Lm.K=olympe.D.J.C;m.sj.K=olympe.D.J.C;m.set.K=olympe.D.J.C;m.remove.K=new olympe.D.J(()=>Object,[]);m.clear.K=olympe.D.J.C;olympe.D.Vg=class extends olympe.D.yj{constructor(a){super(a)}set(a,b,c){this.zk(a,b);void 0!==c&&olympe.D.yc([c],d=>{this.vm(a,d)});this.Af()}remove(a){this.um(a);return this.Si(a)}clear(){this.Vh()}};olympe.D.Vg.prototype.remove.K=olympe.D.J.C;olympe.D.Vg.prototype.clear.K=olympe.D.J.C;olympe.D.ks=class extends olympe.D.Nj{constructor(a,b){super(olympe.D.ga,'animatedFlowSource');this.duration=a;this.C=b||olympe.D.ga.to.Bp}Ib(){return olympe.D.Sx(this.node,this.duration,this.C,void 0)}};let yb=null;olympe.D.N=void 0;olympe.D.mn=void 0;olympe.D.Zh=void 0;olympe.D.Uh=new Map;olympe.D.Uh.set(0,olympe.D.ga.ZERO);olympe.D.Uh.set(1,olympe.D.ga.ONE);olympe.D.Uh.set(2,olympe.D.ga.av);olympe.D.yk=new Map;olympe.D.yk.set('',olympe.D.Za.EMPTY);olympe.D.yk.set(' ',olympe.D.Za.Ou);olympe.D.createNode=function(a,b,c,d,e,f,g,h){return new olympe.D.Node({valueType:a,zd:b,Yf:c,Xm:d,debug:g,ug:e,wd:f,Ui:h})};olympe.D.Uf=function(a){return!!(a&&a instanceof olympe.D.Node)};
330
+ olympe.D.Jd=function(a,b,c){a=olympe.D.createNode(a,void 0,void 0,void 0,void 0,c);olympe.D.Uf(b)?hb(a,b):olympe.D.nb(b)?hb(a,b.Pa):K(a,b);return L(a)};olympe.D.nb=function(a){return!(!a||!a.zf)};olympe.D.Vf=function(a){return!(!a||!(a instanceof olympe.D.Node||a.zf))};olympe.D.$m=function(a){return olympe.D.Uf(a)||a instanceof olympe.D.Zb||a instanceof olympe.D.xq};olympe.D.ei=function(a){return a instanceof olympe.D.Nj};
331
+ olympe.D.Tk=function(a,b){if(void 0!==a){olympe.D.ei(a)&&(a=a.Ib().Pa);if(!olympe.D.Vf(a))return b(a);var c=[];olympe.D.nb(a)?c.push(a.Pa):c.push(a);return olympe.D.createNode(void 0,b,null,c,[0],'onResolved')}};olympe.D.$a=function(a,b){let c=a;olympe.D.nb(a)?c=a.Pa.Kb:olympe.D.Uf(a)?c=a.Kb:olympe.D.ei(a)&&(c=a.Ib().Pa.Kb);return void 0===c?b:c};
332
+ olympe.D.bf=function(a,b){let c;olympe.D.nb(a)?c=a.Pa:olympe.D.Uf(a)?c=a:olympe.D.ei(a)&&(c=a.Ib().Pa);c&&olympe.D.yc([b],d=>{c.bf(d)},'setDefaultValue');return a};olympe.D.cf=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.ir?(h=h.Pa,g.push(k)):h instanceof olympe.D.Node?g.push(k):olympe.D.ei(h)&&(h=h.Ib().Pa,g.push(k))),f[k]=h;return olympe.D.createNode(c,b,null,f,g,d||'syncNodes')};
333
333
  olympe.D.ie=function(a,b,c,d){return L(olympe.D.cf(a,b,c,d||'syncProxies'))};const zb=a=>{for(const b of a)if(olympe.D.Vf(b)||olympe.D.ei(b))return!1;return!0};olympe.D.Fa=function(a,b,c,d,e){if(zb(a))return b(...a);const f=olympe.D.cf(a,b,c,d||'TransformFlows');e&&olympe.D.yc([e],g=>{f.bf(g)},'setDefaultValue');return L(f)};olympe.D.yc=function(a,b,c){zb(a)?b(...a):olympe.D.cf(a,b,void 0,c||'processFlows')};
334
- olympe.D.Ur=function(a,b){if(zb(a))b(...a);else{const c=olympe.D.La();olympe.D.cf(a,(...d)=>{olympe.D.La().destroy();c.run(b,...d)},void 0,'processFlowsOnce')}};olympe.D.ln=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.D.nb(g)?(g=g.Pa,f.push(h)):g instanceof olympe.D.Node?f.push(h):olympe.D.ei(g)&&(g=g.Ib().Pa,f.push(h))),e[h]=g;0!==f.length&&new olympe.D.Node({zd:b,Ym:e,ug:f,my:!1,wd:c})};
335
- olympe.D.nD=function(a,b,c){const d=olympe.D.La();olympe.D.ln(a,(...e)=>{olympe.D.La().destroy();d.run(b,...e)},c||'processFutureFlowsOnce')};olympe.D.OC=function(a,b,c){a=new olympe.D.Oj(a,c);b(a);return a.Ib()};olympe.D.Qc=function(a,b='flowSource'){return new olympe.D.Oj(a,b)};olympe.D.qD=function(a,b,c,d){const e=olympe.D.La();olympe.D.cf(a,(...f)=>{olympe.D.La().destroy();e.run(b,...f)},c,d||'syncProxiesOnce')};
336
- olympe.D.Xm=function(a,b,c){olympe.D.Fa([a],d=>d.valueOf()?b.apply(null,void 0):c&&c.apply(null,void 0),Object,'If')};olympe.D.TC=function(a,b,...c){return a?a.run(b,...c):b(...c)};olympe.D.vD=function(a){return olympe.D.La().F(a)};olympe.D.RC=function(a,b,c){olympe.D.Xv(a?a.Pa:a,b,c)};
337
- olympe.D.Xv=function(a,b,c){if(a){var d=a.Z();null===yb&&(yb={});if(yb[d])olympe.D.N.log(`Already started node #${d} dump`+(b?`: ${b}`:''));else{yb[d]=!0;var e=`Starting node #${d} dump`+(b?`: ${b}`:'');c?olympe.D.N.warn(e):olympe.D.N.log(e);var f=`#${d}`+(b?`: ${b}`:'')+':';c=olympe.D.createNode(null,g=>{void 0===g?olympe.D.N.log(f,'undefined'):null===g?olympe.D.N.log(f,'null'):olympe.D.N.log(f,String(g))},null,[a],[0],'DataFlowDump');a.onDestroy(()=>{olympe.D.N.log(`Node #${d} destroyed`+(b?`: ${b}`:
338
- ''))});c.onDestroy(()=>{delete yb[d]})}}else olympe.D.N.log('NOT starting node dump, node is '+String(a))};olympe.D.QC=function(){let a='',b=olympe.D.La();for(;null!==b;)a+=b.Xc()+' --\x3e ',b=b.getParent();olympe.D.N.log(a)};
339
- olympe.D.Ba=function(a){if(void 0===a)return olympe.D.ga.ZERO;if(a instanceof olympe.D.ga)return a;a&&a.valueOf&&(a=a.valueOf());if('number'===typeof a){if(isNaN(a))return olympe.D.ga.Lp;if(a===Math.PI)return olympe.D.ga.PI;if(Infinity===a)return olympe.D.ga.kt;if(-Infinity===a)return olympe.D.ga.du;if(isNaN(a))var b=!1;else b=parseFloat(a),b=(b|0)===b;return b&&-1<=a&&100>=a?(olympe.D.Uh.has(a)||olympe.D.Uh.set(a,new olympe.D.ga(a)),olympe.D.Uh.get(a)):new olympe.D.ga(a)}return null};
340
- olympe.D.ge=function(a){return void 0===a?olympe.D.Jd(olympe.D.ga):olympe.D.Jd(olympe.D.ga,olympe.D.Vf(a)?a:olympe.D.Ba(a))};olympe.D.Tx=olympe.D.ga.animate;olympe.D.hD=function(a,b){return new olympe.D.ls(a,b)};olympe.D.yb=function(a){if(a instanceof olympe.D.Za)return a;a instanceof Object&&(a=a.valueOf());const b=typeof a;if('string'===b||'number'===b||'boolean'===b)return a=String(a),olympe.D.zk.has(a)?olympe.D.zk.get(a):new olympe.D.Za(a)};
341
- olympe.D.kD=function(a){return void 0===a?olympe.D.Jd(olympe.D.Za):olympe.D.Jd(olympe.D.Za,olympe.D.Vf(a)?a:olympe.D.yb(a))};olympe.D.wc=function(a){return a instanceof olympe.D.sa?a:void 0!==a&&null!==a&&a.valueOf()?olympe.D.sa.F:olympe.D.sa.C};olympe.D.hy=function(a){return void 0===a?olympe.D.Jd(olympe.D.sa):olympe.D.Jd(olympe.D.sa,olympe.D.Vf(a)?a:olympe.D.wc(a))};olympe.D.Ux=function(a){if(a instanceof Date)return new olympe.D.ib(a)};
342
- olympe.D.jD=function(a){return olympe.D.Jd(olympe.D.ib,void 0!==a?new olympe.D.ib(a):null)};olympe.D.Rr=a=>a instanceof olympe.D.sa||a instanceof olympe.D.ga||a instanceof olympe.D.Za||a instanceof olympe.D.ib;olympe.D.lD=function(a,b){return olympe.D.Jd(olympe.D.kc,void 0===a&&void 0===b?void 0:new olympe.D.kc(a,b))};olympe.D.gy=function(a,b,c,d){let e;void 0!==a&&(a instanceof olympe.D.Color?e=a:e=olympe.D.Color.create(a,b,c,d));return olympe.D.Jd(olympe.D.Color,e)};olympe.D.iD=olympe.D.gy;
343
- olympe.D.Nv=function(a){olympe.D.N=a;olympe.D.Zh=olympe.D.lh()};olympe.D.lh=function(){olympe.D.nn||(olympe.D.nn=new olympe.D.yq);return olympe.D.nn};olympe.D.La=function(){olympe.D.Zh||(olympe.D.Zh=olympe.D.lh());return olympe.D.Zh};olympe.D.Xr=function(a){const b=olympe.D.Zh;olympe.D.an(a)&&(olympe.D.Zh=a);return b||null};
334
+ olympe.D.Tr=function(a,b){if(zb(a))b(...a);else{const c=olympe.D.La();olympe.D.cf(a,(...d)=>{olympe.D.La().destroy();c.run(b,...d)},void 0,'processFlowsOnce')}};olympe.D.kn=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.D.nb(g)?(g=g.Pa,f.push(h)):g instanceof olympe.D.Node?f.push(h):olympe.D.ei(g)&&(g=g.Ib().Pa,f.push(h))),e[h]=g;0!==f.length&&new olympe.D.Node({zd:b,Xm:e,ug:f,ly:!1,wd:c})};
335
+ olympe.D.mD=function(a,b,c){const d=olympe.D.La();olympe.D.kn(a,(...e)=>{olympe.D.La().destroy();d.run(b,...e)},c||'processFutureFlowsOnce')};olympe.D.NC=function(a,b,c){a=new olympe.D.Nj(a,c);b(a);return a.Ib()};olympe.D.Qc=function(a,b='flowSource'){return new olympe.D.Nj(a,b)};olympe.D.pD=function(a,b,c,d){const e=olympe.D.La();olympe.D.cf(a,(...f)=>{olympe.D.La().destroy();e.run(b,...f)},c,d||'syncProxiesOnce')};
336
+ olympe.D.Wm=function(a,b,c){olympe.D.Fa([a],d=>d.valueOf()?b.apply(null,void 0):c&&c.apply(null,void 0),Object,'If')};olympe.D.SC=function(a,b,...c){return a?a.run(b,...c):b(...c)};olympe.D.uD=function(a){return olympe.D.La().F(a)};olympe.D.QC=function(a,b,c){olympe.D.Wv(a?a.Pa:a,b,c)};
337
+ olympe.D.Wv=function(a,b,c){if(a){var d=a.Z();null===yb&&(yb={});if(yb[d])olympe.D.N.log(`Already started node #${d} dump`+(b?`: ${b}`:''));else{yb[d]=!0;var e=`Starting node #${d} dump`+(b?`: ${b}`:'');c?olympe.D.N.warn(e):olympe.D.N.log(e);var f=`#${d}`+(b?`: ${b}`:'')+':';c=olympe.D.createNode(null,g=>{void 0===g?olympe.D.N.log(f,'undefined'):null===g?olympe.D.N.log(f,'null'):olympe.D.N.log(f,String(g))},null,[a],[0],'DataFlowDump');a.onDestroy(()=>{olympe.D.N.log(`Node #${d} destroyed`+(b?`: ${b}`:
338
+ ''))});c.onDestroy(()=>{delete yb[d]})}}else olympe.D.N.log('NOT starting node dump, node is '+String(a))};olympe.D.PC=function(){let a='',b=olympe.D.La();for(;null!==b;)a+=b.Xc()+' --\x3e ',b=b.getParent();olympe.D.N.log(a)};
339
+ olympe.D.Ba=function(a){if(void 0===a)return olympe.D.ga.ZERO;if(a instanceof olympe.D.ga)return a;a&&a.valueOf&&(a=a.valueOf());if('number'===typeof a){if(isNaN(a))return olympe.D.ga.Kp;if(a===Math.PI)return olympe.D.ga.PI;if(Infinity===a)return olympe.D.ga.jt;if(-Infinity===a)return olympe.D.ga.cu;if(isNaN(a))var b=!1;else b=parseFloat(a),b=(b|0)===b;return b&&-1<=a&&100>=a?(olympe.D.Uh.has(a)||olympe.D.Uh.set(a,new olympe.D.ga(a)),olympe.D.Uh.get(a)):new olympe.D.ga(a)}return null};
340
+ olympe.D.ge=function(a){return void 0===a?olympe.D.Jd(olympe.D.ga):olympe.D.Jd(olympe.D.ga,olympe.D.Vf(a)?a:olympe.D.Ba(a))};olympe.D.Sx=olympe.D.ga.animate;olympe.D.gD=function(a,b){return new olympe.D.ks(a,b)};olympe.D.yb=function(a){if(a instanceof olympe.D.Za)return a;a instanceof Object&&(a=a.valueOf());const b=typeof a;if('string'===b||'number'===b||'boolean'===b)return a=String(a),olympe.D.yk.has(a)?olympe.D.yk.get(a):new olympe.D.Za(a)};
341
+ olympe.D.jD=function(a){return void 0===a?olympe.D.Jd(olympe.D.Za):olympe.D.Jd(olympe.D.Za,olympe.D.Vf(a)?a:olympe.D.yb(a))};olympe.D.wc=function(a){return a instanceof olympe.D.sa?a:void 0!==a&&null!==a&&a.valueOf()?olympe.D.sa.F:olympe.D.sa.C};olympe.D.gy=function(a){return void 0===a?olympe.D.Jd(olympe.D.sa):olympe.D.Jd(olympe.D.sa,olympe.D.Vf(a)?a:olympe.D.wc(a))};olympe.D.Tx=function(a){if(a instanceof Date)return new olympe.D.ib(a)};
342
+ olympe.D.iD=function(a){return olympe.D.Jd(olympe.D.ib,void 0!==a?new olympe.D.ib(a):null)};olympe.D.Qr=a=>a instanceof olympe.D.sa||a instanceof olympe.D.ga||a instanceof olympe.D.Za||a instanceof olympe.D.ib;olympe.D.kD=function(a,b){return olympe.D.Jd(olympe.D.kc,void 0===a&&void 0===b?void 0:new olympe.D.kc(a,b))};olympe.D.ey=function(a,b,c,d){let e;void 0!==a&&(a instanceof olympe.D.Color?e=a:e=olympe.D.Color.create(a,b,c,d));return olympe.D.Jd(olympe.D.Color,e)};olympe.D.hD=olympe.D.ey;
343
+ olympe.D.Mv=function(a){olympe.D.N=a;olympe.D.Zh=olympe.D.lh()};olympe.D.lh=function(){olympe.D.mn||(olympe.D.mn=new olympe.D.xq);return olympe.D.mn};olympe.D.La=function(){olympe.D.Zh||(olympe.D.Zh=olympe.D.lh());return olympe.D.Zh};olympe.D.Wr=function(a){const b=olympe.D.Zh;olympe.D.$m(a)&&(olympe.D.Zh=a);return b||null};
344
344
  olympe.D.lc=a=>{a='string'===typeof a?JSON.parse(a):a;if(a.type){let b=null;switch(a.type){case 'dateTime':b=olympe.D.ib.lc(a);break;case 'number':b=olympe.D.ga.lc(a);break;case 'string':b=olympe.D.Za.lc(a);break;case 'vector2':b=olympe.D.kc.lc(a);break;case 'color':b=olympe.D.Color.lc(a);break;case 'boolean':b=olympe.D.sa.lc(a)}return b}return null};function Ab(a){a.C.G()||(a.G.forEach(b=>{b.destroy()}),a.G.clear(),a.F.clear(),a.size.clear(),a.R.clear(),a.W.length=0,a.L.length=0)}
345
- olympe.D.qB=class{constructor(){this.C=new olympe.D.Zb('Slot Manager context');this.G=new Map;this.C.run(()=>{this.F=olympe.D.Qc(Bb,'Last slot manager entry');this.size=rb(olympe.D.Qc(olympe.D.ga,'SlotManager size').repeat(this.F.Ib().Tm()),olympe.D.ga.ZERO);this.R=rb(olympe.D.Qc(olympe.D.ga,'last valid slots'),olympe.D.Ba(-1))});this.W=[];this.L=[];this.C.onDestroy(()=>{Ab(this)})}};
346
- class Bb{constructor(a,b,c,d){this.id=a;this.F=new olympe.D.Zb('Slot manager entry');this.L=c;this.R=d;this.F.run(()=>{const e=rb(olympe.D.Qc(olympe.D.ga),olympe.D.ga.ZERO);olympe.D.nb(b)?e.repeat(b):e.update(b);this.C=olympe.D.Qc(olympe.D.ga);this.G=this.C.Ib().he(e.Ib())});this.next=null}Z(){return this.id}jx(){return this.C.Ib()}Tm(){return this.G}ee(){return this.L}vx(){return this.R}Qy(a){this.L=a}Ay(a){null===a?this.C.update(olympe.D.ga.ZERO):(this.C.repeat(a.Tm()),a.next=this)}wt(){this.C.clear();
347
- this.next=null}destroy(){this.F.destroy();this.G=this.C=this.next=null}}m=Bb.prototype;m.Z.K=olympe.D.J.C;m.jx.K=new olympe.D.J(()=>olympe.D.ga);m.Tm.K=new olympe.D.J(()=>olympe.D.ga);m.ee.K=olympe.D.J.C;m.vx.K=olympe.D.J.C;m.Qy.K=olympe.D.J.C;m.Ay.K=olympe.D.J.C;m.wt.K=olympe.D.J.C;m.destroy.K=olympe.D.J.C;olympe.D.P={Ea:'df.Logger'};olympe.U.config(a=>{D(a,olympe.D.Config.Mp,Number.POSITIVE_INFINITY);C(a,olympe.D.P.Ea,[olympe.ra.P.Aa],b=>b.Oc('df'))},'olympe.df');olympe.U.run([olympe.D.P.Ea],a=>{olympe.D.Nv(a)},'olympe.df');olympe.host={};const Cb=new Map,Db=new Map;olympe.host.Qp=class{static register(a,b,...c){Cb.set(a,b);0<c.length&&Db.set(a,c)}static create(a,b,c,d){const e=Cb.get(a);if(void 0===e)throw Error('Undefined UI element type: '+a);a=Db.get(a);return void 0!==a?new e(b,c,...a.map(f=>ma(d,f))):new e(b,c)}};function Eb(a,b,c){a.N.debug('CREATE #',b,', type=',c);a.C.set(b,olympe.host.Qp.create(c,b,a.N,a.L))}function Fb(a,b,c,...d){const e=a.C.get(b);if(void 0!==e){a.N.L()<=olympe.ra.Ob.C.eg&&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.D.nb(f))b.push(a.C.get(f.kv)||null);else if('function'===typeof f){const g=f,h=olympe.D.La();b.push((...k)=>{h.G()||g(...k)})}else b.push(f.valueOf());e[c].apply(e,b)}}
348
- function Gb(a){var b=olympe.host.ba.bd,c=olympe.host.ba.Pp.dr;++a.G;const d=a.G;Eb(a,d,c);const e=olympe.D.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],l=d+'_'+k;this.F.has(l)&&this.F.get(l).destroy();for(let n=0;n<f;n++){let p=arguments[n];olympe.D.nb(p)?(h.push(n),p=p.Pa):olympe.D.Uf(p)&&h.push(n);g[n]=p}0===h.length?e.run(()=>{Fb(this,d,k,...g)}):(f=olympe.D.createNode(void 0,(...n)=>{e.run(()=>
349
- {Fb(this,d,k,...n)})},void 0,g,h,'Native('+d+').'+k),this.F.set(l,f),f.onDestroy(()=>this.F.delete(l)));return null}.bind(a));e.R(a.R.bind(a,d));a=L(e);a.kv=d;K(e,a);return a}olympe.host.pa=class{constructor(a,b){this.N=a;this.L=b;this.G=0;this.C=new Map;this.F=new Map;a.debug('Starting host manager')}Ya(){return this.N}R(a){this.N.debug('DESTROY #',a);const b=this.C.get(a);this.C.delete(a);b.destroy()}};olympe.host.Fd=class{constructor(a){this.C=a;this.F=olympe.D.La()}L(){return this.C}$(){return this.C.Pa.$()||this.F.$()}G(){return this.C.Pa.G()}};olympe.host.Fd.prototype.L.K=new olympe.D.J(()=>olympe.host.ba.Fd,[]);olympe.host.rk=class{};olympe.host.Ci=class{constructor(){}C(){}F(){}kj(){}};function Hb(a){return(a=a.find(b=>'authToken'===b.na()))?a.getValue():null}olympe.host.Ci.F=class{constructor(a,b,c=!1){this.name=a;this.value=b;this.C=c}na(){return this.name}getValue(){return this.value}mb(a){return this.na()===a.na()&&this.getValue()===a.getValue()&&this.C===a.C}};function Ib(){const a={}.parameters;return new olympe.host.Ci.C(a?a.map(b=>new olympe.host.Ci.F(b.name,b.value,b.hidden)):[])}
350
- olympe.host.Ci.C=class{constructor(a){this.parameters=a}fn(a){const b=new Map(this.parameters.map((c,d)=>[c.na(),d]));a.parameters.forEach(c=>{b.has(c.na())?this.parameters[b.get(c.na())]=c:this.parameters.push(c)})}};function Jb(a,b){var c=olympe.host.af;const d=olympe.X.ec(),e=new olympe.D.Zb('onTimeout context');c.C.$(b,d,()=>{e.G()||e.$()||e.run(a);c.C.G(d)});return new olympe.host.bd.G(c.C,d)}function Kb(a,b){var c=olympe.host.af;const d=olympe.X.ec(),e=new olympe.D.Zb('onInterval context');c.C.W(b,d,()=>{e.G()||e.$()?c.C.F(d):e.run(a)});return new olympe.host.bd.F(c.C,d)}function Lb(a){var b=olympe.host.af;a=a instanceof olympe.host.bd.F?a.Z():a;b.C.F(a)}olympe.host.bd=class{constructor(a){this.C=Gb(a)}};
351
- olympe.host.bd.C=class{constructor(a,b){this.af=a;this.id=b}Z(){return this.id}cancel(){}};olympe.host.bd.L=class extends olympe.host.bd.C{cancel(){this.af.R(this.id)}};olympe.host.bd.G=class extends olympe.host.bd.C{cancel(){this.af.G(this.id)}};olympe.host.bd.F=class extends olympe.host.bd.C{cancel(){this.af.F(this.id)}};olympe.host.ba={};olympe.host.ba.Fd=class{destroy(){}};olympe.host.ba.Fd.prototype.destroy=olympe.host.ba.Fd.prototype.destroy;olympe.host.ba.Pp={Zy:100,az:101,$y:102,cz:103,bz:104,Yy:105,dB:201,bB:202,ZA:204,gB:205,YA:206,aB:207,eB:208,hB:209,iB:210,jB:211,$A:212,fB:218,cB:219,kB:220,XA:221,WA:222,tB:300,uB:301,vB:302,zB:303,AB:304,BB:305,wB:310,xB:311,yB:312,EA:400,FA:401,GA:402,AA:450,sA:500,qA:501,vA:502,uA:503,rA:504,tA:505,UB:600,LB:601,PB:602,HB:603,IB:604,FB:605,KB:606,$B:607,SB:608,CB:609,GB:610,JB:611,RB:612,WB:613,DB:614,VB:615,QB:616,ZB:617,MB:618,NB:619,OB:620,TB:630,EB:631,XB:632,YB:633,BC:700,eC:701,fC:702,
352
- gC:703,iC:704,jC:705,kC:706,hC:707,mC:708,lC:709,nC:710,rC:711,zC:712,oC:713,pC:714,sC:715,tC:716,vC:717,wC:718,yC:719,uC:720,xC:721,AC:722,qC:723,CC:724,DC:725,dr:800};olympe.host.ba.bd=class{R(){}$(){}G(){}W(){}F(){}};olympe.host.P={Mq:'host.System',wl:'host.HistoryManager',Aq:'host.Scheduler',Ea:'host.platform.Logger',Aa:'host.Manager'};olympe.host.af=null;olympe.U.config(function(a){ta(a,olympe.host.P.Mq);ta(a,olympe.host.P.wl);C(a,olympe.host.P.Ea,[olympe.ra.P.Aa],function(b){return b.Oc('host')});A(a,olympe.host.P.Aa,olympe.host.pa,olympe.host.P.Ea,olympe.U.P.dg);C(a,olympe.host.P.Aq,[olympe.host.P.Aa],b=>{null===olympe.host.af&&(olympe.host.af=new olympe.host.bd(b));return olympe.host.af},!0)},'olympe.host');
353
- olympe.U.run([olympe.host.P.Aq],a=>a,'olympe.host.scheduler');olympe.U.run([olympe.host.P.Aa],a=>a,'olympe.host');olympe.net={};olympe.net.eb={};olympe.net.eb.Yd={Wl:'POST',GET:'GET',ht:'HEAD',fk:'PUT',Ac:'DELETE',Rl:'OPTIONS',IA:'PATCH'};olympe.net.eb.ResponseType={sk:'text',dl:'blob',ARRAY_BUFFER:'arraybuffer'};olympe.net.eb.Headers={Ej:'content-type',lz:'content-length',ni:'authorization',ks:'access-control-allow-origin'};olympe.net.eb.mz={hA:'text/html',JSON:'application/json',GC:'application/zip'};olympe.net.eb.cd={ss:0,Gh:200,jl:201,xj:202,Xy:400,fv:401,Ys:403,CA:404,wA:405,Bq:500,Mu:503};function Mb(a){return a.host&&encodeURI(a.host)}function Nb(a){return encodeURI(a.path).replace(olympe.net.Ri.C,(b,c)=>'%'+c)}function Ob(a){return void 0===a.G?443===a.port:a.G}olympe.net.Ri=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)}C(){return`${Ob(this)?'wss':'ws'}://${Mb(this)}:${this.port}/${Nb(this)}`}toString(){return`${Mb(this)}:${this.port}/${Nb(this)}`}};
354
- olympe.net.Ri.C=/%25([0-9a-f]{2})/i;olympe.net.WebSocket=class{send(){}close(){}ja(){}da(){}$(){}F(){}};function Pb(a,b,c,d){a=olympe.X.jy(a.valueOf());if(!a.host&&!a.path)return null;const e=a.scheme?a.scheme.includes('s'):!1;b=new olympe.net.Sj(a.host,a.port||(e?443:80),a.path||'',e,b,c,d,a.query||void 0);a.ds&&(c=a.ds.split(':'),2===c.length&&(c=olympe.X.ai().C(Da(`${c[0]}:${c[1]}`)),Qb(b,{Authorization:`Basic ${c}`})));return b}function Rb(a){return void 0!==a.query?a.query.replace(/[^=&]+/g,b=>encodeURIComponent(b)):null}
345
+ olympe.D.pB=class{constructor(){this.C=new olympe.D.Zb('Slot Manager context');this.G=new Map;this.C.run(()=>{this.F=olympe.D.Qc(Bb,'Last slot manager entry');this.size=rb(olympe.D.Qc(olympe.D.ga,'SlotManager size').repeat(this.F.Ib().Sm()),olympe.D.ga.ZERO);this.R=rb(olympe.D.Qc(olympe.D.ga,'last valid slots'),olympe.D.Ba(-1))});this.W=[];this.L=[];this.C.onDestroy(()=>{Ab(this)})}};
346
+ class Bb{constructor(a,b,c,d){this.id=a;this.F=new olympe.D.Zb('Slot manager entry');this.L=c;this.R=d;this.F.run(()=>{const e=rb(olympe.D.Qc(olympe.D.ga),olympe.D.ga.ZERO);olympe.D.nb(b)?e.repeat(b):e.update(b);this.C=olympe.D.Qc(olympe.D.ga);this.G=this.C.Ib().he(e.Ib())});this.next=null}Z(){return this.id}ix(){return this.C.Ib()}Sm(){return this.G}ee(){return this.L}ux(){return this.R}Py(a){this.L=a}zy(a){null===a?this.C.update(olympe.D.ga.ZERO):(this.C.repeat(a.Sm()),a.next=this)}vt(){this.C.clear();
347
+ this.next=null}destroy(){this.F.destroy();this.G=this.C=this.next=null}}m=Bb.prototype;m.Z.K=olympe.D.J.C;m.ix.K=new olympe.D.J(()=>olympe.D.ga);m.Sm.K=new olympe.D.J(()=>olympe.D.ga);m.ee.K=olympe.D.J.C;m.ux.K=olympe.D.J.C;m.Py.K=olympe.D.J.C;m.zy.K=olympe.D.J.C;m.vt.K=olympe.D.J.C;m.destroy.K=olympe.D.J.C;olympe.D.P={Ea:'df.Logger'};olympe.U.config(a=>{D(a,olympe.D.Config.Lp,Number.POSITIVE_INFINITY);C(a,olympe.D.P.Ea,[olympe.ra.P.Aa],b=>b.Oc('df'))},'olympe.df');olympe.U.run([olympe.D.P.Ea],a=>{olympe.D.Mv(a)},'olympe.df');olympe.host={};const Cb=new Map,Db=new Map;olympe.host.Pp=class{static register(a,b,...c){Cb.set(a,b);0<c.length&&Db.set(a,c)}static create(a,b,c,d){const e=Cb.get(a);if(void 0===e)throw Error('Undefined UI element type: '+a);a=Db.get(a);return void 0!==a?new e(b,c,...a.map(f=>ma(d,f))):new e(b,c)}};function Eb(a,b,c){a.N.debug('CREATE #',b,', type=',c);a.C.set(b,olympe.host.Pp.create(c,b,a.N,a.L))}function Fb(a,b,c,...d){const e=a.C.get(b);if(void 0!==e){a.N.L()<=olympe.ra.Ob.C.eg&&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.D.nb(f))b.push(a.C.get(f.jv)||null);else if('function'===typeof f){const g=f,h=olympe.D.La();b.push((...k)=>{h.G()||g(...k)})}else b.push(f.valueOf());e[c].apply(e,b)}}
348
+ function Gb(a){var b=olympe.host.ba.bd,c=olympe.host.ba.Op.cr;++a.G;const d=a.G;Eb(a,d,c);const e=olympe.D.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],l=d+'_'+k;this.F.has(l)&&this.F.get(l).destroy();for(let n=0;n<f;n++){let p=arguments[n];olympe.D.nb(p)?(h.push(n),p=p.Pa):olympe.D.Uf(p)&&h.push(n);g[n]=p}0===h.length?e.run(()=>{Fb(this,d,k,...g)}):(f=olympe.D.createNode(void 0,(...n)=>{e.run(()=>
349
+ {Fb(this,d,k,...n)})},void 0,g,h,'Native('+d+').'+k),this.F.set(l,f),f.onDestroy(()=>this.F.delete(l)));return null}.bind(a));e.R(a.R.bind(a,d));a=L(e);a.jv=d;K(e,a);return a}olympe.host.pa=class{constructor(a,b){this.N=a;this.L=b;this.G=0;this.C=new Map;this.F=new Map;a.debug('Starting host manager')}Ya(){return this.N}R(a){this.N.debug('DESTROY #',a);const b=this.C.get(a);this.C.delete(a);b.destroy()}};olympe.host.Fd=class{constructor(a){this.C=a;this.F=olympe.D.La()}L(){return this.C}$(){return this.C.Pa.$()||this.F.$()}G(){return this.C.Pa.G()}};olympe.host.Fd.prototype.L.K=new olympe.D.J(()=>olympe.host.ba.Fd,[]);olympe.host.qk=class{};olympe.host.Ci=class{constructor(){}C(){}F(){}kj(){}};function Hb(a){return(a=a.find(b=>'authToken'===b.na()))?a.getValue():null}olympe.host.Ci.F=class{constructor(a,b,c=!1){this.name=a;this.value=b;this.C=c}na(){return this.name}getValue(){return this.value}mb(a){return this.na()===a.na()&&this.getValue()===a.getValue()&&this.C===a.C}};function Ib(){const a={}.parameters;return new olympe.host.Ci.C(a?a.map(b=>new olympe.host.Ci.F(b.name,b.value,b.hidden)):[])}
350
+ olympe.host.Ci.C=class{constructor(a){this.parameters=a}en(a){const b=new Map(this.parameters.map((c,d)=>[c.na(),d]));a.parameters.forEach(c=>{b.has(c.na())?this.parameters[b.get(c.na())]=c:this.parameters.push(c)})}};function Jb(a,b){var c=olympe.host.af;const d=olympe.X.ec(),e=new olympe.D.Zb('onTimeout context');c.C.$(b,d,()=>{e.G()||e.$()||e.run(a);c.C.G(d)});return new olympe.host.bd.G(c.C,d)}function Kb(a,b){var c=olympe.host.af;const d=olympe.X.ec(),e=new olympe.D.Zb('onInterval context');c.C.W(b,d,()=>{e.G()||e.$()?c.C.F(d):e.run(a)});return new olympe.host.bd.F(c.C,d)}function Lb(a){var b=olympe.host.af;a=a instanceof olympe.host.bd.F?a.Z():a;b.C.F(a)}olympe.host.bd=class{constructor(a){this.C=Gb(a)}};
351
+ olympe.host.bd.C=class{constructor(a,b){this.af=a;this.id=b}Z(){return this.id}cancel(){}};olympe.host.bd.L=class extends olympe.host.bd.C{cancel(){this.af.R(this.id)}};olympe.host.bd.G=class extends olympe.host.bd.C{cancel(){this.af.G(this.id)}};olympe.host.bd.F=class extends olympe.host.bd.C{cancel(){this.af.F(this.id)}};olympe.host.ba={};olympe.host.ba.Fd=class{destroy(){}};olympe.host.ba.Fd.prototype.destroy=olympe.host.ba.Fd.prototype.destroy;olympe.host.ba.Op={Yy:100,$y:101,Zy:102,bz:103,az:104,Xy:105,cB:201,aB:202,YA:204,fB:205,XA:206,$A:207,dB:208,gB:209,hB:210,iB:211,ZA:212,eB:218,bB:219,jB:220,WA:221,VA:222,sB:300,tB:301,uB:302,yB:303,zB:304,AB:305,vB:310,wB:311,xB:312,DA:400,EA:401,FA:402,zA:450,rA:500,pA:501,uA:502,tA:503,qA:504,sA:505,TB:600,KB:601,OB:602,GB:603,HB:604,EB:605,JB:606,ZB:607,RB:608,BB:609,FB:610,IB:611,QB:612,VB:613,CB:614,UB:615,PB:616,YB:617,LB:618,MB:619,NB:620,SB:630,DB:631,WB:632,XB:633,AC:700,dC:701,eC:702,
352
+ fC:703,hC:704,iC:705,jC:706,gC:707,lC:708,kC:709,mC:710,qC:711,yC:712,nC:713,oC:714,rC:715,sC:716,uC:717,vC:718,xC:719,tC:720,wC:721,zC:722,pC:723,BC:724,CC:725,cr:800};olympe.host.ba.bd=class{R(){}$(){}G(){}W(){}F(){}};olympe.host.P={Lq:'host.System',vl:'host.HistoryManager',zq:'host.Scheduler',Ea:'host.platform.Logger',Aa:'host.Manager'};olympe.host.af=null;olympe.U.config(function(a){ta(a,olympe.host.P.Lq);ta(a,olympe.host.P.vl);C(a,olympe.host.P.Ea,[olympe.ra.P.Aa],function(b){return b.Oc('host')});A(a,olympe.host.P.Aa,olympe.host.pa,olympe.host.P.Ea,olympe.U.P.dg);C(a,olympe.host.P.zq,[olympe.host.P.Aa],b=>{null===olympe.host.af&&(olympe.host.af=new olympe.host.bd(b));return olympe.host.af},!0)},'olympe.host');
353
+ olympe.U.run([olympe.host.P.zq],a=>a,'olympe.host.scheduler');olympe.U.run([olympe.host.P.Aa],a=>a,'olympe.host');olympe.net={};olympe.net.eb={};olympe.net.eb.Yd={Vl:'POST',GET:'GET',gt:'HEAD',ek:'PUT',Ac:'DELETE',Ql:'OPTIONS',HA:'PATCH'};olympe.net.eb.ResponseType={rk:'text',cl:'blob',ARRAY_BUFFER:'arraybuffer'};olympe.net.eb.Headers={Dj:'content-type',kz:'content-length',ni:'authorization',js:'access-control-allow-origin'};olympe.net.eb.lz={gA:'text/html',JSON:'application/json',FC:'application/zip'};olympe.net.eb.cd={rs:0,Gh:200,il:201,wj:202,Wy:400,ev:401,Xs:403,BA:404,vA:405,Aq:500,Lu:503};function Mb(a){return a.host&&encodeURI(a.host)}function Nb(a){return encodeURI(a.path).replace(olympe.net.Ri.C,(b,c)=>'%'+c)}function Ob(a){return void 0===a.G?443===a.port:a.G}olympe.net.Ri=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)}C(){return`${Ob(this)?'wss':'ws'}://${Mb(this)}:${this.port}/${Nb(this)}`}toString(){return`${Mb(this)}:${this.port}/${Nb(this)}`}};
354
+ olympe.net.Ri.C=/%25([0-9a-f]{2})/i;olympe.net.WebSocket=class{send(){}close(){}ja(){}da(){}$(){}F(){}};function Pb(a,b,c,d){a=olympe.X.iy(a.valueOf());if(!a.host&&!a.path)return null;const e=a.scheme?a.scheme.includes('s'):!1;b=new olympe.net.Rj(a.host,a.port||(e?443:80),a.path||'',e,b,c,d,a.query||void 0);a.cs&&(c=a.cs.split(':'),2===c.length&&(c=olympe.X.ai().C(Da(`${c[0]}:${c[1]}`)),Qb(b,{Authorization:`Basic ${c}`})));return b}function Rb(a){return void 0!==a.query?a.query.replace(/[^=&]+/g,b=>encodeURIComponent(b)):null}
355
355
  function Qb(a,b){for(let c in b)Object.prototype.hasOwnProperty.call(b,c)&&(a.headers[c]=b[c])}
356
- olympe.net.Sj=class extends olympe.net.Ri{constructor(a,b,c,d,e,f,g,h){super(a,b,c,d);this.method=void 0!==e?e:olympe.net.eb.Yd.GET;this.query=h;this.headers={};this.body=f;this.F=void 0!==g?g:olympe.net.eb.ResponseType.sk;this.ca=this.cert=this.key=null;this.rejectUnauthorized=!1}ej(){return this.headers}C(){let a=Rb(this);a=a?`?${a}`:'';return Mb(this)?`${Ob(this)?'https':'http'}://${Mb(this)}:${this.port}/${Nb(this)}${a}`:`${Nb(this)}${a}`}toString(){return this.C()}};
357
- olympe.net.Sj.Yd={Wl:'POST',GET:'GET',ht:'HEAD',fk:'PUT',Ac:'DELETE',Rl:'OPTIONS'};olympe.net.Sg=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}getData(){return this.data}Od(){return this.status}ej(){return this.headers}};function Sb(a,b,c){const d=olympe.D.La(),e=d.onDestroy(()=>{var f=a.F();const g=f.C.get(b);g&&(f.C.delete(b),g())});return d.F(f=>{d.Xe(e);a.F().C.delete(b);c(f)})}olympe.net.pa=class{constructor(a){this.N=a;this.L=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(){}G(){}C(){}R(){}W(){}};function Tb(a){return!(!a.client||!a.client.connected)}function Ub(a,b,c){Tb(a)?a.client.subscribe(b,void 0,d=>{d?a.N.error(`Failed to subscribe to topic ${b}: ${d}`):a.F.set(b,c)}):c&&c(Error('Cannot subscribe because the MQTT client is disconnected'))}function Vb(a,b,c){Tb(a)?(a.client.unsubscribe(b,void 0,c),a.F.delete(b)):c&&c(Error('Cannot unsubscribe because the MQTT client is disconnected'))}function Wb(a,b){a.G.push(b)}function Xb(a,b){a.client.on(olympe.net.ke.C.oq,b)}
356
+ olympe.net.Rj=class extends olympe.net.Ri{constructor(a,b,c,d,e,f,g,h){super(a,b,c,d);this.method=void 0!==e?e:olympe.net.eb.Yd.GET;this.query=h;this.headers={};this.body=f;this.F=void 0!==g?g:olympe.net.eb.ResponseType.rk;this.ca=this.cert=this.key=null;this.rejectUnauthorized=!1}ej(){return this.headers}C(){let a=Rb(this);a=a?`?${a}`:'';return Mb(this)?`${Ob(this)?'https':'http'}://${Mb(this)}:${this.port}/${Nb(this)}${a}`:`${Nb(this)}${a}`}toString(){return this.C()}};
357
+ olympe.net.Rj.Yd={Vl:'POST',GET:'GET',gt:'HEAD',ek:'PUT',Ac:'DELETE',Ql:'OPTIONS'};olympe.net.Sg=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}getData(){return this.data}Od(){return this.status}ej(){return this.headers}};function Sb(a,b,c){const d=olympe.D.La(),e=d.onDestroy(()=>{var f=a.F();const g=f.C.get(b);g&&(f.C.delete(b),g())});return d.F(f=>{d.Xe(e);a.F().C.delete(b);c(f)})}olympe.net.pa=class{constructor(a){this.N=a;this.L=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(){}G(){}C(){}R(){}W(){}};function Tb(a){return!(!a.client||!a.client.connected)}function Ub(a,b,c){Tb(a)?a.client.subscribe(b,void 0,d=>{d?a.N.error(`Failed to subscribe to topic ${b}: ${d}`):a.F.set(b,c)}):c&&c(Error('Cannot subscribe because the MQTT client is disconnected'))}function Vb(a,b,c){Tb(a)?(a.client.unsubscribe(b,void 0,c),a.F.delete(b)):c&&c(Error('Cannot unsubscribe because the MQTT client is disconnected'))}function Wb(a,b){a.G.push(b)}function Xb(a,b){a.client.on(olympe.net.ke.C.nq,b)}
358
358
  function Yb(a,b){a.client.on(olympe.net.ke.C.Fh,b)}function Zb(a,b){a.client.on(olympe.net.ke.C.ac,b)}
359
- olympe.net.ke=class{constructor(a,b){this.url=a;this.C=b||null;this.client=null;this.G=[];this.F=new Map;this.N=olympe.ra.Ya('MQTT')}connect(a,b){if(Tb(this))return b&&b(),this;this.C.username=this.C.vhost+':'+a.yd();this.C.password=a.Ve();b&&this.G.push(b);null===this.client&&(this.client=mqtt.connect(this.url,this.C),this.client.on(olympe.net.ke.C.cu,(c,d)=>{this.F.has(c)?this.F.get(c)(JSON.parse(d.toString())):this.N.warn('There is no subscriber for topic '+c)}),this.client.on(olympe.net.ke.C.zs,
360
- ()=>{this.G.forEach(c=>c())}),this.client.on(olympe.net.ke.C.oq,()=>{this.N.warn('Mqtt client is reconnecting to bus ... ')}),this.client.on(olympe.net.ke.C.ac,c=>{this.N.error('Mqtt client error ',c)}),this.client.on(olympe.net.ke.C.Fh,()=>{this.N.error('Mqtt client is offline')}),this.client.on(olympe.net.ke.C.ys,()=>{this.N.error('Mqtt client is closed')}),this.client.on(olympe.net.ke.C.ql,()=>{this.N.error('Mqtt client has ended')}));return this}publish(a,b,c,d){if(!Tb(this))return d&&d(Error('Cannot publish message because the MQTT client is disconnected')),
361
- this;this.client.publish(a,JSON.stringify(b),c,e=>{d&&d(e);e&&this.N.error('Failed to publish a message '+b)});return this}end(a,b){this.client&&this.client.end(a,{},()=>{b&&b();this.client=null});return this}};olympe.net.ke.C={zs:'connect',oq:'reconnect',cu:'message',ys:'close',ql:'end',ac:'error',Fh:'offline'};olympe.net.xk=class{constructor(a){this.N=a}$(){this.N.error('Try to set cors policies on a web server with the browser implementation.');return this}L(){return Promise.reject('Try to open a route on a web server using the browser implementation.')}W(){return Promise.reject('Try to close a route on a web server using the browser implementation.')}};olympe.net.P={Aa:'net.Manager',Ea:'net.Logger',sm:'net.WebServer'};olympe.net.Config={xl:'net.httpHost',yl:'net.httpPort',bp:'net.httpSSL',ap:'net.httpBodyLimit'};
362
- olympe.U.config(function(a){const b='object'===typeof window&&window.location&&window.location.hostname||'localhost',c='localhost'===b;D(a,olympe.net.Config.xl,b);D(a,olympe.net.Config.yl,c?3141:443);D(a,olympe.net.Config.bp,!c);D(a,olympe.net.Config.ap,100);ta(a,olympe.net.P.Aa);C(a,olympe.net.P.Ea,[olympe.ra.P.Aa],function(d){return d.Oc('net')});A(a,olympe.net.P.sm,olympe.net.xk,olympe.net.P.Ea)},'olympe.net');olympe.async={};function $b(a,b){0<=b&&(a.timeout=b)}function ac(a,b){a.L||a.da.push(a.G.F(b))}
363
- olympe.async.Co=class{constructor(a,b=void 0===a){this.C=[];this.da=[];this.G=a||new olympe.D.Zb('Async executor context');this.ta=b;this.F=null;this.env=new Map;this.env.set('Executor',this);this.L=this.R=!1;this.N=null;this.W=this.timeout=0}Ya(){return this.N}add(a){this.L||this.C.push(this.G.F(a));return this}start(){this.R||(this.N&&this.N.log('Executor started.'),this.R=!0,0<this.timeout&&(this.W=setTimeout(()=>{this.F='Timeout expired.';this.W=0;this.complete(!1)},this.timeout)))}clear(){this.C=
359
+ olympe.net.ke=class{constructor(a,b){this.url=a;this.C=b||null;this.client=null;this.G=[];this.F=new Map;this.N=olympe.ra.Ya('MQTT')}connect(a,b){if(Tb(this))return b&&b(),this;this.C.username=this.C.vhost+':'+a.yd();this.C.password=a.Ve();b&&this.G.push(b);null===this.client&&(this.client=mqtt.connect(this.url,this.C),this.client.on(olympe.net.ke.C.bu,(c,d)=>{this.F.has(c)?this.F.get(c)(JSON.parse(d.toString())):this.N.warn('There is no subscriber for topic '+c)}),this.client.on(olympe.net.ke.C.ys,
360
+ ()=>{this.G.forEach(c=>c())}),this.client.on(olympe.net.ke.C.nq,()=>{this.N.warn('Mqtt client is reconnecting to bus ... ')}),this.client.on(olympe.net.ke.C.ac,c=>{this.N.error('Mqtt client error ',c)}),this.client.on(olympe.net.ke.C.Fh,()=>{this.N.error('Mqtt client is offline')}),this.client.on(olympe.net.ke.C.xs,()=>{this.N.error('Mqtt client is closed')}),this.client.on(olympe.net.ke.C.pl,()=>{this.N.error('Mqtt client has ended')}));return this}publish(a,b,c,d){if(!Tb(this))return d&&d(Error('Cannot publish message because the MQTT client is disconnected')),
361
+ this;this.client.publish(a,JSON.stringify(b),c,e=>{d&&d(e);e&&this.N.error('Failed to publish a message '+b)});return this}end(a,b){this.client&&this.client.end(a,{},()=>{b&&b();this.client=null});return this}};olympe.net.ke.C={ys:'connect',nq:'reconnect',bu:'message',xs:'close',pl:'end',ac:'error',Fh:'offline'};olympe.net.wk=class{constructor(a){this.N=a}$(){this.N.error('Try to set cors policies on a web server with the browser implementation.');return this}L(){return Promise.reject('Try to open a route on a web server using the browser implementation.')}W(){return Promise.reject('Try to close a route on a web server using the browser implementation.')}};olympe.net.P={Aa:'net.Manager',Ea:'net.Logger',rm:'net.WebServer'};olympe.net.Config={wl:'net.httpHost',xl:'net.httpPort',ap:'net.httpSSL',$o:'net.httpBodyLimit'};
362
+ olympe.U.config(function(a){const b='object'===typeof window&&window.location&&window.location.hostname||'localhost',c='localhost'===b;D(a,olympe.net.Config.wl,b);D(a,olympe.net.Config.xl,c?3141:443);D(a,olympe.net.Config.ap,!c);D(a,olympe.net.Config.$o,100);ta(a,olympe.net.P.Aa);C(a,olympe.net.P.Ea,[olympe.ra.P.Aa],function(d){return d.Oc('net')});A(a,olympe.net.P.rm,olympe.net.wk,olympe.net.P.Ea)},'olympe.net');olympe.async={};function $b(a,b){0<=b&&(a.timeout=b)}function ac(a,b){a.L||a.da.push(a.G.F(b))}
363
+ olympe.async.Bo=class{constructor(a,b=void 0===a){this.C=[];this.da=[];this.G=a||new olympe.D.Zb('Async executor context');this.ta=b;this.F=null;this.env=new Map;this.env.set('Executor',this);this.L=this.R=!1;this.N=null;this.W=this.timeout=0}Ya(){return this.N}add(a){this.L||this.C.push(this.G.F(a));return this}start(){this.R||(this.N&&this.N.log('Executor started.'),this.R=!0,0<this.timeout&&(this.W=setTimeout(()=>{this.F='Timeout expired.';this.W=0;this.complete(!1)},this.timeout)))}clear(){this.C=
364
364
  [];this.da=[];this.env.clear();this.ta&&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.da)b(a,a?null:this.F,this.env);this.clear()}}};
365
- function bc(a){if(0<a.C.length){const b=a.C.shift();a.N&&a.N.log(`Executing next task. ${a.C.length} tasks left in the pipeline.`);a.G.run(()=>{b(()=>{Promise.resolve().then(()=>{bc(a)})},c=>{c&&(a.F=c);a.complete(!1)},a.env)})}else a.complete(!0)}olympe.async.pk=class extends olympe.async.Co{static create(){return new olympe.async.pk(new olympe.D.Zb('SequencedExecutor'),!0)}insert(a){this.L||this.C.unshift(a);return this}start(){this.R||(super.start(),bc(this))}};
366
- olympe.async.ng=class extends olympe.async.Co{constructor(a,b){super(a,b);this.$=0;this.ja=!0}static create(){return new olympe.async.ng(new olympe.D.Zb('ParallelExecutor'),!0)}run(a){this.N&&this.N.log('Starting a task');this.G.run(()=>{a(()=>{this.done()},b=>{this.ja=!1;b&&(this.F=this.F?`${this.F}. ${b}`:b);this.done()},this.env)})}add(a){super.add(a);this.R&&!this.L&&(this.$++,this.run(a));return this}done(){this.$--;0>=this.$&&this.complete(this.ja)}start(){if(!this.R)if(super.start(),0<this.C.length){this.$=
367
- this.C.length;for(const a of this.C)this.run(a)}else this.complete(!0)}};olympe.hc={};olympe.hc.Rt=class{constructor(){}set(){}get(){}forEach(){}remove(){}clear(){}close(){}};olympe.hc.Qt=class{constructor(){}C(){}};olympe.hc.Storage=class{open(){}F(){}R(){}write(){}G(){}L(){}C(){}close(){}};function cc(a,b,c){a.storage.F(c)}function dc(a,b,c,d,e){a.storage.write(b,'transactions',c.toJSON(),'text/json',d,e)}function ec(a,b){a.storage.G(b)}function fc(a,b){a.storage.C(b)}function gc(a,b,c,d,e,f){a.storage.write(b,'files',c,d,()=>{e('files/'+b)},f)}function hc(a,b){a.storage.R(b)}olympe.hc.Ms=class{constructor(a){this.storage=a}};olympe.hc.P={Xj:'localStorage.KeyValueManager',Oi:'localStorage.Storage',ko:'localStorage.DatacloudStorage',Ea:'localStorage.Logger'};olympe.U.config(function(a){ta(a,olympe.hc.P.Xj);C(a,olympe.hc.P.Ea,[olympe.ra.P.Aa],function(b){return b.Oc('localstorage')});A(a,olympe.hc.P.ko,olympe.hc.Ms,olympe.hc.P.Oi)},'olympe.localstorage');olympe.auth={};olympe.auth.Vu=class{W(){}L(){}R(){}Va(){}da(){}fi(){}mh(){}Jr(){}};function ic(a){a.N.info('Initializing AUTH layer');let b=a.Vb;if(a.ta){const c=a.ta.C(),d=Hb(c.parameters);b=d||b;d&&a.ta.F(c.parameters.filter(e=>'authToken'!==e.na()))}b&&a.storage&&jc(a.storage,b,c=>{!c&&a.N.error('Could not store authToken')});a.N.debug('Asking to be notified when auth connector gets online');a.F.W(()=>{if(a.Va)if(a.L=olympe.auth.pa.G.hs,a.N.log('Connector online, parameter auth.autoLogin=true --\x3e attempting to log with parameters'),a.$){const c=new olympe.auth.Request;c.set('username',
368
- a.$);c.sn(a.Ua);a.N.log('Autologin with user "'+a.$+'"');kc(a,c)}else a.N.error('autoLogin: auto user not specified.'),lc(a);else a.L=olympe.auth.pa.G.tk,a.N.log('Connector online, attempting to log with token'),mc(a)});a.F.L(()=>{switch(olympe.D.$a(a.G)){case olympe.auth.pa.C.Mg:a.N.warn('Disconnected from server - session of user '+olympe.D.$a(a.C.Ib()).yd()+' lost');break;case olympe.auth.pa.C.yh:a.N.warn('Disconnected from server - guest session lost');break;case olympe.auth.pa.C.ki:a.N.warn('Disconnected from server - authentication aborted');
369
- break;case olympe.auth.pa.C.INIT:a.N.warn('Cannot open auth session - no server connection');break;default:a.N.error('Should not get there, investigate')}nc(a,olympe.auth.pa.C.hg)});a.F.R(c=>{switch(c){case olympe.H.pa.C.Th:nc(a,olympe.auth.pa.C.Th);break;case olympe.H.pa.C.sh:nc(a,olympe.auth.pa.C.sh)}});a.F.Va((c,d)=>{if(c===olympe.auth.pa.F.xj)a.N.info('Authentication revoked'),lc(a),a.storage&&oc(a.storage),a.W.forEach(e=>{e(c,d)});else if(c===olympe.auth.pa.F.fp)a.N.info('Redirection to IDP to invalidate token (SAML)'),
365
+ function bc(a){if(0<a.C.length){const b=a.C.shift();a.N&&a.N.log(`Executing next task. ${a.C.length} tasks left in the pipeline.`);a.G.run(()=>{b(()=>{Promise.resolve().then(()=>{bc(a)})},c=>{c&&(a.F=c);a.complete(!1)},a.env)})}else a.complete(!0)}olympe.async.nk=class extends olympe.async.Bo{static create(){return new olympe.async.nk(new olympe.D.Zb('SequencedExecutor'),!0)}insert(a){this.L||this.C.unshift(a);return this}start(){this.R||(super.start(),bc(this))}};
366
+ olympe.async.ng=class extends olympe.async.Bo{constructor(a,b){super(a,b);this.$=0;this.ja=!0}static create(){return new olympe.async.ng(new olympe.D.Zb('ParallelExecutor'),!0)}run(a){this.N&&this.N.log('Starting a task');this.G.run(()=>{a(()=>{this.done()},b=>{this.ja=!1;b&&(this.F=this.F?`${this.F}. ${b}`:b);this.done()},this.env)})}add(a){super.add(a);this.R&&!this.L&&(this.$++,this.run(a));return this}done(){this.$--;0>=this.$&&this.complete(this.ja)}start(){if(!this.R)if(super.start(),0<this.C.length){this.$=
367
+ this.C.length;for(const a of this.C)this.run(a)}else this.complete(!0)}};olympe.hc={};olympe.hc.Qt=class{constructor(){}set(){}get(){}forEach(){}remove(){}clear(){}close(){}};olympe.hc.Pt=class{constructor(){}C(){}};olympe.hc.Storage=class{open(){}F(){}R(){}write(){}G(){}L(){}C(){}close(){}};function cc(a,b,c){a.storage.F(c)}function dc(a,b,c,d,e){a.storage.write(b,'transactions',c.toJSON(),'text/json',d,e)}function ec(a,b){a.storage.G(b)}function fc(a,b){a.storage.C(b)}function gc(a,b,c,d,e,f){a.storage.write(b,'files',c,d,()=>{e('files/'+b)},f)}function hc(a,b){a.storage.R(b)}olympe.hc.Ls=class{constructor(a){this.storage=a}};olympe.hc.P={Wj:'localStorage.KeyValueManager',Oi:'localStorage.Storage',jo:'localStorage.DatacloudStorage',Ea:'localStorage.Logger'};olympe.U.config(function(a){ta(a,olympe.hc.P.Wj);C(a,olympe.hc.P.Ea,[olympe.ra.P.Aa],function(b){return b.Oc('localstorage')});A(a,olympe.hc.P.jo,olympe.hc.Ls,olympe.hc.P.Oi)},'olympe.localstorage');olympe.auth={};olympe.auth.Uu=class{W(){}L(){}R(){}Va(){}da(){}fi(){}mh(){}Ir(){}};function ic(a){a.N.info('Initializing AUTH layer');let b=a.Vb;if(a.ta){const c=a.ta.C(),d=Hb(c.parameters);b=d||b;d&&a.ta.F(c.parameters.filter(e=>'authToken'!==e.na()))}b&&a.storage&&jc(a.storage,b,c=>{!c&&a.N.error('Could not store authToken')});a.N.debug('Asking to be notified when auth connector gets online');a.F.W(()=>{if(a.Va)if(a.L=olympe.auth.pa.G.gs,a.N.log('Connector online, parameter auth.autoLogin=true --\x3e attempting to log with parameters'),a.$){const c=new olympe.auth.Request;c.set('username',
368
+ a.$);c.rn(a.Sa);a.N.log('Autologin with user "'+a.$+'"');kc(a,c)}else a.N.error('autoLogin: auto user not specified.'),lc(a);else a.L=olympe.auth.pa.G.sk,a.N.log('Connector online, attempting to log with token'),mc(a)});a.F.L(()=>{switch(olympe.D.$a(a.G)){case olympe.auth.pa.C.Mg:a.N.warn('Disconnected from server - session of user '+olympe.D.$a(a.C.Ib()).yd()+' lost');break;case olympe.auth.pa.C.yh:a.N.warn('Disconnected from server - guest session lost');break;case olympe.auth.pa.C.ki:a.N.warn('Disconnected from server - authentication aborted');
369
+ break;case olympe.auth.pa.C.INIT:a.N.warn('Cannot open auth session - no server connection');break;default:a.N.error('Should not get there, investigate')}nc(a,olympe.auth.pa.C.hg)});a.F.R(c=>{switch(c){case olympe.H.pa.C.Th:nc(a,olympe.auth.pa.C.Th);break;case olympe.H.pa.C.sh:nc(a,olympe.auth.pa.C.sh)}});a.F.Va((c,d)=>{if(c===olympe.auth.pa.F.wj)a.N.info('Authentication revoked'),lc(a),a.storage&&oc(a.storage),a.W.forEach(e=>{e(c,d)});else if(c===olympe.auth.pa.F.ep)a.N.info('Redirection to IDP to invalidate token (SAML)'),
370
370
  a.storage&&oc(a.storage),a.Ka.F();else throw Error(`Unknown logout step coming from server : ${c}`);});a.N.log('DONE initializing AUTH layer (waiting for connector to be online)')}
371
371
  function mc(a){null!==a.storage?(a.N.debug('Retrieving token from local storage'),a.storage.Yc(b=>{if(b){const d=new olympe.auth.Request;var c=b.yd();d.set('username',c);b=b.Ve();d.set('nonce',b);a.N.debug('Token found, trying login with',d);kc(a,d,a.Ab)}else a.N.debug('No token found, cannot perform auto login. Falling back in GUEST state'),lc(a)})):(a.N.error('Cannot retrieve token: no storage configured, cannot perform auto login. Falling back in GUEST state'),lc(a))}
372
372
  function nc(a,b){a.N.log('State change: ',pc(a),'--\x3e',b);a.G.update(b)}function lc(a){a.C.update(a.ja);nc(a,olympe.auth.pa.C.yh);a.N.info('Authenticated as guest')}function pc(a){return olympe.D.$a(a.G.Ib())}function qc(a){const b=olympe.auth.pa.C.Mg,c=olympe.auth.pa.C.yh,d=olympe.auth.pa.C.ki,e=olympe.D.Qc(olympe.D.sa,'auth.isOnline');olympe.D.yc([a.G],f=>{f=olympe.D.wc(f===b||f===c||f===d);const g=olympe.D.$a(e);void 0!==g&&g.mb(f)||e.update(f)},'Router is online');return e.Ib()}
373
373
  function rc(a,b,c){void 0===c&&(c=olympe.X.yg());a.W.set(c,b)}function sc(a){return a.C.Ib().Ve()}function tc(a,b,c,d=!1){b=b+c?':'+c.message:'';a.N.error(b);a.error.update(olympe.D.yb(b));nc(a,olympe.auth.pa.C.ac);if(d)throw Error(b);}
374
374
  function kc(a,b,c,d){void 0===c&&(c=a.qb);void 0===c&&tc(a,'No authentication provider specified',null,!0);const e=a.Jb.get(c);e||tc(a,'Undefined authentication provider "'+c+'"',null,!0);d&&a.R.set('login',d);a.N.log('Sending authentication request using "'+c+'" for '+b);e.Yc(b,a.Hb.bind(a));nc(a,olympe.auth.pa.C.ki)}function uc(a,b,c){a.R.forEach(d=>{d(b,c)})}function vc(a){return olympe.D.$a(a.C)===a.ja}
375
- olympe.auth.pa=class{constructor(a,b,c,d,e,f,g,h,k,l,n,p){this.N=a;this.F=b;this.storage=c;this.Ka=d;this.ta=e;this.qb=g;this.Ab=h;this.Va=void 0===k?!0:k;this.$=l;this.Ua=n;this.Vb=p;this.Jb=new Map;this.G=olympe.D.Qc(String).update(olympe.auth.pa.C.INIT);this.error=olympe.D.Qc(olympe.D.Za);this.L=null;this.ja=new olympe.auth.vf('guest','0163d9653067b6237f62','e96e099c-55bb-4004-b0e8-bd76b6209218');this.C=olympe.D.Qc(olympe.auth.vf).update(this.ja);this.R=new Map;this.W=new Map;f.forEach(q=>{const r=
376
- q.na();if(this.Jb.has(r))throw Error('Provider "'+r+'" has already been registered !');this.Jb.set(r,q)});ic(this)}getState(){return this.G.Ib()}da(){return this.error.Ib()}yd(){return this.C.Ib().yd()}Dg(){return this.C.Ib().Dg()}bi(){return this.C.Ib().bi()}mh(a,b){this.F.mh(a,olympe.D.$a(sc(this)),b)}dn(){this.N.debug('Sending logout');oc(this.storage);this.F.da(a=>{a?tc(this,'Logout request rejected:',a):this.N.debug('Logout request acknowledged')})}fi(){pc(this)===olympe.auth.pa.C.Mg&&this.F.fi(a=>
377
- {a&&this.N.error('Was not able to send the auth keep alive message:',a.message)})}Hb(a,b){const c=null===this.L?olympe.auth.pa.G.$t:this.L;this.L=null;a?(this.N.warn('Authentication rejected: '+a.message+'. Falling back into GUEST state'),oc(this.storage),this.error.update(olympe.D.yb(a.message)),lc(this),uc(this,a,c)):(this.N.info('User '+b.yd()+' (#'+b.Dg()+') successfully authenticated'),this.C.update(b),nc(this,olympe.auth.pa.C.Mg),uc(this,a,c),this.storage&&jc(this.storage,b));this.R.has('login')&&
378
- this.R.delete('login')}};olympe.auth.pa.C={INIT:'init',Th:'waking',sh:'awake',hg:'disconnected',yh:'guest',ki:'authenticating',ac:'error',Mg:'authenticated'};olympe.auth.pa.G={$t:'manual',hs:'auto',tk:'tokenOnFirstConnection'};olympe.auth.pa.F={xj:'accepted',fp:'redirect'};olympe.auth.Li=class{na(){}Yc(){}};olympe.auth.Request=class{constructor(){this.C=new Map}set(a,b){olympe.D.yc([b],c=>{this.C.set(a.toLocaleLowerCase(),c.toString())})}get(a){(a=this.C.get(a.toLowerCase()))&&a.zf&&(a=a.Pa.Kb);return a?a.valueOf():a}yd(){return this.get('username')}sn(a){this.set('password',a)}Ve(){return this.get('nonce')}toString(){return this.yd()+(this.Ve()?' with nonce':'')+(this.get('password')?' with password':'')}};olympe.auth.vf=class{constructor(a,b,c,d={}){this.user=a;this.wj=b;this.F=c;this.G=d}yd(){return this.user}Dg(){return this.wj}Ve(){return this.F}Vj(){return this.G}bi(){return null}la(){var a=olympe.X,b=a.rr;var c=JSON.stringify({user:this.user,userTag:this.wj,nonce:this.F,payload:this.G});c=olympe.X.ai().C(Da(c));return b.call(a,c)}};m=olympe.auth.vf.prototype;m.yd.K=new olympe.D.J(()=>String,[]);m.Dg.K=new olympe.D.J(()=>String,[]);m.Ve.K=new olympe.D.J(()=>String,[]);
379
- m.Vj.K=new olympe.D.J(()=>Object,[]);m.bi.K=new olympe.D.J(()=>String,[]);m.la.K=new olympe.D.J(()=>String,[]);olympe.auth.Ul=class extends olympe.auth.vf{constructor(a,b,c,d){super(a,b,c,d)}bi(){return this.Vj().access_token||null}};olympe.auth.zq=class extends olympe.auth.vf{constructor(a,b,c,d){super(a,b,c,d);this.C=null}bi(){return this.C}la(){var a=olympe.X.ai(),b={user:this.yd(),userTag:this.Dg(),nonce:this.Ve(),payload:this.Vj(),fullToken:this.C},c=olympe.X,d=c.rr;b=JSON.stringify(b);a=a.C(Da(b));return d.call(c,a)}};function jc(a,b,c){const d=a.C.C('AUTH');d.set(a.key,'string'===typeof b?b:b.la(),e=>{d.close();c&&c(e)})}function oc(a){const b=a.C.C('AUTH');b.remove(a.key,()=>b.close())}
380
- olympe.auth.om=class{constructor(a,b,c){this.C=a;this.N=b;this.key='OlympeToken-'+c.C}Yc(a){const b=this.C.C('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=Ea(olympe.X.ai().R(olympe.X.Dv(c)));const h=f.call(e,g);if(h.fullToken){const k=new olympe.auth.zq(h.user,h.userTag,h.nonce,h.payload);k.C=h.fullToken;d=k}else d=h.payload&&
381
- h.payload.id_token?new olympe.auth.Ul(h.user,h.userTag,h.nonce,h.payload):new olympe.auth.vf(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.om.F='OlympeToken';olympe.auth.om.C='AUTH';olympe.auth.lk=class{redirect(){}F(){}C(){}};olympe.auth.lk.C={GET:'GET',Wl:'POST'};olympe.auth.bl=class{constructor(a){this.C=a||'default'}};olympe.auth.Jb={};olympe.auth.Jb.qa={};olympe.auth.Jb.qa.Gi=class{$(){}};olympe.auth.Jb.qa.Ne=class{ja(){}};olympe.auth.Jb.qa.Fe=class{ta(){}Ka(){}};function wc(a,b){return olympe.X.ob(b+'-olympe-'+a.C[b])}olympe.auth.Jb.Fi=class{constructor(a){this.C=a}na(){return'local'}Yc(a,b){const c=a.yd();if(c){const d=a.get('password'),e=a.Ve();a.C.delete('password');if(void 0!==e&&wc(this,c)===e){b(null,new olympe.auth.vf(c,'',wc(this,c)));return}a=olympe.X.ob(d||'');if(this.C[c]===a){b(null,new olympe.auth.vf(c,'',wc(this,c)));return}}b(Error('Invalid login'))}};olympe.auth.Jb.Fi.C='local';olympe.auth.Jb.Fi.ma=[olympe.auth.Li];olympe.auth.Jb.Gi=class{constructor(a,b){this.C=a;this.storage=b}na(){return'localToken'}Yc(a,b){this.storage.Yc(c=>{this.C.$(a,(d,e)=>{b(d,e||c)})})}};olympe.auth.Jb.Gi.C='localToken';olympe.auth.Jb.Gi.ma=[olympe.auth.Li];olympe.auth.Jb.Tl=class{constructor(a,b){this.C=a;this.F=b}na(){return'openID'}Yc(){const a=this.C.C();this.C.redirect(`${this.F}/auth?url=${a}`,null,olympe.auth.lk.C.GET)}};olympe.auth.Jb.Tl.C='openID';olympe.auth.Jb.Tl.ma=[olympe.auth.Li];olympe.auth.Jb.Ne=class{constructor(a,b){this.F=a;this.C=b}na(){return'saml'}Yc(a,b){this.F.ja(c=>{c?b(c):this.C.F()})}};olympe.auth.Jb.Ne.C='saml';olympe.auth.Jb.Ne.ma=[olympe.auth.Li];olympe.auth.Jb.Fe=class{static aj(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.C=a;this.N=olympe.ra.Ya('auth')}na(){return'srp'}Yc(a,b){const c=a.get('password');a.C.delete('password');this.N.debug('Sending SRP request');this.C.ta(a,(d,e,f)=>{this.N.debug('Received Salt+B message');if(d)b(d);else{try{const g=new SRPClient;g.step1(a.yd(),c);const h=g.step2(e,f);a.set('a',h.A);a.set('m1',h.M1)}catch(g){b(g);
382
- return}this.N.debug('Sending SRP A+M (proof) message');this.C.Ka(a,b)}})}};olympe.auth.Jb.Fe.C='srp';olympe.auth.Jb.Fe.ma=[olympe.auth.Li];olympe.auth.P={Aa:'auth.Manager',Ea:'auth.Logger',Oi:'auth.Storage',yj:'auth.appNameToken',hk:'auth.Redirector'};olympe.auth.qd={Aa:'auth.ManagerConnector',Ap:'auth.LocalTokenConnector',Fe:'auth.SRPConnector',Ne:'auth.SAMLConnector'};olympe.auth.Config={ml:'auth.defaultProvider',Bp:'auth.localTokenProvider',Bn:'auth.autoLogin',Fn:'auth.autoUser',Cn:'auth.autoPassword',tk:'auth.token',zn:'auth.appToken'};
383
- olympe.U.config(function(a){D(a,olympe.auth.Config.ml,'srp');D(a,olympe.auth.Config.Bp,'localToken');D(a,olympe.auth.Config.Bn,!1);D(a,olympe.auth.Config.Fn,'');D(a,olympe.auth.Config.Cn,'');D(a,olympe.auth.Config.tk,'');D(a,olympe.auth.Config.zn,'default');C(a,olympe.auth.P.Ea,[olympe.ra.P.Aa],b=>b.Oc('auth'));A(a,olympe.auth.P.yj,olympe.auth.bl,new olympe.U.fa(olympe.auth.Config.zn));A(a,olympe.auth.P.Oi,olympe.auth.om,olympe.hc.P.Xj,olympe.auth.P.Ea,olympe.auth.P.yj);ta(a,olympe.auth.qd.Aa);ta(a,
384
- olympe.auth.P.hk);C(a,olympe.auth.P.Aa,[olympe.auth.P.Ea,olympe.auth.qd.Aa,olympe.host.P.wl,new olympe.U.tb(olympe.auth.P.Oi,olympe.U.gf.C.Eh),new olympe.U.fa(olympe.auth.Config.ml),new olympe.U.fa(olympe.auth.Config.Bp),new olympe.U.fa(olympe.auth.Config.Bn),new olympe.U.fa(olympe.auth.Config.Fn),new olympe.U.fa(olympe.auth.Config.Cn),new olympe.U.fa(olympe.auth.Config.tk),new olympe.U.tb(olympe.auth.P.hk,olympe.U.gf.C.Eh),new olympe.U.tb(olympe.auth.qd.Ap,olympe.U.gf.C.Eh),new olympe.U.tb(olympe.auth.qd.Fe,
385
- olympe.U.gf.C.Eh),new olympe.U.tb(olympe.auth.qd.Ne,olympe.U.gf.C.Eh)],(b,c,d,e,f,g,h,k,l,n,p,q,r,t)=>{const u=[];q&&u.push(new olympe.auth.Jb.Gi(q,e));r&&u.push(new olympe.auth.Jb.Fe(r));t&&p&&u.push(new olympe.auth.Jb.Ne(t,p));p&&c&&u.push(new olympe.auth.Jb.Tl(p,c.Jr()));if(0===u.length)throw Error('At least one provider is needed for auth to start');if(!u.map(v=>v.na()).includes(f))throw Error('Default provider name'+f+'given by parameter'+olympe.auth.Config.ml+'cannot be found');return new olympe.auth.pa(b,
386
- c,e,p,d.kj()?d:null,u,f,g,h,k,l,n)},!0)},'olympe.auth');olympe.U.run([olympe.auth.P.Aa],a=>{olympe.auth.Jc=()=>a});olympe.dc={};olympe.dc.Ca={ORIGIN:'<',DESTINATION:'>'};z('olympe.dc.Direction',olympe.dc.Ca);olympe.dc.jc={Tc:'ff022000000000000000',vi:'ff02200000000000000e',Xn:'ff02200000000000000f'};olympe.dc.Yb={VERSION:'@v',Gd:'@s'};olympe.dc.Tg={ic:'?'};olympe.dc.qk={Up:'online',Fh:'offline',ot:'invalidate'};olympe.dc.Ha={sb:'self',Mc:'server',$p:'peer',ic:'server'};olympe.dc.za=function(a){if('string'===typeof a)return a;let b=null;a=olympe.D.$a(a);void 0!==a&&null!==a&&(a=a.valueOf(),'string'===typeof a?b=a:a.T?b=a.T():'function'===typeof a&&(b=olympe.dc.ya.Nb(a)));return b||''};z('olympe.dc.instanceToTag',olympe.dc.za);olympe.dc.Ja=function(){return olympe.dc.xd().view};olympe.dc.register=function(a,b){olympe.dc.ya.C(a,b)};olympe.dc.defineProperty=function(a){return new olympe.dc.ua.Property(a)};
387
- olympe.dc.gh=function(a,b=olympe.dc.Ca.DESTINATION,c=olympe.dc.CloudObject,d=olympe.dc.Ca.DESTINATION){const e=olympe.dc.Ca.DESTINATION;return b===olympe.dc.Ca.ORIGIN||b===e?new olympe.dc.ua.Relation(a,b):new olympe.dc.ua.Relation(a,d,b,c)};olympe.dc.Pv=function(a){return a.Ec()};olympe.dc.Writable=class{F(){}qc(){}Dc(){}Ta(){}cc(){}};olympe.dc.Yl=class{Nc(){}Z(){}G(){}};function xc(a,b,c,d,e,f,g){d=new olympe.dc.ha(olympe.dc.ha.ia.Qh,{file:b,url:null,content:c,Ye:e?h=>{yc(a,b,c);f(h)}:f,mimeType:d,se:g||null},[olympe.dc.Ja().source(b)||olympe.dc.Ha.Mc]);a.F.send(d)}function zc(a,b,c,d,e,f){c=c instanceof olympe.D.Za?c.valueOf():c;'string'===typeof c?c=new Blob([Da(c)],{type:d}):c instanceof ArrayBuffer&&(c=new Blob([c],{type:d}));xc(a,b,c,d,a.G,e,f)}
388
- function yc(a,b,c){const d=olympe.dc.za(b);a.C.set(d,c);const e=olympe.X.yg();Ac(olympe.dc.Ja(),d,f=>{f||(a.C.delete(d),Bc(olympe.dc.Ja(),d,e))},e)}function Cc(a,b,c,d){olympe.D.Ur([b.Qr(),b.T(),b.Fl(),b.Vm()],(e,f,g,h)=>{a.C.has(f)?c(a.C.get(f)):(e=new olympe.dc.ha(olympe.dc.ha.ia.vh,{file:f,url:e.valueOf()?null:g,mimeType:h.valueOf(),Ye:a.G?k=>{yc(a,f,k);c(k)}:c,se:d},[olympe.dc.Ja().source(f)||olympe.dc.Ha.Mc]),a.F.send(e))})}
389
- olympe.dc.at=class{constructor(a,b,c,d,e){this.N=a;this.F=c;this.G=e;this.C=new Map}};olympe.dc.pa=class{constructor(a){this.N=a}};function Dc(a,b){a.F=b;return a}function M(a,b){a.Wh.unshift(b);return a}olympe.dc.ha=class{constructor(a,b,c){this.type=a;this.content=b;this.C=c;this.Wh=[];this.F=olympe.D.La()}validate(a=null){this.Wh.forEach(b=>{b(a||null)})}toString(){const a=olympe.X.Hr(olympe.dc.ha.ia,this.type);return a?a:'UNKNOWN_MESSAGE'}};
390
- olympe.dc.ha.ia={ac:1,lg:2,Rg:10,fA:11,Qu:20,oB:21,pB:22,Su:23,yi:24,xi:25,gA:26,Qo:28,am:30,cm:31,yu:32,dh:40,uk:41,uh:45,Cj:46,Mj:47,Qh:50,vh:51,ti:52,gv:60,Du:61,ct:62,dt:63,ws:64,fl:65,eA:90,ll:91,vl:92,Ro:93,wp:94,ak:95,Ru:96,QUERY_RESULT:97,bm:98};olympe.dc.og=class{process(){}};olympe.dc.Zl=class{constructor(...a){this.Ub=a}process(a,b,c){const d=this.Ub.length,e=(f,g,h)=>{g||f>=d?c(g,h):this.Ub[f].process(a,h,e.bind(null,f+1))};e(0,null,b)}};olympe.dc.Zl.ma=[olympe.dc.og];function Ec(a){return olympe.dc.CloudObject.get(a.tag)}olympe.dc.Cc=class{constructor(a){this.tag='string'===typeof a?a:a.T()}T(){return this.tag}toJSON(){return'{ "type": "reference", "tag": '+JSON.stringify(this.tag)+' }'}mb(a){return a instanceof olympe.dc.Cc&&this.tag===a.tag}static lc(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return new olympe.dc.Cc(b.tag)}};olympe.dc.Cc.ma=[olympe.dc.Ae];olympe.dc.Cc.prototype.toJSON.K=olympe.D.J.C;olympe.dc.Cc.prototype.mb.K=olympe.D.J.C;olympe.dc.pg=class{send(){}C(){}ja(){}};const Fc=olympe.dc.Ca.ORIGIN,Gc=olympe.dc.Ca.DESTINATION,Hc=new Map,Ic=new Map,Jc=new Map,Kc=new Map;function Lc(a,b){var c=olympe.dm.File;let d=c;'function'===typeof c&&(d=b.entry);c=[...(d.un||[])];return olympe.dc.ya.C(a,b,...c)}function Mc(a,b){Kc.set(a,b);return a}function Nc(a){return(a=Hc.get(a))&&a.C||olympe.dc.CloudObject}function Oc(a,b,c){const d=a+'@'+(b===Gc?Fc:Gc);if(Ic.has(d))throw Error(`Try to register the same relation (${b+a}) multiple times.`);Ic.set(d,c)}
375
+ olympe.auth.pa=class{constructor(a,b,c,d,e,f,g,h,k,l,n,p){this.N=a;this.F=b;this.storage=c;this.Ka=d;this.ta=e;this.qb=g;this.Ab=h;this.Va=void 0===k?!0:k;this.$=l;this.Sa=n;this.Vb=p;this.Jb=new Map;this.G=olympe.D.Qc(String).update(olympe.auth.pa.C.INIT);this.error=olympe.D.Qc(olympe.D.Za);this.L=null;this.ja=new olympe.auth.vf('guest','0163d9653067b6237f62','e96e099c-55bb-4004-b0e8-bd76b6209218');this.C=olympe.D.Qc(olympe.auth.vf).update(this.ja);this.R=new Map;this.W=new Map;f.forEach(q=>{const r=
376
+ q.na();if(this.Jb.has(r))throw Error('Provider "'+r+'" has already been registered !');this.Jb.set(r,q)});ic(this)}getState(){return this.G.Ib()}da(){return this.error.Ib()}yd(){return this.C.Ib().yd()}Dg(){return this.C.Ib().Dg()}bi(){return this.C.Ib().bi()}mh(a,b){this.F.mh(a,olympe.D.$a(sc(this)),b)}cn(){this.N.debug('Sending logout');oc(this.storage);this.F.da(a=>{a?tc(this,'Logout request rejected:',a):this.N.debug('Logout request acknowledged')})}fi(){pc(this)===olympe.auth.pa.C.Mg&&this.F.fi(a=>
377
+ {a&&this.N.error('Was not able to send the auth keep alive message:',a.message)})}Hb(a,b){const c=null===this.L?olympe.auth.pa.G.Zt:this.L;this.L=null;a?(this.N.warn('Authentication rejected: '+a.message+'. Falling back into GUEST state'),oc(this.storage),this.error.update(olympe.D.yb(a.message)),lc(this),uc(this,a,c)):(this.N.info('User '+b.yd()+' (#'+b.Dg()+') successfully authenticated'),this.C.update(b),nc(this,olympe.auth.pa.C.Mg),uc(this,a,c),this.storage&&jc(this.storage,b));this.R.has('login')&&
378
+ this.R.delete('login')}};olympe.auth.pa.C={INIT:'init',Th:'waking',sh:'awake',hg:'disconnected',yh:'guest',ki:'authenticating',ac:'error',Mg:'authenticated'};olympe.auth.pa.G={Zt:'manual',gs:'auto',sk:'tokenOnFirstConnection'};olympe.auth.pa.F={wj:'accepted',ep:'redirect'};olympe.auth.Li=class{na(){}Yc(){}};olympe.auth.Request=class{constructor(){this.C=new Map}set(a,b){olympe.D.yc([b],c=>{this.C.set(a.toLocaleLowerCase(),c.toString())})}get(a){(a=this.C.get(a.toLowerCase()))&&a.zf&&(a=a.Pa.Kb);return a?a.valueOf():a}yd(){return this.get('username')}rn(a){this.set('password',a)}Ve(){return this.get('nonce')}toString(){return this.yd()+(this.Ve()?' with nonce':'')+(this.get('password')?' with password':'')}};olympe.auth.vf=class{constructor(a,b,c,d={}){this.user=a;this.vj=b;this.F=c;this.G=d}yd(){return this.user}Dg(){return this.vj}Ve(){return this.F}Uj(){return this.G}bi(){return null}la(){var a=olympe.X,b=a.qr;var c=JSON.stringify({user:this.user,userTag:this.vj,nonce:this.F,payload:this.G});c=olympe.X.ai().C(Da(c));return b.call(a,c)}};m=olympe.auth.vf.prototype;m.yd.K=new olympe.D.J(()=>String,[]);m.Dg.K=new olympe.D.J(()=>String,[]);m.Ve.K=new olympe.D.J(()=>String,[]);
379
+ m.Uj.K=new olympe.D.J(()=>Object,[]);m.bi.K=new olympe.D.J(()=>String,[]);m.la.K=new olympe.D.J(()=>String,[]);olympe.auth.Tl=class extends olympe.auth.vf{constructor(a,b,c,d){super(a,b,c,d)}bi(){return this.Uj().access_token||null}};olympe.auth.yq=class extends olympe.auth.vf{constructor(a,b,c,d){super(a,b,c,d);this.C=null}bi(){return this.C}la(){var a=olympe.X.ai(),b={user:this.yd(),userTag:this.Dg(),nonce:this.Ve(),payload:this.Uj(),fullToken:this.C},c=olympe.X,d=c.qr;b=JSON.stringify(b);a=a.C(Da(b));return d.call(c,a)}};function jc(a,b,c){const d=a.C.C('AUTH');d.set(a.key,'string'===typeof b?b:b.la(),e=>{d.close();c&&c(e)})}function oc(a){const b=a.C.C('AUTH');b.remove(a.key,()=>b.close())}
380
+ olympe.auth.nm=class{constructor(a,b,c){this.C=a;this.N=b;this.key='OlympeToken-'+c.C}Yc(a){const b=this.C.C('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=Ea(olympe.X.ai().R(olympe.X.Cv(c)));const h=f.call(e,g);if(h.fullToken){const k=new olympe.auth.yq(h.user,h.userTag,h.nonce,h.payload);k.C=h.fullToken;d=k}else d=h.payload&&
381
+ h.payload.id_token?new olympe.auth.Tl(h.user,h.userTag,h.nonce,h.payload):new olympe.auth.vf(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.nm.F='OlympeToken';olympe.auth.nm.C='AUTH';olympe.auth.kk=class{redirect(){}F(){}C(){}};olympe.auth.kk.C={GET:'GET',Vl:'POST'};olympe.auth.al=class{constructor(a){this.C=a||'default'}};olympe.auth.Jb={};olympe.auth.Jb.qa={};olympe.auth.Jb.qa.Gi=class{$(){}};olympe.auth.Jb.qa.Ne=class{ja(){}};olympe.auth.Jb.qa.Fe=class{ta(){}Ka(){}};function wc(a,b){return olympe.X.ob(b+'-olympe-'+a.C[b])}olympe.auth.Jb.Fi=class{constructor(a){this.C=a}na(){return'local'}Yc(a,b){const c=a.yd();if(c){const d=a.get('password'),e=a.Ve();a.C.delete('password');if(void 0!==e&&wc(this,c)===e){b(null,new olympe.auth.vf(c,'',wc(this,c)));return}a=olympe.X.ob(d||'');if(this.C[c]===a){b(null,new olympe.auth.vf(c,'',wc(this,c)));return}}b(Error('Invalid login'))}};olympe.auth.Jb.Fi.C='local';olympe.auth.Jb.Fi.ma=[olympe.auth.Li];olympe.auth.Jb.Gi=class{constructor(a,b){this.C=a;this.storage=b}na(){return'localToken'}Yc(a,b){this.storage.Yc(c=>{this.C.$(a,(d,e)=>{b(d,e||c)})})}};olympe.auth.Jb.Gi.C='localToken';olympe.auth.Jb.Gi.ma=[olympe.auth.Li];olympe.auth.Jb.Sl=class{constructor(a,b){this.C=a;this.F=b}na(){return'openID'}Yc(){const a=this.C.C();this.C.redirect(`${this.F}/auth?url=${a}`,null,olympe.auth.kk.C.GET)}};olympe.auth.Jb.Sl.C='openID';olympe.auth.Jb.Sl.ma=[olympe.auth.Li];olympe.auth.Jb.Ne=class{constructor(a,b){this.F=a;this.C=b}na(){return'saml'}Yc(a,b){this.F.ja(c=>{c?b(c):this.C.F()})}};olympe.auth.Jb.Ne.C='saml';olympe.auth.Jb.Ne.ma=[olympe.auth.Li];olympe.auth.Jb.Fe=class{static aj(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.C=a;this.N=olympe.ra.Ya('auth')}na(){return'srp'}Yc(a,b){const c=a.get('password');a.C.delete('password');this.N.debug('Sending SRP request');this.C.ta(a,(d,e,f)=>{this.N.debug('Received Salt+B message');if(d)b(d);else{try{const g=new SRPClient;g.step1(a.yd(),c);const h=g.step2(e,f);a.set('a',h.A);a.set('m1',h.M1)}catch(g){b(g);
382
+ return}this.N.debug('Sending SRP A+M (proof) message');this.C.Ka(a,b)}})}};olympe.auth.Jb.Fe.C='srp';olympe.auth.Jb.Fe.ma=[olympe.auth.Li];olympe.auth.P={Aa:'auth.Manager',Ea:'auth.Logger',Oi:'auth.Storage',xj:'auth.appNameToken',gk:'auth.Redirector'};olympe.auth.qd={Aa:'auth.ManagerConnector',zp:'auth.LocalTokenConnector',Fe:'auth.SRPConnector',Ne:'auth.SAMLConnector'};olympe.auth.Config={ll:'auth.defaultProvider',Ap:'auth.localTokenProvider',An:'auth.autoLogin',En:'auth.autoUser',Bn:'auth.autoPassword',sk:'auth.token',yn:'auth.appToken'};
383
+ olympe.U.config(function(a){D(a,olympe.auth.Config.ll,'srp');D(a,olympe.auth.Config.Ap,'localToken');D(a,olympe.auth.Config.An,!1);D(a,olympe.auth.Config.En,'');D(a,olympe.auth.Config.Bn,'');D(a,olympe.auth.Config.sk,'');D(a,olympe.auth.Config.yn,'default');C(a,olympe.auth.P.Ea,[olympe.ra.P.Aa],b=>b.Oc('auth'));A(a,olympe.auth.P.xj,olympe.auth.al,new olympe.U.fa(olympe.auth.Config.yn));A(a,olympe.auth.P.Oi,olympe.auth.nm,olympe.hc.P.Wj,olympe.auth.P.Ea,olympe.auth.P.xj);ta(a,olympe.auth.qd.Aa);ta(a,
384
+ olympe.auth.P.gk);C(a,olympe.auth.P.Aa,[olympe.auth.P.Ea,olympe.auth.qd.Aa,olympe.host.P.vl,new olympe.U.tb(olympe.auth.P.Oi,olympe.U.gf.C.Eh),new olympe.U.fa(olympe.auth.Config.ll),new olympe.U.fa(olympe.auth.Config.Ap),new olympe.U.fa(olympe.auth.Config.An),new olympe.U.fa(olympe.auth.Config.En),new olympe.U.fa(olympe.auth.Config.Bn),new olympe.U.fa(olympe.auth.Config.sk),new olympe.U.tb(olympe.auth.P.gk,olympe.U.gf.C.Eh),new olympe.U.tb(olympe.auth.qd.zp,olympe.U.gf.C.Eh),new olympe.U.tb(olympe.auth.qd.Fe,
385
+ olympe.U.gf.C.Eh),new olympe.U.tb(olympe.auth.qd.Ne,olympe.U.gf.C.Eh)],(b,c,d,e,f,g,h,k,l,n,p,q,r,t)=>{const u=[];q&&u.push(new olympe.auth.Jb.Gi(q,e));r&&u.push(new olympe.auth.Jb.Fe(r));t&&p&&u.push(new olympe.auth.Jb.Ne(t,p));p&&c&&u.push(new olympe.auth.Jb.Sl(p,c.Ir()));if(0===u.length)throw Error('At least one provider is needed for auth to start');if(!u.map(v=>v.na()).includes(f))throw Error('Default provider name'+f+'given by parameter'+olympe.auth.Config.ll+'cannot be found');return new olympe.auth.pa(b,
386
+ c,e,p,d.kj()?d:null,u,f,g,h,k,l,n)},!0)},'olympe.auth');olympe.U.run([olympe.auth.P.Aa],a=>{olympe.auth.Jc=()=>a});olympe.dc={};olympe.dc.Ca={ORIGIN:'<',DESTINATION:'>'};z('olympe.dc.Direction',olympe.dc.Ca);olympe.dc.jc={Tc:'ff022000000000000000',vi:'ff02200000000000000e',Wn:'ff02200000000000000f'};olympe.dc.Yb={VERSION:'@v',Gd:'@s'};olympe.dc.Tg={ic:'?'};olympe.dc.pk={Tp:'online',Fh:'offline',nt:'invalidate'};olympe.dc.Ha={sb:'self',Mc:'server',Zp:'peer',ic:'server'};olympe.dc.za=function(a){if('string'===typeof a)return a;let b=null;a=olympe.D.$a(a);void 0!==a&&null!==a&&(a=a.valueOf(),'string'===typeof a?b=a:a.T?b=a.T():'function'===typeof a&&(b=olympe.dc.ya.Nb(a)));return b||''};z('olympe.dc.instanceToTag',olympe.dc.za);olympe.dc.Ja=function(){return olympe.dc.xd().view};olympe.dc.register=function(a,b){olympe.dc.ya.C(a,b)};olympe.dc.defineProperty=function(a){return new olympe.dc.ua.Property(a)};
387
+ olympe.dc.gh=function(a,b=olympe.dc.Ca.DESTINATION,c=olympe.dc.CloudObject,d=olympe.dc.Ca.DESTINATION){const e=olympe.dc.Ca.DESTINATION;return b===olympe.dc.Ca.ORIGIN||b===e?new olympe.dc.ua.Relation(a,b):new olympe.dc.ua.Relation(a,d,b,c)};olympe.dc.Ov=function(a){return a.Ec()};olympe.dc.Writable=class{F(){}qc(){}Dc(){}Ua(){}cc(){}};olympe.dc.Xl=class{Nc(){}Z(){}G(){}};function xc(a,b,c,d,e,f,g){d=new olympe.dc.ha(olympe.dc.ha.ia.Qh,{file:b,url:null,content:c,Ye:e?h=>{yc(a,b,c);f(h)}:f,mimeType:d,se:g||null},[olympe.dc.Ja().source(b)||olympe.dc.Ha.Mc]);a.F.send(d)}function zc(a,b,c,d,e,f){c=c instanceof olympe.D.Za?c.valueOf():c;'string'===typeof c?c=new Blob([Da(c)],{type:d}):c instanceof ArrayBuffer&&(c=new Blob([c],{type:d}));xc(a,b,c,d,a.G,e,f)}
388
+ function yc(a,b,c){const d=olympe.dc.za(b);a.C.set(d,c);const e=olympe.X.yg();Ac(olympe.dc.Ja(),d,f=>{f||(a.C.delete(d),Bc(olympe.dc.Ja(),d,e))},e)}function Cc(a,b,c,d){olympe.D.Tr([b.Pr(),b.T(),b.El(),b.Um()],(e,f,g,h)=>{a.C.has(f)?c(a.C.get(f)):(e=new olympe.dc.ha(olympe.dc.ha.ia.vh,{file:f,url:e.valueOf()?null:g,mimeType:h.valueOf(),Ye:a.G?k=>{yc(a,f,k);c(k)}:c,se:d},[olympe.dc.Ja().source(f)||olympe.dc.Ha.Mc]),a.F.send(e))})}
389
+ olympe.dc.$s=class{constructor(a,b,c,d,e){this.N=a;this.F=c;this.G=e;this.C=new Map}};olympe.dc.pa=class{constructor(a){this.N=a}};function Dc(a,b){a.F=b;return a}function M(a,b){a.Wh.unshift(b);return a}olympe.dc.ha=class{constructor(a,b,c){this.type=a;this.content=b;this.C=c;this.Wh=[];this.F=olympe.D.La()}validate(a=null){this.Wh.forEach(b=>{b(a||null)})}toString(){const a=olympe.X.Gr(olympe.dc.ha.ia,this.type);return a?a:'UNKNOWN_MESSAGE'}};
390
+ olympe.dc.ha.ia={ac:1,lg:2,Rg:10,eA:11,Pu:20,nB:21,oB:22,Ru:23,yi:24,xi:25,fA:26,Po:28,$l:30,bm:31,xu:32,dh:40,tk:41,uh:45,Bj:46,Lj:47,Qh:50,vh:51,ti:52,fv:60,Cu:61,bt:62,ct:63,vs:64,el:65,dA:90,kl:91,ul:92,Qo:93,vp:94,$j:95,Qu:96,QUERY_RESULT:97,am:98};olympe.dc.og=class{process(){}};olympe.dc.Yl=class{constructor(...a){this.Ub=a}process(a,b,c){const d=this.Ub.length,e=(f,g,h)=>{g||f>=d?c(g,h):this.Ub[f].process(a,h,e.bind(null,f+1))};e(0,null,b)}};olympe.dc.Yl.ma=[olympe.dc.og];function Ec(a){return olympe.dc.CloudObject.get(a.tag)}olympe.dc.Cc=class{constructor(a){this.tag='string'===typeof a?a:a.T()}T(){return this.tag}toJSON(){return'{ "type": "reference", "tag": '+JSON.stringify(this.tag)+' }'}mb(a){return a instanceof olympe.dc.Cc&&this.tag===a.tag}static lc(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return new olympe.dc.Cc(b.tag)}};olympe.dc.Cc.ma=[olympe.dc.Ae];olympe.dc.Cc.prototype.toJSON.K=olympe.D.J.C;olympe.dc.Cc.prototype.mb.K=olympe.D.J.C;olympe.dc.pg=class{send(){}C(){}ja(){}};const Fc=olympe.dc.Ca.ORIGIN,Gc=olympe.dc.Ca.DESTINATION,Hc=new Map,Ic=new Map,Jc=new Map,Kc=new Map;function Lc(a,b){var c=olympe.dm.File;let d=c;'function'===typeof c&&(d=b.entry);c=[...(d.tn||[])];return olympe.dc.ya.C(a,b,...c)}function Mc(a,b){Kc.set(a,b);return a}function Nc(a){return(a=Hc.get(a))&&a.C||olympe.dc.CloudObject}function Oc(a,b,c){const d=a+'@'+(b===Gc?Fc:Gc);if(Ic.has(d))throw Error(`Try to register the same relation (${b+a}) multiple times.`);Ic.set(d,c)}
391
391
  function Pc(a){a=a.T()+'@'+a.Ra();return Ic.get(a)||olympe.dc.CloudObject}function N(a,b){b.NAME=a;Jc.set(a,b)}function O(a){return a.NAME||null}
392
392
  olympe.dc.ya=class{constructor(){}static C(a,b,...c){if(Hc.has(a))throw Error(`Tag: ${a} - overwriting already defined sync ${Hc.get(a).C.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.tb(g):g}}b=new olympe.dc.ua.Entry(a,b,d);Hc.set(a,b);return b.C.entry=b}static Nb(a){return(a=a.entry)&&a.T()||null}};olympe.dc.ua={};function P(a,b){b=b.Ec();Oc(b.T(),b.Ra(),a.C);return b}function Qc(a){a.F=!0;return a}
393
- olympe.dc.ua.Entry=class{constructor(a,b,c){this.tag=a;this.C=b;this.un=c||null;this.F=!1}T(){return this.tag}instantiate(a,b){const c=this.C;if(this.ij()&&b.getParameter(olympe.dc.Config.xo)){var d=olympe.dc.Ja();d=`Trying to instantiate an abstract class ${d.name(this)} (${this.T()}).`+` This may happen when the implementation of another class extending ${d.name(this)} has not been registered`;olympe.ra.Ya('dc').error(d)}return this.un?(a=[void 0,a].concat(na(b,this.un)),new c(...a)):new c(void 0,
393
+ olympe.dc.ua.Entry=class{constructor(a,b,c){this.tag=a;this.C=b;this.tn=c||null;this.F=!1}T(){return this.tag}instantiate(a,b){const c=this.C;if(this.ij()&&b.getParameter(olympe.dc.Config.wo)){var d=olympe.dc.Ja();d=`Trying to instantiate an abstract class ${d.name(this)} (${this.T()}).`+` This may happen when the implementation of another class extending ${d.name(this)} has not been registered`;olympe.ra.Ya('dc').error(d)}return this.tn?(a=[void 0,a].concat(na(b,this.tn)),new c(...a)):new c(void 0,
394
394
  a)}xa(a){return new olympe.dc.ua.Property(a)}Ga(a,b=olympe.dc.Ca.DESTINATION){Oc(a,b,this.C);return new olympe.dc.Y.Sb(a,b)}ij(){return this.F}};z('olympe.dc.registry.Entry',olympe.dc.ua.Entry);olympe.dc.ua.Entry.prototype.addRelation=olympe.dc.ua.Entry.prototype.Ga;olympe.dc.ua.Entry.prototype.addProperty=olympe.dc.ua.Entry.prototype.xa;olympe.dc.ua.Entry.ma=[olympe.dc.Ae];olympe.dc.ua.Property=class{constructor(a){this.tag=a}T(){return this.tag}};olympe.dc.ua.Property.prototype.getTag=olympe.dc.ua.Property.prototype.T;olympe.dc.ua.Property.ma=[olympe.dc.Ae];olympe.dc.ua.Relation=class{constructor(a,b=olympe.dc.Ca.DESTINATION,c=olympe.dc.CloudObject,d=olympe.dc.CloudObject){this.tag=olympe.dc.za(a);this.direction=b;this.origin=c;this.destination=d}T(){return this.tag}Ra(){return this.direction}type(){return this.destination}Ec(){return new olympe.dc.ua.Relation(this.tag,this.direction===olympe.dc.Ca.DESTINATION?olympe.dc.Ca.ORIGIN:olympe.dc.Ca.DESTINATION,this.destination,this.origin)}mb(a){return a instanceof olympe.dc.ua.Relation?a.T()===this.T()&&
395
395
  a.Ra()===this.Ra():!1}toString(){return this.direction+this.tag}};olympe.dc.ua.Relation.prototype.getInverse=olympe.dc.ua.Relation.prototype.Ec;olympe.dc.ua.Relation.prototype.getDirection=olympe.dc.ua.Relation.prototype.Ra;olympe.dc.ua.Relation.prototype.getTag=olympe.dc.ua.Relation.prototype.T;olympe.dc.ua.Relation.ma=[olympe.dc.Ae];olympe.dc.db={};function Rc(a,b,c,d,e,f=olympe.dc.Ha.sb){const g=c.Z();Sc(a.C,b,c,d,e,f);return h=>{if(h)a.C.push(g);else{h=a.C;const k=h.F.get(g);if(void 0!==k){const l=h.C.indexOf(g);h.C.splice(l,1);Tc(h,Uc(h,k.C,h.C.length),k.source);h.F.delete(g)}}}}function Vc(a,b){a.Na.Ka(b)}function Wc(a,b,c){b&&a.Na.bc(b);c&&a.Na.zc(c)}
396
- olympe.dc.db.Os=class{constructor(a,b,c,d,e){this.N=a;this.Na=b;this.C=new olympe.dc.db.Cs(a,b,d);this.view=new olympe.dc.hb(a,b);this.Kx=new olympe.dc.db.fu(this.N,this.view,b,e)}Ya(){return this.N}persist(a){this.Na.ta();this.Na.qb(a,olympe.dc.db.Instance.C.cq);this.Na.ja()}$e(a,b){this.C.$e(a,b)}};const Xc=olympe.dc.Yb.VERSION,Yc=olympe.dc.Yb.Gd,Zc=olympe.dc.jc.Tc,$c=olympe.dc.jc.vi;
397
- olympe.dc.db.Database=class a extends Map{constructor(b,c){super();this.id=olympe.X.ec();this.N=b;this.Ab=olympe.D.La();this.od=c.get('defaultSource')||olympe.dc.Ha.sb;this.R=olympe.dc.db.Database.G.IDLE;this.da=new Map;this.Hb=[];this.G=[];this.Ua=new Map;b=c.get('garbageCollector')||olympe.dc.db.zi.C.ol;new olympe.dc.db.zi(this,b,this.Ab);c.get('debug')&&this.be()}Z(){return this.id}getState(){return this.R}Ya(){return this.N}create(b,c){const d=this.L(b,!0);d.bc(c&&parseInt(c.get(Xc),10)||1);d.ii(c&&
398
- c.get(Yc)||this.od);c&&(c.delete(Xc),c.delete(Yc),this.Xc(d,c));this.C(a.F.np,b)}update(b,c,d=!1){if(void 0!==c&&null!==c){b=this.L(b,!0);var e=c&&parseInt(c.get(Xc),10);0>e||!d&&b.version()>=e||(c.delete(Xc),b.bc(isNaN(e)?b.version()+1:e),this.Xc(b,c))}}Dc(b){const c=this.get(b);void 0!==c&&(this.Va(c,!1),this.C(a.F.op,b))}link(b,c,d){c=this.L(c,!0);d=this.L(d,!0);switch(b){case Zc:c.Kd(d);break;case $c:c.$d(d);break;default:c.link(b,d)}}unlink(b,c,d){c=this.get(c);d=this.get(d);if(void 0!==c&&void 0!==
399
- d)switch(b){case Zc:c.Ok(d);break;case $c:c.lj(d);break;default:c.unlink(b,d)}}bc(b){for(const c of b)this.L(c).da()}zc(b){for(const c of b)(b=this.get(c))&&b.ja()}qb(b,c){b.forEach(d=>{this.L(d).We(c)})}Vb(b){const c=this.get(b);void 0!==c&&(c.clear(),super.delete(b),this.C(a.F.wo,b))}L(b,c=!1){let d=this.get(b);void 0===d&&(d=new olympe.dc.db.Instance(b,this),this.set(b,d),this.C(a.F.vo,b),c&&this.C(a.F.wk,b));return d}W(b,c,d=!1,e=null){return{[Symbol.iterator]:function*(f){const g=olympe.dm.Relation.C.vk,
400
- h=olympe.dm.Relation.C.jk,k=olympe.dc.Ca.ORIGIN,l=olympe.dc.Ca.DESTINATION,n=a.C.Jh+c,p=d?h:g,q=d?g:h,r=(new Map).set(f,!1),t=(v,w)=>(v=this.get(v))&&0!==(v.get(n)&w),u=([v,w])=>!r.has(v)&&(e?e(w):!0);for(const v of r.keys())r.get(v)||(r.set(v,!0),yield v),f=this.get(v),void 0!==f&&f.forEach((w,y)=>{(y[0]===k&&t(y.substring(1),q)||y[0]===l&&t(y.substring(1),p))&&Array.from(w.entries()).filter(u).forEach(([B])=>{r.set(B,!1)})})}.bind(this,b)}}Hc(b){ad(this.G[0],olympe.X.yg(),b)}$(b){if(0===this.G.length)debugger;
401
- this.G[0].C.delete(b)}C(b,c,...d){this.da.has(b)&&this.da.get(b).forEach(e=>{e(c,...d)})}Va(b,c){this.Ua.set(b,c)}$d(b,c,d,e){0<this.G.length&&bd(this.G[0],b).xa(e?cd+c:c,d)}Kd(b,c,d,e,f){if(0<this.G.length){var g=this.G[0];d===dd?f?bd(g,b).link(c,e):bd(g,b).unlink(c,e):f?bd(g,b).Ua(c,e):bd(g,b).qb(c,e)}}F(b,c){let d=this.da.get(b);void 0===d&&(d=[],this.da.set(b,d));d.push(c)}Ka(b){this.Hb.push(b)}vd(b){return this.G.reduce((c,d)=>d.G.has(b)||c,!1)}ta(){this.R===a.G.IDLE&&(this.R=a.G.ps);this.G.unshift(new olympe.dc.db.Ts(this,
402
- this.Ab))}ja(){this.R=a.G.cg;this.fe();ed(this.G[0]);this.G.shift();0===this.G.length&&(this.R=a.G.IDLE,this.Hb.forEach(b=>{b()}))}Xc(b,c){const d=a.C.ic;for(const [e,f]of c)void 0!==f&&(e[0]===d?b.en(e.substr(1),f):b.update(e,f))}fe(){const b=a.C.ORIGIN,c=new Set,d=(f,g=[])=>{const h=f.tag();if(!c.has(h)&&(c.add(h),g.push(f),f=f.get(b+Zc)))for(const k of f.values())d(k,g);return g},e=this.G[0];for(const [f,g]of this.Ua)d(f).filter(h=>h.vd(g)).forEach(h=>{h=h.tag();g?bd(e,h).create():bd(e,h).delete()});
403
- this.Ua.clear()}be(){const b=a.C.DESTINATION,c=a.F.rl,d=a.F.ik,e=new Set,f=new Map;this.F(a.F.np,g=>{e.add(g)});this.F(c,g=>{e.delete(g);f.delete(g)});this.F(d,(g,...h)=>{if(h[0]===$c&&h[1]===b){const k=h[2];this.get(k).Db()||(h=f.get(k)||new Set,0===h.size&&f.set(k,h),h.add(g))}});this.Ka(()=>{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&&
404
- 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.C={Jh:'$',lt:'~',ic:'?',$k:'=',Tn:'@',ORIGIN:olympe.dc.Ca.ORIGIN,DESTINATION:olympe.dc.Ca.DESTINATION};olympe.dc.db.Database.F={vo:0,wo:1,Xq:2,wk:3,Un:4,Vn:5,rl:6,Ac:7,ik:8,fm:9,np:10,op:11,pq:12};olympe.dc.db.Database.G={IDLE:0,ps:1,cg:2};const Q=olympe.dc.db.Database.F,fd=olympe.dc.db.Database.C.Jh,gd=olympe.dc.db.Database.C.lt,hd=olympe.dc.db.Database.C.ic,id=olympe.dc.db.Database.C.$k,jd=olympe.dc.db.Database.C.Tn,R=olympe.dc.Ca.ORIGIN,T=olympe.dc.Ca.DESTINATION,kd=olympe.dc.jc.Tc,ld=olympe.dc.jc.vi;
405
- olympe.dc.db.Instance=class a extends Map{constructor(b,c){super();this.C=b;this.Xc=olympe.dc.Ha.sb;this.e=!1;this.Hb=0;this.F=void 0;this.c=0;this.Ka=a.C.cq;this.db=c}tag(){return this.C}Db(){return this.e}Vb(){return this.db.vd(this.C)}source(){return this.Xc}version(){return this.Hb}model(){const b=this.get(T+kd);return b&&b.values().next().value||null}Df(){const b=this.get(T+ld);return b&&b.values().next().value||null}persisted(){return this.Ka!==a.C.fr}toString(){var b=this.cb(olympe.dc.CloudObject.nameProp.T());
396
+ olympe.dc.db.Ns=class{constructor(a,b,c,d,e){this.N=a;this.Na=b;this.C=new olympe.dc.db.Bs(a,b,d);this.view=new olympe.dc.hb(a,b);this.Jx=new olympe.dc.db.eu(this.N,this.view,b,e)}Ya(){return this.N}persist(a){this.Na.ta();this.Na.qb(a,olympe.dc.db.Instance.C.bq);this.Na.ja()}$e(a,b){this.C.$e(a,b)}};const Xc=olympe.dc.Yb.VERSION,Yc=olympe.dc.Yb.Gd,Zc=olympe.dc.jc.Tc,$c=olympe.dc.jc.vi;
397
+ olympe.dc.db.Database=class a extends Map{constructor(b,c){super();this.id=olympe.X.ec();this.N=b;this.Ab=olympe.D.La();this.od=c.get('defaultSource')||olympe.dc.Ha.sb;this.R=olympe.dc.db.Database.G.IDLE;this.da=new Map;this.Hb=[];this.G=[];this.Sa=new Map;b=c.get('garbageCollector')||olympe.dc.db.zi.C.nl;new olympe.dc.db.zi(this,b,this.Ab);c.get('debug')&&this.be()}Z(){return this.id}getState(){return this.R}Ya(){return this.N}create(b,c){const d=this.L(b,!0);d.bc(c&&parseInt(c.get(Xc),10)||1);d.ii(c&&
398
+ c.get(Yc)||this.od);c&&(c.delete(Xc),c.delete(Yc),this.Xc(d,c));this.C(a.F.mp,b)}update(b,c,d=!1){if(void 0!==c&&null!==c){b=this.L(b,!0);var e=c&&parseInt(c.get(Xc),10);0>e||!d&&b.version()>=e||(c.delete(Xc),b.bc(isNaN(e)?b.version()+1:e),this.Xc(b,c))}}Dc(b){const c=this.get(b);void 0!==c&&(this.Va(c,!1),this.C(a.F.np,b))}link(b,c,d){c=this.L(c,!0);d=this.L(d,!0);switch(b){case Zc:c.Kd(d);break;case $c:c.$d(d);break;default:c.link(b,d)}}unlink(b,c,d){c=this.get(c);d=this.get(d);if(void 0!==c&&void 0!==
399
+ d)switch(b){case Zc:c.Nk(d);break;case $c:c.lj(d);break;default:c.unlink(b,d)}}bc(b){for(const c of b)this.L(c).da()}zc(b){for(const c of b)(b=this.get(c))&&b.ja()}qb(b,c){b.forEach(d=>{this.L(d).We(c)})}Vb(b){const c=this.get(b);void 0!==c&&(c.clear(),super.delete(b),this.C(a.F.vo,b))}L(b,c=!1){let d=this.get(b);void 0===d&&(d=new olympe.dc.db.Instance(b,this),this.set(b,d),this.C(a.F.uo,b),c&&this.C(a.F.vk,b));return d}W(b,c,d=!1,e=null){return{[Symbol.iterator]:function*(f){const g=olympe.dm.Relation.C.uk,
400
+ h=olympe.dm.Relation.C.ik,k=olympe.dc.Ca.ORIGIN,l=olympe.dc.Ca.DESTINATION,n=a.C.Jh+c,p=d?h:g,q=d?g:h,r=(new Map).set(f,!1),t=(v,w)=>(v=this.get(v))&&0!==(v.get(n)&w),u=([v,w])=>!r.has(v)&&(e?e(w):!0);for(const v of r.keys())r.get(v)||(r.set(v,!0),yield v),f=this.get(v),void 0!==f&&f.forEach((w,y)=>{(y[0]===k&&t(y.substring(1),q)||y[0]===l&&t(y.substring(1),p))&&Array.from(w.entries()).filter(u).forEach(([B])=>{r.set(B,!1)})})}.bind(this,b)}}Hc(b){ad(this.G[0],olympe.X.yg(),b)}$(b){if(0===this.G.length)debugger;
401
+ this.G[0].C.delete(b)}C(b,c,...d){this.da.has(b)&&this.da.get(b).forEach(e=>{e(c,...d)})}Va(b,c){this.Sa.set(b,c)}$d(b,c,d,e){0<this.G.length&&bd(this.G[0],b).xa(e?cd+c:c,d)}Kd(b,c,d,e,f){if(0<this.G.length){var g=this.G[0];d===dd?f?bd(g,b).link(c,e):bd(g,b).unlink(c,e):f?bd(g,b).Sa(c,e):bd(g,b).qb(c,e)}}F(b,c){let d=this.da.get(b);void 0===d&&(d=[],this.da.set(b,d));d.push(c)}Ka(b){this.Hb.push(b)}vd(b){return this.G.reduce((c,d)=>d.G.has(b)||c,!1)}ta(){this.R===a.G.IDLE&&(this.R=a.G.ns);this.G.unshift(new olympe.dc.db.Ss(this,
402
+ this.Ab))}ja(){this.R=a.G.cg;this.fe();ed(this.G[0]);this.G.shift();0===this.G.length&&(this.R=a.G.IDLE,this.Hb.forEach(b=>{b()}))}Xc(b,c){const d=a.C.ic;for(const [e,f]of c)void 0!==f&&(e[0]===d?b.dn(e.substr(1),f):b.update(e,f))}fe(){const b=a.C.ORIGIN,c=new Set,d=(f,g=[])=>{const h=f.tag();if(!c.has(h)&&(c.add(h),g.push(f),f=f.get(b+Zc)))for(const k of f.values())d(k,g);return g},e=this.G[0];for(const [f,g]of this.Sa)d(f).filter(h=>h.vd(g)).forEach(h=>{h=h.tag();g?bd(e,h).create():bd(e,h).delete()});
403
+ this.Sa.clear()}be(){const b=a.C.DESTINATION,c=a.F.ql,d=a.F.hk,e=new Set,f=new Map;this.F(a.F.mp,g=>{e.add(g)});this.F(c,g=>{e.delete(g);f.delete(g)});this.F(d,(g,...h)=>{if(h[0]===$c&&h[1]===b){const k=h[2];this.get(k).Db()||(h=f.get(k)||new Set,0===h.size&&f.set(k,h),h.add(g))}});this.Ka(()=>{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&&
404
+ 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.C={Jh:'$',kt:'~',ic:'?',Zk:'=',Sn:'@',ORIGIN:olympe.dc.Ca.ORIGIN,DESTINATION:olympe.dc.Ca.DESTINATION};olympe.dc.db.Database.F={uo:0,vo:1,Wq:2,vk:3,Tn:4,Un:5,ql:6,Ac:7,hk:8,em:9,mp:10,np:11,oq:12};olympe.dc.db.Database.G={IDLE:0,ns:1,cg:2};const Q=olympe.dc.db.Database.F,fd=olympe.dc.db.Database.C.Jh,gd=olympe.dc.db.Database.C.kt,hd=olympe.dc.db.Database.C.ic,id=olympe.dc.db.Database.C.Zk,jd=olympe.dc.db.Database.C.Sn,R=olympe.dc.Ca.ORIGIN,T=olympe.dc.Ca.DESTINATION,kd=olympe.dc.jc.Tc,ld=olympe.dc.jc.vi;
405
+ olympe.dc.db.Instance=class a extends Map{constructor(b,c){super();this.C=b;this.Xc=olympe.dc.Ha.sb;this.e=!1;this.Hb=0;this.F=void 0;this.c=0;this.Ka=a.C.bq;this.db=c}tag(){return this.C}Db(){return this.e}Vb(){return this.db.vd(this.C)}source(){return this.Xc}version(){return this.Hb}model(){const b=this.get(T+kd);return b&&b.values().next().value||null}Df(){const b=this.get(T+ld);return b&&b.values().next().value||null}persisted(){return this.Ka!==a.C.er}toString(){var b=this.cb(olympe.dc.CloudObject.nameProp.T());
406
406
  b=`Instance: ${this.C}, Exist: ${this.e}, Name: ${b}`;var c=this.model();if(c){var d=c.cb(olympe.dc.CloudObject.nameProp.T())||'No model name';b+=`\nModel: ${c.C}, Exist: ${c.e}, Model name: ${d}`}else b+='\nModel: no model';(c=this.Df())?(d=c.cb(olympe.dc.CloudObject.nameProp.T())||'No extension name',b+=`\nExtension: ${c.C}, Exist: ${c.e}, Extension name: ${d}`):b+='\nExtension: no extension';return b}cb(b,c=!1){const d=this.get(fd+b);return c||void 0!==d?d:this.get(id+b)}Va(b,c=!1){const d=this.get(hd+
407
407
  b);return c||void 0!==d?d:this.get(gd+b)}update(b,c){const d=fd+b;var e=this.get(d),f=e=void 0===e?null:e;(null!==f&&'function'===typeof f.mb?f.mb(c):f===c)||(e instanceof olympe.dc.Cc&&(this.db.get(e.T()).zc(),this.db.Dc(e.T())),c instanceof olympe.dc.Cc&&(e=this.db.L(c.T(),!0),e.F&&e.F.tag!==this.C&&this.db.Ya().fatal('Instance',c.T(),'referenced multiple times!\nThis instance is currently property of',e.F.tag,'(for the property '+e.F.kb+')','and is assigned as a property of',this.C,'(for the property '+
408
- b+')'),e.ph(this.C,b)),e=id+b,null===c?(this.delete(d),c=(c=this.model())&&c.Va(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)))}en(b,c){const d=hd+b;var e=this.get(d);(void 0===e?null:e)!==c&&(e=gd+b,null===c?(this.delete(d),c=(c=this.Df())&&c.Va(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=R+b;const e=this.Ab(T+
409
- b);d=c.Ab(d);e.has(c.C)||(e.set(c.C,c),d.set(this.C,this),this.db.C(Q.ik,this.C,b,T,c.C),this.db.C(Q.ik,c.C,b,R,this.C),this.e&&c.e&&(this.G(b,T,c,!0),c.G(b,R,this,!0)))}unlink(b,c){const d=R+b;void 0!==this.qb(T+b,c.C)&&(c.qb(d,this.C),this.db.C(Q.fm,this.C,b,T,c.C),this.db.C(Q.fm,c.C,b,R,this.C),this.e&&c.e&&(this.G(b,T,c,!1),c.G(b,R,this,!1)))}Kd(b){const c=this.model();if(null!==c){if(c===b)return;this.unlink(kd,c)}this.link(kd,b);b.forEach((d,e)=>{if(e[0]===hd||e[0]===gd)e=e.substring(1),this.Ua(e,
410
- d)});(b.e||b===this)&&this.db.Va(this,!0)}Ok(b){this.unlink(kd,b);this.forEach((c,d)=>{c=d.substring(1);this.Ua(c,null)});this.db.Va(this,!1)}$d(b){const c=this.Df();if(null!==c){if(c===b)return;this.unlink(ld,c)}this.link(ld,b);const d=new Map;b.forEach((e,f)=>{if(f[0]===hd||f[0]===gd)f=f.substring(1),this.has(hd+f)||(this.set(gd+f,e),d.set(f,e))});this.W(d)}lj(b){this.unlink(ld,b);const c=new Map;this.forEach((d,e)=>{e[0]===gd&&(this.delete(e),d=e.substring(1),c.set(d,null))});this.W(c)}Hc(b,c,
411
- d){const e=(...f)=>{var g=f.length;const h=f[g-2];(g=this.db.get(f[g-1]))&&(h?g.da():g.ja());d(...f)};this.$(b,c,e);return e}$(b,c,d){const e=this.Ab(jd+b);e.has(c)||(e.set(c,d),this.da(),this.db.C(Q.Un,this.C,b,c))}R(b,c){const d=this.qb(jd+b,c);void 0!==d&&(this.ja(),this.db.C(Q.Vn,this.C,b,c));return d}ii(b){this.Xc=b}bc(b){this.Hb=b}We(b){this.Ka=b;this.ta()||this.db.C(Q.wk,this.C)}vd(b){const c=this.e!==b;c&&(b?(this.e=b,this.fe()):(this.be(),this.e=b),this.od(b));return c}da(){this.c++;1===
412
- this.c&&this.db.C(Q.Xq,this.C)}ja(){0<this.c?--this.c:this.db.C(Q.pq,this.C,`Try to decrease references on instance ${this.C} 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.C(Q.wk,this.C)}ta(){return 0<this.c||this.Ka===olympe.dc.db.Instance.C.eq}clear(){this.forEach((b,c)=>{const d=c[0];if(d===R||d===T){const e=c.substring(1),
408
+ b+')'),e.ph(this.C,b)),e=id+b,null===c?(this.delete(d),c=(c=this.model())&&c.Va(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)))}dn(b,c){const d=hd+b;var e=this.get(d);(void 0===e?null:e)!==c&&(e=gd+b,null===c?(this.delete(d),c=(c=this.Df())&&c.Va(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=R+b;const e=this.Ab(T+
409
+ b);d=c.Ab(d);e.has(c.C)||(e.set(c.C,c),d.set(this.C,this),this.db.C(Q.hk,this.C,b,T,c.C),this.db.C(Q.hk,c.C,b,R,this.C),this.e&&c.e&&(this.G(b,T,c,!0),c.G(b,R,this,!0)))}unlink(b,c){const d=R+b;void 0!==this.qb(T+b,c.C)&&(c.qb(d,this.C),this.db.C(Q.em,this.C,b,T,c.C),this.db.C(Q.em,c.C,b,R,this.C),this.e&&c.e&&(this.G(b,T,c,!1),c.G(b,R,this,!1)))}Kd(b){const c=this.model();if(null!==c){if(c===b)return;this.unlink(kd,c)}this.link(kd,b);b.forEach((d,e)=>{if(e[0]===hd||e[0]===gd)e=e.substring(1),this.Sa(e,
410
+ d)});(b.e||b===this)&&this.db.Va(this,!0)}Nk(b){this.unlink(kd,b);this.forEach((c,d)=>{c=d.substring(1);this.Sa(c,null)});this.db.Va(this,!1)}$d(b){const c=this.Df();if(null!==c){if(c===b)return;this.unlink(ld,c)}this.link(ld,b);const d=new Map;b.forEach((e,f)=>{if(f[0]===hd||f[0]===gd)f=f.substring(1),this.has(hd+f)||(this.set(gd+f,e),d.set(f,e))});this.W(d)}lj(b){this.unlink(ld,b);const c=new Map;this.forEach((d,e)=>{e[0]===gd&&(this.delete(e),d=e.substring(1),c.set(d,null))});this.W(c)}Hc(b,c,
411
+ d){const e=(...f)=>{var g=f.length;const h=f[g-2];(g=this.db.get(f[g-1]))&&(h?g.da():g.ja());d(...f)};this.$(b,c,e);return e}$(b,c,d){const e=this.Ab(jd+b);e.has(c)||(e.set(c,d),this.da(),this.db.C(Q.Tn,this.C,b,c))}R(b,c){const d=this.qb(jd+b,c);void 0!==d&&(this.ja(),this.db.C(Q.Un,this.C,b,c));return d}ii(b){this.Xc=b}bc(b){this.Hb=b}We(b){this.Ka=b;this.ta()||this.db.C(Q.vk,this.C)}vd(b){const c=this.e!==b;c&&(b?(this.e=b,this.fe()):(this.be(),this.e=b),this.od(b));return c}da(){this.c++;1===
412
+ this.c&&this.db.C(Q.Wq,this.C)}ja(){0<this.c?--this.c:this.db.C(Q.oq,this.C,`Try to decrease references on instance ${this.C} 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.C(Q.vk,this.C)}ta(){return 0<this.c||this.Ka===olympe.dc.db.Instance.C.cq}clear(){this.forEach((b,c)=>{const d=c[0];if(d===R||d===T){const e=c.substring(1),
413
413
  f=d===R?T:R;b.forEach(g=>{const h=g.get(f+e);h.delete(this.C);0===h.size&&g.delete(f+e)})}d===fd&&b instanceof olympe.dc.Cc&&this.db.get(b.T()).zc()});void 0!==this.F&&this.db.get(this.F.tag).delete(fd+this.F.kb)}ph(b,c){void 0===this.F&&this.da();this.F={tag:b,kb:c}}zc(){void 0!==this.F&&(this.ja(),this.F=void 0)}fe(){this.forEach((b,c)=>{const d=c[0];if(d===R||d===T){const e=c.substring(1),f=d===R?T:R;b.forEach(g=>{g.e&&(this.G(e,d,g,!0),g.G(e,f,this,!0))})}else if(d===fd||d===id)c=c.substring(1),
414
- this.L(c,b,d===id)})}be(){this.forEach((b,c)=>{const d=c[0];if(d!==jd){var e=c.substring(1);d===R?b.forEach(f=>{f.unlink(e,this)}):d===T?b.forEach(f=>{this.unlink(e,f)}):d===fd&&this.update(e,null);this.delete(c)}});this.Hb=0;if(void 0!==this.F){const b=this.db.get(this.F.tag),c=b.get(fd+this.F.kb);c&&c.T&&c.T()===this.C&&b.update(this.F.kb,null)}}od(b){this.db.C(b?Q.rl:Q.Ac,this.C)}L(b,c,d){this.e&&this.db.$d(this.C,b,c,d)}G(b,c,d,e){this.db.Kd(this.C,b,c,d.C,e)}W(b,c=[]){var d=this.get(R+kd);void 0!==
415
- d&&d.forEach(e=>{b.forEach((f,g)=>e.Ua(g,f))});d=this.get(R+ld);void 0!==d&&d.forEach((e,f)=>{if(!c.includes(e.tag())){var g=new Map;b.forEach((h,k)=>{e.has(hd+k)||(g.set(k,h),null!==h?e.set(gd+k,h):e.delete(gd+k))});e.W(g,[...c,f])}})}Ua(b,c){if(!this.has(fd+b)){const d=id+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))}}Ab(b){let c=this.get(b);void 0===c&&(c=new Map,this.set(b,c));return c}qb(b,c){const d=this.get(b);if(void 0!==d){const e=d.get(c);
416
- d.delete(c);0===d.size&&this.delete(b);return e}}};olympe.dc.db.Instance.C={fr:0,eq:1,cq:2};const dd=olympe.dc.db.Database.C.DESTINATION,cd=olympe.dc.db.Database.C.$k,md=olympe.dc.db.Database.C.Jh,nd=olympe.dc.db.Database.C.Tn,od=olympe.dc.db.Database.C.ORIGIN+dd,pd=md+md;function ad(a,b,c){let d=a.C.get(b);void 0===d&&(d=[],a.C.set(b,d));a.buffer.push([b,d.length]);d.push(c)}
414
+ this.L(c,b,d===id)})}be(){this.forEach((b,c)=>{const d=c[0];if(d!==jd){var e=c.substring(1);d===R?b.forEach(f=>{f.unlink(e,this)}):d===T?b.forEach(f=>{this.unlink(e,f)}):d===fd&&this.update(e,null);this.delete(c)}});this.Hb=0;if(void 0!==this.F){const b=this.db.get(this.F.tag),c=b.get(fd+this.F.kb);c&&c.T&&c.T()===this.C&&b.update(this.F.kb,null)}}od(b){this.db.C(b?Q.ql:Q.Ac,this.C)}L(b,c,d){this.e&&this.db.$d(this.C,b,c,d)}G(b,c,d,e){this.db.Kd(this.C,b,c,d.C,e)}W(b,c=[]){var d=this.get(R+kd);void 0!==
415
+ d&&d.forEach(e=>{b.forEach((f,g)=>e.Sa(g,f))});d=this.get(R+ld);void 0!==d&&d.forEach((e,f)=>{if(!c.includes(e.tag())){var g=new Map;b.forEach((h,k)=>{e.has(hd+k)||(g.set(k,h),null!==h?e.set(gd+k,h):e.delete(gd+k))});e.W(g,[...c,f])}})}Sa(b,c){if(!this.has(fd+b)){const d=id+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))}}Ab(b){let c=this.get(b);void 0===c&&(c=new Map,this.set(b,c));return c}qb(b,c){const d=this.get(b);if(void 0!==d){const e=d.get(c);
416
+ d.delete(c);0===d.size&&this.delete(b);return e}}};olympe.dc.db.Instance.C={er:0,cq:1,bq:2};const dd=olympe.dc.db.Database.C.DESTINATION,cd=olympe.dc.db.Database.C.Zk,md=olympe.dc.db.Database.C.Jh,nd=olympe.dc.db.Database.C.Sn,od=olympe.dc.db.Database.C.ORIGIN+dd,pd=md+md;function ad(a,b,c){let d=a.C.get(b);void 0===d&&(d=[],a.C.set(b,d));a.buffer.push([b,d.length]);d.push(c)}
417
417
  function ed(a){const b=a.Na;a.F.forEach((c,d)=>{const e=b.get(d);if(c.re()||c.L()){var f=e.get(nd);f&&qd(a,f,c.re(),d);c.L()&&a.G.add(d)}for(const [l,n]of c.dd()){var g=l[0]===cd;d=a;var h=e;f=g?l.substr(1):l;var k=n;const p=h.get(nd+md+f);p&&qd(d,p,k,g);(h=h.get(nd+pd))&&qd(d,h,f,k,g)}for(const l of c.Ka())rd(a,e,...l)});a.F.clear();sd(a)}function bd(a,b){let c=a.F.get(b);void 0===c&&(c=new olympe.dc.db.jg(b),a.F.set(b,c));return c}
418
- function qd(a,b,...c){b.forEach((d,e)=>{ad(a,e,d.bind(null,...c))})}function rd(a,b,c,d,e,f){const g=b.get(nd+d+c);g&&qd(a,g,f,e);(b=b.get(nd+od))&&qd(a,b,c,d,f,e)}function sd(a){a.L.run(()=>{const b=a.C;for(const [d,e]of a.buffer){var c=b.get(d);(c=c&&c[e])&&c()}});a.C.clear();a.buffer.length=0}olympe.dc.db.Ts=class{constructor(a,b){this.Na=a;this.L=b;this.F=new Map;this.G=new Set;this.C=new Map;this.buffer=[]}};function td(a){const b=olympe.dc.db.Database.F.wo,c=olympe.dc.db.Database.F.rl,d=olympe.dc.db.Database.F.Ac,e=olympe.dc.db.Database.F.ik,f=olympe.dc.db.Database.F.fm,g=olympe.dc.db.Database.F.Un,h=olympe.dc.db.Database.F.Vn,k=()=>{};a.Na.F(olympe.dc.db.Database.F.vo,()=>{});a.Na.F(b,()=>{});a.Na.F(c,l=>{a.Na.Hc(()=>{ud(a.view,l,k,`monitorRelations${l}`)})});a.Na.F(d,l=>{a.Na.Hc(()=>{vd(a.view,l,`monitorRelations${l}`)})});a.Na.F(e,()=>{});a.Na.F(f,()=>{});a.Na.F(g,()=>{});a.Na.F(h,()=>{})}
419
- olympe.dc.db.fu=class{constructor(a,b,c,d){this.N=a;this.view=b;this.Na=c;d&&td(this)}debug(a){const b=olympe.dc.za(a);if(this.Na.has(b)){var c=this.Na.get(a);a='\n[DEBUG - DATABASE]\n'+c.toString();if(!c.Db()){const d=[];for(;null!==c&&!d.includes(c.tag());)d.push(c.tag()),c=c.model();c=this.Na.get(d[d.length-1]);const e=olympe.dc.db.Database.C.Jh+olympe.dc.CloudObject.nameProp.T();d.push('???');a+='\n\nThe instance <<'+b+'>> does not exists because the instance '+c.tag()+' (name: '+c.get(e)+') has no model.\nList: '+
420
- 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.zi=class a{constructor(b,c,d){this.N=b.Ya();this.Na=b;this.F=new Set;this.mode=c;this.L=d;this.C=!1;c!==a.C.ol&&this.R()}run(){if(!this.C)switch(this.mode){case a.C.gs:this.C=!0;this.L.run(()=>{Jb(()=>{this.G();this.C=!1},0)});break;case a.C.Kq:this.C=!0,this.G(),this.C=!1}}G(){const b=this.Na,c=olympe.dc.Qb.tf,d=this.F,e=h=>b.get(h);var f=h=>!(h.persisted()||h.ta());for(var g of d){const h=b.get(g);if(h&&!h.ta()){if(!h.persisted())continue;Array.from(b.W(g,c,!1,f)).forEach(k=>{d.add(k)});
421
- b.Vb(g)}d.delete(g)}for(const h of d)f=Array.from(b.W(h,c,!0)).map(e),g=Array.from(b.W(h,c)).map(e),f.some(k=>k.ta())?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.Vb(k)});d.clear()}R(){this.Na.Ka(this.run.bind(this));const b=olympe.dc.db.Database.F.Xq,c=olympe.dc.db.Database.F.op,d=olympe.dc.db.Database.F.pq,e=olympe.dc.db.Database.G.IDLE,f=g=>{this.F.add(g);this.Na.getState()===e&&this.run()};this.Na.F(olympe.dc.db.Database.F.wk,
422
- f.bind(this));this.Na.F(c,f.bind(this));this.Na.F(b,g=>{this.F.delete(g)});this.Na.F(d,(g,...h)=>{this.N.error(h[0])})}};olympe.dc.db.zi.C={ol:0,Kq:1,gs:2};const wd=olympe.dc.db.Database.C.ORIGIN,xd=olympe.dc.db.Database.C.DESTINATION,yd=olympe.dc.db.Database.C.Jh,zd=olympe.dc.db.Database.C.$k,Ad=wd+xd,Bd=yd+yd,Cd=olympe.dc.db.Database.G;function Ac(a,b,c,d){const e=a.Na.L(olympe.dc.za(b));d=d||Dd(a);e.$('',d,c);e.Db()&&a.G.run(()=>{c(!0,b)});return d}function Bc(a,b,c,d=!1){const e=U(a,b);if(null!==e){const f=e.R('',c);void 0!==f&&(a.Na.getState()===Cd.cg&&a.Na.$(c),!d&&e.Db()&&a.G.run(()=>{f(!1,b)}))}}
418
+ function qd(a,b,...c){b.forEach((d,e)=>{ad(a,e,d.bind(null,...c))})}function rd(a,b,c,d,e,f){const g=b.get(nd+d+c);g&&qd(a,g,f,e);(b=b.get(nd+od))&&qd(a,b,c,d,f,e)}function sd(a){a.L.run(()=>{const b=a.C;for(const [d,e]of a.buffer){var c=b.get(d);(c=c&&c[e])&&c()}});a.C.clear();a.buffer.length=0}olympe.dc.db.Ss=class{constructor(a,b){this.Na=a;this.L=b;this.F=new Map;this.G=new Set;this.C=new Map;this.buffer=[]}};function td(a){const b=olympe.dc.db.Database.F.vo,c=olympe.dc.db.Database.F.ql,d=olympe.dc.db.Database.F.Ac,e=olympe.dc.db.Database.F.hk,f=olympe.dc.db.Database.F.em,g=olympe.dc.db.Database.F.Tn,h=olympe.dc.db.Database.F.Un,k=()=>{};a.Na.F(olympe.dc.db.Database.F.uo,()=>{});a.Na.F(b,()=>{});a.Na.F(c,l=>{a.Na.Hc(()=>{ud(a.view,l,k,`monitorRelations${l}`)})});a.Na.F(d,l=>{a.Na.Hc(()=>{vd(a.view,l,`monitorRelations${l}`)})});a.Na.F(e,()=>{});a.Na.F(f,()=>{});a.Na.F(g,()=>{});a.Na.F(h,()=>{})}
419
+ olympe.dc.db.eu=class{constructor(a,b,c,d){this.N=a;this.view=b;this.Na=c;d&&td(this)}debug(a){const b=olympe.dc.za(a);if(this.Na.has(b)){var c=this.Na.get(a);a='\n[DEBUG - DATABASE]\n'+c.toString();if(!c.Db()){const d=[];for(;null!==c&&!d.includes(c.tag());)d.push(c.tag()),c=c.model();c=this.Na.get(d[d.length-1]);const e=olympe.dc.db.Database.C.Jh+olympe.dc.CloudObject.nameProp.T();d.push('???');a+='\n\nThe instance <<'+b+'>> does not exists because the instance '+c.tag()+' (name: '+c.get(e)+') has no model.\nList: '+
420
+ 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.zi=class a{constructor(b,c,d){this.N=b.Ya();this.Na=b;this.F=new Set;this.mode=c;this.L=d;this.C=!1;c!==a.C.nl&&this.R()}run(){if(!this.C)switch(this.mode){case a.C.es:this.C=!0;this.L.run(()=>{Jb(()=>{this.G();this.C=!1},0)});break;case a.C.Jq:this.C=!0,this.G(),this.C=!1}}G(){const b=this.Na,c=olympe.dc.Qb.tf,d=this.F,e=h=>b.get(h);var f=h=>!(h.persisted()||h.ta());for(var g of d){const h=b.get(g);if(h&&!h.ta()){if(!h.persisted())continue;Array.from(b.W(g,c,!1,f)).forEach(k=>{d.add(k)});
421
+ b.Vb(g)}d.delete(g)}for(const h of d)f=Array.from(b.W(h,c,!0)).map(e),g=Array.from(b.W(h,c)).map(e),f.some(k=>k.ta())?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.Vb(k)});d.clear()}R(){this.Na.Ka(this.run.bind(this));const b=olympe.dc.db.Database.F.Wq,c=olympe.dc.db.Database.F.np,d=olympe.dc.db.Database.F.oq,e=olympe.dc.db.Database.G.IDLE,f=g=>{this.F.add(g);this.Na.getState()===e&&this.run()};this.Na.F(olympe.dc.db.Database.F.vk,
422
+ f.bind(this));this.Na.F(c,f.bind(this));this.Na.F(b,g=>{this.F.delete(g)});this.Na.F(d,(g,...h)=>{this.N.error(h[0])})}};olympe.dc.db.zi.C={nl:0,Jq:1,es:2};const wd=olympe.dc.db.Database.C.ORIGIN,xd=olympe.dc.db.Database.C.DESTINATION,yd=olympe.dc.db.Database.C.Jh,zd=olympe.dc.db.Database.C.Zk,Ad=wd+xd,Bd=yd+yd,Cd=olympe.dc.db.Database.G;function Ac(a,b,c,d){const e=a.Na.L(olympe.dc.za(b));d=d||Dd(a);e.$('',d,c);e.Db()&&a.G.run(()=>{c(!0,b)});return d}function Bc(a,b,c,d=!1){const e=U(a,b);if(null!==e){const f=e.R('',c);void 0!==f&&(a.Na.getState()===Cd.cg&&a.Na.$(c),!d&&e.Db()&&a.G.run(()=>{f(!1,b)}))}}
423
423
  function ud(a,b,c,d){const e=a.Na.L(olympe.dc.za(b));b=d||Dd(a);const f=e.Hc(Ad,b,c);e.Db()&&e.forEach((g,h)=>{g=h[0];g!==wd&&g!==xd||Ed(a,e,h,!0,f,!0)})}function vd(a,b,c){const d=U(a,b);if(null!==d){const e=d.R(Ad,c);void 0!==e&&(a.Na.getState()!==Cd.cg||d.Vb()||a.Na.$(c),d.Db()&&d.forEach((f,g)=>{f=g[0];(f===wd||f===xd)&&e&&Ed(a,d,g,!1,e,!0)}))}}function Dd(a){++a.L;return String(a.L)}
424
424
  function Fd(a,b,c,d,e){b=a.Na.L(olympe.dc.za(b));c=olympe.dc.za(c);const f=yd+c;e=e||Dd(a);b.$(f,e,d);if(b.Db()){let g=!1,h=b.get(f);void 0===h&&(g=!0,h=b.get(zd+c));if(void 0===h)return e;a.G.run(()=>{d(h,g)})}return e}function U(a,b,c=!1){if(null===b||void 0===b)throw Error('Provided tag is null or undefined.');a=a.Na.get(olympe.dc.za(b));return!a||c&&!a.Db()?null:a}
425
425
  function Gd(a,b,c){b=a.Na.L(olympe.dc.za(b));const d=Dd(a);b.$(Bd,d,c);b.Db()&&b.forEach((e,f)=>{const g=f[0];g!==yd&&g!==zd||a.G.run(()=>{c(f.substr(1),e,g===zd)})});return d}function Hd(a,b,c){b=U(a,b);null!==b&&(b.R(Bd,c),a.Na.getState()===Cd.cg&&a.Na.$(c))}function Ed(a,b,c,d,e,f){(b=b.get(c))&&b.forEach((g,h)=>{g.Db()&&(f?a.G.run(()=>{e(c.substr(1),c[0],d,h)}):a.G.run(()=>{e(d,h)}))})}
426
426
  function V(a,b,c,d,e){b=a.Na.L(olympe.dc.za(b));c=c.Ra()+c.T();e=e||Dd(a);d=b.Hc(c,e,d);b.Db()&&Ed(a,b,c,!0,d,!1);return e}function Id(a,b,c){return c===olympe.dc.Qb.NONE?0:a.cb(b,c,!0)||0}function Jd(a,b){return function*(c){if(c)for(const [d,e]of c)if(c=d[0],c===wd||c===xd){const f=d.substring(1);for(const g of e.keys())yield[f,c,g]}}(U(a,b,!0))}
427
- function Kd(a,b,c){if(!a.Db(b))return a.N.warn(`No instance found with tag ${b}`),new Map;const d=new Map,e=[olympe.dc.za(b)];for(const f of e){const g=a.ub(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.za(b)}`);return d}function Ld(a,b,c){return null!==a.Nm(c,olympe.dc.CloudObject.extendRel,d=>olympe.dc.Ja().Nk(d,olympe.dc.CloudObject.propertyRel,b))}
427
+ function Kd(a,b,c){if(!a.Db(b))return a.N.warn(`No instance found with tag ${b}`),new Map;const d=new Map,e=[olympe.dc.za(b)];for(const f of e){const g=a.ub(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.za(b)}`);return d}function Ld(a,b,c){return null!==a.Mm(c,olympe.dc.CloudObject.extendRel,d=>olympe.dc.Ja().Mk(d,olympe.dc.CloudObject.propertyRel,b))}
428
428
  function Md(a,b,c,d){return(c=(a=U(a,b,!0))&&a.get(d+c))?Array.from(c.values()).filter(e=>e.Db()).length:0}
429
429
  olympe.dc.hb=class{constructor(a,b){this.N=a;this.G=new olympe.D.Zb('DB View context');this.Na=b;this.L=0}Z(){return this.Na.Z()}F(a,b,c){a=U(this,a);null!==a&&(b=olympe.dc.za(b),a.R(yd+b,c),this.Na.getState()===Cd.cg&&this.Na.$(c))}C(a,b,c,d=!1){a=U(this,a);if(null!==a){b=b.Ra()+b.T();const e=a.R(b,c);void 0!==e&&(this.Na.getState()!==Cd.cg||a.Vb()&&!d||this.Na.$(c),!d&&a.Db()&&Ed(this,a,b,!1,e,!1))}}Db(a){a=U(this,a);return!(!a||!a.Db())}name(a){let b,c;return null!=(c=null==(b=U(this,a))?void 0:
430
430
  b.cb(olympe.dc.CloudObject.nameProp.T()))?c:''}model(a){return(a=(a=U(this,a,!0))?a.model():null)?a.tag():null}Df(a){return(a=(a=U(this,a,!0))&&a.Df())?a.tag():null}jj(a){a=U(this,a,!0);return!(!a||!a.Df())}Rf(a,b){a=(a=U(this,a,!0))&&a.model();return!(!a||!this.Tf(a.tag(),b))}version(a){return(a=U(this,a,!0))&&a.version()}source(a){return(a=U(this,a,!0))&&a.source()}Wf(a){return(a=U(this,a,!1))?!!a.persisted():!0}cb(a,b,c){let d;a=null==(d=U(this,a,!0))?void 0:d.cb(olympe.dc.za(b),c);return void 0!==
431
- a?a:null}dd(a,b=!1){var c=U(this,a,!0);a=new Map;if(c)for(const [d,e]of c)c=d[0],(c===yd||!b&&c===zd)&&a.set(d.substring(1),e);return a}ub(a,b){return this.fj(a,[b])}Nk(a,b,c){return this.ub(a,b).includes(olympe.dc.za(c))}fj(a,b){a=U(this,a,!0);if(!a)return[];a=[a.tag()];for(const c of b){b=[];for(const d of a)if(a=U(this,d,!0).get(c.Ra()+c.T()),void 0!==a)for(const e of a.values())e.Db()&&b.push(e.tag());a=b}return a}fc(a,b){var c=U(this,a,!0);return c?(c=c.get(b.Ra()+b.T()))&&1<c.size?(this.N.warn(`Relation ${b.T()} to instance ${a} is not unique: found ${c.size} related items`),
432
- null):(a=c?c.values().next().value:null)&&a.Db()?a.tag():null:null}Pf(a,b,c){a=olympe.dc.za(a);const d=Kd(this,a,b);d.delete(a);return c?(c=olympe.dc.za(c),d.has(c)?Array.from(Kd(this,c,b.Ec()).keys()).filter(e=>d.has(e)):[]):Array.from(d.keys())}Nm(a,b,c){if(!this.Db(a))return null;b=Kd(this,a,b);const d=[olympe.dc.za(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}Om(a,b,c){return this.fj(a,b).find(c)||null}aw(a,b,c){return this.fj(a,
433
- b).filter(c)}Hk(a,b=olympe.dc.CloudObject){var c=U(this,a,!0);const d=b&&U(this,b,!0),e=[c];for(;c&&c!==d;){c=c.Df();if(e.includes(c))throw Error(`Cycle detected when following recursively extend relations from base model instance "${a}".`);if(c&&!c.Db())throw a=`Try to get all extensions of the model ${olympe.dc.za(a)} but one of them does not exists (${c.tag()})`,Error(a);null!==c&&e.push(c)}c=U(this,olympe.dc.CloudObject,!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}).`);
434
- return e.map(f=>f.tag())}Tf(a,b){const c=olympe.dc.za(b);return!!this.Nm(a,olympe.dc.CloudObject.extendRel,d=>d===c)}de(a){return this.ub(a,olympe.dc.CloudObject.instancesRel)}};olympe.dc.hb.prototype.getInstances=olympe.dc.hb.prototype.de;olympe.dc.hb.prototype.isExtending=olympe.dc.hb.prototype.Tf;olympe.dc.hb.prototype.getExtendedModels=olympe.dc.hb.prototype.Hk;olympe.dc.hb.prototype.findAllRelated=olympe.dc.hb.prototype.aw;olympe.dc.hb.prototype.findRelated=olympe.dc.hb.prototype.Om;
435
- olympe.dc.hb.prototype.findRecursive=olympe.dc.hb.prototype.Nm;olympe.dc.hb.prototype.getRecursiveRelated=olympe.dc.hb.prototype.Pf;olympe.dc.hb.prototype.getUniqueRelated=olympe.dc.hb.prototype.fc;olympe.dc.hb.prototype.getMultiRelated=olympe.dc.hb.prototype.fj;olympe.dc.hb.prototype.isRelated=olympe.dc.hb.prototype.Nk;olympe.dc.hb.prototype.getRelated=olympe.dc.hb.prototype.ub;olympe.dc.hb.prototype.getProperties=olympe.dc.hb.prototype.dd;olympe.dc.hb.prototype.getProperty=olympe.dc.hb.prototype.cb;
431
+ a?a:null}dd(a,b=!1){var c=U(this,a,!0);a=new Map;if(c)for(const [d,e]of c)c=d[0],(c===yd||!b&&c===zd)&&a.set(d.substring(1),e);return a}ub(a,b){return this.fj(a,[b])}Mk(a,b,c){return this.ub(a,b).includes(olympe.dc.za(c))}fj(a,b){a=U(this,a,!0);if(!a)return[];a=[a.tag()];for(const c of b){b=[];for(const d of a)if(a=U(this,d,!0).get(c.Ra()+c.T()),void 0!==a)for(const e of a.values())e.Db()&&b.push(e.tag());a=b}return a}fc(a,b){var c=U(this,a,!0);return c?(c=c.get(b.Ra()+b.T()))&&1<c.size?(this.N.warn(`Relation ${b.T()} to instance ${a} is not unique: found ${c.size} related items`),
432
+ null):(a=c?c.values().next().value:null)&&a.Db()?a.tag():null:null}Pf(a,b,c){a=olympe.dc.za(a);const d=Kd(this,a,b);d.delete(a);return c?(c=olympe.dc.za(c),d.has(c)?Array.from(Kd(this,c,b.Ec()).keys()).filter(e=>d.has(e)):[]):Array.from(d.keys())}Mm(a,b,c){if(!this.Db(a))return null;b=Kd(this,a,b);const d=[olympe.dc.za(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.fj(a,b).find(c)||null}$v(a,b,c){return this.fj(a,
433
+ b).filter(c)}Gk(a,b=olympe.dc.CloudObject){var c=U(this,a,!0);const d=b&&U(this,b,!0),e=[c];for(;c&&c!==d;){c=c.Df();if(e.includes(c))throw Error(`Cycle detected when following recursively extend relations from base model instance "${a}".`);if(c&&!c.Db())throw a=`Try to get all extensions of the model ${olympe.dc.za(a)} but one of them does not exists (${c.tag()})`,Error(a);null!==c&&e.push(c)}c=U(this,olympe.dc.CloudObject,!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}).`);
434
+ return e.map(f=>f.tag())}Tf(a,b){const c=olympe.dc.za(b);return!!this.Mm(a,olympe.dc.CloudObject.extendRel,d=>d===c)}de(a){return this.ub(a,olympe.dc.CloudObject.instancesRel)}};olympe.dc.hb.prototype.getInstances=olympe.dc.hb.prototype.de;olympe.dc.hb.prototype.isExtending=olympe.dc.hb.prototype.Tf;olympe.dc.hb.prototype.getExtendedModels=olympe.dc.hb.prototype.Gk;olympe.dc.hb.prototype.findAllRelated=olympe.dc.hb.prototype.$v;olympe.dc.hb.prototype.findRelated=olympe.dc.hb.prototype.Nm;
435
+ olympe.dc.hb.prototype.findRecursive=olympe.dc.hb.prototype.Mm;olympe.dc.hb.prototype.getRecursiveRelated=olympe.dc.hb.prototype.Pf;olympe.dc.hb.prototype.getUniqueRelated=olympe.dc.hb.prototype.fc;olympe.dc.hb.prototype.getMultiRelated=olympe.dc.hb.prototype.fj;olympe.dc.hb.prototype.isRelated=olympe.dc.hb.prototype.Mk;olympe.dc.hb.prototype.getRelated=olympe.dc.hb.prototype.ub;olympe.dc.hb.prototype.getProperties=olympe.dc.hb.prototype.dd;olympe.dc.hb.prototype.getProperty=olympe.dc.hb.prototype.cb;
436
436
  olympe.dc.hb.prototype.isPersisted=olympe.dc.hb.prototype.Wf;olympe.dc.hb.prototype.instanceOf=olympe.dc.hb.prototype.Rf;olympe.dc.hb.prototype.isModel=olympe.dc.hb.prototype.jj;olympe.dc.hb.prototype.extension=olympe.dc.hb.prototype.Df;olympe.dc.hb.prototype.model=olympe.dc.hb.prototype.model;olympe.dc.hb.prototype.name=olympe.dc.hb.prototype.name;olympe.dc.hb.prototype.exist=olympe.dc.hb.prototype.Db;function Nd(a,b){let c=a.C.get(b);void 0===c&&(c=new olympe.dc.db.jg(b),a.C.set(b,c));return c}function Od(a,b,c=olympe.dc.Qb.NONE){b=Pd(a,b,c);for(const d of b)Qd(a,d,!1),a.C.delete(d)}
437
- function Pd(a,b,c,d=!0){const e=olympe.dm.Relation.C.jk,f=olympe.dm.Relation.C.vk,g=olympe.dc.Ca.ORIGIN,h=olympe.dc.Ja();b=new Set([b]);const k=new Set;for(const n of b){var l=a.C.get(n);if(void 0!==l){for(const [p,q,r]of l.ed())r&&Id(h,p,c)&f?b.add(q):d||r||k.add(`${n}.${p}.${q}`);for(const [p,q,r]of l.Va())r&&Id(h,p,c)&e?b.add(q):d||r||k.add(`${q}.${p}.${n}`)}for(const [p,q,r]of Jd(h,n))l=q===g?e:f,!k.has(q===g?`${r}.${p}.${n}`:`${n}.${p}.${r}`)&&Id(h,p,c)&l&&b.add(r)}return Array.from(b).filter(n=>
437
+ function Pd(a,b,c,d=!0){const e=olympe.dm.Relation.C.ik,f=olympe.dm.Relation.C.uk,g=olympe.dc.Ca.ORIGIN,h=olympe.dc.Ja();b=new Set([b]);const k=new Set;for(const n of b){var l=a.C.get(n);if(void 0!==l){for(const [p,q,r]of l.ed())r&&Id(h,p,c)&f?b.add(q):d||r||k.add(`${n}.${p}.${q}`);for(const [p,q,r]of l.Va())r&&Id(h,p,c)&e?b.add(q):d||r||k.add(`${q}.${p}.${n}`)}for(const [p,q,r]of Jd(h,n))l=q===g?e:f,!k.has(q===g?`${r}.${p}.${n}`:`${n}.${p}.${r}`)&&Id(h,p,c)&l&&b.add(r)}return Array.from(b).filter(n=>
438
438
  a.C.has(n))}function Qd(a,b,c){const d=olympe.dc.Ca.ORIGIN,e=olympe.dc.Ca.DESTINATION,f=a.C.get(b);for(const [h,k,l]of f.ed())if(l||!c){f.R(h,e,k);var g=a.C.get(k);g&&g.R(h,d,b)}for(const [h,k,l]of f.Va())if(l||!c)f.R(h,d,k),(g=a.C.get(k))&&g.R(h,e,b)}function*Rd(a,b,c,d,e=[]){e.push(b);b=a.Lf(b);for(const [f,g]of b.ub(c))e.includes(f)||(yield*Rd(a,f,c,d,e),yield d(f,g))}function Sd(a,b,c,d){const e=a.C.get(c);a=a.C.get(d);e&&e.R(b,olympe.dc.Ca.DESTINATION,d);a&&a.R(b,olympe.dc.Ca.ORIGIN,c)}
439
439
  olympe.dc.db.uc=class{constructor(a){this.id=a||olympe.X.ih();this.C=new Map}toJSON(){let a='{ "id": '+JSON.stringify(this.id)+', "instances": {';for(const b of this.C.keys()){const c=this.C.get(b);a+=JSON.stringify(b)+': '+c.toJSON()+', '}a.endsWith(', ')&&(a=a.substr(0,a.length-2));return a+'}}'}static lc(a){var b;'string'===typeof a?b=JSON.parse(a):b=a;a=new olympe.dc.db.uc(b.id);b=b.instances;for(const c of Object.keys(b)){const d=olympe.dc.db.jg.lc(b[c]);a.C.set(c,d)}return a}Z(){return this.id}Nc(a){const b=
440
- olympe.dc.db.jg.C.Ol,c=olympe.dc.db.jg.C.Ac,d=olympe.dc.db.jg.C.Ph;this.C.forEach((e,f)=>{const g=e.getState();switch(g.id){case b:a.F(f,e.W()?e.dd():void 0);break;case d:e.W()&&a.qc(f,e.dd(),g.Zi);break;case c:a.Dc(f,g.Zi)}for(const [h,k,l]of e.ed())l?a.Ta(h,f,k):a.cc(h,f,k)})}G(){let a=0;this.C.forEach(b=>{a+=b.Ab()});return a}F(a,b){a=Nd(this,a).create();b&&a.ja(b)}qc(a,b,c){b&&(a=Nd(this,a).ja(b),c&&a.Hb())}Dc(a,b=olympe.dc.Qb.NONE){const c=this.C.get(a);if(c&&c.re())Od(this,a,b);else{Nd(this,
441
- a).delete(b);for(const d of Pd(this,a,b,!1))this.C.get(d).dd().clear(),Qd(this,d,!0)}}Ta(a,b,c){Nd(this,b).link(a,c);Nd(this,c).Ua(a,b)}cc(a,b,c){Nd(this,b).unlink(a,c);Nd(this,c).qb(a,b)}de(){return function*(a){for(const b of a.values())if(b.re()||b.L()||b.W())yield b}(this.C)}Lf(a){return this.C.get(olympe.dc.za(a))||null}ed(){return function*(a){for(var b=a.next();!b.done;){b=b.value;const c=b.tag();yield*b.ed((d,e,f)=>[d,c,e,f]);b=a.next()}}(this.C.values())}Pf(a,b,c=(d,e)=>[d,e]){return Rd(this,
442
- a,b,c)}};olympe.dc.db.uc.ma=[olympe.dc.Writable,olympe.dc.Yl];const Td=new Map;
440
+ olympe.dc.db.jg.C.Nl,c=olympe.dc.db.jg.C.Ac,d=olympe.dc.db.jg.C.Ph;this.C.forEach((e,f)=>{const g=e.getState();switch(g.id){case b:a.F(f,e.W()?e.dd():void 0);break;case d:e.W()&&a.qc(f,e.dd(),g.Zi);break;case c:a.Dc(f,g.Zi)}for(const [h,k,l]of e.ed())l?a.Ua(h,f,k):a.cc(h,f,k)})}G(){let a=0;this.C.forEach(b=>{a+=b.Ab()});return a}F(a,b){a=Nd(this,a).create();b&&a.ja(b)}qc(a,b,c){b&&(a=Nd(this,a).ja(b),c&&a.Hb())}Dc(a,b=olympe.dc.Qb.NONE){const c=this.C.get(a);if(c&&c.re())Od(this,a,b);else{Nd(this,
441
+ a).delete(b);for(const d of Pd(this,a,b,!1))this.C.get(d).dd().clear(),Qd(this,d,!0)}}Ua(a,b,c){Nd(this,b).link(a,c);Nd(this,c).Sa(a,b)}cc(a,b,c){Nd(this,b).unlink(a,c);Nd(this,c).qb(a,b)}de(){return function*(a){for(const b of a.values())if(b.re()||b.L()||b.W())yield b}(this.C)}Lf(a){return this.C.get(olympe.dc.za(a))||null}ed(){return function*(a){for(var b=a.next();!b.done;){b=b.value;const c=b.tag();yield*b.ed((d,e,f)=>[d,c,e,f]);b=a.next()}}(this.C.values())}Pf(a,b,c=(d,e)=>[d,e]){return Rd(this,
442
+ a,b,c)}};olympe.dc.db.uc.ma=[olympe.dc.Writable,olympe.dc.Xl];const Td=new Map;
443
443
  olympe.dc.db.jg=class a{constructor(b){this.da=b;this.G=a.F(a.C.Ph,!1);this.F=this.Oa=this.C=null}toJSON(){let b='{ "tag": '+JSON.stringify(this.da)+', "state": '+JSON.stringify(this.G);if(this.C){b+=', "properties": {';for(var c of this.C.keys()){const d=this.C.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.Oa){b+=', "relations": {';for(const d of this.Oa.keys()){c=this.Oa.get(d);b+=JSON.stringify(d)+
444
444
  ': {';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 lc(b){var c;'string'===typeof b?c=JSON.parse(b):c=b;b=new olympe.dc.db.jg(c.tag);b.G=c.state;const d=c.properties;if(d){b.C=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.Cc.lc(f):h=olympe.D.lc(f));null!==h&&void 0!==h&&b.C.set(e,h)}}if(c=
445
- c.relations){b.Oa=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.Oa.set(f,e)}}return b}static F(b,c){const d=String(b)+','+String(c);let e=Td.get(d);void 0===e&&(e={id:b,Zi:c},Td.set(d,e));return e}tag(){return this.da}getState(){return this.G}create(){this.G=a.F(a.C.Ol);return this}delete(b=olympe.dc.Qb.NONE){this.G=a.F(a.C.Ac,b);this.C=null;return this}Hb(){this.G.id===a.C.Ph&&(this.G=a.F(a.C.Ph,!0))}xa(b,c){if(this.G.type===a.C.Ac)return this;
446
- this.C||(this.C=new Map);this.C.set(b,c);return this}ja(b){this.C||(this.C=new Map);b.forEach((c,d)=>{this.C.set(d,c)});return this}ta(b){let c;null==(c=this.C)||c.delete(b);0===this.C.size&&(this.C=null)}link(b,c){null===this.Oa&&(this.Oa=new Map);this.Ga(this.Oa,b,c,!0);return this}unlink(b,c){null===this.Oa&&(this.Oa=new Map);this.Ga(this.Oa,b,c,!1);return this}Ua(b,c){null===this.F&&(this.F=new Map);this.Ga(this.F,b,c,!0)}qb(b,c){null===this.F&&(this.F=new Map);this.Ga(this.F,b,c,!1)}Vb(b,c,d){if(c=
447
- c===olympe.dc.Ca.ORIGIN?this.F:this.Oa)return(b=c.get(b))&&b.get(d)}R(b,c,d){const e=(c=c===olympe.dc.Ca.ORIGIN?this.F:this.Oa)&&c.get(b);e&&e.delete(d);e&&0===e.size&&c.delete(b)}re(){return this.G.id===a.C.Ol}L(){return this.G.id===a.C.Ac}Ab(){let b=this.C?this.C.size:0;this.Oa&&this.Oa.forEach(c=>{b+=c.size});return b}W(){return null!==this.C}dd(){return this.C||new Map}cb(b){if(this.C)return this.C.get(b)}ub(b,c=(d,e)=>[d,e]){return function*(d){if(d=d&&d.get(b.T()))for(const [e,f]of d)yield c(e,
445
+ c.relations){b.Oa=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.Oa.set(f,e)}}return b}static F(b,c){const d=String(b)+','+String(c);let e=Td.get(d);void 0===e&&(e={id:b,Zi:c},Td.set(d,e));return e}tag(){return this.da}getState(){return this.G}create(){this.G=a.F(a.C.Nl);return this}delete(b=olympe.dc.Qb.NONE){this.G=a.F(a.C.Ac,b);this.C=null;return this}Hb(){this.G.id===a.C.Ph&&(this.G=a.F(a.C.Ph,!0))}xa(b,c){if(this.G.type===a.C.Ac)return this;
446
+ this.C||(this.C=new Map);this.C.set(b,c);return this}ja(b){this.C||(this.C=new Map);b.forEach((c,d)=>{this.C.set(d,c)});return this}ta(b){let c;null==(c=this.C)||c.delete(b);0===this.C.size&&(this.C=null)}link(b,c){null===this.Oa&&(this.Oa=new Map);this.Ga(this.Oa,b,c,!0);return this}unlink(b,c){null===this.Oa&&(this.Oa=new Map);this.Ga(this.Oa,b,c,!1);return this}Sa(b,c){null===this.F&&(this.F=new Map);this.Ga(this.F,b,c,!0)}qb(b,c){null===this.F&&(this.F=new Map);this.Ga(this.F,b,c,!1)}Vb(b,c,d){if(c=
447
+ c===olympe.dc.Ca.ORIGIN?this.F:this.Oa)return(b=c.get(b))&&b.get(d)}R(b,c,d){const e=(c=c===olympe.dc.Ca.ORIGIN?this.F:this.Oa)&&c.get(b);e&&e.delete(d);e&&0===e.size&&c.delete(b)}re(){return this.G.id===a.C.Nl}L(){return this.G.id===a.C.Ac}Ab(){let b=this.C?this.C.size:0;this.Oa&&this.Oa.forEach(c=>{b+=c.size});return b}W(){return null!==this.C}dd(){return this.C||new Map}cb(b){if(this.C)return this.C.get(b)}ub(b,c=(d,e)=>[d,e]){return function*(d){if(d=d&&d.get(b.T()))for(const [e,f]of d)yield c(e,
448
448
  f)}(b.Ra()===olympe.dc.Ca.ORIGIN?this.F:this.Oa)}fc(b){const c=b.Ra()===olympe.dc.Ca.ORIGIN?this.F:this.Oa;return(b=c&&c.get(b.T()))&&0!==b.size?Array.from(b.keys())[0]:null}Mf(){return this.fc(olympe.dc.CloudObject.modelRel)}ed(b=(c,d,e)=>[c,d,e]){return this.$(this.Oa,b)}Va(b=(c,d,e)=>[c,d,e]){return this.$(this.F,b)}Ka(b=(c,d,e,f)=>[c,d,e,f]){const c=olympe.dc.Ca.ORIGIN,d=olympe.dc.Ca.DESTINATION;return function*(e,f,g){yield*e(f,(h,k,l)=>b(h,d,k,l));yield*e(g,(h,k,l)=>b(h,c,k,l))}(this.$.bind(this),
449
- this.Oa,this.F)}Ga(b,c,d,e){if(this.G.id!==a.C.Ac||!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)}}*$(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.jg.C={Ol:0,Ph:1,Ac:2};function Sc(a,b,c,d,e,f=olympe.dc.Ha.sb){const g=olympe.dc.db.Instance.C.eq,h=olympe.dc.db.Instance.C.fr,k=c.Z();if(a.F.has(k))throw Error(`You try to execute the patch ${k} a second times whereas the first execution has not been validated yet.`);const l=new Ud(c,Vd(a,c),f);a.C.push(k);a.F.set(k,l);a.Na.ta();a.Na.qb(d,g);a.Na.qb(e,h);Tc(a,c,f);const n=Array.from(c.de()).filter(p=>p.re()).map(p=>p.tag());a.Na.bc(n);a.Na.ja();0<n.length&&b.R(()=>{a.Na.ta();a.Na.zc(n);a.Na.ja()})}
449
+ this.Oa,this.F)}Ga(b,c,d,e){if(this.G.id!==a.C.Ac||!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)}}*$(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.jg.C={Nl:0,Ph:1,Ac:2};function Sc(a,b,c,d,e,f=olympe.dc.Ha.sb){const g=olympe.dc.db.Instance.C.cq,h=olympe.dc.db.Instance.C.er,k=c.Z();if(a.F.has(k))throw Error(`You try to execute the patch ${k} a second times whereas the first execution has not been validated yet.`);const l=new Ud(c,Vd(a,c),f);a.C.push(k);a.F.set(k,l);a.Na.ta();a.Na.qb(d,g);a.Na.qb(e,h);Tc(a,c,f);const n=Array.from(c.de()).filter(p=>p.re()).map(p=>p.tag());a.Na.bc(n);a.Na.ja();0<n.length&&b.R(()=>{a.Na.ta();a.Na.zc(n);a.Na.ja()})}
450
450
  function Tc(a,b,c){a.G.process(c,b,d=>{d||a.N.debug('CommitController: Rebase of patch',b.Z(),'done')})}function Uc(a,b,c){return a.C.slice(0,c).map(d=>a.F.get(d)).reduce((d,e)=>e?e.$e(d):d,b)}
451
451
  function Vd(a,b){const c=a.Na,d=olympe.dc.db.Database.C.Jh,e=olympe.dc.db.Database.C.ic,f=olympe.dc.db.Database.C.ORIGIN,g=olympe.dc.db.Database.C.DESTINATION,h=olympe.dc.Yb.VERSION,k=olympe.dc.Yb.Gd,l=new olympe.dc.db.uc('rev-'+b.Z());a.N.debug('Generate the reverse graphLayer of',b.Z());b.C.forEach((n,p)=>{if(n.re()){l.Dc(p,olympe.dc.Qb.NONE);for(const [t,u]of n.ed())l.cc(t,p,u)}else{var q=c.get(p);if(void 0!==q)if(n.L()){n=n.getState().Zi;for(const t of c.W(p,n)){p=c.get(t);const u=(new Map).set(h,
452
- q.version()).set(k,q.source());p.forEach((v,w)=>{const y=w[0],B=w.substr(1);y===d?u.set(B,v):y===e?u.set(w,v):y===f?v.forEach((E,S)=>{l.Ta(B,S,t,0)}):y===g&&v.forEach((E,S)=>{l.Ta(B,t,S,0)})});l.F(t,u,0)}}else{const t=(new Map).set(h,q.version());for(const u of n.dd().keys()){var r=u[0]===e;const v=r?u.substr(1):u;r=r?q.Va(v,!0):q.cb(v,!0);t.set(u,void 0===r?null:r)}1<t.size&&l.qc(p,t,!0,0);for(const [u,v,w]of n.ed())w?l.cc(u,p,v):l.Ta(u,p,v)}}});return l}
453
- olympe.dc.db.Cs=class{constructor(a,b,c){this.N=a;this.Na=b;this.G=c;this.C=[];this.F=new Map}$e(a,b){Tc(this,Uc(this,a,this.C.length),b)}push(a){const b=this.C.indexOf(a);if(-1<b){const c=this.F.get(a);this.C.splice(b,1);Uc(this,c.F,b);this.F.delete(a)}}};function Wd(a,b,c,d){const e=olympe.dc.Ca.DESTINATION;c=c.tag();const f=a.C.Lf(c);b.dd().forEach((g,h)=>{f.xa(h,g);b.ta(h)});for(const [g,h,k,l]of b.Ka()){if(!l)continue;const n=h===e?c:k,p=h===e?k:c;a.C.Ta(g,n,p);Sd(d,g,n,p)}}
452
+ q.version()).set(k,q.source());p.forEach((v,w)=>{const y=w[0],B=w.substr(1);y===d?u.set(B,v):y===e?u.set(w,v):y===f?v.forEach((E,S)=>{l.Ua(B,S,t,0)}):y===g&&v.forEach((E,S)=>{l.Ua(B,t,S,0)})});l.F(t,u,0)}}else{const t=(new Map).set(h,q.version());for(const u of n.dd().keys()){var r=u[0]===e;const v=r?u.substr(1):u;r=r?q.Va(v,!0):q.cb(v,!0);t.set(u,void 0===r?null:r)}1<t.size&&l.qc(p,t,!0,0);for(const [u,v,w]of n.ed())w?l.cc(u,p,v):l.Ua(u,p,v)}}});return l}
453
+ olympe.dc.db.Bs=class{constructor(a,b,c){this.N=a;this.Na=b;this.G=c;this.C=[];this.F=new Map}$e(a,b){Tc(this,Uc(this,a,this.C.length),b)}push(a){const b=this.C.indexOf(a);if(-1<b){const c=this.F.get(a);this.C.splice(b,1);Uc(this,c.F,b);this.F.delete(a)}}};function Wd(a,b,c,d){const e=olympe.dc.Ca.DESTINATION;c=c.tag();const f=a.C.Lf(c);b.dd().forEach((g,h)=>{f.xa(h,g);b.ta(h)});for(const [g,h,k,l]of b.Ka()){if(!l)continue;const n=h===e?c:k,p=h===e?k:c;a.C.Ua(g,n,p);Sd(d,g,n,p)}}
454
454
  function Xd(a,b,c,d){const e=olympe.dc.Ca.DESTINATION,f=c.tag(),g=a.C.Lf(f);b.dd().forEach((h,k)=>{void 0!==c.cb(k)&&(g.xa(k,h),b.ta(k))});for(const [h,k,l]of b.ed()){const n=c.Vb(h,e,k);void 0!==n&&(Sd(d,h,f,k),n===l&&Sd(a.C,h,f,k))}}
455
- class Ud{constructor(a,b,c){this.F=a;this.C=b;this.source=c;this.db=olympe.dc.Ja()}Z(){return this.F.Z()}$e(a){var b=this.F.C,c=a.C;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.L()?c.re()||Od(this.C,b,f.getState().Zi):c.L()?(Wd(this,f,c,a),Od(a,b,c.getState().Zi)):Xd(this,f,c,a))}return a}};olympe.dc.db.P={Ea:'dc.db.Logger',Aa:'dc.db.DatabaseManager',Gj:'dc.db.Database',hb:'dc.db.Driver',et:'dc.db.Graph',io:'dc.db.DataProcessor',no:'dc.db.DebugProcessor',JA:'dc.db.PermissionProcessor',Hi:'dc.db.GraphMonitor'};olympe.dc.db.Config={Lo:'db.garbageCollector',Hi:'db.monitor',mo:'db.debug'};
456
- olympe.U.config(function(a){D(a,olympe.dc.db.Config.Lo,olympe.dc.db.zi.C.Kq);D(a,olympe.dc.db.Config.Hi,!1);D(a,olympe.dc.db.Config.mo,!1);C(a,olympe.dc.db.P.Ea,[olympe.ra.P.Aa],b=>b.Oc('dc.db'));C(a,olympe.dc.db.P.Gj,[olympe.dc.db.P.Ea,new olympe.U.fa(olympe.dc.Config.oo),new olympe.U.fa(olympe.dc.db.Config.Lo),new olympe.U.fa(olympe.dc.Config.Zg),new olympe.U.fa(olympe.dc.db.Config.mo)],(b,c,d,e,f)=>{d=e?olympe.dc.db.zi.C.ol:d;c=(new Map).set('defaultSource',c).set('garbageCollector',d).set('debug',
457
- f);return new olympe.dc.db.Database(b,c)});C(a,olympe.dc.db.P.hb,[olympe.dc.db.P.Aa],b=>b.view);C(a,olympe.dc.db.P.Hi,[olympe.dc.db.P.Aa],b=>b.Kx);A(a,olympe.dc.db.P.no,olympe.dc.db.Ub.to,olympe.dc.P.Ea);C(a,olympe.dc.db.P.io,[olympe.dc.db.P.Ea,olympe.dc.db.P.Gj,olympe.U.P.dg,new olympe.U.fa(olympe.dc.Config.eg)],(b,c,d,e)=>{b=new olympe.dc.db.Ub.ir(b,c);e&&(b=new olympe.dc.Zl(ma(d,olympe.dc.db.P.no),b));return b});A(a,olympe.dc.db.P.Aa,olympe.dc.db.Os,olympe.dc.db.P.Ea,olympe.dc.db.P.Gj,olympe.dc.P.ne,
458
- olympe.dc.db.P.io,new olympe.U.fa(olympe.dc.db.Config.Hi))},'olympe.dc.db');olympe.U.run([olympe.dc.db.P.Gj,olympe.dc.db.P.Hi],(a,b)=>{olympe.dj().db=a;olympe.dj().dbMonitor=b},'DC.DB debug service injection');olympe.dc.db.Ub={};olympe.dc.db.Ub.ir=class{constructor(a,b){this.N=a;this.Na=b;this.buffer=[]}process(a,b,c){this.Na.ta();b.Nc(this);this.Na.ja();c(null,b)}F(a,b){this.Na.create(a,b)}qc(a,b,c){this.Na.update(a,b,c)}Dc(a,b=olympe.dc.Qb.NONE){for(const c of this.Na.W(a,b))this.Na.Dc(c)}Ta(a,b,c){this.Na.link(a,b,c)}cc(a,b,c){this.Na.unlink(a,b,c)}};olympe.dc.db.Ub.ir.ma=[olympe.dc.og,olympe.dc.Writable];function Yd(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.Cc||f instanceof olympe.dc.CloudObject?d+='new olympe.dc.Reference("'+f.T()+'")':f instanceof olympe.D.Color?d+='new olympe.df.Color("'+f.Qf()+','+f.Kf()+','+f.Ff()+','+f.Ef()+'")':f.constructor&&Object.prototype.hasOwnProperty.call(f.constructor.prototype,'toString')?d+=JSON.stringify(f.toString()):'object'===typeof f&&(d+=Yd(a,f,(c||0)+1)):d+=JSON.stringify(f);return'{'+
455
+ class Ud{constructor(a,b,c){this.F=a;this.C=b;this.source=c;this.db=olympe.dc.Ja()}Z(){return this.F.Z()}$e(a){var b=this.F.C,c=a.C;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.L()?c.re()||Od(this.C,b,f.getState().Zi):c.L()?(Wd(this,f,c,a),Od(a,b,c.getState().Zi)):Xd(this,f,c,a))}return a}};olympe.dc.db.P={Ea:'dc.db.Logger',Aa:'dc.db.DatabaseManager',Fj:'dc.db.Database',hb:'dc.db.Driver',dt:'dc.db.Graph',ho:'dc.db.DataProcessor',mo:'dc.db.DebugProcessor',IA:'dc.db.PermissionProcessor',Hi:'dc.db.GraphMonitor'};olympe.dc.db.Config={Ko:'db.garbageCollector',Hi:'db.monitor',lo:'db.debug'};
456
+ olympe.U.config(function(a){D(a,olympe.dc.db.Config.Ko,olympe.dc.db.zi.C.Jq);D(a,olympe.dc.db.Config.Hi,!1);D(a,olympe.dc.db.Config.lo,!1);C(a,olympe.dc.db.P.Ea,[olympe.ra.P.Aa],b=>b.Oc('dc.db'));C(a,olympe.dc.db.P.Fj,[olympe.dc.db.P.Ea,new olympe.U.fa(olympe.dc.Config.no),new olympe.U.fa(olympe.dc.db.Config.Ko),new olympe.U.fa(olympe.dc.Config.Zg),new olympe.U.fa(olympe.dc.db.Config.lo)],(b,c,d,e,f)=>{d=e?olympe.dc.db.zi.C.nl:d;c=(new Map).set('defaultSource',c).set('garbageCollector',d).set('debug',
457
+ f);return new olympe.dc.db.Database(b,c)});C(a,olympe.dc.db.P.hb,[olympe.dc.db.P.Aa],b=>b.view);C(a,olympe.dc.db.P.Hi,[olympe.dc.db.P.Aa],b=>b.Jx);A(a,olympe.dc.db.P.mo,olympe.dc.db.Ub.so,olympe.dc.P.Ea);C(a,olympe.dc.db.P.ho,[olympe.dc.db.P.Ea,olympe.dc.db.P.Fj,olympe.U.P.dg,new olympe.U.fa(olympe.dc.Config.eg)],(b,c,d,e)=>{b=new olympe.dc.db.Ub.hr(b,c);e&&(b=new olympe.dc.Yl(ma(d,olympe.dc.db.P.mo),b));return b});A(a,olympe.dc.db.P.Aa,olympe.dc.db.Ns,olympe.dc.db.P.Ea,olympe.dc.db.P.Fj,olympe.dc.P.ne,
458
+ olympe.dc.db.P.ho,new olympe.U.fa(olympe.dc.db.Config.Hi))},'olympe.dc.db');olympe.U.run([olympe.dc.db.P.Fj,olympe.dc.db.P.Hi],(a,b)=>{olympe.dj().db=a;olympe.dj().dbMonitor=b},'DC.DB debug service injection');olympe.dc.db.Ub={};olympe.dc.db.Ub.hr=class{constructor(a,b){this.N=a;this.Na=b;this.buffer=[]}process(a,b,c){this.Na.ta();b.Nc(this);this.Na.ja();c(null,b)}F(a,b){this.Na.create(a,b)}qc(a,b,c){this.Na.update(a,b,c)}Dc(a,b=olympe.dc.Qb.NONE){for(const c of this.Na.W(a,b))this.Na.Dc(c)}Ua(a,b,c){this.Na.link(a,b,c)}cc(a,b,c){this.Na.unlink(a,b,c)}};olympe.dc.db.Ub.hr.ma=[olympe.dc.og,olympe.dc.Writable];function Yd(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.Cc||f instanceof olympe.dc.CloudObject?d+='new olympe.dc.Reference("'+f.T()+'")':f instanceof olympe.D.Color?d+='new olympe.df.Color("'+f.Qf()+','+f.Kf()+','+f.Ff()+','+f.Ef()+'")':f.constructor&&Object.prototype.hasOwnProperty.call(f.constructor.prototype,'toString')?d+=JSON.stringify(f.toString()):'object'===typeof f&&(d+=Yd(a,f,(c||0)+1)):d+=JSON.stringify(f);return'{'+
459
459
  (d?d:'')+'}'}
460
- olympe.dc.db.Ub.to=class{constructor(a){this.N=a;this.output=''}process(a,b,c){this.output='Patch #'+b.Z()+' (source: '+a+')';b.Nc(this);this.N.info(this.output);this.output='';c(null,b)}log(a,b){this.output+='\ndb.'+a+';'+(b?' // '+b:'')}F(a,b){this.log('createInstance("'+a+'", '+Yd(this,b)+')')}qc(a,b){this.log('updateInstance("'+a+'", '+Yd(this,b)+')')}Dc(a,b){var c=olympe.dc.Ja();const d=c.model(a);c=d?c.name(d)+' #'+d:'';this.log('deleteInstance("'+a+'", rule: '+b+')',c)}Ta(a,b,c){this.log('createRelation("'+
461
- a+'", "'+b+'", "'+c+'")',a===olympe.dc.jc.Tc?'Model':'')}cc(a,b,c){this.log('deleteRelation("'+a+'", "'+b+'", "'+c+'")',a===olympe.dc.jc.Tc?'Model':'')}};olympe.dc.db.Ub.to.ma=[olympe.dc.Writable,olympe.dc.og];olympe.dc.transaction={};olympe.dc.oi=class a{constructor(b,c){this.id=b||olympe.X.ec();this.F=new olympe.D.Zb('BurstTransaction#'+this.id,c);this.Ab=Zd(this);this.W=!1;this.F.onDestroy(()=>this.R());this.ta=new Set;this.G=new Map;this.L=new Set;this.C=null;this.Ua=olympe.U.getParameter(olympe.dc.transaction.Config.Ln)||30;this.ja=[]}static C(b,c){return`${b},${c}`}Hb(b){for(const c of this.ja)c(b);this.stop()}Va(){null!==this.C&&(clearTimeout(this.C),this.C=null);const b=this.da(this.L);0<b.size&&$d(this,b,!1);this.L.clear()}da(b){const c=
462
- new Map;b.forEach(d=>{const e=d.split(',');let f=c.get(e[0]);void 0===f&&(f=new Map,c.set(e[0],f));f.set(e[1],this.G.get(d))});return c}$(b,c,d){this.Ka(b,c,d);this.Ab(b,c,d);null===this.C&&(this.C=setTimeout(this.Va.bind(this),this.Ua))}Ka(b,c,d){b=a.C(b,c);this.G.set(b,d);this.L.add(b)}qb(b,c){return this.G.get(a.C(b,c))}push(b,c){const d=olympe.dc.za(b);b=c.subscribe(e=>{for(const [f,g]of e)e=olympe.dc.za(f),this.qb(d,e)!==g&&this.$(d,e,g.valueOf())});this.ta.add(b)}complete(){return new Promise((b,
463
- c)=>{this.R((d,e)=>{for(const f of this.ta)f.unsubscribe();d?b():c(e)})})}update(b,c,d){const e=olympe.dc.za(b),f=olympe.dc.za(c);void 0===e||void 0===f?olympe.dc.di().Ya().error('Burst transaction: instance tag or property tag is undefined'):(this.F.run(()=>{olympe.D.ln([d],g=>{this.W=!0;g instanceof olympe.dc.Cc?olympe.dc.di().Ya().error('Cannot send complex property values in burst transactions'):this.$(e,f,g.valueOf())})}),this.F.R(()=>{this.R()}))}stop(){this.F.destroy();this.ja.length=0}Z(){return this.id}oh(){return!1}R(b){if(this.W){this.W=
464
- !1;null!==this.C&&(clearTimeout(this.C),this.C=null);this.L.clear();const c=this.da(new Set(this.G.keys()));$d(this,c,!0,b)}else b&&b(!0,null)}toString(){return'Burst transaction #'+this.id}};olympe.dc.oi.prototype.complete=olympe.dc.oi.prototype.complete;olympe.dc.oi.prototype.push=olympe.dc.oi.prototype.push;olympe.dc.Yp=class{C(){}toString(){}};olympe.dc.transaction.mg=class{constructor(a){this.id=a||olympe.X.ih();this.va=[];this.size=0}Z(){return this.id}G(){return this.size}concat(a){this.va.push(...a.va)}Nc(a){const b=olympe.dc.transaction.mg.C,c=this.va.length;let d=0;for(;d<c;)switch(this.va[d]){case b.Yn:a.F(this.va[d+1],this.va[d+2],this.va[d+3]);d+=4;break;case b.Wq:a.qc(this.va[d+1],this.va[d+2],this.va[d+3],this.va[d+4]);d+=5;break;case b.po:a.Dc(this.va[d+1],this.va[d+2],this.va[d+3]);d+=4;break;case b.Zn:a.Ta(this.va[d+1],this.va[d+
465
- 2],this.va[d+3],this.va[d+4]);d+=5;break;case b.qo:a.cc(this.va[d+1],this.va[d+2],this.va[d+3],this.va[d+4]);d+=5;break;default:throw Error('Invalid Patch operations "'+this.va[d]+'"');}}F(a,b,c){this.va.push(olympe.dc.transaction.mg.C.Yn,a,b,c);this.size++}qc(a,b,c,d){this.va.push(olympe.dc.transaction.mg.C.Wq,a,b,c,d);this.size++}Dc(a,b=olympe.dc.Qb.NONE,c){this.va.push(olympe.dc.transaction.mg.C.po,a,b,c);this.size++}Ta(a,b,c,d){if('string'!==typeof a)throw Error('Relation should be created using a tag as string (most likely a relation object is given here instead)');
466
- this.va.push(olympe.dc.transaction.mg.C.Zn,a,b,c,d);this.size++}cc(a,b,c,d){this.va.push(olympe.dc.transaction.mg.C.qo,a,b,c,d);this.size++}};olympe.dc.transaction.mg.C={Yn:1,Wq:2,po:3,Zn:4,qo:5};olympe.dc.transaction.mg.ma=[olympe.dc.Writable,olympe.dc.Yl];function ae(a,b){return a.R.get(b)||a.db.source(b)||olympe.dc.Ha.ic}function be(a,b){return a.L.has(b)?a.L.get(b):a.db.Wf(b)}function ce(a,b,c,d){var e=d&&d.get(olympe.dc.Yb.VERSION);a.versions.set(b,Number(e)||1);d&&a.R.set(b,d.get(olympe.dc.Yb.Gd));e=ae(a,b);a.L.set(b,c&&a.F);a.xc(e,c,f=>{f.F(b,d,0)})}
467
- olympe.dc.transaction.wu=class{constructor(a,b){this.id=b||olympe.X.ec();this.db=a;this.C=new Map;this.G=new olympe.dc.db.uc(b);this.versions=new Map;this.R=new Map;this.L=new Map;this.F=!0}Sf(){return 0===this.G.C.size}persist(a){this.F=a}qc(a,b,c=!1){var d=b&&b.get(olympe.dc.Yb.VERSION);this.versions.set(a,Number(d)||1);d=ae(this,a);if(!d)throw Error('Attempt to update an instance which has an unknown source.');this.xc(d,be(this,a),e=>{e.qc(a,b,c,0)})}Dc(a,b){const c=ae(this,a),d=be(this,a);this.xc(c,
468
- d,e=>{e.Dc(a,b)})}Ta(a,b,c){const d=ae(this,b),e=ae(this,c);let f=be(this,b)&&be(this,c);f&&d!==e&&a!==olympe.dc.jc.Tc&&(olympe.ra.Ya('dc').warn(`Try to create a relation between 2 objects that have different locations: ${b}-[${a}]->${c}`),f=!1);this.xc(d,f,g=>{g.Ta(a,b,c,0)})}cc(a,b,c){const d=ae(this,b),e=ae(this,c);let f=be(this,b)&&be(this,c);f&&d!==e&&a!==olympe.dc.jc.Tc&&(olympe.ra.Ya('dc').warn(`Try to delete a relation between 2 objects that have different locations: ${b}-[${a}]->${c}`),f=
460
+ olympe.dc.db.Ub.so=class{constructor(a){this.N=a;this.output=''}process(a,b,c){this.output='Patch #'+b.Z()+' (source: '+a+')';b.Nc(this);this.N.info(this.output);this.output='';c(null,b)}log(a,b){this.output+='\ndb.'+a+';'+(b?' // '+b:'')}F(a,b){this.log('createInstance("'+a+'", '+Yd(this,b)+')')}qc(a,b){this.log('updateInstance("'+a+'", '+Yd(this,b)+')')}Dc(a,b){var c=olympe.dc.Ja();const d=c.model(a);c=d?c.name(d)+' #'+d:'';this.log('deleteInstance("'+a+'", rule: '+b+')',c)}Ua(a,b,c){this.log('createRelation("'+
461
+ a+'", "'+b+'", "'+c+'")',a===olympe.dc.jc.Tc?'Model':'')}cc(a,b,c){this.log('deleteRelation("'+a+'", "'+b+'", "'+c+'")',a===olympe.dc.jc.Tc?'Model':'')}};olympe.dc.db.Ub.so.ma=[olympe.dc.Writable,olympe.dc.og];olympe.dc.transaction={};olympe.dc.oi=class a{constructor(b,c){this.id=b||olympe.X.ec();this.F=new olympe.D.Zb('BurstTransaction#'+this.id,c);this.Ab=Zd(this);this.W=!1;this.F.onDestroy(()=>this.R());this.ta=new Set;this.G=new Map;this.L=new Set;this.C=null;this.Sa=olympe.U.getParameter(olympe.dc.transaction.Config.Kn)||30;this.ja=[]}static C(b,c){return`${b},${c}`}Hb(b){for(const c of this.ja)c(b);this.stop()}Va(){null!==this.C&&(clearTimeout(this.C),this.C=null);const b=this.da(this.L);0<b.size&&$d(this,b,!1);this.L.clear()}da(b){const c=
462
+ new Map;b.forEach(d=>{const e=d.split(',');let f=c.get(e[0]);void 0===f&&(f=new Map,c.set(e[0],f));f.set(e[1],this.G.get(d))});return c}$(b,c,d){this.Ka(b,c,d);this.Ab(b,c,d);null===this.C&&(this.C=setTimeout(this.Va.bind(this),this.Sa))}Ka(b,c,d){b=a.C(b,c);this.G.set(b,d);this.L.add(b)}qb(b,c){return this.G.get(a.C(b,c))}push(b,c){const d=olympe.dc.za(b);b=c.subscribe(e=>{for(const [f,g]of e)e=olympe.dc.za(f),this.qb(d,e)!==g&&this.$(d,e,g.valueOf())});this.ta.add(b)}complete(){return new Promise((b,
463
+ c)=>{this.R((d,e)=>{for(const f of this.ta)f.unsubscribe();d?b():c(e)})})}update(b,c,d){const e=olympe.dc.za(b),f=olympe.dc.za(c);void 0===e||void 0===f?olympe.dc.di().Ya().error('Burst transaction: instance tag or property tag is undefined'):(this.F.run(()=>{olympe.D.kn([d],g=>{this.W=!0;g instanceof olympe.dc.Cc?olympe.dc.di().Ya().error('Cannot send complex property values in burst transactions'):this.$(e,f,g.valueOf())})}),this.F.R(()=>{this.R()}))}stop(){this.F.destroy();this.ja.length=0}Z(){return this.id}oh(){return!1}R(b){if(this.W){this.W=
464
+ !1;null!==this.C&&(clearTimeout(this.C),this.C=null);this.L.clear();const c=this.da(new Set(this.G.keys()));$d(this,c,!0,b)}else b&&b(!0,null)}toString(){return'Burst transaction #'+this.id}};olympe.dc.oi.prototype.complete=olympe.dc.oi.prototype.complete;olympe.dc.oi.prototype.push=olympe.dc.oi.prototype.push;olympe.dc.Xp=class{C(){}toString(){}};olympe.dc.transaction.mg=class{constructor(a){this.id=a||olympe.X.ih();this.va=[];this.size=0}Z(){return this.id}G(){return this.size}concat(a){this.va.push(...a.va)}Nc(a){const b=olympe.dc.transaction.mg.C,c=this.va.length;let d=0;for(;d<c;)switch(this.va[d]){case b.Xn:a.F(this.va[d+1],this.va[d+2],this.va[d+3]);d+=4;break;case b.Vq:a.qc(this.va[d+1],this.va[d+2],this.va[d+3],this.va[d+4]);d+=5;break;case b.oo:a.Dc(this.va[d+1],this.va[d+2],this.va[d+3]);d+=4;break;case b.Yn:a.Ua(this.va[d+1],this.va[d+
465
+ 2],this.va[d+3],this.va[d+4]);d+=5;break;case b.po:a.cc(this.va[d+1],this.va[d+2],this.va[d+3],this.va[d+4]);d+=5;break;default:throw Error('Invalid Patch operations "'+this.va[d]+'"');}}F(a,b,c){this.va.push(olympe.dc.transaction.mg.C.Xn,a,b,c);this.size++}qc(a,b,c,d){this.va.push(olympe.dc.transaction.mg.C.Vq,a,b,c,d);this.size++}Dc(a,b=olympe.dc.Qb.NONE,c){this.va.push(olympe.dc.transaction.mg.C.oo,a,b,c);this.size++}Ua(a,b,c,d){if('string'!==typeof a)throw Error('Relation should be created using a tag as string (most likely a relation object is given here instead)');
466
+ this.va.push(olympe.dc.transaction.mg.C.Yn,a,b,c,d);this.size++}cc(a,b,c,d){this.va.push(olympe.dc.transaction.mg.C.po,a,b,c,d);this.size++}};olympe.dc.transaction.mg.C={Xn:1,Vq:2,oo:3,Yn:4,po:5};olympe.dc.transaction.mg.ma=[olympe.dc.Writable,olympe.dc.Xl];function ae(a,b){return a.R.get(b)||a.db.source(b)||olympe.dc.Ha.ic}function be(a,b){return a.L.has(b)?a.L.get(b):a.db.Wf(b)}function ce(a,b,c,d){var e=d&&d.get(olympe.dc.Yb.VERSION);a.versions.set(b,Number(e)||1);d&&a.R.set(b,d.get(olympe.dc.Yb.Gd));e=ae(a,b);a.L.set(b,c&&a.F);a.xc(e,c,f=>{f.F(b,d,0)})}
467
+ olympe.dc.transaction.vu=class{constructor(a,b){this.id=b||olympe.X.ec();this.db=a;this.C=new Map;this.G=new olympe.dc.db.uc(b);this.versions=new Map;this.R=new Map;this.L=new Map;this.F=!0}Sf(){return 0===this.G.C.size}persist(a){this.F=a}qc(a,b,c=!1){var d=b&&b.get(olympe.dc.Yb.VERSION);this.versions.set(a,Number(d)||1);d=ae(this,a);if(!d)throw Error('Attempt to update an instance which has an unknown source.');this.xc(d,be(this,a),e=>{e.qc(a,b,c,0)})}Dc(a,b){const c=ae(this,a),d=be(this,a);this.xc(c,
468
+ d,e=>{e.Dc(a,b)})}Ua(a,b,c){const d=ae(this,b),e=ae(this,c);let f=be(this,b)&&be(this,c);f&&d!==e&&a!==olympe.dc.jc.Tc&&(olympe.ra.Ya('dc').warn(`Try to create a relation between 2 objects that have different locations: ${b}-[${a}]->${c}`),f=!1);this.xc(d,f,g=>{g.Ua(a,b,c,0)})}cc(a,b,c){const d=ae(this,b),e=ae(this,c);let f=be(this,b)&&be(this,c);f&&d!==e&&a!==olympe.dc.jc.Tc&&(olympe.ra.Ya('dc').warn(`Try to delete a relation between 2 objects that have different locations: ${b}-[${a}]->${c}`),f=
469
469
  !1);this.xc(d,f,g=>{g.cc(a,b,c,0)})}xc(a,b,c){c(this.G);b&&this.F&&(b=this.C.get(a),b||(b=new olympe.dc.db.uc(this.id),this.C.set(a,b)),c(b))}};function de(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.Yb.Gd)if(e===olympe.dc.Ha.sb)d[g]=olympe.dc.Ja().Z();else{if(e===olympe.dc.Ha.Mc)continue}else g.startsWith(olympe.dc.Yb.VERSION)?(g=g.substr(1),e=null===e?1:e):g.startsWith(olympe.dc.Tg.ic)&&(g='fd'+g.substr(1));e=a.$(e);c&&e instanceof Object&&8===e.c?a.W.set(g,e):d[g]=e}return d}
470
470
  function ee(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}
471
471
  class fe{constructor(){this.W=new Map}$(a){return a instanceof olympe.D.Za||a instanceof olympe.D.sa||a instanceof olympe.D.ga?a.valueOf():a instanceof Date||a instanceof olympe.D.ib?(a=a instanceof olympe.D.ib?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.D.Color?{c:7,r:a.Qf().valueOf(),g:a.Kf().valueOf(),b:a.Ff().valueOf(),a:a.Ef().valueOf()}:a&&'function'===
472
472
  typeof a.T?{c:8,t:a.T()}:a}}function ge(a){a.Hg=[];a.Re=[];a.$f=[];a.Ig=[];a.wg=[]}function he(a){const b={};0<a.wg.length&&(b.wg=a.wg);0<a.Re.length&&(b.Re=a.Re);0<a.Hg.length&&(b.Hg=a.Hg);0<a.$f.length&&(b.$f=a.$f);0<a.Ig.length&&(b.Ig=a.Ig);ge(a);return b}function ie(a){const b=[...a.wg,...a.Re,...a.Hg,...a.$f,...a.Ig];ge(a);return b}
473
- olympe.dc.transaction.td=class{constructor(a=!1){this.Hg=[];this.Re=[];this.$f=[];this.Ig=[];this.wg=[];this.G=a;this.C=olympe.D?new fe:new class extends fe{$(b){return b&&'function'===typeof b.T?{c:8,t:b.T()}:b}}}flush(){return JSON.stringify(ie(this))}F(a,b,c=-1){this.Hg.push({o:1,t:a,p:de(this.C,b||null,this.G),i:c});this.G&&(b=ee(this.C))&&this.$f.push({o:2,t:a,p:b,i:c})}qc(a,b,c,d=-1){this.$f.push({o:2,t:a,p:de(this.C,b||null,!1),i:d})}Dc(a,b,c=-1){this.Re.push({o:3,t:a,f:b,i:c})}Ta(a,b,c,d=
473
+ olympe.dc.transaction.td=class{constructor(a=!1){this.Hg=[];this.Re=[];this.$f=[];this.Ig=[];this.wg=[];this.G=a;this.C=olympe.D?new fe:new class extends fe{$(b){return b&&'function'===typeof b.T?{c:8,t:b.T()}:b}}}flush(){return JSON.stringify(ie(this))}F(a,b,c=-1){this.Hg.push({o:1,t:a,p:de(this.C,b||null,this.G),i:c});this.G&&(b=ee(this.C))&&this.$f.push({o:2,t:a,p:b,i:c})}qc(a,b,c,d=-1){this.$f.push({o:2,t:a,p:de(this.C,b||null,!1),i:d})}Dc(a,b,c=-1){this.Re.push({o:3,t:a,f:b,i:c})}Ua(a,b,c,d=
474
474
  -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.Ig.push({o:4,m:a,l:b,r:c,i:d})}cc(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.wg.push({o:5,m:a,
475
475
  l:b,r:c,i:d})}};olympe.dc.transaction.td.ma=[olympe.dc.Writable];olympe.dc.transaction.Oh=class{constructor(a){this.id=a||olympe.X.ec();this.C=new Map;this.Oa=new Map}Z(){return this.id}F(a,b){this.C.has(a)&&console.warn('Try to add twice the same instance in the graph');const c=new olympe.dc.transaction.Oh.Instance(a);if(b)for(const [d,e]of b)c.xa(d,e);this.C.set(a,c)}qc(){throw Error('UpdateInstance should never be called on a SubGraph since it represents the result of a GraphDef Query');}Dc(){throw Error('DeleteInstance should never be called on a SubGraph since it represents the result of a GraphDef Query');
476
- }Ta(a,b,c){a=new olympe.dc.transaction.Oh.Relation(b,c,a);this.Oa.set(a.toString(),a)}cc(a,b,c){a=new olympe.dc.transaction.Oh.Relation(b,c,a);this.Oa.delete(a.F+'.'+a.G+'.'+a.C)}G(){return this.Oa.size+this.C.size}de(){return this.C}Nc(a){const b=new Map;this.C.forEach((c,d)=>{const e=new Map;je(c,(f,g)=>{if(g instanceof olympe.dc.Cc){const h=b.get(d)||new Map;h.set(f,g);b.set(d,h)}else e.set(f,g)});a.F(d,e)});b.forEach((c,d)=>{a.qc(d,c)});this.Oa.forEach(c=>{a.Ta(c.C,c.F,c.G)})}};
477
- function je(a,b){a.C.forEach((c,d)=>{b(d,b)})}olympe.dc.transaction.Oh.Instance=class{constructor(a){this.tag=a;this.C=new Map}T(){return this.tag}xa(a,b){this.C.set(a,b);return this}deleteProperty(a){this.C.delete(a);return this}};olympe.dc.transaction.Oh.Relation=class{constructor(a,b,c){this.F=a;this.G=b;this.C=olympe.dc.za(c)}toString(){return this.F+'.'+this.G+'.'+this.C}};olympe.dc.transaction.Oh.ma=[olympe.dc.Writable,olympe.dc.Yl];function ke(a,b){b&&a.va.push(b);return b}function le(a){return(b,c)=>a.forEach(d=>d&&d(b,c))}
478
- olympe.dc.Transaction=class{constructor(a){this.id=a||olympe.X.ec();this.va=[];this.G=!0;this.F=[]}Z(){return this.id}persist(a){this.G=a;return this}C(a){a.persist(this.G);const b=this.va;for(let c=0,d=b.length;c<d;c++)b[c].C(a)}create(a,b){return ke(this,new olympe.dc.transaction.va.Td(a,b))}qj(a,b=!0){const c=olympe.dc.za(a);var d=this.va.find(g=>g instanceof olympe.dc.transaction.va.Td&&g.T()===c);if(d)return d.persist(b);d=olympe.dc.Ja();const e=d.model(a);if(null===e)throw Error('Try to persist a instance that does not exist: '+
479
- a);if(d.Wf(a))return null;const f=d.source(a)||olympe.dc.Ha.ic;a=this.create(e,a).persist(b).ii(f);for(const [g,h,k]of Jd(d,a))g!==olympe.dc.jc.Tc&&d.Wf(k)&&this.Ta(g,h===olympe.dc.Ca.DESTINATION?a:k,h===olympe.dc.Ca.DESTINATION?k:a);return a}delete(a,b=olympe.dc.Qb.Ac){ke(this,new olympe.dc.transaction.va.Jj(a,b))}update(a,b,c){return ke(this,new olympe.dc.transaction.va.Qi(a,b,c))}Ta(a,b,c){ke(this,new olympe.dc.transaction.va.ho(a,b,c))}cc(a,b,c,d){ke(this,new olympe.dc.transaction.va.Qs(a,b,c,
480
- d))}Im(a,b,c,d){ke(this,new olympe.dc.transaction.va.Ps(a,b,c,d))}defineProperty(a,b,c,d,e,f){d=this.create(olympe.dm.Property,f);d.setProperty(olympe.dc.CloudObject.nameProp,c||'');void 0!==e&&this.update(a,olympe.dc.Tg.ic+d.T(),e);this.Ta(olympe.dc.CloudObject.propertyRel,a,d);this.Ta(olympe.dm.Property.typeRel,d,b);this.Ta(olympe.dc.CloudObject.containsRel,a,d);return d}gh(a,b,c='',{Wi:d=olympe.dm.Relation.F.Ql,Br:e=olympe.dm.Relation.C.qq,zr:f=olympe.dm.Relation.C.el,sj:g=olympe.dm.Relation.C.Bl,
481
- Vi:h=olympe.dm.Kc.NONE,pj:k=olympe.dm.Relation.L|h}={},l=olympe.X.ec()){c=this.create(olympe.dm.Relation,l).setProperty(olympe.dc.CloudObject.nameProp,c||'').setProperty(olympe.dm.Relation.Cm,d).setProperty(olympe.dm.Relation.kn,k).setProperty(olympe.dm.Relation.Km,e).setProperty(olympe.dm.Relation.tn,e).setProperty(olympe.dm.Relation.Jm,f).setProperty(olympe.dm.Relation.pn,g).setProperty(olympe.dm.Relation.qr,h);this.Ta(olympe.dc.CloudObject.G,a,c);this.Ta(olympe.dm.Relation.destinationModelRel,
482
- c,b);this.Ta(olympe.dc.CloudObject.containsRel,a,c);return c}oh(){return!1}Bm(a){this.F.push(olympe.D.La().F(a))}jb(a,b){a=le([...this.F,a]);me(this,a,b)}Lm(a){a=le([...this.F,a]);ne(olympe.dc.di(),this,a,!0)}toString(){return`Transaction #${this.id}`}};olympe.dc.Transaction.ma=[olympe.dc.Yp];function Zd(a){var b=olympe.dc.di();const c=a.Z();b.L.set(c,a);a.F.onDestroy(()=>{b.L.delete(c)});return(d,e,f)=>{const g=new olympe.dc.db.uc(c);e=(new Map).set(olympe.dc.Yb.VERSION,b.db.version(d)+1).set(e,f);g.qc(d,e,!1,0);olympe.dc.xd().$e(g,olympe.dc.Ha.sb)}}
483
- function $d(a,b,c,d){var e=olympe.dc.di();const f=olympe.dc.Yb.VERSION,g=olympe.dc.ha.ia.uh,h=olympe.dc.ha.ia.fl,k=a.Z(),l=a.oh(),n=new Map;for(const q of b.keys()){var p=e.db.source(q);if(p===olympe.dc.Ha.sb)continue;let r=n.get(p);r||(r=new olympe.dc.db.uc(k),n.set(p,r));p=b.get(q);p.set(f,e.db.version(q)+1);r.qc(q,p,!1,0)}for(const [q,r]of n)b=Dc(new olympe.dc.ha(c?h:g,{xc:r,oh:l},[q]),a.F),c&&d&&M(b,t=>{t?d(!1,t.message):d(!0,null)}),e.G.send(b)}
476
+ }Ua(a,b,c){a=new olympe.dc.transaction.Oh.Relation(b,c,a);this.Oa.set(a.toString(),a)}cc(a,b,c){a=new olympe.dc.transaction.Oh.Relation(b,c,a);this.Oa.delete(a.F+'.'+a.G+'.'+a.C)}G(){return this.Oa.size+this.C.size}de(){return this.C}Nc(a){const b=new Map;this.C.forEach((c,d)=>{const e=new Map;je(c,(f,g)=>{if(g instanceof olympe.dc.Cc){const h=b.get(d)||new Map;h.set(f,g);b.set(d,h)}else e.set(f,g)});a.F(d,e)});b.forEach((c,d)=>{a.qc(d,c)});this.Oa.forEach(c=>{a.Ua(c.C,c.F,c.G)})}};
477
+ function je(a,b){a.C.forEach((c,d)=>{b(d,b)})}olympe.dc.transaction.Oh.Instance=class{constructor(a){this.tag=a;this.C=new Map}T(){return this.tag}xa(a,b){this.C.set(a,b);return this}deleteProperty(a){this.C.delete(a);return this}};olympe.dc.transaction.Oh.Relation=class{constructor(a,b,c){this.F=a;this.G=b;this.C=olympe.dc.za(c)}toString(){return this.F+'.'+this.G+'.'+this.C}};olympe.dc.transaction.Oh.ma=[olympe.dc.Writable,olympe.dc.Xl];function ke(a,b){b&&a.va.push(b);return b}function le(a){return(b,c)=>a.forEach(d=>d&&d(b,c))}
478
+ olympe.dc.Transaction=class{constructor(a){this.id=a||olympe.X.ec();this.va=[];this.G=!0;this.F=[]}Z(){return this.id}persist(a){this.G=a;return this}C(a){a.persist(this.G);const b=this.va;for(let c=0,d=b.length;c<d;c++)b[c].C(a)}create(a,b){return ke(this,new olympe.dc.transaction.va.Td(a,b))}pj(a,b=!0){const c=olympe.dc.za(a);var d=this.va.find(g=>g instanceof olympe.dc.transaction.va.Td&&g.T()===c);if(d)return d.persist(b);d=olympe.dc.Ja();const e=d.model(a);if(null===e)throw Error('Try to persist a instance that does not exist: '+
479
+ a);if(d.Wf(a))return null;const f=d.source(a)||olympe.dc.Ha.ic;a=this.create(e,a).persist(b).ii(f);for(const [g,h,k]of Jd(d,a))g!==olympe.dc.jc.Tc&&d.Wf(k)&&this.Ua(g,h===olympe.dc.Ca.DESTINATION?a:k,h===olympe.dc.Ca.DESTINATION?k:a);return a}delete(a,b=olympe.dc.Qb.Ac){ke(this,new olympe.dc.transaction.va.Ij(a,b))}update(a,b,c){return ke(this,new olympe.dc.transaction.va.Qi(a,b,c))}Ua(a,b,c){ke(this,new olympe.dc.transaction.va.fo(a,b,c))}cc(a,b,c,d){ke(this,new olympe.dc.transaction.va.Ps(a,b,c,
480
+ d))}Hm(a,b,c,d){ke(this,new olympe.dc.transaction.va.Os(a,b,c,d))}defineProperty(a,b,c,d,e,f){d=this.create(olympe.dm.Property,f);d.setProperty(olympe.dc.CloudObject.nameProp,c||'');void 0!==e&&this.update(a,olympe.dc.Tg.ic+d.T(),e);this.Ua(olympe.dc.CloudObject.propertyRel,a,d);this.Ua(olympe.dm.Property.typeRel,d,b);this.Ua(olympe.dc.CloudObject.containsRel,a,d);return d}gh(a,b,c='',{Wi:d=olympe.dm.Relation.F.Pl,Ar:e=olympe.dm.Relation.C.pq,yr:f=olympe.dm.Relation.C.dl,rj:g=olympe.dm.Relation.C.Al,
481
+ Vi:h=olympe.dm.Kc.NONE,oj:k=olympe.dm.Relation.L|h}={},l=olympe.X.ec()){c=this.create(olympe.dm.Relation,l).setProperty(olympe.dc.CloudObject.nameProp,c||'').setProperty(olympe.dm.Relation.Bm,d).setProperty(olympe.dm.Relation.jn,k).setProperty(olympe.dm.Relation.Jm,e).setProperty(olympe.dm.Relation.sn,e).setProperty(olympe.dm.Relation.Im,f).setProperty(olympe.dm.Relation.nn,g).setProperty(olympe.dm.Relation.nr,h);this.Ua(olympe.dc.CloudObject.G,a,c);this.Ua(olympe.dm.Relation.destinationModelRel,
482
+ c,b);this.Ua(olympe.dc.CloudObject.containsRel,a,c);return c}oh(){return!1}Am(a){this.F.push(olympe.D.La().F(a))}jb(a,b){a=le([...this.F,a]);me(this,a,b)}Km(a){a=le([...this.F,a]);ne(olympe.dc.di(),this,a,!0)}toString(){return`Transaction #${this.id}`}};olympe.dc.Transaction.ma=[olympe.dc.Xp];function Zd(a){var b=olympe.dc.di();const c=a.Z();b.L.set(c,a);a.F.onDestroy(()=>{b.L.delete(c)});return(d,e,f)=>{const g=new olympe.dc.db.uc(c);e=(new Map).set(olympe.dc.Yb.VERSION,b.db.version(d)+1).set(e,f);g.qc(d,e,!1,0);olympe.dc.xd().$e(g,olympe.dc.Ha.sb)}}
483
+ function $d(a,b,c,d){var e=olympe.dc.di();const f=olympe.dc.Yb.VERSION,g=olympe.dc.ha.ia.uh,h=olympe.dc.ha.ia.el,k=a.Z(),l=a.oh(),n=new Map;for(const q of b.keys()){var p=e.db.source(q);if(p===olympe.dc.Ha.sb)continue;let r=n.get(p);r||(r=new olympe.dc.db.uc(k),n.set(p,r));p=b.get(q);p.set(f,e.db.version(q)+1);r.qc(q,p,!1,0)}for(const [q,r]of n)b=Dc(new olympe.dc.ha(c?h:g,{xc:r,oh:l},[q]),a.F),c&&d&&M(b,t=>{t?d(!1,t.message):d(!0,null)}),e.G.send(b)}
484
484
  function me(a,b,c){var d=olympe.dc.di();if(c&&b){const e=a.Z();d.F.set(e,b);ne(d,a,(f,g)=>{f||(d.F.delete(e),b(f,g))},!1)}else ne(d,a,b,!1)}
485
- function oe(a){const b=olympe.dc.ha.ia.Mj;a.G.C(olympe.dc.ha.ia.Cj,(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.Hb(d));olympe.dc.xd().$e(e,olympe.dc.Ha.sb);a.N.warn(`Fast update (id=${c}) has been refused and is rolled back. Error: ${d}`)});a.G.C(b,(c,d)=>{c=d.finalize;var e=d.error;(d=(d=a.C.get(d.id))&&d.pop())&&d(c,e)})}
486
- function ne(a,b,c,d=!1){const e=olympe.D.La(),f=c?e.F(c):void 0;c=olympe.dc.xd();const g=b.Z(),h=new olympe.dc.transaction.wu(a.db,g);b.C(h);if(h.Sf())f&&f(!0,null);else{a.C.set(g,[]);const k=[],l=[];for(const p of h.versions.keys())be(h,p)?k.push(p):l.push(p);const n=Rc(c,e,h.G,k,l);pe(a,h,(p,q,r)=>{q?(qe(a,g,k,h.C.size),re(a,h,d,b.oh(),(t,u)=>{t||se(a,g,u);n(t);p&&p(t);f&&f(t,u)})):(a.N.error(r),se(a,g,r),n(!1),f&&f(!1,r))})}}
485
+ function oe(a){const b=olympe.dc.ha.ia.Lj;a.G.C(olympe.dc.ha.ia.Bj,(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.Hb(d));olympe.dc.xd().$e(e,olympe.dc.Ha.sb);a.N.warn(`Fast update (id=${c}) has been refused and is rolled back. Error: ${d}`)});a.G.C(b,(c,d)=>{c=d.finalize;var e=d.error;(d=(d=a.C.get(d.id))&&d.pop())&&d(c,e)})}
486
+ function ne(a,b,c,d=!1){const e=olympe.D.La(),f=c?e.F(c):void 0;c=olympe.dc.xd();const g=b.Z(),h=new olympe.dc.transaction.vu(a.db,g);b.C(h);if(h.Sf())f&&f(!0,null);else{a.C.set(g,[]);const k=[],l=[];for(const p of h.versions.keys())be(h,p)?k.push(p):l.push(p);const n=Rc(c,e,h.G,k,l);pe(a,h,(p,q,r)=>{q?(qe(a,g,k,h.C.size),re(a,h,d,b.oh(),(t,u)=>{t||se(a,g,u);n(t);p&&p(t);f&&f(t,u)})):(a.N.error(r),se(a,g,r),n(!1),f&&f(!1,r))})}}
487
487
  function pe(a,b,c){const d=[];for(const p of b.versions.keys())a.db.Rf(p,olympe.dm.File)&&be(b,p)&&d.push(p);if(0===d.length)c(null,!0,null);else{var e=olympe.dm.File.urlProp.T(),f=olympe.dm.File.C.T(),g=olympe.dm.File.modificationDateProp.T(),h=Array.from(b.C.values()),k=[],l=new olympe.async.ng(olympe.D.lh()),n=olympe.X.ai();d.forEach(p=>{l.add((q,r)=>{const t=a.db.cb(p,e,!0),u=a.db.cb(p,olympe.dm.File.mimeTypeProp)||'application/data';t.startsWith('blob:')?n.F(t,v=>{n.W(t);null===v?q():zc(a.W,
488
488
  p,v,u,w=>{const y=h.reduce((B,E)=>B||E.Lf(p),null);null!==y&&(y.xa(e,w).xa(f,!0),k.push([p,w]));q()},w=>{r(w)})}):(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())})});ac(l,(p,q)=>{let r=null;if(p){const t=new olympe.dc.db.uc;k.forEach(([u,v])=>{const w=new Map;w.set(e,v).set(f,!0).set(g,olympe.D.ib.now());t.qc(u,w,!0,0)});r=Rc(olympe.dc.xd(),olympe.D.lh(),t,[],[])}c(r,p,q)});l.start()}}
489
- function qe(a,b,c,d){const e=olympe.D.lh(),f=new olympe.async.ng(e);0<a.timeout&&$b(f,a.timeout);const g=a.C.get(b);for(let h=0;h<d;h++)f.add((k,l,n)=>{g.push(e.F((p,q)=>{n.set('final',p);q?l(q):k()}))});ac(f,(h,k,l)=>{h||a.N.warn(`An error occurred while processing the notification of transaction (${b}): ${k}.`);l.get('final')!==olympe.dc.transaction.rg.C.Op&&olympe.dc.xd().persist(c);se(a,b)});f.start()}
490
- function re(a,b,c,d,e){b=b.C;if(0===b.size)e(!0,null);else{var f=c?olympe.dc.ha.ia.uk:olympe.dc.ha.ia.dh;c=(h,k,l,n)=>{h=M(new olympe.dc.ha(f,{xc:h,oh:d},[k]),p=>{p instanceof Error?n(p.message):l()});a.G.send(h)};var g=new olympe.async.ng(olympe.D.lh());for(const [h,k]of b)g.add(c.bind(null,k,h));ac(g,e);g.start()}}
491
- function se(a,b,c){if(void 0!==c){var d;null==(d=a.C.get(b))||d.forEach(e=>{e(olympe.dc.transaction.rg.C.ak,c)})}a.C.delete(b);if(0===a.C.size){for(const e of a.R)e();a.R=[]}a.F.has(b)&&(d=a.F.get(b),a.F.delete(b),d(!0,null))}function te(a,b){0<a.C.size?a.R.push(olympe.D.La().F(b)):b()}olympe.dc.transaction.rg=class{constructor(a,b,c,d,e){this.N=a;this.db=b;this.G=c;this.W=d;this.timeout=e;this.L=new Map;this.C=new Map;this.R=[];this.F=new Map;oe(this)}Ya(){return this.N}};
492
- olympe.dc.transaction.rg.C={ak:0,Np:1,Op:2};olympe.dc.transaction.P={Ea:'dc.transaction.Logger',Aa:'dc.transaction.Manager'};olympe.dc.transaction.Config={TIMEOUT:'dc.transaction.timeout',Ln:'dc.transaction.burstInterval'};
493
- olympe.U.config(function(a){D(a,olympe.dc.transaction.Config.TIMEOUT,6E4);D(a,olympe.dc.transaction.Config.Ln,30);C(a,olympe.dc.transaction.P.Ea,[olympe.ra.P.Aa],b=>b.Oc('dc'));A(a,olympe.dc.transaction.P.Aa,olympe.dc.transaction.rg,olympe.dc.transaction.P.Ea,olympe.dc.P.si,olympe.dc.P.ne,olympe.dc.P.wi,new olympe.U.fa(olympe.dc.transaction.Config.TIMEOUT))},'olympe.dc.transaction');olympe.dc.transaction.va={};function W(a){return olympe.dc.za(a)}function ue(a,b){const c=new Map;for(const [d,e]of b)c.set(d,a.$a(e));return c}olympe.dc.transaction.va.Og=class{C(){throw Error('Abstract method build() not override !');}toString(){throw Error('Abstract method toString() not override !');}$a(a){a=olympe.D.$a(a);return void 0===a||null===a?null:olympe.D.Rr(a)?a.valueOf():a}};olympe.dc.transaction.va.Og.ma=[olympe.dc.Yp];olympe.dc.transaction.va.Td=class extends olympe.dc.transaction.va.Og{constructor(a,b){super();this.tag=void 0!==b?b:olympe.X.ec();this.model=a;this.F=new Map;this.G=!0;this.F.set(olympe.dc.Yb.VERSION,1)}T(){return W(this.tag)}Nb(){return W(this.model)}persist(a){this.G=a;return this}ii(a){this.F.set(olympe.dc.Yb.Gd,a);return this}Ax(){this.F.set(olympe.dc.Yb.Gd,olympe.dc.Ha.sb)}setProperty(a,b){this.F.set(olympe.dc.za(a),b);return this}Wk(a){this.setProperty(olympe.dc.CloudObject.nameProp.T(),a);
494
- return this}C(a){const b=olympe.dc.Ja(),c=this.Nb(),d=this.T();if(void 0===c)throw Error('OperationError: Cannot create instance, model tag is undefined');var e=olympe.dc.Yb.Gd;if(!this.F.has(e)){var f=b.source(c);this.F.set(e,null!==f?f:olympe.dc.Ha.ic)}if(b.Db(d)&&!b.Wf(d)&&this.G){e=new Map([...b.dd(d,!0),...ue(this,this.F)]);for(const g of e.values())g instanceof olympe.dc.Cc&&!be(a,g.T())&&(f=new olympe.dc.Transaction,f.qj(g.T()),f.C(a));ce(a,d,this.G,e);a.Ta(olympe.dc.CloudObject.modelRel.T(),
495
- d,c);for(const [g,h,k]of Jd(b,d))be(a,k)&&(h===olympe.dc.Ca.ORIGIN?a.Ta(g,k,d):a.Ta(g,d,k))}else b.Db(d)||(ce(a,d,this.G,ue(this,this.F)),a.Ta(olympe.dc.CloudObject.modelRel.T(),d,c))}toString(){return`CreateInstance(${this.Nb()}, ${this.T()})`}};olympe.dc.transaction.va.Td.prototype.setProperty=olympe.dc.transaction.va.Td.prototype.setProperty;olympe.dc.transaction.va.Td.prototype.localSource=olympe.dc.transaction.va.Td.prototype.Ax;olympe.dc.transaction.va.Td.prototype.persist=olympe.dc.transaction.va.Td.prototype.persist;
496
- olympe.dc.transaction.va.Td.prototype.getModelTag=olympe.dc.transaction.va.Td.prototype.Nb;olympe.dc.transaction.va.Td.prototype.getTag=olympe.dc.transaction.va.Td.prototype.T;olympe.dc.transaction.va.Td.ma=[olympe.dc.Ae];olympe.dc.transaction.va.ho=class extends olympe.dc.transaction.va.Og{constructor(a,b,c){super();this.type=a.Ra?a:new olympe.dc.Y.Sb(W(a));this.F=b;this.G=c}Ra(){return this.$a(this.type).Ra()}C(a){const b=W(this.type);if(''===b)throw Error('OperationError: Cannot create relation, type is undefined, null or empty string');if(b===olympe.dc.jc.Tc)throw Error('OperationError: Cannot create the instance -> model relation');const c=W(this.F);if(''===c)throw Error('OperationError: Cannot create relation, origin tag is undefined, null or empty string');
497
- const d=W(this.G);if(''===d)throw Error('OperationError: Cannot create relation, destination tag is undefined, null or empty string');this.Ra()===olympe.dc.Ca.DESTINATION?a.Ta(b,c,d):a.Ta(b,d,c)}toString(){return`CreateRelation('${this.Ra()}${W(this.type)}, ${W(this.F)}, ${W(this.G)})`}};olympe.dc.transaction.va.vz=class extends olympe.dc.transaction.va.Og{constructor(a,b=olympe.dc.Qb.Ac){super();this.model=a;this.F=b}Nb(){return W(this.model)}C(a){const b=this.Nb();if(void 0===b)throw Error('OperationError: Cannot delete instances of model, model is undefined');const c=olympe.dc.Ja();for(const d of c.de(b))d!==b&&(new olympe.dc.transaction.va.Jj(d,this.F)).C(a)}toString(){return`DeleteAllInstances(${this.Nb()}, ${this.F})`}};olympe.dc.transaction.va.Ps=class extends olympe.dc.transaction.va.Og{constructor(a,b,c,d){super();this.F=a.Ra?a:new olympe.dc.Y.Sb(W(a));this.G=b;this.L=c||!1;this.R=d instanceof Array?d.map(e=>W(e)):null}Ra(){return this.$a(this.F).Ra()}C(a){const b=W(this.F);if(void 0===b)throw Error('OperationError: Cannot delete relation, type is undefined');if(b===olympe.dc.jc.Tc)throw Error('OperationError: Cannot delete the instance -> model relation');const c=W(this.G);if(void 0===c)throw Error('OperationError: Cannot delete relation, left tag is undefined');
498
- var d=olympe.dc.Ja();const e=this.Ra(),f=this.R;d=d.ub(c,this.F);for(const g of d)e===olympe.dc.Ca.DESTINATION?a.cc(b,c,g):a.cc(b,g,c),null!==f&&0<=f.indexOf(g)||this.L&&(new olympe.dc.transaction.va.Jj(g,olympe.dc.Qb.Ac)).C(a)}toString(){return`DeleteAllRelations(${this.Ra()}${W(this.F)}, ${W(this.G)}, ${this.L})`}};olympe.dc.transaction.va.Jj=class extends olympe.dc.transaction.va.Og{constructor(a,b=olympe.dc.Qb.Ac){super();this.tag=a;this.F=b}T(){return W(this.tag)}C(a){const b=olympe.dc.Ja(),c=this.T();if(void 0===c)throw Error('OperationError: Cannot delete instance, tag is undefined');const d=b.model(c);0<=b.version(c)&&d&&a.Dc(c,this.F)}toString(){return'DeleteInstance('+this.T()+', '+this.F+')'}};olympe.dc.transaction.va.Qs=class extends olympe.dc.transaction.va.ho{constructor(a,b,c,d=!1){super(a,b,c);this.L=d}C(a){const b=W(this.type);if(void 0===b)throw Error('OperationError: Cannot delete relation, type is undefined');if(b===olympe.dc.jc.Tc)throw Error('OperationError: Cannot delete the instance -> model relation');const c=W(this.F);if(void 0===c)throw Error('OperationError: Cannot delete relation, left tag is undefined');const d=W(this.G);if(void 0===d)throw Error('OperationError: Cannot delete relation, right tag is undefined');
499
- this.Ra()===olympe.dc.Ca.DESTINATION?a.cc(b,c,d):a.cc(b,d,c);this.L&&(new olympe.dc.transaction.va.Jj(d,olympe.dc.Qb.Ac)).C(a)}toString(){return'DeleteRelation('+this.Ra()+W(this.type)+', '+W(this.F)+', '+W(this.G)+', '+this.L+')'}};olympe.dc.transaction.va.Qi=class extends olympe.dc.transaction.va.Og{constructor(a,b,c){super();this.tag=a;this.F=new Map;this.F.set(olympe.dc.Yb.VERSION,-1);void 0!==b&&this.setProperty(b,c)}T(){return W(this.tag)}setProperty(a,b){this.F.set(W(a),b);return this}C(a){const b=this.T();if(void 0===b)throw Error('OperationError: Cannot update instance, tag is undefined');const c=olympe.dc.Ja();var d=c.version(b),e=a.versions.get(b);e=void 0!==e?e:d;if(null===e)throw Error('OperationError: Instance #'+
500
- b+' not found so it cannot be updated');d=ue(this,this.F);0>=d.get(olympe.dc.Yb.VERSION)&&d.set(olympe.dc.Yb.VERSION,e+1);for(const [f,g]of d)e=c.cb(b,f),e instanceof olympe.dc.Cc&&a.Dc(e.T(),olympe.dc.Qb.Ac),g instanceof olympe.dc.Cc&&!be(a,g.T())&&(e=new olympe.dc.Transaction,e.qj(g.T()),e.C(a));a.qc(b,d)}toString(){return'UpdateInstance('+this.T()+', '+ue(this,this.F)+')'}};olympe.dc.transaction.va.Qi.prototype.setProperty=olympe.dc.transaction.va.Qi.prototype.setProperty;
501
- olympe.dc.transaction.va.Qi.prototype.getTag=olympe.dc.transaction.va.Qi.prototype.T;olympe.dc.ba={};olympe.dc.Ae=class{T(){}};olympe.dc.Ae.prototype.getTag=olympe.dc.Ae.prototype.T;olympe.dc.iA=olympe.dc.Ae;olympe.dc.ba.ek={ASC:'ASC',DESC:'DESC'};function ve(a){switch(a.pr){case 1:const c=a.v;switch(a.t){case 1:var b=c;break;case 2:b=new Date(c);break;case 3:b=olympe.dc.CloudObject.get(c);break;case 4:b=new olympe.D.Color(c.r,c.g,c.b,c.a)}return new olympe.dc.ba.V.Fc(a.p,b,olympe.dc.Ja());case 2:return new olympe.dc.ba.V.Sc(a.p,a.s,olympe.dc.Ja(),a.c);case 3:return new olympe.dc.ba.V.Ah(a.p,a.b,a.l,a.s);case 4:return new olympe.dc.ba.V.jd(ve(a.v));case 5:return new olympe.dc.ba.V.ud(a.p,new RegExp(a.r),olympe.dc.Ja(),a.c);case 6:b=new olympe.dc.ba.V.Ee(a.d);
502
- for(const [d,e,f]of a.r)a=new olympe.dc.query.Relation(d,e,f),f?b.Dk(a):b.rb(a);return b;case 7:return new olympe.dc.ba.V.Zd(...a.p.map(d=>ve(d)));case 8:return new olympe.dc.ba.V.Qd(...a.p.map(d=>ve(d)));default:return null}}
503
- olympe.dc.ba.bb=class{observe(){}jb(){}clear(){}la(){}toString(){}static mb(a,b){return new olympe.dc.ba.V.Fc(a,b,olympe.dc.Ja())}static contains(a,b,c=!1){return new olympe.dc.ba.V.Sc(a,b,olympe.dc.Ja(),c)}static Vr(a,b,c=!0){return new olympe.dc.ba.V.ud(a,b,olympe.dc.Ja(),c)}static Jk(a,b,c=!0){return new olympe.dc.ba.V.Ah(a,b,!1,c)}static uj(a,b,c=!0){return new olympe.dc.ba.V.Ah(a,b,!0,c)}static and(...a){return new olympe.dc.ba.V.Qd(...a)}static or(...a){return new olympe.dc.ba.V.Zd(...a)}static not(a){return new olympe.dc.ba.V.jd(a)}};
504
- olympe.dc.ba.bb.not=olympe.dc.ba.bb.not;olympe.dc.ba.bb.or=olympe.dc.ba.bb.or;olympe.dc.ba.bb.and=olympe.dc.ba.bb.and;olympe.dc.ba.bb.smallerThan=olympe.dc.ba.bb.uj;olympe.dc.ba.bb.greaterThan=olympe.dc.ba.bb.Jk;olympe.dc.ba.bb.regex=olympe.dc.ba.bb.Vr;olympe.dc.ba.bb.contains=olympe.dc.ba.bb.contains;olympe.dc.ba.bb.equals=olympe.dc.ba.bb.mb;function we(a,b){return new olympe.dc.gb(a.G,a.source,b,a.F,{max:a.max,offset:a.offset})}function xe(a){return a.C.filter(b=>b instanceof olympe.dc.ba.Gb.hf||b instanceof olympe.dc.ba.Gb.jf).length}
489
+ function qe(a,b,c,d){const e=olympe.D.lh(),f=new olympe.async.ng(e);0<a.timeout&&$b(f,a.timeout);const g=a.C.get(b);for(let h=0;h<d;h++)f.add((k,l,n)=>{g.push(e.F((p,q)=>{n.set('final',p);q?l(q):k()}))});ac(f,(h,k,l)=>{h||a.N.warn(`An error occurred while processing the notification of transaction (${b}): ${k}.`);l.get('final')!==olympe.dc.transaction.rg.C.Np&&olympe.dc.xd().persist(c);se(a,b)});f.start()}
490
+ function re(a,b,c,d,e){b=b.C;if(0===b.size)e(!0,null);else{var f=c?olympe.dc.ha.ia.tk:olympe.dc.ha.ia.dh;c=(h,k,l,n)=>{h=M(new olympe.dc.ha(f,{xc:h,oh:d},[k]),p=>{p instanceof Error?n(p.message):l()});a.G.send(h)};var g=new olympe.async.ng(olympe.D.lh());for(const [h,k]of b)g.add(c.bind(null,k,h));ac(g,e);g.start()}}
491
+ function se(a,b,c){if(void 0!==c){var d;null==(d=a.C.get(b))||d.forEach(e=>{e(olympe.dc.transaction.rg.C.$j,c)})}a.C.delete(b);if(0===a.C.size){for(const e of a.R)e();a.R=[]}a.F.has(b)&&(d=a.F.get(b),a.F.delete(b),d(!0,null))}function te(a,b){0<a.C.size?a.R.push(olympe.D.La().F(b)):b()}olympe.dc.transaction.rg=class{constructor(a,b,c,d,e){this.N=a;this.db=b;this.G=c;this.W=d;this.timeout=e;this.L=new Map;this.C=new Map;this.R=[];this.F=new Map;oe(this)}Ya(){return this.N}};
492
+ olympe.dc.transaction.rg.C={$j:0,Mp:1,Np:2};olympe.dc.transaction.P={Ea:'dc.transaction.Logger',Aa:'dc.transaction.Manager'};olympe.dc.transaction.Config={TIMEOUT:'dc.transaction.timeout',Kn:'dc.transaction.burstInterval'};
493
+ olympe.U.config(function(a){D(a,olympe.dc.transaction.Config.TIMEOUT,6E4);D(a,olympe.dc.transaction.Config.Kn,30);C(a,olympe.dc.transaction.P.Ea,[olympe.ra.P.Aa],b=>b.Oc('dc'));A(a,olympe.dc.transaction.P.Aa,olympe.dc.transaction.rg,olympe.dc.transaction.P.Ea,olympe.dc.P.si,olympe.dc.P.ne,olympe.dc.P.wi,new olympe.U.fa(olympe.dc.transaction.Config.TIMEOUT))},'olympe.dc.transaction');olympe.dc.transaction.va={};function W(a){return olympe.dc.za(a)}function ue(a,b){const c=new Map;for(const [d,e]of b)c.set(d,a.$a(e));return c}olympe.dc.transaction.va.Og=class{C(){throw Error('Abstract method build() not override !');}toString(){throw Error('Abstract method toString() not override !');}$a(a){a=olympe.D.$a(a);return void 0===a||null===a?null:olympe.D.Qr(a)?a.valueOf():a}};olympe.dc.transaction.va.Og.ma=[olympe.dc.Xp];olympe.dc.transaction.va.Td=class extends olympe.dc.transaction.va.Og{constructor(a,b){super();this.tag=void 0!==b?b:olympe.X.ec();this.model=a;this.F=new Map;this.G=!0;this.F.set(olympe.dc.Yb.VERSION,1)}T(){return W(this.tag)}Nb(){return W(this.model)}persist(a){this.G=a;return this}ii(a){this.F.set(olympe.dc.Yb.Gd,a);return this}zx(){this.F.set(olympe.dc.Yb.Gd,olympe.dc.Ha.sb)}setProperty(a,b){this.F.set(olympe.dc.za(a),b);return this}Vk(a){this.setProperty(olympe.dc.CloudObject.nameProp.T(),a);
494
+ return this}C(a){const b=olympe.dc.Ja(),c=this.Nb(),d=this.T();if(void 0===c)throw Error('OperationError: Cannot create instance, model tag is undefined');var e=olympe.dc.Yb.Gd;if(!this.F.has(e)){var f=b.source(c);this.F.set(e,null!==f?f:olympe.dc.Ha.ic)}if(b.Db(d)&&!b.Wf(d)&&this.G){e=new Map([...b.dd(d,!0),...ue(this,this.F)]);for(const g of e.values())g instanceof olympe.dc.Cc&&!be(a,g.T())&&(f=new olympe.dc.Transaction,f.pj(g.T()),f.C(a));ce(a,d,this.G,e);a.Ua(olympe.dc.CloudObject.modelRel.T(),
495
+ d,c);for(const [g,h,k]of Jd(b,d))be(a,k)&&(h===olympe.dc.Ca.ORIGIN?a.Ua(g,k,d):a.Ua(g,d,k))}else b.Db(d)||(ce(a,d,this.G,ue(this,this.F)),a.Ua(olympe.dc.CloudObject.modelRel.T(),d,c))}toString(){return`CreateInstance(${this.Nb()}, ${this.T()})`}};olympe.dc.transaction.va.Td.prototype.setProperty=olympe.dc.transaction.va.Td.prototype.setProperty;olympe.dc.transaction.va.Td.prototype.localSource=olympe.dc.transaction.va.Td.prototype.zx;olympe.dc.transaction.va.Td.prototype.persist=olympe.dc.transaction.va.Td.prototype.persist;
496
+ olympe.dc.transaction.va.Td.prototype.getModelTag=olympe.dc.transaction.va.Td.prototype.Nb;olympe.dc.transaction.va.Td.prototype.getTag=olympe.dc.transaction.va.Td.prototype.T;olympe.dc.transaction.va.Td.ma=[olympe.dc.Ae];olympe.dc.transaction.va.fo=class extends olympe.dc.transaction.va.Og{constructor(a,b,c){super();this.type=a.Ra?a:new olympe.dc.Y.Sb(W(a));this.F=b;this.G=c}Ra(){return this.$a(this.type).Ra()}C(a){const b=W(this.type);if(''===b)throw Error('OperationError: Cannot create relation, type is undefined, null or empty string');if(b===olympe.dc.jc.Tc)throw Error('OperationError: Cannot create the instance -> model relation');const c=W(this.F);if(''===c)throw Error('OperationError: Cannot create relation, origin tag is undefined, null or empty string');
497
+ const d=W(this.G);if(''===d)throw Error('OperationError: Cannot create relation, destination tag is undefined, null or empty string');this.Ra()===olympe.dc.Ca.DESTINATION?a.Ua(b,c,d):a.Ua(b,d,c)}toString(){return`CreateRelation('${this.Ra()}${W(this.type)}, ${W(this.F)}, ${W(this.G)})`}};olympe.dc.transaction.va.uz=class extends olympe.dc.transaction.va.Og{constructor(a,b=olympe.dc.Qb.Ac){super();this.model=a;this.F=b}Nb(){return W(this.model)}C(a){const b=this.Nb();if(void 0===b)throw Error('OperationError: Cannot delete instances of model, model is undefined');const c=olympe.dc.Ja();for(const d of c.de(b))d!==b&&(new olympe.dc.transaction.va.Ij(d,this.F)).C(a)}toString(){return`DeleteAllInstances(${this.Nb()}, ${this.F})`}};olympe.dc.transaction.va.Os=class extends olympe.dc.transaction.va.Og{constructor(a,b,c,d){super();this.F=a.Ra?a:new olympe.dc.Y.Sb(W(a));this.G=b;this.L=c||!1;this.R=d instanceof Array?d.map(e=>W(e)):null}Ra(){return this.$a(this.F).Ra()}C(a){const b=W(this.F);if(void 0===b)throw Error('OperationError: Cannot delete relation, type is undefined');if(b===olympe.dc.jc.Tc)throw Error('OperationError: Cannot delete the instance -> model relation');const c=W(this.G);if(void 0===c)throw Error('OperationError: Cannot delete relation, left tag is undefined');
498
+ var d=olympe.dc.Ja();const e=this.Ra(),f=this.R;d=d.ub(c,this.F);for(const g of d)e===olympe.dc.Ca.DESTINATION?a.cc(b,c,g):a.cc(b,g,c),null!==f&&0<=f.indexOf(g)||this.L&&(new olympe.dc.transaction.va.Ij(g,olympe.dc.Qb.Ac)).C(a)}toString(){return`DeleteAllRelations(${this.Ra()}${W(this.F)}, ${W(this.G)}, ${this.L})`}};olympe.dc.transaction.va.Ij=class extends olympe.dc.transaction.va.Og{constructor(a,b=olympe.dc.Qb.Ac){super();this.tag=a;this.F=b}T(){return W(this.tag)}C(a){const b=olympe.dc.Ja(),c=this.T();if(void 0===c)throw Error('OperationError: Cannot delete instance, tag is undefined');const d=b.model(c);0<=b.version(c)&&d&&a.Dc(c,this.F)}toString(){return'DeleteInstance('+this.T()+', '+this.F+')'}};olympe.dc.transaction.va.Ps=class extends olympe.dc.transaction.va.fo{constructor(a,b,c,d=!1){super(a,b,c);this.L=d}C(a){const b=W(this.type);if(void 0===b)throw Error('OperationError: Cannot delete relation, type is undefined');if(b===olympe.dc.jc.Tc)throw Error('OperationError: Cannot delete the instance -> model relation');const c=W(this.F);if(void 0===c)throw Error('OperationError: Cannot delete relation, left tag is undefined');const d=W(this.G);if(void 0===d)throw Error('OperationError: Cannot delete relation, right tag is undefined');
499
+ this.Ra()===olympe.dc.Ca.DESTINATION?a.cc(b,c,d):a.cc(b,d,c);this.L&&(new olympe.dc.transaction.va.Ij(d,olympe.dc.Qb.Ac)).C(a)}toString(){return'DeleteRelation('+this.Ra()+W(this.type)+', '+W(this.F)+', '+W(this.G)+', '+this.L+')'}};olympe.dc.transaction.va.Qi=class extends olympe.dc.transaction.va.Og{constructor(a,b,c){super();this.tag=a;this.F=new Map;this.F.set(olympe.dc.Yb.VERSION,-1);void 0!==b&&this.setProperty(b,c)}T(){return W(this.tag)}setProperty(a,b){this.F.set(W(a),b);return this}C(a){const b=this.T();if(void 0===b)throw Error('OperationError: Cannot update instance, tag is undefined');const c=olympe.dc.Ja();var d=c.version(b),e=a.versions.get(b);e=void 0!==e?e:d;if(null===e)throw Error('OperationError: Instance #'+
500
+ b+' not found so it cannot be updated');d=ue(this,this.F);0>=d.get(olympe.dc.Yb.VERSION)&&d.set(olympe.dc.Yb.VERSION,e+1);for(const [f,g]of d)e=c.cb(b,f),e instanceof olympe.dc.Cc&&a.Dc(e.T(),olympe.dc.Qb.Ac),g instanceof olympe.dc.Cc&&!be(a,g.T())&&(e=new olympe.dc.Transaction,e.pj(g.T()),e.C(a));a.qc(b,d)}toString(){return'UpdateInstance('+this.T()+', '+ue(this,this.F)+')'}};olympe.dc.transaction.va.Qi.prototype.setProperty=olympe.dc.transaction.va.Qi.prototype.setProperty;
501
+ olympe.dc.transaction.va.Qi.prototype.getTag=olympe.dc.transaction.va.Qi.prototype.T;olympe.dc.ba={};olympe.dc.Ae=class{T(){}};olympe.dc.Ae.prototype.getTag=olympe.dc.Ae.prototype.T;olympe.dc.hA=olympe.dc.Ae;olympe.dc.ba.dk={ASC:'ASC',DESC:'DESC'};function ve(a){switch(a.pr){case 1:const c=a.v;switch(a.t){case 1:var b=c;break;case 2:b=new Date(c);break;case 3:b=olympe.dc.CloudObject.get(c);break;case 4:b=new olympe.D.Color(c.r,c.g,c.b,c.a)}return new olympe.dc.ba.V.Fc(a.p,b,olympe.dc.Ja());case 2:return new olympe.dc.ba.V.Sc(a.p,a.s,olympe.dc.Ja(),a.c);case 3:return new olympe.dc.ba.V.Ah(a.p,a.b,a.l,a.s);case 4:return new olympe.dc.ba.V.jd(ve(a.v));case 5:return new olympe.dc.ba.V.ud(a.p,new RegExp(a.r),olympe.dc.Ja(),a.c);case 6:b=new olympe.dc.ba.V.Ee(a.d);
502
+ for(const [d,e,f]of a.r)a=new olympe.dc.query.Relation(d,e,f),f?b.Ck(a):b.rb(a);return b;case 7:return new olympe.dc.ba.V.Zd(...a.p.map(d=>ve(d)));case 8:return new olympe.dc.ba.V.Qd(...a.p.map(d=>ve(d)));default:return null}}
503
+ olympe.dc.ba.bb=class{observe(){}jb(){}clear(){}la(){}toString(){}static mb(a,b){return new olympe.dc.ba.V.Fc(a,b,olympe.dc.Ja())}static contains(a,b,c=!1){return new olympe.dc.ba.V.Sc(a,b,olympe.dc.Ja(),c)}static Ur(a,b,c=!0){return new olympe.dc.ba.V.ud(a,b,olympe.dc.Ja(),c)}static Ik(a,b,c=!0){return new olympe.dc.ba.V.Ah(a,b,!1,c)}static tj(a,b,c=!0){return new olympe.dc.ba.V.Ah(a,b,!0,c)}static and(...a){return new olympe.dc.ba.V.Qd(...a)}static or(...a){return new olympe.dc.ba.V.Zd(...a)}static not(a){return new olympe.dc.ba.V.jd(a)}};
504
+ olympe.dc.ba.bb.not=olympe.dc.ba.bb.not;olympe.dc.ba.bb.or=olympe.dc.ba.bb.or;olympe.dc.ba.bb.and=olympe.dc.ba.bb.and;olympe.dc.ba.bb.smallerThan=olympe.dc.ba.bb.tj;olympe.dc.ba.bb.greaterThan=olympe.dc.ba.bb.Ik;olympe.dc.ba.bb.regex=olympe.dc.ba.bb.Ur;olympe.dc.ba.bb.contains=olympe.dc.ba.bb.contains;olympe.dc.ba.bb.equals=olympe.dc.ba.bb.mb;function we(a,b){return new olympe.dc.gb(a.G,a.source,b,a.F,{max:a.max,offset:a.offset})}function xe(a){return a.C.filter(b=>b instanceof olympe.dc.ba.Gb.hf||b instanceof olympe.dc.ba.Gb.jf).length}
505
505
  function ye(a){const b=olympe.dc.ba.Gb.Mh,c=olympe.dc.ba.Gb.hf,d=olympe.dc.ba.Gb.jf,e=0===a.F.size?a.Bf():a;let f=-1,g=0;for(const h of a.C)h instanceof b&&(f=g),(h instanceof c||h instanceof d)&&g++;if(0<=f&&!e.F.has(f))throw Error('AndReturn was not called for the current level before sortBy operator');return e}
506
506
  function ze(a,b){const c=olympe.dc.Cd.SUBSCRIBE,d=olympe.dc.Cd.Ji,e=new olympe.dc.kf(a.G,b?c:d);for(const f of a.C)f instanceof olympe.dc.ba.Gb.hf?e.rb(f.Nd()):f instanceof olympe.dc.ba.Gb.jf?e.rb(f.Nd(),!0):f instanceof olympe.dc.ba.Gb.rc&&(a=f.C,a instanceof olympe.dc.ba.V.Ee&&(a=a.ed(),a.forEach(g=>e.rb(g)),Ae(e,a.length)));return e}function Be(a){return a.source||a.db.source(a.G)||olympe.dc.Ha.ic}
507
507
  function Ce(a){return new olympe.dc.gb(a.r,a.s,a.qp.map(b=>De(b)),new Set(a.lv),{max:a.lp.m,offset:a.lp.o})}
508
- olympe.dc.gb=class{constructor(a,b=null,c=[],d=new Set,e={max:-1,offset:0}){this.db=olympe.dc.Ja();this.G=olympe.dc.za(a);this.source=b;this.C=c;this.F=d;this.max=-1===e.max?-1:e.max;this.offset=e.offset;this.id=null}static from(a,b){return new olympe.dc.gb(a,b)}static Lk(a,b=olympe.dc.Ha.ic){return(new olympe.dc.gb(a,b)).rb(olympe.dc.CloudObject.instancesRel)}rb(a){const b=Array.from(this.C);b.push(new olympe.dc.ba.Gb.hf(this.db,a));return we(this,b)}Pm(a,b=!1){const c=Array.from(this.C);c.push(new olympe.dc.ba.Gb.jf(this.db,
509
- a,b));return we(this,c)}Bf(){this.F.add(xe(this));return new olympe.dc.gb(this.G,this.source,this.C,this.F,{max:this.max,offset:this.offset})}filter(a){const b=Array.from(this.C);b.push(new olympe.dc.ba.Gb.rc(a));return we(this,b)}Xi(){return this}limit(a,b=0){return new olympe.dc.gb(this.G,this.source,this.C,this.F,{max:a,offset:b})}Yk(a,b=olympe.dc.ba.ek.ASC){const c=Array.from(this.C);c.push(new olympe.dc.ba.Gb.Mh(this.db,a,b));return we(this,c)}jb(a){return Ee(olympe.dc.Nf(),ye(this),'function'===
510
- typeof a.Ua?a.C.C:a)}observe(a){return Fe(olympe.dc.Nf(),ye(this),'function'===typeof a.Ua?a.C.C:a)}Ic(){var a=ye(this);return olympe.dc.Nf().R.Ic(a)}Z(){null===this.id&&(this.id=olympe.X.ob(this.G+this.C.reduce((a,b)=>a+b.toString(),'')+Array.from(this.F).toString()+this.offset+this.max));return this.id}la(){return{r:this.G,qp:this.C.map(a=>a.la()),lv:Array.from(this.F),s:this.source,lp:{m:this.max,o:this.offset}}}};olympe.dc.gb.prototype.executeFromCache=olympe.dc.gb.prototype.Ic;
511
- olympe.dc.gb.prototype.observe=olympe.dc.gb.prototype.observe;olympe.dc.gb.prototype.execute=olympe.dc.gb.prototype.jb;olympe.dc.gb.prototype.sortBy=olympe.dc.gb.prototype.Yk;olympe.dc.gb.prototype.limit=olympe.dc.gb.prototype.limit;olympe.dc.gb.prototype.cast=olympe.dc.gb.prototype.Xi;olympe.dc.gb.prototype.filter=olympe.dc.gb.prototype.filter;olympe.dc.gb.prototype.andReturn=olympe.dc.gb.prototype.Bf;olympe.dc.gb.prototype.followRecursively=olympe.dc.gb.prototype.Pm;
512
- olympe.dc.gb.prototype.follow=olympe.dc.gb.prototype.rb;olympe.dc.gb.instancesOf=olympe.dc.gb.Lk;olympe.dc.gb.from=olympe.dc.gb.from;function De(a){const b=olympe.dc.Ja();switch(a.t){case 1:return(a=ve(a.p))?new olympe.dc.ba.Gb.rc(a):null;case 2:return new olympe.dc.ba.Gb.hf(b,new olympe.dc.query.Relation(a.r.t,a.r.d,!1));case 3:var c=a.s;return new olympe.dc.ba.Gb.jf(b,new olympe.dc.query.Relation(a.r.t,a.r.d,!0),c);case 4:return c=a.o,new olympe.dc.ba.Gb.Mh(b,new olympe.dc.ua.Property(a.p),c);default:return null}}olympe.dc.ba.gk=class{la(){}F(){}jb(){}observe(){}toString(){}};function Ge(a){return a.G.map(b=>a.F.get(a.C[b]))}function He(a){return a.L.map(b=>{b=b.split('.');return 1===b.length?b[0]:b})}function Ie(a){a=Array.from(a.F.values()).flat();return new Set(a.map(b=>b.T()))}function Je(a){return new Set(a.L.flatMap(b=>b.split('.')))}
513
- function Ke(a,b){var c=olympe.dc.Ja();if(c.Db(a)){b.F(a,c.dd(a,!0),0);b.Ta(olympe.dc.jc.Tc,a,c.model(a),0);for(const [d,e,f]of Jd(c,a))(c=b.Lf(f))&&c.re()&&(e===olympe.dc.Ca.DESTINATION?b.Ta(d,a,f,0):b.Ta(d,f,a,0))}else olympe.ra.Ya('Query Result').error(`Fail to serialize instance with tag ${a} not present in local DBView`)}
508
+ olympe.dc.gb=class{constructor(a,b=null,c=[],d=new Set,e={max:-1,offset:0}){this.db=olympe.dc.Ja();this.G=olympe.dc.za(a);this.source=b;this.C=c;this.F=d;this.max=-1===e.max?-1:e.max;this.offset=e.offset;this.id=null}static from(a,b){return new olympe.dc.gb(a,b)}static Kk(a,b=olympe.dc.Ha.ic){return(new olympe.dc.gb(a,b)).rb(olympe.dc.CloudObject.instancesRel)}rb(a){const b=Array.from(this.C);b.push(new olympe.dc.ba.Gb.hf(this.db,a));return we(this,b)}Om(a,b=!1){const c=Array.from(this.C);c.push(new olympe.dc.ba.Gb.jf(this.db,
509
+ a,b));return we(this,c)}Bf(){this.F.add(xe(this));return new olympe.dc.gb(this.G,this.source,this.C,this.F,{max:this.max,offset:this.offset})}filter(a){const b=Array.from(this.C);b.push(new olympe.dc.ba.Gb.rc(a));return we(this,b)}Xi(){return this}limit(a,b=0){return new olympe.dc.gb(this.G,this.source,this.C,this.F,{max:a,offset:b})}Xk(a,b=olympe.dc.ba.dk.ASC){const c=Array.from(this.C);c.push(new olympe.dc.ba.Gb.Mh(this.db,a,b));return we(this,c)}jb(a){return Ee(olympe.dc.Nf(),ye(this),'function'===
510
+ typeof a.Sa?a.C.C:a)}observe(a){return Fe(olympe.dc.Nf(),ye(this),'function'===typeof a.Sa?a.C.C:a)}Ic(){var a=ye(this);return olympe.dc.Nf().R.Ic(a)}Z(){null===this.id&&(this.id=olympe.X.ob(this.G+this.C.reduce((a,b)=>a+b.toString(),'')+Array.from(this.F).toString()+this.offset+this.max));return this.id}la(){return{r:this.G,qp:this.C.map(a=>a.la()),lv:Array.from(this.F),s:this.source,lp:{m:this.max,o:this.offset}}}};olympe.dc.gb.prototype.executeFromCache=olympe.dc.gb.prototype.Ic;
511
+ olympe.dc.gb.prototype.observe=olympe.dc.gb.prototype.observe;olympe.dc.gb.prototype.execute=olympe.dc.gb.prototype.jb;olympe.dc.gb.prototype.sortBy=olympe.dc.gb.prototype.Xk;olympe.dc.gb.prototype.limit=olympe.dc.gb.prototype.limit;olympe.dc.gb.prototype.cast=olympe.dc.gb.prototype.Xi;olympe.dc.gb.prototype.filter=olympe.dc.gb.prototype.filter;olympe.dc.gb.prototype.andReturn=olympe.dc.gb.prototype.Bf;olympe.dc.gb.prototype.followRecursively=olympe.dc.gb.prototype.Om;
512
+ olympe.dc.gb.prototype.follow=olympe.dc.gb.prototype.rb;olympe.dc.gb.instancesOf=olympe.dc.gb.Kk;olympe.dc.gb.from=olympe.dc.gb.from;function De(a){const b=olympe.dc.Ja();switch(a.t){case 1:return(a=ve(a.p))?new olympe.dc.ba.Gb.rc(a):null;case 2:return new olympe.dc.ba.Gb.hf(b,new olympe.dc.query.Relation(a.r.t,a.r.d,!1));case 3:var c=a.s;return new olympe.dc.ba.Gb.jf(b,new olympe.dc.query.Relation(a.r.t,a.r.d,!0),c);case 4:return c=a.o,new olympe.dc.ba.Gb.Mh(b,new olympe.dc.ua.Property(a.p),c);default:return null}}olympe.dc.ba.fk=class{la(){}F(){}jb(){}observe(){}toString(){}};function Ge(a){return a.G.map(b=>a.F.get(a.C[b]))}function He(a){return a.L.map(b=>{b=b.split('.');return 1===b.length?b[0]:b})}function Ie(a){a=Array.from(a.F.values()).flat();return new Set(a.map(b=>b.T()))}function Je(a){return new Set(a.L.flatMap(b=>b.split('.')))}
513
+ function Ke(a,b){var c=olympe.dc.Ja();if(c.Db(a)){b.F(a,c.dd(a,!0),0);b.Ua(olympe.dc.jc.Tc,a,c.model(a),0);for(const [d,e,f]of Jd(c,a))(c=b.Lf(f))&&c.re()&&(e===olympe.dc.Ca.DESTINATION?b.Ua(d,a,f,0):b.Ua(d,f,a,0))}else olympe.ra.Ya('Query Result').error(`Fail to serialize instance with tag ${a} not present in local DBView`)}
514
514
  function Le(a,b,c=olympe.dc.Ha.Mc){b&&b((new olympe.dc.X.Ii(c)).C(a.p||[]));const d=olympe.dc.Ja();let e=!1;b=a.k.map(f=>{const g=f.split('.').map(h=>d.Db(h)?olympe.dc.CloudObject.get(h):(olympe.ra.Ya('QueryResult').error(`CloudObject with tag ${h} not present but required for deserialization`),e=!0,null));return[f,1===g.length?g[0]:g]});return e?null:olympe.dc.Xa.create(b,a.a,a.r)}
515
515
  olympe.dc.Xa=class{constructor(){this.C=[];this.F=new Map;this.G=[];this.L=[];this.hash=''}static empty(){return new olympe.dc.Xa}[Symbol.iterator](){let a=0;return{next:()=>{var b={done:!0};a<this.C.length&&(b=this.C[a],b={value:[b,this.F.get(b)],done:!1},a++);return b}}}entries(){return this.C.map(a=>[a,this.F.get(a)])}values(){return this.F.values()}keys(){return this.C.values()}df(){return this.C.map(a=>this.F.get(a))}size(){return this.C.length}has(a){return this.F.has(a)||this.df().includes(a)}indexOf(a){return null===
516
516
  a||void 0===a?-1:'string'===typeof a?this.C.indexOf(a):this.df().indexOf(a)}get(a){return(a=this.F.get(a))?a:null}Pc(){return this.qe(0)}qe(a){return a<this.C.length?this.F.get(this.C[a]):null}push(...a){const b=this.df();b.push(...a);return b}pop(){if(0===this.C.length)return[];const a=this.df();a.pop();return a}shift(){if(0<this.C.length){const a=this.df();a.shift();return a}return[]}filter(a){return this.df().filter(a)}find(a){return(a=this.df().find(a))?a:null}forEach(a){this.C.forEach((b,c)=>
517
517
  a(this.F.get(b),c))}map(a){return this.df().map(a)}sort(a){const b=this.entries().sort((c,d)=>a(c[1],d[1]));return olympe.dc.Xa.create(b,Array.from(this.G),Array.from(this.L))}reduce(a,b){return this.df().reduce(a,b)}concat(...a){const b=[this.entries(),...a.map(d=>d.entries())].flat();let c=Array.from(this.G);for(const d of a)c=c.concat(d.G.map(e=>e+c.length));a=this.L.concat(...a.map(d=>d.L));return olympe.dc.Xa.create(b,c,a)}static from(a,b){const c=olympe.dc.Ja();var d=Me(b);if(b.Id){const {kb:k,
518
- order:l,Id:n,Hv:p}=b.Id,q=Array.from(b.G).sort().indexOf(p),r=l===olympe.dc.ba.ek.ASC?1:-1;d.sort((t,u)=>{u=u[q];t=c.cb(t[q],k);u=c.cb(u,k);return null===t?-r:null===u?r:r*n(t,u)})}else d.sort((k,l)=>k.reduce((n,p,q)=>n||p.localeCompare(l[q]),0));0<b.offset&&(d=d.slice(b.offset));-1<b.max&&(d=d.slice(0,b.max));b=olympe.X.ob(d.flat().join(''));if(b===a.hash)return a;d=d.map(k=>[k.join('.'),1===k.length?olympe.dc.CloudObject.get(k[0]):k.map(l=>olympe.dc.CloudObject.get(l))]);const e=new Set(d.map(k=>
518
+ order:l,Id:n,Gv:p}=b.Id,q=Array.from(b.G).sort().indexOf(p),r=l===olympe.dc.ba.dk.ASC?1:-1;d.sort((t,u)=>{u=u[q];t=c.cb(t[q],k);u=c.cb(u,k);return null===t?-r:null===u?r:r*n(t,u)})}else d.sort((k,l)=>k.reduce((n,p,q)=>n||p.localeCompare(l[q]),0));0<b.offset&&(d=d.slice(b.offset));-1<b.max&&(d=d.slice(0,b.max));b=olympe.X.ob(d.flat().join(''));if(b===a.hash)return a;d=d.map(k=>[k.join('.'),1===k.length?olympe.dc.CloudObject.get(k[0]):k.map(l=>olympe.dc.CloudObject.get(l))]);const e=new Set(d.map(k=>
519
519
  k[0])),f=new Set(a.keys()),g=[],h=[];d.forEach(([k],l)=>{!f.has(k)&&g.push(l)});f.forEach(k=>{!e.has(k)&&h.push(k)});return olympe.dc.Xa.create(d,g,h,b)}static create(a,b,c,d){const e=new olympe.dc.Xa;e.C=a.map(f=>f[0]);e.F=new Map(a);e.hash=d||olympe.X.ob(e.C.join(''));e.G=b||e.C.map((f,g)=>g);e.L=c||[];return e}la(){const a=new olympe.dc.db.uc;var b=new Set(this.G.flatMap(c=>this.C[c].split('.')));for(const c of b)Ke(c,a);b=new olympe.dc.transaction.td;a.Nc(b);return{k:this.C,p:ie(b),a:this.G,r:this.L}}};
520
520
  olympe.dc.Xa.prototype.concat=olympe.dc.Xa.prototype.concat;olympe.dc.Xa.prototype.reduce=olympe.dc.Xa.prototype.reduce;olympe.dc.Xa.prototype.sort=olympe.dc.Xa.prototype.sort;olympe.dc.Xa.prototype.map=olympe.dc.Xa.prototype.map;olympe.dc.Xa.prototype.forEach=olympe.dc.Xa.prototype.forEach;olympe.dc.Xa.prototype.find=olympe.dc.Xa.prototype.find;olympe.dc.Xa.prototype.filter=olympe.dc.Xa.prototype.filter;olympe.dc.Xa.prototype.shift=olympe.dc.Xa.prototype.shift;olympe.dc.Xa.prototype.pop=olympe.dc.Xa.prototype.pop;
521
521
  olympe.dc.Xa.prototype.push=olympe.dc.Xa.prototype.push;olympe.dc.Xa.prototype.getAt=olympe.dc.Xa.prototype.qe;olympe.dc.Xa.prototype.getFirst=olympe.dc.Xa.prototype.Pc;olympe.dc.Xa.prototype.get=olympe.dc.Xa.prototype.get;olympe.dc.Xa.prototype.indexOf=olympe.dc.Xa.prototype.indexOf;olympe.dc.Xa.prototype.has=olympe.dc.Xa.prototype.has;olympe.dc.Xa.prototype.size=olympe.dc.Xa.prototype.size;olympe.dc.Xa.prototype.toArray=olympe.dc.Xa.prototype.df;olympe.dc.Xa.prototype.keys=olympe.dc.Xa.prototype.keys;
522
- olympe.dc.Xa.prototype.values=olympe.dc.Xa.prototype.values;olympe.dc.Xa.prototype.entries=olympe.dc.Xa.prototype.entries;olympe.dc.Xa.empty=olympe.dc.Xa.empty;function Me(a){var b=new Set(X(a,a.Ag()-1).keys());a.C.push((new Map).set('sink',b));b=[];for(const c of Ne(a,'sink',a.Ag()-1,''))b.push(c.slice(0,-1).split(';'));a.C.pop();return b}function Oe(a,b,c,d,e){a.Id={Id:b,Hv:c,order:d,kb:e}}function Pe(a){a.F||(a.F=!0)}function X(a,b){return b>=a.Ag()?new Map:a.C[b]}
522
+ olympe.dc.Xa.prototype.values=olympe.dc.Xa.prototype.values;olympe.dc.Xa.prototype.entries=olympe.dc.Xa.prototype.entries;olympe.dc.Xa.empty=olympe.dc.Xa.empty;function Me(a){var b=new Set(X(a,a.Ag()-1).keys());a.C.push((new Map).set('sink',b));b=[];for(const c of Ne(a,'sink',a.Ag()-1,''))b.push(c.slice(0,-1).split(';'));a.C.pop();return b}function Oe(a,b,c,d,e){a.Id={Id:b,Gv:c,order:d,kb:e}}function Pe(a){a.F||(a.F=!0)}function X(a,b){return b>=a.Ag()?new Map:a.C[b]}
523
523
  function Ne(a,b,c,d){if(0===c)return a.G.has(c)?(b=Array.from(X(a,0).keys())[0],(new Set).add(`${b};${d}`)):(new Set).add(d);const e=Qe(a,b,c),f=a.G.has(c)?`${b};${d}`:d;return e.reduce((g,h)=>{for(const k of Ne(a,h,c-1,f))g.add(k);return g},new Set)}function Qe(a,b,c){return 0===c?null:(a=X(a,c))&&a.has(b)?Array.from(a.get(b)):null}function Re(a,b,c,d){X(a,c+1).forEach((e,f)=>{e.has(d)&&a.remove(f,c+1,b)});X(a,c).delete(d);Pe(a)}
524
- olympe.dc.ba.gq=class{constructor(a){this.C=Array.from({length:xe(a)+1},()=>new Map);this.G=new Set(Array.from(a.F));this.Id=null;this.F=!1;this.max=a.max;this.offset=a.offset}Ag(){return this.C.length}insert(a,b,c){var d=X(this,b);if(0<b&&(null===c||!X(this,b-1).has(c)))return olympe.ra.Ya('dc').error('Try to insert result entry linked to a non existing parent'),null;if(d.has(a)&&null!==c)return a=d.get(a),d=a.size,a.add(c),a.size>d&&Pe(this),!1;if(b>=this.Ag())return olympe.ra.Ya('dc').error('Try to insert result entry to a higher level than possible'),
524
+ olympe.dc.ba.fq=class{constructor(a){this.C=Array.from({length:xe(a)+1},()=>new Map);this.G=new Set(Array.from(a.F));this.Id=null;this.F=!1;this.max=a.max;this.offset=a.offset}Ag(){return this.C.length}insert(a,b,c){var d=X(this,b);if(0<b&&(null===c||!X(this,b-1).has(c)))return olympe.ra.Ya('dc').error('Try to insert result entry linked to a non existing parent'),null;if(d.has(a)&&null!==c)return a=d.get(a),d=a.size,a.add(c),a.size>d&&Pe(this),!1;if(b>=this.Ag())return olympe.ra.Ya('dc').error('Try to insert result entry to a higher level than possible'),
525
525
  null;b=new Set;null!==c&&b.add(c);d.set(a,b);Pe(this);return!0}remove(a,b,c){var d=X(this,b);if(!d.has(a))return!0;if(0<b&&(null===c||!X(this,b-1).has(c)))return olympe.ra.Ya('dc').error('Try to remove result entry linked to a non existing parent'),null;d=d.get(a);c&&d.delete(c);if(1>d.size)return Re(this,a,b,a),!0;Pe(this);return!1}};olympe.dc.kd=class{constructor(a){this.query=a}static from(a){return new olympe.dc.kd(olympe.dc.gb.from(a))}rb(a){return new olympe.dc.kd(this.query.rb(a))}Xi(){return this}jb(a){return this.query.jb(a).then(b=>{const c=b.size();return 1<c?(olympe.ra.Ya('dc').warn('a follow() on a QuerySingle has '+c+' results (0 or 1 expected) -> returns null'),null):b.Pc()||null})}Ic(){const a=this.query.Ic(),b=a.size();return 1<b?(olympe.ra.Ya('dc').warn('a follow() on a QuerySingle has '+b+' results (0 or 1 expected) -> returns null'),
526
526
  null):a.Pc()||null}};olympe.dc.kd.prototype.executeFromCache=olympe.dc.kd.prototype.Ic;olympe.dc.kd.prototype.execute=olympe.dc.kd.prototype.jb;olympe.dc.kd.prototype.cast=olympe.dc.kd.prototype.Xi;olympe.dc.kd.prototype.follow=olympe.dc.kd.prototype.rb;olympe.dc.ba.V={};olympe.dc.ba.V.Qd=class{constructor(...a){this.V=a}jb(a){return this.V.reduce((b,c)=>b&&c.jb(a),!0)}observe(a,b,c){const d=this.V.map(()=>!1),e=this.V.map(()=>null),f=(g,h)=>{d[h]=g;g=d.every(k=>k);e[h]!==g&&(e[h]=g,c(g))};this.V.forEach((g,h)=>{g.observe(a,olympe.X.ob('AND-'+b+a+h),k=>f(k,h))})}la(){return{pr:8,p:this.V.map(a=>a.la())}}toString(){return'And-'+this.V.reduce((a,b)=>a+'-'+b.toString(),'')}clear(a,b){this.V.forEach((c,d)=>{c.clear(a,olympe.X.ob('AND-'+b+a+d))})}};
527
527
  olympe.dc.ba.V.Qd.C=8;olympe.dc.ba.V.Qd.ma=[olympe.dc.ba.bb];olympe.dc.ba.V.Sc=class{constructor(a,b,c,d=!1){this.kb=olympe.dc.za(a);this.substring=b;this.db=c;this.C=d}cb(){return this.kb}jb(a){return this.apply(this.db.cb(a,this.kb))}observe(a,b,c){Fd(this.db,a,this.kb,d=>{c(this.apply(d))},olympe.X.ob(b+a+this.toString()))}apply(a){return'string'===typeof a?this.C?a.includes(this.substring):a.toLowerCase().includes(this.substring.toLowerCase()):!1}toString(){return'Contains'+this.kb+'-'+this.substring+'-'+this.C}clear(a,b){this.db.F(a,this.kb,olympe.X.ob(b+
@@ -530,493 +530,493 @@ this.C}toString(){return'Equals-'+this.kb+'-'+this.C.toString()}cb(){return this
530
530
  olympe.dc.ba.V.Ah=class{constructor(a,b,c=!0,d=!0){this.db=olympe.dc.Ja();this.kb=olympe.dc.za(a);this.C='number'===typeof b?b:olympe.dc.za(b);this.F=c;this.G=d}cb(){return this.kb}jb(a){return Se(this,this.db.cb(a,this.kb),Te(this,a))}observe(a,b,c){'string'===typeof this.C&&Fd(this.db,a,this.C,d=>{const e=this.db.cb(a,this.kb);null!==e&&c(Se(this,e,d))},Ue(this,a,b));Fd(this.db,a,this.kb,d=>{const e=Te(this,a);c(null!==e?Se(this,d,e):!0)},Ue(this,a,b))}clear(a,b){this.db.F(a,this.kb,Ue(this,a,b));
531
531
  'string'===typeof this.C&&this.db.F(a,this.C,Ue(this,a,b))}la(){return{pr:3,p:this.kb,b:this.C,l:this.F,s:this.G}}toString(){return'GreaterThan-'+this.kb+'-'+this.G+'-'+this.C}};olympe.dc.ba.V.Ah.C=3;olympe.dc.ba.V.Ah.ma=[olympe.dc.ba.bb];olympe.dc.ba.V.jd=class{constructor(a){this.C=a}jb(a){return!this.C.jb(a)}observe(a,b,c){let d=null;this.C.observe(a,olympe.X.ob('NOT'+b+a),e=>{!e!==d&&(d=!e,c(d))})}la(){return{pr:4,v:this.C.la()}}toString(){return`NOT-${this.C.toString()}`}clear(a,b){this.C.clear(a,olympe.X.ob('NOT'+b+a))}};olympe.dc.ba.V.jd.C=4;olympe.dc.ba.V.jd.ma=[olympe.dc.ba.bb];olympe.dc.ba.V.Zd=class{constructor(...a){this.V=a}jb(a){return this.V.reduce((b,c)=>b||c.jb(a),!1)}observe(a,b,c){const d=this.V.map(()=>!1),e=this.V.map(()=>null),f=(g,h)=>{d[h]=g;g=d.some(k=>k);e[h]!==g&&(e[h]=g,c(g))};this.V.forEach((g,h)=>{g.observe(a,olympe.X.ob('OR-'+b+a+h),k=>f(k,h))})}la(){return{pr:7,p:this.V.map(a=>a.la())}}toString(){return'And-'+this.V.reduce((a,b)=>a.toString()+'-'+b.toString(),'')}clear(a,b){this.V.forEach((c,d)=>{c.clear(a,olympe.X.ob('OR-'+b+a+d))})}};
532
532
  olympe.dc.ba.V.Zd.C=7;olympe.dc.ba.V.Zd.ma=[olympe.dc.ba.bb];olympe.dc.ba.V.ud=class{constructor(a,b,c,d=!0){this.kb=olympe.dc.za(a);this.C=RegExp('');try{this.C=new RegExp(b)}catch(e){if(!(e instanceof SyntaxError))throw e;}this.db=c;this.F=d}cb(){return this.kb}jb(a){return this.apply(this.db.cb(a,this.kb))}observe(a,b,c){Fd(this.db,a,this.kb,d=>{c(this.apply(d))},olympe.X.ob(b+a+this.toString()))}apply(a){return'string'===typeof a?this.F?this.C.test(a):this.C.test(a.toLowerCase()):!1}toString(){return'Regex'+this.kb+'-'+this.C.toString()+'-'+this.F}la(){return{pr:5,
533
- p:this.kb,r:this.C.source,c:this.F}}clear(a,b){this.db.F(a,this.kb,olympe.X.ob(b+a+this.toString()))}};olympe.dc.ba.V.ud.C=5;olympe.dc.ba.V.ud.ma=[olympe.dc.ba.bb];olympe.dc.ba.V.Ee=class{constructor(a){this.db=olympe.dc.Ja();this.Oa=[];this.recursive=[];this.destination=a?olympe.dc.za(a):null}ed(){return Array.from(this.Oa)}clear(a,b){0<this.Oa.length&&this.db.C(a,this.Oa[0],olympe.X.ob(b+0+a))}rb(a){this.Oa.push(a);this.recursive.push(!1);return this}Dk(a){this.Oa.push(a);this.recursive.push(!0);return this}jb(a){if(1>this.Oa.length)return olympe.ra.Ya('dc').error('RelatedTo executed with less than 1 relation'),!1;let b=[];const c=this.destination||'',d=(e,
533
+ p:this.kb,r:this.C.source,c:this.F}}clear(a,b){this.db.F(a,this.kb,olympe.X.ob(b+a+this.toString()))}};olympe.dc.ba.V.ud.C=5;olympe.dc.ba.V.ud.ma=[olympe.dc.ba.bb];olympe.dc.ba.V.Ee=class{constructor(a){this.db=olympe.dc.Ja();this.Oa=[];this.recursive=[];this.destination=a?olympe.dc.za(a):null}ed(){return Array.from(this.Oa)}clear(a,b){0<this.Oa.length&&this.db.C(a,this.Oa[0],olympe.X.ob(b+0+a))}rb(a){this.Oa.push(a);this.recursive.push(!1);return this}Ck(a){this.Oa.push(a);this.recursive.push(!0);return this}jb(a){if(1>this.Oa.length)return olympe.ra.Ya('dc').error('RelatedTo executed with less than 1 relation'),!1;let b=[];const c=this.destination||'',d=(e,
534
534
  f,g,h)=>e?f?this.db.Pf(g,h,c):this.db.Pf(g,h):this.db.ub(g,h);for(let e=0;e<this.Oa.length;++e){const f=this.Oa[e],g=this.recursive[e],h=e===this.Oa.length-1;if(0===e)b=d(g,h,a,f);else if(b=b.flatMap(k=>d(g,h,k,f)),0===b.length)return!1}return c?b.includes(c):0<b.length}observe(a,b,c){const d=this.Oa.length;let e=0;const f=new Set,g=(k,l)=>{this.destination&&this.destination!==l||(e+=k?1:-1,1<e||c(0<e))},h=(k,l,n,p)=>{const q=this.Oa[k],r=this.recursive[k-1]?this.Oa[k-1]:null;l=olympe.X.ob(l+k+p);
535
- const t=olympe.X.ob(l+'rec');k===d?g(n,p):n?f.has(p)||(f.add(p),V(this.db,p,q,h.bind(this,k+1,l),l),r&&V(this.db,p,r,h.bind(this,k,t),t)):(f.delete(p),this.db.C(p,q,l),r&&this.db.C(p,r,t))};h(0,b,!0,a);0===e&&c(!1)}la(){return{pr:6,r:this.Oa.map((a,b)=>[a.T(),a.Ra(),this.recursive[b]]),d:this.destination}}toString(){const a=this.Oa.reduce((b,c,d)=>b+c.T()+this.recursive[d],'');return`RelatedTo-${this.destination}-${a}`}};olympe.dc.ba.V.Ee.prototype.followRecursive=olympe.dc.ba.V.Ee.prototype.Dk;
535
+ const t=olympe.X.ob(l+'rec');k===d?g(n,p):n?f.has(p)||(f.add(p),V(this.db,p,q,h.bind(this,k+1,l),l),r&&V(this.db,p,r,h.bind(this,k,t),t)):(f.delete(p),this.db.C(p,q,l),r&&this.db.C(p,r,t))};h(0,b,!0,a);0===e&&c(!1)}la(){return{pr:6,r:this.Oa.map((a,b)=>[a.T(),a.Ra(),this.recursive[b]]),d:this.destination}}toString(){const a=this.Oa.reduce((b,c,d)=>b+c.T()+this.recursive[d],'');return`RelatedTo-${this.destination}-${a}`}};olympe.dc.ba.V.Ee.prototype.followRecursive=olympe.dc.ba.V.Ee.prototype.Ck;
536
536
  olympe.dc.ba.V.Ee.prototype.follow=olympe.dc.ba.V.Ee.prototype.rb;olympe.dc.ba.V.Ee.C=6;olympe.dc.ba.V.Ee.ma=[olympe.dc.ba.bb];olympe.dc.ba.Gb={};olympe.dc.ba.Gb.rc=class{constructor(a){this.C=a}F(a){return a}jb(a,b){for(const c of X(a,b).keys())this.C.jb(c)||(0===b?a.remove(c,b,null):Qe(a,c,b).forEach(d=>{a.remove(c,b,d)}))}observe(a,b,c){let d=!1;return(e,f,g,h)=>{const k=olympe.X.ob(h+f+this.toString());e?this.C.observe(f,k,l=>{d||(l?a.insert(f,b,g):a.remove(f,b,g),c(l,f,g,k))}):(d=!0,this.C.clear(f,k),d=!1,c(!1,f,g,k))}}la(){return{t:1,p:this.C.la()}}toString(){return'filterQueryPart-'+this.C.toString()}};olympe.dc.ba.Gb.rc.C=1;
537
- olympe.dc.ba.Gb.rc.ma=[olympe.dc.ba.gk];olympe.dc.ba.Gb.hf=class{constructor(a,b){this.db=a;this.C=b}Nd(){return this.C}F(a){return a+1}jb(a,b){for(const c of X(a,b).keys())this.db.ub(c,this.C).forEach(d=>{a.insert(d,b+1,c)})}observe(a,b,c){return(d,e,f,g)=>{const h=olympe.X.ob(g+e+this.toString());d?V(this.db,e,this.C,(k,l)=>{(k?a.insert(l,b+1,e):a.remove(l,b+1,e))&&c(k,l,e,h)},h):this.db.C(e,this.C,h)}}la(){return{t:2,r:{t:this.C.T(),d:this.C.Ra()}}}toString(){return'followQueryPart-'+this.C.Ra()+this.C.T()}};olympe.dc.ba.Gb.hf.C=2;
538
- olympe.dc.ba.Gb.hf.ma=[olympe.dc.ba.gk];olympe.dc.ba.Gb.jf=class{constructor(a,b,c=!1){this.db=a;this.C=b;this.G=c}Nd(){return this.C}F(a){return a+1}jb(a,b){for(const c of X(a,b).keys())this.G&&a.insert(c,b+1,c),this.db.Pf(c,this.C).forEach(d=>{a.insert(d,b+1,c)})}observe(a,b,c){const d=(g,h,k,l)=>olympe.X.ob(g+h+k+l+this.toString()),e=new Set,f=(g,h,k,l,n)=>{h=d(h,g,n,k);(this.G||0<k)&&(l?a.insert(n,b+1,g):a.remove(n,b+1,g))&&c(l,n,g,h);l?e.has(n)||(e.add(n),V(this.db,n,this.C,f.bind(this,g,h,k+1),h)):(e.delete(n),this.db.C(n,this.C,
539
- h))};return(g,h,k,l)=>f(h,l,0,g,h)}la(){return{t:3,s:this.G,r:{t:this.C.T(),d:this.C.Ra()}}}toString(){return'followRecursivelyQueryPart-'+this.C.Ra()+this.C.T()}};olympe.dc.ba.Gb.jf.C=3;olympe.dc.ba.Gb.jf.ma=[olympe.dc.ba.gk];function Ve(a){a=a.db.fc(a.kb,olympe.dm.Property.typeRel);const b=olympe.dc.za;if(a===b(olympe.dm.String))return We((c,d)=>c.localeCompare(d));if(a===b(olympe.dm.Number)||a===b(olympe.dm.Boolean))return We((c,d)=>c-d);if(a===b(olympe.dm.DateTime))return We((c,d)=>c.getTime()-d.getTime());olympe.ra.Ya('dc').warn(`No comparator found for type with tag ${a}`);return We(()=>-1)}function We(a){return(b,c)=>{const d=null===b,e=null===c;return d||e?d&&e?0:d?1:-1:a(b,c)}}
540
- olympe.dc.ba.Gb.Mh=class{constructor(a,b,c){this.db=a;this.kb=b;this.order=c}F(a){return a}jb(a,b){Oe(a,Ve(this),b,this.order,this.kb)}observe(a,b,c){Oe(a,Ve(this),b,this.order,this.kb);return(d,e,f,g)=>{g=olympe.X.ob(g+this.toString());d?Fd(this.db,e,this.kb,()=>{Pe(a)},g):this.db.F(e,this.kb,g);c(d,e,f,g)}}la(){return{t:4,p:this.kb.T(),o:this.order}}toString(){return'sortByQueryPart-'+this.order+this.kb.T()}cb(){return this.kb}};olympe.dc.ba.Gb.Mh.C=4;olympe.dc.ba.Gb.Mh.ma=[olympe.dc.ba.gk];olympe.dc.query={};function Xe(a,b,c,d){let e=a.C.get(b);void 0===e&&(e=new Set,a.C.set(b,e));a=olympe.X.ec();e.add(a);d.set(a,c)}function Ye(a,b,c){Xe(a,b,c,a.F)}function Ze(a,b,c){if(a.C.has(b)){for(const d of a.C.get(b))c.delete(d);a.C.delete(b)}}function $e(a,b,c,d,e){if(a.C.has(b)){if(!a.L.has(b)){a.L.add(b);for(const f of a.C.get(b))e=d.get(f),d.delete(f),c instanceof olympe.dc.query.errors.Rj?e(Error(c.da()),c):'string'===typeof c?e(Error(c),null):e(null,c);a.C.delete(b);a.L.delete(b)}}else a.N.warn(e)}
541
- function af(a,b,c){$e(a,b,c,a.F,`Graph result of graphdef ${b} has no associated handler in the datacloud`)}function bf(a,b,c){Xe(a,b,c,a.G)}olympe.dc.query.Bs=class{constructor(a){this.N=a;this.C=new Map;this.F=new Map;this.G=new Map;this.L=new Set}};olympe.dc.Me=class{na(){}L(){}G(){}R(){}la(){}toString(){}};olympe.dc.Cd={SUBSCRIBE:0,Ji:1,$l:2,mB:0,GET:1};olympe.dc.Cd.toString=function(a){for(const [b,c]of Object.entries(olympe.dc.Cd))if(c===a)return b;return null};function Ae(a,b=1){a.validate(olympe.dc.Qb.NONE,'back');let c=a.W;for(let d=0;d<b&&null!==c;d++)c=a.F.get(c.G)||null;a.W=c}function cf(a){return'not_defined'===a.C?olympe.dc.Qb.NONE:a.C}function df(a,b){a.validate(b,'activateFollowRules');return a}function ef(a){return'not_defined'!==a.C&&a.C!==olympe.dc.Qb.NONE}
537
+ olympe.dc.ba.Gb.rc.ma=[olympe.dc.ba.fk];olympe.dc.ba.Gb.hf=class{constructor(a,b){this.db=a;this.C=b}Nd(){return this.C}F(a){return a+1}jb(a,b){for(const c of X(a,b).keys())this.db.ub(c,this.C).forEach(d=>{a.insert(d,b+1,c)})}observe(a,b,c){return(d,e,f,g)=>{const h=olympe.X.ob(g+e+this.toString());d?V(this.db,e,this.C,(k,l)=>{(k?a.insert(l,b+1,e):a.remove(l,b+1,e))&&c(k,l,e,h)},h):this.db.C(e,this.C,h)}}la(){return{t:2,r:{t:this.C.T(),d:this.C.Ra()}}}toString(){return'followQueryPart-'+this.C.Ra()+this.C.T()}};olympe.dc.ba.Gb.hf.C=2;
538
+ olympe.dc.ba.Gb.hf.ma=[olympe.dc.ba.fk];olympe.dc.ba.Gb.jf=class{constructor(a,b,c=!1){this.db=a;this.C=b;this.G=c}Nd(){return this.C}F(a){return a+1}jb(a,b){for(const c of X(a,b).keys())this.G&&a.insert(c,b+1,c),this.db.Pf(c,this.C).forEach(d=>{a.insert(d,b+1,c)})}observe(a,b,c){const d=(g,h,k,l)=>olympe.X.ob(g+h+k+l+this.toString()),e=new Set,f=(g,h,k,l,n)=>{h=d(h,g,n,k);(this.G||0<k)&&(l?a.insert(n,b+1,g):a.remove(n,b+1,g))&&c(l,n,g,h);l?e.has(n)||(e.add(n),V(this.db,n,this.C,f.bind(this,g,h,k+1),h)):(e.delete(n),this.db.C(n,this.C,
539
+ h))};return(g,h,k,l)=>f(h,l,0,g,h)}la(){return{t:3,s:this.G,r:{t:this.C.T(),d:this.C.Ra()}}}toString(){return'followRecursivelyQueryPart-'+this.C.Ra()+this.C.T()}};olympe.dc.ba.Gb.jf.C=3;olympe.dc.ba.Gb.jf.ma=[olympe.dc.ba.fk];function Ve(a){a=a.db.fc(a.kb,olympe.dm.Property.typeRel);const b=olympe.dc.za;if(a===b(olympe.dm.String))return We((c,d)=>c.localeCompare(d));if(a===b(olympe.dm.Number)||a===b(olympe.dm.Boolean))return We((c,d)=>c-d);if(a===b(olympe.dm.DateTime))return We((c,d)=>c.getTime()-d.getTime());olympe.ra.Ya('dc').warn(`No comparator found for type with tag ${a}`);return We(()=>-1)}function We(a){return(b,c)=>{const d=null===b,e=null===c;return d||e?d&&e?0:d?1:-1:a(b,c)}}
540
+ olympe.dc.ba.Gb.Mh=class{constructor(a,b,c){this.db=a;this.kb=b;this.order=c}F(a){return a}jb(a,b){Oe(a,Ve(this),b,this.order,this.kb)}observe(a,b,c){Oe(a,Ve(this),b,this.order,this.kb);return(d,e,f,g)=>{g=olympe.X.ob(g+this.toString());d?Fd(this.db,e,this.kb,()=>{Pe(a)},g):this.db.F(e,this.kb,g);c(d,e,f,g)}}la(){return{t:4,p:this.kb.T(),o:this.order}}toString(){return'sortByQueryPart-'+this.order+this.kb.T()}cb(){return this.kb}};olympe.dc.ba.Gb.Mh.C=4;olympe.dc.ba.Gb.Mh.ma=[olympe.dc.ba.fk];olympe.dc.query={};function Xe(a,b,c,d){let e=a.C.get(b);void 0===e&&(e=new Set,a.C.set(b,e));a=olympe.X.ec();e.add(a);d.set(a,c)}function Ye(a,b,c){Xe(a,b,c,a.F)}function Ze(a,b,c){if(a.C.has(b)){for(const d of a.C.get(b))c.delete(d);a.C.delete(b)}}function $e(a,b,c,d,e){if(a.C.has(b)){if(!a.L.has(b)){a.L.add(b);for(const f of a.C.get(b))e=d.get(f),d.delete(f),c instanceof olympe.dc.query.errors.Qj?e(Error(c.da()),c):'string'===typeof c?e(Error(c),null):e(null,c);a.C.delete(b);a.L.delete(b)}}else a.N.warn(e)}
541
+ function af(a,b,c){$e(a,b,c,a.F,`Graph result of graphdef ${b} has no associated handler in the datacloud`)}function bf(a,b,c){Xe(a,b,c,a.G)}olympe.dc.query.As=class{constructor(a){this.N=a;this.C=new Map;this.F=new Map;this.G=new Map;this.L=new Set}};olympe.dc.Me=class{na(){}L(){}G(){}R(){}la(){}toString(){}};olympe.dc.Cd={SUBSCRIBE:0,Ji:1,Zl:2,lB:0,GET:1};olympe.dc.Cd.toString=function(a){for(const [b,c]of Object.entries(olympe.dc.Cd))if(c===a)return b;return null};function Ae(a,b=1){a.validate(olympe.dc.Qb.NONE,'back');let c=a.W;for(let d=0;d<b&&null!==c;d++)c=a.F.get(c.G)||null;a.W=c}function cf(a){return'not_defined'===a.C?olympe.dc.Qb.NONE:a.C}function df(a,b){a.validate(b,'activateFollowRules');return a}function ef(a){return'not_defined'!==a.C&&a.C!==olympe.dc.Qb.NONE}
542
542
  function ff(a){if(ef(a))throw Error('An implicit GraphDef has no blocks');return a.F.values()}
543
- function gf(a,b,c){c=new olympe.dc.query.Relation(b.T(),b.Ra(),c||b instanceof olympe.dc.Y.Bc);b=[];var d;for(var e of hf(a)){if(d=a.F.get(e)){var f=new olympe.dc.query.Qj(c,d.id);d.F.has(f.Z())?d=d.F.get(f.Z()):(d.F.set(f.Z(),f),d=f)}else{d=a;var g=c;const h=olympe.X.ob(d.G);f=olympe.X.ob(h+g.toString());g=d.F.get(f)||new olympe.dc.query.Qj(g,h);d.R.set(f,g);d=g}f=d.Z();a.F.set(f,d);b.push(f)}e=b[0];a.ja.set(e,b);return a.F.get(e)}
544
- function jf(a,b){if(ef(a))a.$.push(b);else throw Error('You cannot add a "skip predicate" to an explicit graphdef. Please activate a follow rule first.');return a}function kf(a,b){a.da=b;return a}function lf(a){const b=new olympe.dc.kf(a.G,a.L);b.C=a.C;for(const [c,d]of a.R)b.R.set(c,d);for(const [c,d]of a.F)b.F.set(c,d);b.da=a.da;b.$=[...a.$];return b}function mf(a,b){return ef(a)?new olympe.dc.query.Dl(lf(a),b||olympe.D.La()):new olympe.dc.query.Pj(lf(a),b||olympe.D.La())}
543
+ function gf(a,b,c){c=new olympe.dc.query.Relation(b.T(),b.Ra(),c||b instanceof olympe.dc.Y.Bc);b=[];var d;for(var e of hf(a)){if(d=a.F.get(e)){var f=new olympe.dc.query.Pj(c,d.id);d.F.has(f.Z())?d=d.F.get(f.Z()):(d.F.set(f.Z(),f),d=f)}else{d=a;var g=c;const h=olympe.X.ob(d.G);f=olympe.X.ob(h+g.toString());g=d.F.get(f)||new olympe.dc.query.Pj(g,h);d.R.set(f,g);d=g}f=d.Z();a.F.set(f,d);b.push(f)}e=b[0];a.ja.set(e,b);return a.F.get(e)}
544
+ function jf(a,b){if(ef(a))a.$.push(b);else throw Error('You cannot add a "skip predicate" to an explicit graphdef. Please activate a follow rule first.');return a}function kf(a,b){a.da=b;return a}function lf(a){const b=new olympe.dc.kf(a.G,a.L);b.C=a.C;for(const [c,d]of a.R)b.R.set(c,d);for(const [c,d]of a.F)b.F.set(c,d);b.da=a.da;b.$=[...a.$];return b}function mf(a,b){return ef(a)?new olympe.dc.query.Cl(lf(a),b||olympe.D.La()):new olympe.dc.query.Oj(lf(a),b||olympe.D.La())}
545
545
  function hf(a){let b=a.W;const c=[];for(;b&&b.Nd().recursive;)c.push(b.Z()),b=a.F.get(b.G)||null;c.push(b&&b.Z()||olympe.X.ob(a.G));const d=[];c.slice(0,5).forEach(e=>{d.push(...a.ja.get(e))});return d}
546
546
  olympe.dc.kf=class{constructor(a,b=olympe.dc.Cd.SUBSCRIBE){if(void 0===a||null===a)throw Error('Cannot create GraphDef with undefined or null baseTag');this.G=olympe.dc.za(a);this.L=b;this.C='not_defined';this.$=[];this.W=null;this.R=new Map;this.F=new Map;this.da=null;this.ja=(new Map).set(olympe.X.ob(this.G),[olympe.X.ob(this.G)])}static Dc(a,b){olympe.dc.kf.Re([a],b)}static Re(a,b){const c=new olympe.dc.Transaction;a.forEach(d=>c.delete(d,olympe.dc.Qb.Ac));c.jb(b)}toJSON(){const a=Object.create(null),
547
547
  b=c=>{const d=Object.create(null),e=c.Nd();d.t=e.T();d.d=e.Ra();d.r=e.recursive;d.c=c.jh().map(b);return d};a.t=this.G;a.o=this.L;a.f=cf(this);a.b=Array.from(this.R.keys()).map(c=>b(this.F.get(c)));return JSON.stringify(a)}static lc(a){a='string'===typeof a?JSON.parse(a):a;const b=df(new olympe.dc.kf(a.t,a.o),a.f),c=d=>{const e=new olympe.dc.ua.Relation(d.t,d.d);b.rb(e,d.r);for(const f of d.c)c(f);Ae(b)};for(const d of a.b)c(d);return b}Z(){const a=olympe.X.ob,b=d=>d.Z()+d.jh().map(e=>b(e)).sort().join(''),
548
548
  c=Array.from(this.R,([,d])=>b(d)).sort().join('');return a(`${this.L}-${this.G}${c}-${cf(this)}`)}add(a,b=!1){this.validate(olympe.dc.Qb.NONE,'add');gf(this,a,b);return this}rb(a,b=!1){this.validate(olympe.dc.Qb.NONE,'follow');this.W=gf(this,a,b);return this}jb(a=b=>b){'not_defined'===this.C&&(this.C=olympe.dc.Qb.NONE);const b=olympe.dc.Nf();a=olympe.D.La().F(a);switch(this.L){case olympe.dc.Cd.SUBSCRIBE:case olympe.dc.Cd.Ji:const c=nf(b,this,a);olympe.D.La().R(()=>{of(olympe.dc.Nf(),c.Z())});break;
549
- case olympe.dc.Cd.$l:pf(b,this,a);break;default:throw Error('Wrong graph operation');}}validate(a,b){if('not_defined'!==this.C&&this.C!==a)throw Error(this.C!==olympe.dc.Qb.NONE?`Method ${b} can't be called on an implicit Graphdef`:`Method ${b} can't be called on an explicit Graphdef`);this.C=a}};function qf(a,b){a.data.Nc(b.data);a.C.forEach((c,d)=>{if(b.C.has(d))d=b.C.get(d),d.add.push(...c.add),d.remove.push(...c.remove);else{var e=c.remove;const f=new rf(d);f.add=c.add;f.remove=e;b.C.set(d,f)}})}function sf(a,b){a.C.forEach((c,d)=>b(d,c.add,c.remove))}olympe.dc.query.gt=class{constructor(a,b){this.id=a;this.C=new Map;this.data=b}Z(){return this.id}};class rf{constructor(a){this.id=a;this.add=[];this.remove=[]}Z(){return this.id}};function tf(a){return(a=a.C)&&olympe.dc.Ja().source(a)||olympe.dc.Ha.Mc}function uf(a){return Array.from(a.ta,b=>a.F.get(b))}function vf(a){if(!a.L){for(const b of a.R.values())b();a.R.clear();a.L=!0}}
550
- olympe.dc.query.Pj=class{constructor(a,b){this.nh=a;this.C=a.G;this.id=a.Z();this.$=new olympe.D.Zb(`GraphSubscription ${this.id}`,b);this.N=olympe.ra.Ya('dc.query');this.ta=[];this.F=new Map;this.L=!1;this.R=new Map;b=olympe.X.ob(this.C);if(!ef(a))for(const c of ff(a))this.F.set(c.Z(),c),c.G===b&&this.ta.push(c.Z())}Z(){return this.id}Ke(a,b){b=b||olympe.X.ec();this.L?a():this.R.set(b,olympe.D.La().F(a));return b}oj(a){return this.R.delete(a)}onDestroy(a){this.$.onDestroy(a)}release(){this.$.destroy()}W(){return function*(a,
549
+ case olympe.dc.Cd.Zl:pf(b,this,a);break;default:throw Error('Wrong graph operation');}}validate(a,b){if('not_defined'!==this.C&&this.C!==a)throw Error(this.C!==olympe.dc.Qb.NONE?`Method ${b} can't be called on an implicit Graphdef`:`Method ${b} can't be called on an explicit Graphdef`);this.C=a}};function qf(a,b){a.data.Nc(b.data);a.C.forEach((c,d)=>{if(b.C.has(d))d=b.C.get(d),d.add.push(...c.add),d.remove.push(...c.remove);else{var e=c.remove;const f=new rf(d);f.add=c.add;f.remove=e;b.C.set(d,f)}})}function sf(a,b){a.C.forEach((c,d)=>b(d,c.add,c.remove))}olympe.dc.query.ft=class{constructor(a,b){this.id=a;this.C=new Map;this.data=b}Z(){return this.id}};class rf{constructor(a){this.id=a;this.add=[];this.remove=[]}Z(){return this.id}};function tf(a){return(a=a.C)&&olympe.dc.Ja().source(a)||olympe.dc.Ha.Mc}function uf(a){return Array.from(a.ta,b=>a.F.get(b))}function vf(a){if(!a.L){for(const b of a.R.values())b();a.R.clear();a.L=!0}}
550
+ olympe.dc.query.Oj=class{constructor(a,b){this.nh=a;this.C=a.G;this.id=a.Z();this.$=new olympe.D.Zb(`GraphSubscription ${this.id}`,b);this.N=olympe.ra.Ya('dc.query');this.ta=[];this.F=new Map;this.L=!1;this.R=new Map;b=olympe.X.ob(this.C);if(!ef(a))for(const c of ff(a))this.F.set(c.Z(),c),c.G===b&&this.ta.push(c.Z())}Z(){return this.id}Ke(a,b){b=b||olympe.X.ec();this.L?a():this.R.set(b,olympe.D.La().F(a));return b}nj(a){return this.R.delete(a)}onDestroy(a){this.$.onDestroy(a)}release(){this.$.destroy()}W(){return function*(a,
551
551
  b){yield a;for(const c of b)yield*c.de()}(this.C,this.F.values())}da(a){const b=olympe.X.ob(this.C);wf(a,(c,d)=>{if(b!==c)if(c=this.F.get(c),void 0===c)this.N.error('Try to apply a block result that does not exists in the original query');else for(const e of d)c.C.add(e)})}ja(a){let b=[],c=[];const d=olympe.X.ob(this.C);sf(a,(e,f,g)=>{const h=d===e,k=this.F.get(e);h||void 0!==k?h?(b.push(...f),c.push(...g)):(b=b.concat(f.filter(l=>{k.C.has(l)?l=!1:(k.C.add(l),l=!0);return l})),c=c.concat(g.filter(l=>
552
- k.C.delete(l)))):this.N.error(`A notification contains a block ${e} which is not present in the current graph query ${this.id}`)});Wc(olympe.dc.xd(),b,c)}wr(a){const b=a.C,c=[],d=this.C;d===b&&c.push(olympe.X.ob(d));this.F.forEach((k,l)=>{k.C.has(b)&&c.push(l)});const e=olympe.X.ob,f=this.F,g=(k,l)=>{const n=l.Nd(),p=[e(k+n),e(k+new olympe.dc.query.Relation(n.tag,n.direction,!0))].filter(q=>f.has(q));return 0<p.length?l.jh().reduce((q,r)=>q&&g(p[0],r),!0):!1},h=uf(a);return void 0!==c.find(k=>{for(const l of h)if(!g(k,
553
- l))return!1;return!0})}};olympe.dc.query.Qj=class{constructor(a,b){this.L=a;this.F=new Map;this.C=new Set;this.G=b;this.id=olympe.X.ob(b+a.toString());this.apply=!0}toJSON(){let a='{ "id": '+JSON.stringify(this.id)+', "parentId": '+JSON.stringify(this.G)+', "apply": '+JSON.stringify(this.apply)+', ';a+='"relation": '+this.L.toJSON();if(0<this.F.size){a+=', "children": [';for(const b of this.F.values())a+=b.toJSON()+', ';a.endsWith(', ')&&(a=a.substr(0,a.length-2));a+=']'}if(0<this.C.size){a+=', "instances": [';for(const b of this.C)a+=
554
- JSON.stringify(b)+', ';a.endsWith(', ')&&(a=a.substr(0,a.length-2));a+=']'}return a+'}'}static lc(a){var b;'string'===typeof a?b=JSON.parse(a):b=a;a=olympe.dc.query.Relation.lc(b.relation);a=new olympe.dc.query.Qj(a,b.parentId);a.id=b.id;a.apply=b.apply;if(b.instances)for(const c of b.instances)a.C.add(c);if(b.children)for(const c of b.children)b=olympe.dc.query.Qj.lc(c),a.F.set(b.id,b);return a}Z(){return this.id}Nd(){return this.L}jh(){return Array.from(this.F.values())}de(){return this.C.values()}toString(){return this.G+
552
+ k.C.delete(l)))):this.N.error(`A notification contains a block ${e} which is not present in the current graph query ${this.id}`)});Wc(olympe.dc.xd(),b,c)}vr(a){const b=a.C,c=[],d=this.C;d===b&&c.push(olympe.X.ob(d));this.F.forEach((k,l)=>{k.C.has(b)&&c.push(l)});const e=olympe.X.ob,f=this.F,g=(k,l)=>{const n=l.Nd(),p=[e(k+n),e(k+new olympe.dc.query.Relation(n.tag,n.direction,!0))].filter(q=>f.has(q));return 0<p.length?l.jh().reduce((q,r)=>q&&g(p[0],r),!0):!1},h=uf(a);return void 0!==c.find(k=>{for(const l of h)if(!g(k,
553
+ l))return!1;return!0})}};olympe.dc.query.Pj=class{constructor(a,b){this.L=a;this.F=new Map;this.C=new Set;this.G=b;this.id=olympe.X.ob(b+a.toString());this.apply=!0}toJSON(){let a='{ "id": '+JSON.stringify(this.id)+', "parentId": '+JSON.stringify(this.G)+', "apply": '+JSON.stringify(this.apply)+', ';a+='"relation": '+this.L.toJSON();if(0<this.F.size){a+=', "children": [';for(const b of this.F.values())a+=b.toJSON()+', ';a.endsWith(', ')&&(a=a.substr(0,a.length-2));a+=']'}if(0<this.C.size){a+=', "instances": [';for(const b of this.C)a+=
554
+ JSON.stringify(b)+', ';a.endsWith(', ')&&(a=a.substr(0,a.length-2));a+=']'}return a+'}'}static lc(a){var b;'string'===typeof a?b=JSON.parse(a):b=a;a=olympe.dc.query.Relation.lc(b.relation);a=new olympe.dc.query.Pj(a,b.parentId);a.id=b.id;a.apply=b.apply;if(b.instances)for(const c of b.instances)a.C.add(c);if(b.children)for(const c of b.children)b=olympe.dc.query.Pj.lc(c),a.F.set(b.id,b);return a}Z(){return this.id}Nd(){return this.L}jh(){return Array.from(this.F.values())}de(){return this.C.values()}toString(){return this.G+
555
555
  this.L.toString()}};function wf(a,b){a.C.forEach((c,d)=>b(d,c))}
556
556
  olympe.dc.query.Ai=class{constructor(a,b,c,d){this.id=a;this.source=b;this.destination=c;this.C=new Map;this.xc=d}toJSON(){let a=`{ "id": "${this.id}", "source": "${this.source}", "destination": "${this.destination}"`;a.endsWith(', ')&&(a=a.substr(0,a.length-2));a+=', "blocks": {';for(const [b,c]of this.C)a+=`"${b}": ${JSON.stringify(Array.from(c))}, `;a.endsWith(', ')&&(a=a.substr(0,a.length-2));a+=`}, "patch": ${this.xc.toJSON()}`;return a+'}'}static lc(a){let b;'string'===typeof a?b=JSON.parse(a):
557
557
  b=a;a=olympe.dc.db.uc.lc(b.patch);a=new olympe.dc.query.Ai(b.id,b.source,b.destination,a);for(const [c,d]of Object.entries(b.blocks))a.C.set(c,new Set(d));return a}Z(){return this.id}};const xf=olympe.dc.jc.Tc,yf=olympe.dc.jc.vi,zf=olympe.dc.Ca.ORIGIN,Af=olympe.dc.Ca.DESTINATION;function Bf(a,b,c){const d=a.nh.$;return c.filter(e=>d.reduce((f,g)=>f&&!g(b,e.Nd()),!0))}
558
- olympe.dc.query.Dl=class extends olympe.dc.query.Pj{constructor(a,b){super(a,b);this.G=(new Set).add(a.G)}W(){return this.G.values()}da(a){a=a.xc;for(const b of a.de())b.L()?this.G.delete(b.tag()):b.re()&&this.G.add(b.tag())}ja(a){let b=[],c=[];sf(a,(d,e,f)=>{b=b.concat(e.filter(g=>{if(this.G.has(g)&&this.C!==g)return!1;this.G.add(g);return!0}));c=c.concat(f.filter(g=>this.G.delete(g)))});Wc(olympe.dc.xd(),b,c)}wr(a){var b=a.C,c=Array.from(a.F.values()),d=Bf(this,b,c);if(d.length===c.length&&!this.G.has(b))return!1;
559
- b=olympe.dm.Relation.C.vk;c=olympe.dm.Relation.C.jk;const e=olympe.dc.Ja();for(const h of d){var f=h.Nd(),g=f.T();d=f.Ra();if(d!==Af||g!==xf&&g!==yf){if(!e.Db(f))return this.N.info('ImplicitGraphQuery: checking coverage of graphPath',a.Z(),'failed at the relation',g,'which is not in local DB'),!1;f=Id(e,f,cf(this.nh));g=0===h.jh().length;if(!(f&(d===zf?g?12:c:g?3:b)))return!1}}return!0}};function Cf(a){let b=null;for(a=[...a.Y];null===b&&0<a.length;)b=a.pop().Wb();return b}function Df(a,b){a.W()||(a=`Calling "${b}" on subscription with id ${a.Z()} while it is not ready (thus no data is available).`+'This call should be made within an onReady callback.',olympe.ra.Ya('dc').warn(a))}
558
+ olympe.dc.query.Cl=class extends olympe.dc.query.Oj{constructor(a,b){super(a,b);this.G=(new Set).add(a.G)}W(){return this.G.values()}da(a){a=a.xc;for(const b of a.de())b.L()?this.G.delete(b.tag()):b.re()&&this.G.add(b.tag())}ja(a){let b=[],c=[];sf(a,(d,e,f)=>{b=b.concat(e.filter(g=>{if(this.G.has(g)&&this.C!==g)return!1;this.G.add(g);return!0}));c=c.concat(f.filter(g=>this.G.delete(g)))});Wc(olympe.dc.xd(),b,c)}vr(a){var b=a.C,c=Array.from(a.F.values()),d=Bf(this,b,c);if(d.length===c.length&&!this.G.has(b))return!1;
559
+ b=olympe.dm.Relation.C.uk;c=olympe.dm.Relation.C.ik;const e=olympe.dc.Ja();for(const h of d){var f=h.Nd(),g=f.T();d=f.Ra();if(d!==Af||g!==xf&&g!==yf){if(!e.Db(f))return this.N.info('ImplicitGraphQuery: checking coverage of graphPath',a.Z(),'failed at the relation',g,'which is not in local DB'),!1;f=Id(e,f,cf(this.nh));g=0===h.jh().length;if(!(f&(d===zf?g?12:c:g?3:b)))return!1}}return!0}};function Cf(a){let b=null;for(a=[...a.Y];null===b&&0<a.length;)b=a.pop().Wb();return b}function Df(a,b){a.W()||(a=`Calling "${b}" on subscription with id ${a.Z()} while it is not ready (thus no data is available).`+'This call should be made within an onReady callback.',olympe.ra.Ya('dc').warn(a))}
560
560
  function Ef(a,b){const c=new olympe.D.Zb('listDef toObservable',a.nc().Bh());return new rxjs.Observable(d=>{c.run(()=>{olympe.D.yc([b],e=>{d.next(e.valueOf())})});c.onDestroy(()=>{d.complete()});return c.destroy.bind(c)})}
561
561
  olympe.dc.Da=class{constructor(a,b,c){void 0===a||null===a?olympe.ra.Ya('dc').warn('attempt to create a listdef with a null or undefind basetag. This listdef is thus without effect.'):(this.F=olympe.D.Fa([a],olympe.dc.za,String),this.Y=void 0!==b&&(Array.isArray(b)?b:[b])||[],this.valueType=c||Cf(this),this.C=null)}Jc(){return olympe.dc.Jc()}jb(){if(null===this.C){const a=olympe.dc.Nf();this.C=Ff(a,this);null!==this.valueType&&this.C.Ed(this.valueType);olympe.D.La().R(()=>{Gf(a,this.C.Z());this.C=
562
- null})}return this}nc(){null===this.C&&this.jb();return this.C}Ed(a){this.valueType=a;null!==this.C&&this.C.Ed(this.valueType)}Wb(){return null!==this.C?this.C.Wb():null===this.valueType?olympe.dc.CloudObject:this.valueType}Ld(){return this.F}Gl(){return this.Y}Ke(a,b){return this.nc().Ke(a,b)}oj(a){this.nc().oj(a)}zt(){return this.nc().Kd()}yt(){return this.nc().W()}get(a){return this.nc().get(a)}ci(){return this.nc().ci()}kh(a){const b=this.nc();Df(b,'getCurrent');return b.kh(a)}has(a){return this.nc().has(a)}Eg(a){const b=
563
- this.nc();Df(b,'hasCurrent');return b.Eg(a)}qe(a){return this.nc().qe(a)}Wx(a){return Ef(this,this.qe(a))}Te(a){const b=this.nc();Df(b,'getCurrentAt');return b.Te(a)}Ue(a){return this.nc().Ue(a)}Gf(a){const b=this.nc();Df(b,'getCurrentKeyAt');return b.Gf(a)}ee(a){return this.nc().ee(a)}$x(a){return Ef(this,this.ee(a))}Hf(a){const b=this.nc();Df(b,'getCurrentRank');return b.Hf(a)}Pc(){return this.nc().Pc()}Xx(){return Ef(this,this.Pc())}If(){return this.nc().If()}nf(){return this.nc().nf()}ay(){return Ef(this,
562
+ null})}return this}nc(){null===this.C&&this.jb();return this.C}Ed(a){this.valueType=a;null!==this.C&&this.C.Ed(this.valueType)}Wb(){return null!==this.C?this.C.Wb():null===this.valueType?olympe.dc.CloudObject:this.valueType}Ld(){return this.F}Fl(){return this.Y}Ke(a,b){return this.nc().Ke(a,b)}nj(a){this.nc().nj(a)}yt(){return this.nc().Kd()}xt(){return this.nc().W()}get(a){return this.nc().get(a)}ci(){return this.nc().ci()}kh(a){const b=this.nc();Df(b,'getCurrent');return b.kh(a)}has(a){return this.nc().has(a)}Eg(a){const b=
563
+ this.nc();Df(b,'hasCurrent');return b.Eg(a)}qe(a){return this.nc().qe(a)}Vx(a){return Ef(this,this.qe(a))}Te(a){const b=this.nc();Df(b,'getCurrentAt');return b.Te(a)}Ue(a){return this.nc().Ue(a)}Gf(a){const b=this.nc();Df(b,'getCurrentKeyAt');return b.Gf(a)}ee(a){return this.nc().ee(a)}Zx(a){return Ef(this,this.ee(a))}Hf(a){const b=this.nc();Df(b,'getCurrentRank');return b.Hf(a)}Pc(){return this.nc().Pc()}Wx(){return Ef(this,this.Pc())}If(){return this.nc().If()}nf(){return this.nc().nf()}$x(){return Ef(this,
564
564
  this.nf())}zg(){const a=this.nc();Df(a,'getCurrentSize');return a.zg()}forEach(a,b){this.nc().forEach(a,b)}ae(a){const b=this.nc();Df(b,'forEachCurrentValue');return b.ae(a)}$i(a,b,c,d){a=new olympe.dc.Y.Xd(a,b);(new olympe.dc.Da(this.F,[...this.Y,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.Y];for(const c of b){if(void 0===
565
- c)throw Error('ListDef.transform(): Trying to set an undefined transformer');if(c instanceof olympe.dc.ua.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.Da(this.F,a);b.Ed(Cf(b)||this.valueType||Object);return b}Zk(a){return this.transform(new olympe.dc.Y.wf(a))}filter(a){return this.transform(new olympe.dc.Y.rc(a))}vg(){const a=new olympe.dc.Zj(this.F,null===this.valueType?
566
- void 0:this.valueType);let b=this.Y;b instanceof Array||(b=b?[b]:[]);a.transform(b);return a}toString(){let a=this.Y;a=a?', '+(a.join?a.join(', '):a.toString()):'';return'ListDef(#'+olympe.D.$a(this.F)+a+')'}xt(){return this.nc().Ug()}Rc(){return olympe.D.Fa([this.nf()],a=>{let b='[';for(let c=0;c<a;c++){const d=this.Te(c).toString();b=0<c&&c<a?b+(', '+d):b+d}return olympe.D.yb(b+']')},olympe.D.Za)}};olympe.dc.Da.prototype.filter=olympe.dc.Da.prototype.filter;olympe.dc.Da.prototype.union=olympe.dc.Da.prototype.Zk;
567
- olympe.dc.Da.prototype.transform=olympe.dc.Da.prototype.transform;olympe.dc.Da.prototype.forEachCurrentValue=olympe.dc.Da.prototype.ae;olympe.dc.Da.prototype.forEach=olympe.dc.Da.prototype.forEach;olympe.dc.Da.prototype.getCurrentSize=olympe.dc.Da.prototype.zg;olympe.dc.Da.prototype.observeSize=olympe.dc.Da.prototype.ay;olympe.dc.Da.prototype.observeFirst=olympe.dc.Da.prototype.Xx;olympe.dc.Da.prototype.getCurrentRank=olympe.dc.Da.prototype.Hf;olympe.dc.Da.prototype.observeRank=olympe.dc.Da.prototype.$x;
568
- olympe.dc.Da.prototype.getCurrentAt=olympe.dc.Da.prototype.Te;olympe.dc.Da.prototype.observeAt=olympe.dc.Da.prototype.Wx;olympe.dc.Da.prototype.offReady=olympe.dc.Da.prototype.oj;olympe.dc.Da.prototype.onReady=olympe.dc.Da.prototype.Ke;olympe.dc.Da.prototype.getBaseTag=olympe.dc.Da.prototype.Ld;olympe.dc.Da.ma=[olympe.D.md];m=olympe.dc.Da.prototype;m.Jc.K=olympe.D.J.C;m.jb.K=olympe.D.J.L();m.nc.K=new olympe.D.J(()=>olympe.dc.query.Subscription,[]);m.Ed.K=new olympe.D.J(()=>{},[]);
569
- m.Ld.K=new olympe.D.J(()=>String,[]);m.Gl.K=new olympe.D.J(()=>Array,[]);m.Ke.K=new olympe.D.J(()=>String,[]);m.oj.K=new olympe.D.J(()=>{},[]);m.zt.K=olympe.D.J.R;m.yt.K=olympe.D.J.C;m.get.K=new olympe.D.J(()=>olympe.dc.CloudObject,[],'valueType');m.ci.K=new olympe.D.J(()=>Array,[]);m.kh.K=olympe.D.J.C;m.has.K=olympe.D.J.R;m.Eg.K=olympe.D.J.C;m.qe.K=new olympe.D.J(()=>olympe.dc.CloudObject,[],'valueType');m.Te.K=olympe.D.J.C;m.Ue.K=new olympe.D.J(()=>String,[]);m.Gf.K=olympe.D.J.C;m.ee.K=olympe.D.J.G;
570
- m.Hf.K=olympe.D.J.C;m.Pc.K=new olympe.D.J(()=>olympe.dc.CloudObject,[],'valueType');m.If.K=new olympe.D.J(()=>String,[]);m.nf.K=olympe.D.J.G;m.zg.K=olympe.D.J.C;m.forEach.K=new olympe.D.J(()=>{},[]);m.ae.K=olympe.D.J.C;m.$i.K=new olympe.D.J(()=>{},[]);m.transform.K=new olympe.D.J(()=>olympe.dc.Da,[]);m.Zk.K=new olympe.D.J(()=>olympe.dc.Da,[]);m.filter.K=new olympe.D.J(()=>olympe.dc.Da,[]);m.vg.K=new olympe.D.J(()=>olympe.dc.Zj,[]);m.toString.K=olympe.D.J.C;m.xt.K=olympe.D.J.C;m.Rc.K=olympe.D.J.F;const Hf={Sy:'append',sl:'filter_not',Go:'filter_and',Ho:'filter_or'};function If(a,b){a=Jf(a);a=olympe.dc.CloudObject.get(a);return(new olympe.dc.oa.Gn(a,b)).F}
571
- olympe.dc.Zj=class{constructor(a,b){this.C=Jf(a);this.N=olympe.dc.Nf().Ya();this.valueType=void 0===b?olympe.dc.CloudObject:b;this.Y=[];this.va=[]}pf(){return new olympe.dc.Da(this.C,this.Y,this.valueType)}transform(a){for(let b=0,c=a.length,d;b<c;b++){d=a[b];if(void 0===d)throw new Kf('transform','Trying to set an undefined transformer');if(d instanceof olympe.dc.ua.Property)throw new Kf('transform','Properties cannot be used as transformer, unlike relations '+d);if(!d||'function'!==typeof d.getTransform)throw new Kf('transform',
572
- 'one of the argument is not a Transformer '+d);const e=d.Wb();null!==e&&(this.valueType=e);this.Y.push(d)}return this}Zk(a){this.Y.push(new olympe.dc.Y.wf(a));return this}Py(a){this.Y.push(new olympe.dc.Y.wf(Jf(a)));return this}Bt(a){this.valueType=a;return this}rb(a){this.Y.push(a);this.valueType=a.Wb()||olympe.dc.CloudObject;return this}dw(a){for(const b of a)this.Y.push(b),this.valueType=b.Wb()||olympe.dc.CloudObject;return this}Dk(a,b,c){a=new olympe.dc.Y.Bc(a,a.Ra(),b,c);this.Y.push(a);this.valueType=
573
- a.Wb()||olympe.dc.CloudObject;return this}cw(a){const b=[];let c;for(let d=0;d<a.length;d++){const e=a[d];b.push(e.T());void 0===c&&(c=e.Ra())}a=new olympe.dc.Y.Ce(b,c);this.Y.push(a);this.valueType=a.Wb()||olympe.dc.CloudObject;return this}At(){this.rb(olympe.dc.CloudObject.instancesRel);return this}Se(a){var b=this.va.pop();b===Hf.sl&&(a=new olympe.dc.V.jd(a),b=this.va.pop());switch(b){case Hf.Go:b=this.Y.pop().C;b instanceof olympe.dc.V.Qd?(b=b.V,b.push(a),a=new olympe.dc.V.Qd(...b)):a=new olympe.dc.V.Qd(b,
574
- a);b=this.va.pop();break;case Hf.Ho:b=this.Y.pop().C,b instanceof olympe.dc.V.Zd?(b=b.V,b.push(a),a=new olympe.dc.V.Zd(...b)):a=new olympe.dc.V.Zd(b,a),b=this.va.pop()}b===Hf.sl&&(a=new olympe.dc.V.jd(a),this.va.pop());this.Y.push(new olympe.dc.Y.rc(a));return this}Yv(a,b,c){return this.Se(new olympe.dc.V.Fc(If(a,c),new olympe.dc.oa.Bd(b)))}contains(a,b,c=!1,d){return this.Se(new olympe.dc.V.Sc(If(a,d),new olympe.dc.oa.Bd(b),c))}Rf(a){if(!(a instanceof Array))throw new Kf('instanceOf','Provided argument "models" must be an array.');
575
- const b=[];for(let c=0;c<a.length;c++)b.push(Jf(a[c]));return this.Se(new olympe.dc.V.mf(b))}Kk(a){return this.Se(new olympe.dc.V.Fc(new olympe.dc.oa.uf,new olympe.dc.oa.Bd(Jf(a))))}Zv(a){if(!Array.isArray(a))throw Error('ExcludeInstances should be called with an array');if(0<a.length){this.not().Kk(a[0]);for(let b=1,c=a.length;b<c;b++)this.and().not().Kk(a[b])}return this}hj(a,b){if(!(a instanceof Array))throw new Kf('hasRelated','Provided argument "relations" must be an array.');const c=[],d=[];
576
- a.forEach(e=>{c.push(e);d.push(e.Ra())});return this.Se(new olympe.dc.V.lf(c,d,b))}Jk(a,b,c){a=If(a,c);return this.Se(new olympe.dc.V.ze(a,new olympe.dc.oa.Bd(b)))}uj(a,b,c){a=If(a,c);return this.Se(new olympe.dc.V.Ge(a,new olympe.dc.oa.Bd(b)))}Gx(a,b,c,d){a=If(a,d);return this.Se(new olympe.dc.V.ud(a,b,c))}filter(a){const b=new class extends olympe.dc.V.Ng{C(c,d){return a(olympe.dc.CloudObject.get(d))}};return this.Se(b)}not(){this.va.push(Hf.sl);return this}and(){this.Y[this.Y.length-1]instanceof
577
- olympe.dc.Y.rc&&this.va.push(Hf.Go);return this}or(){this.Y[this.Y.length-1]instanceof olympe.dc.Y.rc&&this.va.push(Hf.Ho);return this}Yk(a,b,c){a=Jf(a);let d=null;switch(olympe.dc.Ja().fc(a,olympe.dm.Property.typeRel)){case olympe.dm.String.O.T():d=new olympe.dc.Bb.String(new olympe.dc.oa.pe(a,c));break;case olympe.dm.Number.O.T():d=new olympe.dc.Bb.Number(new olympe.dc.oa.le(a,c));break;case olympe.dm.DateTime.O.T():d=new olympe.dc.Bb.DateTime(new olympe.dc.oa.je(a,c))}c=d;null!==c&&this.Y.push(new olympe.dc.Y.Hd(c,
578
- b));return this}sort(a,b,c){const d=new class extends olympe.dc.Bb.Ng{L(e,f){return a(olympe.dc.CloudObject.get(f))}G(e,f){return b(e,f).valueOf()}};this.Y.push(new olympe.dc.Y.Hd(d,c));return this}Uv(){this.Y.push(new olympe.dc.Y.xe);return this}limit(a,b){this.Y.push(new olympe.dc.Y.Xd(a,b));return this}};class Kf extends Error{constructor(a,b){super(`ListDefBuilder.${a}(): ${b}`)}}
579
- function Jf(a){return'string'===typeof a||a instanceof olympe.D.Za?a:'function'===typeof a?olympe.dc.ya.Nb(a):olympe.D.nb(a)?a.yk===olympe.D.Za?a:olympe.D.Fa([a],b=>olympe.D.yb(olympe.dc.za(b)),olympe.D.Za):a.T()}m=olympe.dc.Zj.prototype;m.pf.K=new olympe.D.J(()=>olympe.dc.Da,[]);m.transform.K=olympe.D.J.L();m.Zk.K=olympe.D.J.L();m.Py.K=olympe.D.J.L();m.Bt.K=olympe.D.J.L();m.rb.K=olympe.D.J.L();m.dw.K=olympe.D.J.L();m.Dk.K=olympe.D.J.L();m.cw.K=olympe.D.J.L();m.At.K=olympe.D.J.L();m.Se.K=olympe.D.J.L();
580
- m.Yv.K=olympe.D.J.L();m.contains.K=olympe.D.J.L();m.Rf.K=olympe.D.J.L();m.Kk.K=olympe.D.J.L();m.Zv.K=olympe.D.J.L();m.hj.K=olympe.D.J.L();m.Jk.K=olympe.D.J.L();m.uj.K=olympe.D.J.L();m.Gx.K=olympe.D.J.L();m.filter.K=olympe.D.J.L();m.not.K=olympe.D.J.L();m.and.K=olympe.D.J.L();m.or.K=olympe.D.J.L();m.Yk.K=olympe.D.J.L();m.sort.K=olympe.D.J.L();m.Uv.K=olympe.D.J.L();m.limit.K=olympe.D.J.L();olympe.dc.query.Dp=class{constructor(a){this.id=a;this.C=[];this.data=new olympe.dc.db.uc}F(a){this.C.push(olympe.dc.za(a))}Z(){return this.id}getData(){return this.data}};function Lf(a){return olympe.D.nb(a)?'Node#'+a.Pa.Z():String(a)}function Mf(a,b){return olympe.D.nb(b)?'{"c":"Parameter","v":"'+a.add(b)+'"}':JSON.stringify(b)}
581
- olympe.dc.query.uu=class{constructor(){this.C=0;this.values=null}add(a){let b;b=olympe.D.nb(a)?'n'+a.Pa.Z():'p'+ ++this.C;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.bb=class{na(){}C(){}F(){}la(){}toString(){}};function Ee(a,b,c){return a.G.run(()=>a.R.jb(b,c))}function Fe(a,b,c){return a.G.run(()=>Nf(a.R,b,c))}
565
+ c)throw Error('ListDef.transform(): Trying to set an undefined transformer');if(c instanceof olympe.dc.ua.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.Da(this.F,a);b.Ed(Cf(b)||this.valueType||Object);return b}Yk(a){return this.transform(new olympe.dc.Y.wf(a))}filter(a){return this.transform(new olympe.dc.Y.rc(a))}vg(){const a=new olympe.dc.Yj(this.F,null===this.valueType?
566
+ void 0:this.valueType);let b=this.Y;b instanceof Array||(b=b?[b]:[]);a.transform(b);return a}toString(){let a=this.Y;a=a?', '+(a.join?a.join(', '):a.toString()):'';return'ListDef(#'+olympe.D.$a(this.F)+a+')'}wt(){return this.nc().Ug()}Rc(){return olympe.D.Fa([this.nf()],a=>{let b='[';for(let c=0;c<a;c++){const d=this.Te(c).toString();b=0<c&&c<a?b+(', '+d):b+d}return olympe.D.yb(b+']')},olympe.D.Za)}};olympe.dc.Da.prototype.filter=olympe.dc.Da.prototype.filter;olympe.dc.Da.prototype.union=olympe.dc.Da.prototype.Yk;
567
+ olympe.dc.Da.prototype.transform=olympe.dc.Da.prototype.transform;olympe.dc.Da.prototype.forEachCurrentValue=olympe.dc.Da.prototype.ae;olympe.dc.Da.prototype.forEach=olympe.dc.Da.prototype.forEach;olympe.dc.Da.prototype.getCurrentSize=olympe.dc.Da.prototype.zg;olympe.dc.Da.prototype.observeSize=olympe.dc.Da.prototype.$x;olympe.dc.Da.prototype.observeFirst=olympe.dc.Da.prototype.Wx;olympe.dc.Da.prototype.getCurrentRank=olympe.dc.Da.prototype.Hf;olympe.dc.Da.prototype.observeRank=olympe.dc.Da.prototype.Zx;
568
+ olympe.dc.Da.prototype.getCurrentAt=olympe.dc.Da.prototype.Te;olympe.dc.Da.prototype.observeAt=olympe.dc.Da.prototype.Vx;olympe.dc.Da.prototype.offReady=olympe.dc.Da.prototype.nj;olympe.dc.Da.prototype.onReady=olympe.dc.Da.prototype.Ke;olympe.dc.Da.prototype.getBaseTag=olympe.dc.Da.prototype.Ld;olympe.dc.Da.ma=[olympe.D.md];m=olympe.dc.Da.prototype;m.Jc.K=olympe.D.J.C;m.jb.K=olympe.D.J.L();m.nc.K=new olympe.D.J(()=>olympe.dc.query.Subscription,[]);m.Ed.K=new olympe.D.J(()=>{},[]);
569
+ m.Ld.K=new olympe.D.J(()=>String,[]);m.Fl.K=new olympe.D.J(()=>Array,[]);m.Ke.K=new olympe.D.J(()=>String,[]);m.nj.K=new olympe.D.J(()=>{},[]);m.yt.K=olympe.D.J.R;m.xt.K=olympe.D.J.C;m.get.K=new olympe.D.J(()=>olympe.dc.CloudObject,[],'valueType');m.ci.K=new olympe.D.J(()=>Array,[]);m.kh.K=olympe.D.J.C;m.has.K=olympe.D.J.R;m.Eg.K=olympe.D.J.C;m.qe.K=new olympe.D.J(()=>olympe.dc.CloudObject,[],'valueType');m.Te.K=olympe.D.J.C;m.Ue.K=new olympe.D.J(()=>String,[]);m.Gf.K=olympe.D.J.C;m.ee.K=olympe.D.J.G;
570
+ m.Hf.K=olympe.D.J.C;m.Pc.K=new olympe.D.J(()=>olympe.dc.CloudObject,[],'valueType');m.If.K=new olympe.D.J(()=>String,[]);m.nf.K=olympe.D.J.G;m.zg.K=olympe.D.J.C;m.forEach.K=new olympe.D.J(()=>{},[]);m.ae.K=olympe.D.J.C;m.$i.K=new olympe.D.J(()=>{},[]);m.transform.K=new olympe.D.J(()=>olympe.dc.Da,[]);m.Yk.K=new olympe.D.J(()=>olympe.dc.Da,[]);m.filter.K=new olympe.D.J(()=>olympe.dc.Da,[]);m.vg.K=new olympe.D.J(()=>olympe.dc.Yj,[]);m.toString.K=olympe.D.J.C;m.wt.K=olympe.D.J.C;m.Rc.K=olympe.D.J.F;const Hf={Ry:'append',rl:'filter_not',Fo:'filter_and',Go:'filter_or'};function If(a,b){a=Jf(a);a=olympe.dc.CloudObject.get(a);return(new olympe.dc.oa.Fn(a,b)).F}
571
+ olympe.dc.Yj=class{constructor(a,b){this.C=Jf(a);this.N=olympe.dc.Nf().Ya();this.valueType=void 0===b?olympe.dc.CloudObject:b;this.Y=[];this.va=[]}pf(){return new olympe.dc.Da(this.C,this.Y,this.valueType)}transform(a){for(let b=0,c=a.length,d;b<c;b++){d=a[b];if(void 0===d)throw new Kf('transform','Trying to set an undefined transformer');if(d instanceof olympe.dc.ua.Property)throw new Kf('transform','Properties cannot be used as transformer, unlike relations '+d);if(!d||'function'!==typeof d.getTransform)throw new Kf('transform',
572
+ 'one of the argument is not a Transformer '+d);const e=d.Wb();null!==e&&(this.valueType=e);this.Y.push(d)}return this}Yk(a){this.Y.push(new olympe.dc.Y.wf(a));return this}Oy(a){this.Y.push(new olympe.dc.Y.wf(Jf(a)));return this}At(a){this.valueType=a;return this}rb(a){this.Y.push(a);this.valueType=a.Wb()||olympe.dc.CloudObject;return this}cw(a){for(const b of a)this.Y.push(b),this.valueType=b.Wb()||olympe.dc.CloudObject;return this}Ck(a,b,c){a=new olympe.dc.Y.Bc(a,a.Ra(),b,c);this.Y.push(a);this.valueType=
573
+ a.Wb()||olympe.dc.CloudObject;return this}bw(a){const b=[];let c;for(let d=0;d<a.length;d++){const e=a[d];b.push(e.T());void 0===c&&(c=e.Ra())}a=new olympe.dc.Y.Ce(b,c);this.Y.push(a);this.valueType=a.Wb()||olympe.dc.CloudObject;return this}zt(){this.rb(olympe.dc.CloudObject.instancesRel);return this}Se(a){var b=this.va.pop();b===Hf.rl&&(a=new olympe.dc.V.jd(a),b=this.va.pop());switch(b){case Hf.Fo:b=this.Y.pop().C;b instanceof olympe.dc.V.Qd?(b=b.V,b.push(a),a=new olympe.dc.V.Qd(...b)):a=new olympe.dc.V.Qd(b,
574
+ a);b=this.va.pop();break;case Hf.Go:b=this.Y.pop().C,b instanceof olympe.dc.V.Zd?(b=b.V,b.push(a),a=new olympe.dc.V.Zd(...b)):a=new olympe.dc.V.Zd(b,a),b=this.va.pop()}b===Hf.rl&&(a=new olympe.dc.V.jd(a),this.va.pop());this.Y.push(new olympe.dc.Y.rc(a));return this}Xv(a,b,c){return this.Se(new olympe.dc.V.Fc(If(a,c),new olympe.dc.oa.Bd(b)))}contains(a,b,c=!1,d){return this.Se(new olympe.dc.V.Sc(If(a,d),new olympe.dc.oa.Bd(b),c))}Rf(a){if(!(a instanceof Array))throw new Kf('instanceOf','Provided argument "models" must be an array.');
575
+ const b=[];for(let c=0;c<a.length;c++)b.push(Jf(a[c]));return this.Se(new olympe.dc.V.mf(b))}Jk(a){return this.Se(new olympe.dc.V.Fc(new olympe.dc.oa.uf,new olympe.dc.oa.Bd(Jf(a))))}Yv(a){if(!Array.isArray(a))throw Error('ExcludeInstances should be called with an array');if(0<a.length){this.not().Jk(a[0]);for(let b=1,c=a.length;b<c;b++)this.and().not().Jk(a[b])}return this}hj(a,b){if(!(a instanceof Array))throw new Kf('hasRelated','Provided argument "relations" must be an array.');const c=[],d=[];
576
+ a.forEach(e=>{c.push(e);d.push(e.Ra())});return this.Se(new olympe.dc.V.lf(c,d,b))}Ik(a,b,c){a=If(a,c);return this.Se(new olympe.dc.V.ze(a,new olympe.dc.oa.Bd(b)))}tj(a,b,c){a=If(a,c);return this.Se(new olympe.dc.V.Ge(a,new olympe.dc.oa.Bd(b)))}Fx(a,b,c,d){a=If(a,d);return this.Se(new olympe.dc.V.ud(a,b,c))}filter(a){const b=new class extends olympe.dc.V.Ng{C(c,d){return a(olympe.dc.CloudObject.get(d))}};return this.Se(b)}not(){this.va.push(Hf.rl);return this}and(){this.Y[this.Y.length-1]instanceof
577
+ olympe.dc.Y.rc&&this.va.push(Hf.Fo);return this}or(){this.Y[this.Y.length-1]instanceof olympe.dc.Y.rc&&this.va.push(Hf.Go);return this}Xk(a,b,c){a=Jf(a);let d=null;switch(olympe.dc.Ja().fc(a,olympe.dm.Property.typeRel)){case olympe.dm.String.O.T():d=new olympe.dc.Bb.String(new olympe.dc.oa.pe(a,c));break;case olympe.dm.Number.O.T():d=new olympe.dc.Bb.Number(new olympe.dc.oa.le(a,c));break;case olympe.dm.DateTime.O.T():d=new olympe.dc.Bb.DateTime(new olympe.dc.oa.je(a,c))}c=d;null!==c&&this.Y.push(new olympe.dc.Y.Hd(c,
578
+ b));return this}sort(a,b,c){const d=new class extends olympe.dc.Bb.Ng{L(e,f){return a(olympe.dc.CloudObject.get(f))}G(e,f){return b(e,f).valueOf()}};this.Y.push(new olympe.dc.Y.Hd(d,c));return this}Tv(){this.Y.push(new olympe.dc.Y.xe);return this}limit(a,b){this.Y.push(new olympe.dc.Y.Xd(a,b));return this}};class Kf extends Error{constructor(a,b){super(`ListDefBuilder.${a}(): ${b}`)}}
579
+ function Jf(a){return'string'===typeof a||a instanceof olympe.D.Za?a:'function'===typeof a?olympe.dc.ya.Nb(a):olympe.D.nb(a)?a.xk===olympe.D.Za?a:olympe.D.Fa([a],b=>olympe.D.yb(olympe.dc.za(b)),olympe.D.Za):a.T()}m=olympe.dc.Yj.prototype;m.pf.K=new olympe.D.J(()=>olympe.dc.Da,[]);m.transform.K=olympe.D.J.L();m.Yk.K=olympe.D.J.L();m.Oy.K=olympe.D.J.L();m.At.K=olympe.D.J.L();m.rb.K=olympe.D.J.L();m.cw.K=olympe.D.J.L();m.Ck.K=olympe.D.J.L();m.bw.K=olympe.D.J.L();m.zt.K=olympe.D.J.L();m.Se.K=olympe.D.J.L();
580
+ m.Xv.K=olympe.D.J.L();m.contains.K=olympe.D.J.L();m.Rf.K=olympe.D.J.L();m.Jk.K=olympe.D.J.L();m.Yv.K=olympe.D.J.L();m.hj.K=olympe.D.J.L();m.Ik.K=olympe.D.J.L();m.tj.K=olympe.D.J.L();m.Fx.K=olympe.D.J.L();m.filter.K=olympe.D.J.L();m.not.K=olympe.D.J.L();m.and.K=olympe.D.J.L();m.or.K=olympe.D.J.L();m.Xk.K=olympe.D.J.L();m.sort.K=olympe.D.J.L();m.Tv.K=olympe.D.J.L();m.limit.K=olympe.D.J.L();olympe.dc.query.Cp=class{constructor(a){this.id=a;this.C=[];this.data=new olympe.dc.db.uc}F(a){this.C.push(olympe.dc.za(a))}Z(){return this.id}getData(){return this.data}};function Lf(a){return olympe.D.nb(a)?'Node#'+a.Pa.Z():String(a)}function Mf(a,b){return olympe.D.nb(b)?'{"c":"Parameter","v":"'+a.add(b)+'"}':JSON.stringify(b)}
581
+ olympe.dc.query.tu=class{constructor(){this.C=0;this.values=null}add(a){let b;b=olympe.D.nb(a)?'n'+a.Pa.Z():'p'+ ++this.C;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.bb=class{na(){}C(){}F(){}la(){}toString(){}};function Ee(a,b,c){return a.G.run(()=>a.R.jb(b,c))}function Fe(a,b,c){return a.G.run(()=>Nf(a.R,b,c))}
582
582
  function nf(a,b,c){var d=olympe.dc.Ha.sb;const e=b.Z();let f=Of(a.ua,e),g=olympe.dc.Ha.sb;null===f&&(f=mf(b,a.G),a.L||(g=tf(f)));Pf(a.ua,f,d,g);c&&Ye(a.F,e,c);b=olympe.dc.ha.ia.yi;const h=olympe.dc.ha.ia.xi,k=l=>{if(null!==l){a.N.error(`graph subscription "${e}" failed to subscribe ${l}`);Qf(a.ua,e,d);var n=a.F;Ze(n,e,n.F);c(l,null)}};g===olympe.dc.Ha.sb?(a.N.debug('QueryManager: [ID:',e,'] GraphQuery processed locally'),a.W.process(d,f,k)):(b=M(new olympe.dc.ha(f.nh.L===olympe.dc.Cd.Ji?h:b,f,[g]),
583
- k),a.N.debug('QueryManager: [ID:',e,'] sending GraphQuery to',g),a.C.send(b));return f}function of(a,b){var c=olympe.dc.Ha.sb;const d=olympe.dc.Ha.sb;if(c===d){const e=Of(a.ua,b).nh.L,f=Rf(a.ua,b);Qf(a.ua,b,c)&&f!==d&&e===olympe.dc.Cd.SUBSCRIBE&&(c=M(new olympe.dc.ha(olympe.dc.ha.ia.Qo,String(b),[f]),g=>{g&&a.N.error(`Unsubscription of graphdef ${b} failed: ${g.message}`)}),a.C.send(c))}else Qf(a.ua,b,c)}
583
+ k),a.N.debug('QueryManager: [ID:',e,'] sending GraphQuery to',g),a.C.send(b));return f}function of(a,b){var c=olympe.dc.Ha.sb;const d=olympe.dc.Ha.sb;if(c===d){const e=Of(a.ua,b).nh.L,f=Rf(a.ua,b);Qf(a.ua,b,c)&&f!==d&&e===olympe.dc.Cd.SUBSCRIBE&&(c=M(new olympe.dc.ha(olympe.dc.ha.ia.Po,String(b),[f]),g=>{g&&a.N.error(`Unsubscription of graphdef ${b} failed: ${g.message}`)}),a.C.send(c))}else Qf(a.ua,b,c)}
584
584
  function pf(a,b,c){var d=olympe.dc.Ha.sb;b=mf(b,a.G);const e=b.Z();var f=a.F.C.has(e);c&&Ye(a.F,e,c);if(!f){f=h=>{if(h){var k=a.F;Ze(k,e,k.F);c(h,null)}};var g=tf(b);g===olympe.dc.Ha.sb?a.W.process(d,b,f):(d=M(new olympe.dc.ha(olympe.dc.ha.ia.xi,b,[g]),f),a.C.send(d))}}
585
- function Ff(a,b){var c=olympe.dc.Ha.sb;const d=b.Ld();var e=new olympe.dc.query.uu;let f;f=d;olympe.D.nb(f)&&(f=e.add(d));b=(b=b.Gl())?Array.isArray(b)?b:[b]:null;const g=olympe.dc.query.Subscription.G(f,b,e);e=Sf(a.ua,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.Xc());a.Ka.process(c,e,h=>{h&&(Tf(a.ua,g,c||olympe.dc.Ha.sb),a.N.error(`subscription "${g}" failed to subscribe ${h}`))});return e}
586
- function Gf(a,b){var c=olympe.dc.Ha.sb;if(c===olympe.dc.Ha.sb){const d=Rf(a.ua,b);a.N.debug('QueryMGR: [ID:',b,'] - Unregistered');Tf(a.ua,b,c)&&d!==olympe.dc.Ha.sb&&(c=M(new olympe.dc.ha(olympe.dc.ha.ia.Su,String(b),[d]),e=>{e&&a.N.error(`Unsubscription of listdef ${b} failed, ${e.message}`)}),a.C.send(c))}else Tf(a.ua,b,c)}
587
- function Uf(a){const b=olympe.dc.ha.ia.Ro,c=olympe.dc.ha.ia.ll,d=olympe.dc.ha.ia.wp;a.C.C(olympe.dc.ha.ia.vl,(e,f)=>{Vf(a,f,e)});a.C.C(b,(e,f)=>{Wf(a,f,e)});a.C.C(c,(e,f)=>{a.$.$e(f,e)});a.C.C(d,(e,f)=>{Xf(a,f,e)});a.C.ja((e,f)=>{Yf(a,f,e)})}function Zf(a,b){a.N.log('Received subscribeToAll command');b=b?olympe.D.La().F(b):void 0;const c=new olympe.dc.ha(olympe.dc.ha.ia.Rg,null,[olympe.dc.Ha.Mc]);b&&M(c,b);a.C.send(c)}
585
+ function Ff(a,b){var c=olympe.dc.Ha.sb;const d=b.Ld();var e=new olympe.dc.query.tu;let f;f=d;olympe.D.nb(f)&&(f=e.add(d));b=(b=b.Fl())?Array.isArray(b)?b:[b]:null;const g=olympe.dc.query.Subscription.G(f,b,e);e=Sf(a.ua,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.Xc());a.Ka.process(c,e,h=>{h&&(Tf(a.ua,g,c||olympe.dc.Ha.sb),a.N.error(`subscription "${g}" failed to subscribe ${h}`))});return e}
586
+ function Gf(a,b){var c=olympe.dc.Ha.sb;if(c===olympe.dc.Ha.sb){const d=Rf(a.ua,b);a.N.debug('QueryMGR: [ID:',b,'] - Unregistered');Tf(a.ua,b,c)&&d!==olympe.dc.Ha.sb&&(c=M(new olympe.dc.ha(olympe.dc.ha.ia.Ru,String(b),[d]),e=>{e&&a.N.error(`Unsubscription of listdef ${b} failed, ${e.message}`)}),a.C.send(c))}else Tf(a.ua,b,c)}
587
+ function Uf(a){const b=olympe.dc.ha.ia.Qo,c=olympe.dc.ha.ia.kl,d=olympe.dc.ha.ia.vp;a.C.C(olympe.dc.ha.ia.ul,(e,f)=>{Vf(a,f,e)});a.C.C(b,(e,f)=>{Wf(a,f,e)});a.C.C(c,(e,f)=>{a.$.$e(f,e)});a.C.C(d,(e,f)=>{Xf(a,f,e)});a.C.ja((e,f)=>{Yf(a,f,e)})}function Zf(a,b){a.N.log('Received subscribeToAll command');b=b?olympe.D.La().F(b):void 0;const c=new olympe.dc.ha(olympe.dc.ha.ia.Rg,null,[olympe.dc.Ha.Mc]);b&&M(c,b);a.C.send(c)}
588
588
  function Vf(a,b,c=olympe.dc.Ha.sb){b.destination!==olympe.dc.Ha.sb?a.N.error(`Graphdefs registered from peers is not supported yet ! (id: ${b.Z()})`):a.ja.process(c,b,d=>{d&&a.N.error(`An error occurred during the process of a graphdef result ${b.Z()}: ${d.message}`)})}
589
589
  function Wf(a,b,c=olympe.dc.Ha.sb){const d=$f(a.ua,b.Z());0!==d.length&&(1<d.length||d[0]!==olympe.dc.Ha.sb?a.N.error(`Notification received for graphdefs subscription registered from peers. Not supported yet ! (id: ${b.Z()})`):a.da.process(c,b,e=>{e&&a.N.error(`An error occurred during the process of a graphNotification ${b.Z()}`)}))}
590
590
  function Xf(a,b,c=olympe.dc.Ha.sb){const d=ag(a.ua,b.Z());1<d.length||d[0]!==olympe.dc.Ha.sb?a.N.error(`Listdefs registered from peers is not supported yet ! (id: ${b.Z()})`):a.ta.process(c,b,e=>{e&&a.N.error(`An error occurred during the process of a listNotification ${b.Z()}`)})}
591
- function Yf(a,b,c){a.N.debug('Source event',b,'received for source',c);if(b===olympe.dc.qk.Up){const d=(e,f)=>{f&&a.N.error(`Error after trying to resubscribe to ${e}: ${f}`)};bg(a.ua,c).forEach(e=>{Ye(a.F,e.Z(),d.bind(a,e.Z()));a.N.debug(`resubscribing graph subscription ${e.Z()} to destination : ${c}`);e=M(new olympe.dc.ha(olympe.dc.ha.ia.yi,e,[c]),d.bind(a,e.Z()));a.C.send(e)});cg(a.ua,c).forEach(e=>{a.N.debug(`resubscribing list subscription ${e.Z()} to destination : ${c}`);e=M(new olympe.dc.ha(olympe.dc.ha.ia.Qu,
592
- e,[c]),d.bind(a,e.Z()));a.C.send(e)})}}olympe.dc.query.Au=class{constructor(a,b,c,d,e,f,g,h){this.N=a;this.L=b;this.C=c;this.$=d;this.ua=e;this.F=f;this.G=new olympe.D.Zb('Query Manager context');this.Ka=g[0];this.W=g[1];this.ja=g[2];this.da=g[3];this.ta=g[4];this.R=h;Uf(this)}Ya(){return this.N}};olympe.dc.query.Relation=class extends olympe.dc.ua.Relation{constructor(a,b,c){super(a,b);this.recursive=c}toJSON(){let a='{ "tag": '+JSON.stringify(this.T())+', ';a+='"direction": '+JSON.stringify(this.Ra())+', ';a+='"recursive": '+JSON.stringify(this.recursive);return a+'}'}static lc(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.T(),a.Ra(),a instanceof olympe.dc.Y.Bc)}Ec(){const a=
593
- olympe.dc.Ca.DESTINATION,b=olympe.dc.Ca.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.D.zj{constructor(b,c,d,e){super(olympe.dc.CloudObject,new olympe.D.Zb('context subscription '+b,e));this.id=b;this.$d=c;this.Y=d||null;this.G=this.R.run(()=>olympe.D.ge(olympe.dc.query.Subscription.C.INIT));this.od=!1;this.da=this.vd=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].la(d);else e+='|null';e=olympe.X.ob(e)}catch(f){e=olympe.X.ec()}return e}Z(){return this.id}Ld(){return this.$d}Cg(){return this.Y}Xc(){const b=
594
- olympe.dc.Ja(),c=olympe.D.$a(this.Ld());return c?b.Wf(c)?b.source(c)||olympe.dc.Ha.Mc:olympe.dc.Ha.sb:olympe.dc.Ha.Mc}We(){const b=this.G.Pa.Kb;return b&&b.valueOf()>=olympe.dc.query.Subscription.C.Hq}ph(){if(this.G.Pa.G())throw Error(`Cannot set destroyed subscription '${this.id}' as subscribed`);const b=this.vd;this.vd=null;for(let c in b)if(Object.prototype.hasOwnProperty.call(b,c))b[c](this);qb(this.G,olympe.D.ge(olympe.dc.query.Subscription.C.Hq))}Kd(){return olympe.D.Fa([this.G],()=>{},olympe.D.sa)}W(){const b=
595
- this.G.Pa.Kb;return b&&b.valueOf()>=olympe.dc.query.Subscription.C.nq}Ke(b,c){this.W()?b(this):(null===this.da&&(this.da=new Map),void 0===c&&(c=olympe.X.ec()),this.da.set(c,olympe.D.La().F(b)));return c||''}oj(b){null!==this.da&&b&&this.da.delete(b)}Hc(){const b=olympe.dc.query.Subscription.C.nq;if(!this.G.Pa.G()&&olympe.D.$a(this.G)!==b&&(this.Af(),qb(this.G,b),null!==this.da)){for(const c of this.da.values())c(this);this.da=null}}onDestroy(b){this.R.onDestroy(b)}release(){this.R.destroy()}Ab(b){if(!this.G.Pa.G()){for(let c=
596
- 0,d=b.length;c<d;c++)this.wm(b[c],c);if(this.W())this.Af();else{this.od=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.Hc()}}}zc(b){const c=this.F;for(let d in c)Object.prototype.hasOwnProperty.call(c,d)&&b(c[d],d)}Vb(b,c){if(!this.G.Pa.G()&&(this.Ak(b,olympe.dc.CloudObject.get(c)),b=this.W(),this.od&&!b)){b=!0;for(let d in this.F)if(Object.prototype.hasOwnProperty.call(this.F,d)&&!Object.prototype.hasOwnProperty.call(this.values,
597
- d)){b=!1;break}b&&this.Hc()}}bc(b){this.G.Pa.G()||(this.vm(b),this.Si(b,!this.W()))}Ug(){return this.W()?super.Ug():'Subscription is not ready!'}be(){const b=olympe.D.$a(this.Ld());return olympe.dc.query.Subscription.F(b,this.Cg())}static F(b,c){var d=new olympe.dc.kf(b,olympe.dc.Cd.SUBSCRIBE);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.Y.Sb||g instanceof olympe.dc.Y.Bc)b.forEach(h=>{const k=olympe.dc.query.Relation.from(g);h.rb(k,k.recursive)});
598
- else if(g instanceof olympe.dc.Y.wf)d=a.F(olympe.D.$a(g.Ld()),g.Cg()),b.push(...d);else if(g instanceof olympe.dc.Y.rc||g instanceof olympe.dc.Y.Hd){const h=g.F();b.forEach(k=>{for(const l of h){for(const n of l)k.rb(n,n.recursive);Ae(k,l.length)}})}}return b}};olympe.dc.query.Subscription.C={INIT:0,Hq:1,nq:2};olympe.dc.query.Subscription.prototype.Ug.K=olympe.D.J.C;function Sf(a,b){return a.F.has(b)?a.F.get(b).F():null}function Tf(a,b,c){return dg(a,a.F,b,c)}function Rf(a,b){for(const [c,d]of a.L)if(d.has(b))return c;return null}function Of(a,b){return a.C.has(b)?a.C.get(b).F():null}function Pf(a,b,c,d){const e=b.Z();let f=a.C.get(e);void 0===f&&(f=new olympe.dc.query.ua.ft(b,a.R,a),a.C.set(e,f));f.L(c);eg(a,e,d)}function Qf(a,b,c){return dg(a,a.C,b,c)}function $f(a,b){return(a=a.C.get(b))?Array.from(a.C.keys()):[]}
591
+ function Yf(a,b,c){a.N.debug('Source event',b,'received for source',c);if(b===olympe.dc.pk.Tp){const d=(e,f)=>{f&&a.N.error(`Error after trying to resubscribe to ${e}: ${f}`)};bg(a.ua,c).forEach(e=>{Ye(a.F,e.Z(),d.bind(a,e.Z()));a.N.debug(`resubscribing graph subscription ${e.Z()} to destination : ${c}`);e=M(new olympe.dc.ha(olympe.dc.ha.ia.yi,e,[c]),d.bind(a,e.Z()));a.C.send(e)});cg(a.ua,c).forEach(e=>{a.N.debug(`resubscribing list subscription ${e.Z()} to destination : ${c}`);e=M(new olympe.dc.ha(olympe.dc.ha.ia.Pu,
592
+ e,[c]),d.bind(a,e.Z()));a.C.send(e)})}}olympe.dc.query.zu=class{constructor(a,b,c,d,e,f,g,h){this.N=a;this.L=b;this.C=c;this.$=d;this.ua=e;this.F=f;this.G=new olympe.D.Zb('Query Manager context');this.Ka=g[0];this.W=g[1];this.ja=g[2];this.da=g[3];this.ta=g[4];this.R=h;Uf(this)}Ya(){return this.N}};olympe.dc.query.Relation=class extends olympe.dc.ua.Relation{constructor(a,b,c){super(a,b);this.recursive=c}toJSON(){let a='{ "tag": '+JSON.stringify(this.T())+', ';a+='"direction": '+JSON.stringify(this.Ra())+', ';a+='"recursive": '+JSON.stringify(this.recursive);return a+'}'}static lc(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.T(),a.Ra(),a instanceof olympe.dc.Y.Bc)}Ec(){const a=
593
+ olympe.dc.Ca.DESTINATION,b=olympe.dc.Ca.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.D.yj{constructor(b,c,d,e){super(olympe.dc.CloudObject,new olympe.D.Zb('context subscription '+b,e));this.id=b;this.$d=c;this.Y=d||null;this.G=this.R.run(()=>olympe.D.ge(olympe.dc.query.Subscription.C.INIT));this.od=!1;this.da=this.vd=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].la(d);else e+='|null';e=olympe.X.ob(e)}catch(f){e=olympe.X.ec()}return e}Z(){return this.id}Ld(){return this.$d}Cg(){return this.Y}Xc(){const b=
594
+ olympe.dc.Ja(),c=olympe.D.$a(this.Ld());return c?b.Wf(c)?b.source(c)||olympe.dc.Ha.Mc:olympe.dc.Ha.sb:olympe.dc.Ha.Mc}We(){const b=this.G.Pa.Kb;return b&&b.valueOf()>=olympe.dc.query.Subscription.C.Gq}ph(){if(this.G.Pa.G())throw Error(`Cannot set destroyed subscription '${this.id}' as subscribed`);const b=this.vd;this.vd=null;for(let c in b)if(Object.prototype.hasOwnProperty.call(b,c))b[c](this);qb(this.G,olympe.D.ge(olympe.dc.query.Subscription.C.Gq))}Kd(){return olympe.D.Fa([this.G],()=>{},olympe.D.sa)}W(){const b=
595
+ this.G.Pa.Kb;return b&&b.valueOf()>=olympe.dc.query.Subscription.C.mq}Ke(b,c){this.W()?b(this):(null===this.da&&(this.da=new Map),void 0===c&&(c=olympe.X.ec()),this.da.set(c,olympe.D.La().F(b)));return c||''}nj(b){null!==this.da&&b&&this.da.delete(b)}Hc(){const b=olympe.dc.query.Subscription.C.mq;if(!this.G.Pa.G()&&olympe.D.$a(this.G)!==b&&(this.Af(),qb(this.G,b),null!==this.da)){for(const c of this.da.values())c(this);this.da=null}}onDestroy(b){this.R.onDestroy(b)}release(){this.R.destroy()}Ab(b){if(!this.G.Pa.G()){for(let c=
596
+ 0,d=b.length;c<d;c++)this.vm(b[c],c);if(this.W())this.Af();else{this.od=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.Hc()}}}zc(b){const c=this.F;for(let d in c)Object.prototype.hasOwnProperty.call(c,d)&&b(c[d],d)}Vb(b,c){if(!this.G.Pa.G()&&(this.zk(b,olympe.dc.CloudObject.get(c)),b=this.W(),this.od&&!b)){b=!0;for(let d in this.F)if(Object.prototype.hasOwnProperty.call(this.F,d)&&!Object.prototype.hasOwnProperty.call(this.values,
597
+ d)){b=!1;break}b&&this.Hc()}}bc(b){this.G.Pa.G()||(this.um(b),this.Si(b,!this.W()))}Ug(){return this.W()?super.Ug():'Subscription is not ready!'}be(){const b=olympe.D.$a(this.Ld());return olympe.dc.query.Subscription.F(b,this.Cg())}static F(b,c){var d=new olympe.dc.kf(b,olympe.dc.Cd.SUBSCRIBE);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.Y.Sb||g instanceof olympe.dc.Y.Bc)b.forEach(h=>{const k=olympe.dc.query.Relation.from(g);h.rb(k,k.recursive)});
598
+ else if(g instanceof olympe.dc.Y.wf)d=a.F(olympe.D.$a(g.Ld()),g.Cg()),b.push(...d);else if(g instanceof olympe.dc.Y.rc||g instanceof olympe.dc.Y.Hd){const h=g.F();b.forEach(k=>{for(const l of h){for(const n of l)k.rb(n,n.recursive);Ae(k,l.length)}})}}return b}};olympe.dc.query.Subscription.C={INIT:0,Gq:1,mq:2};olympe.dc.query.Subscription.prototype.Ug.K=olympe.D.J.C;function Sf(a,b){return a.F.has(b)?a.F.get(b).F():null}function Tf(a,b,c){return dg(a,a.F,b,c)}function Rf(a,b){for(const [c,d]of a.L)if(d.has(b))return c;return null}function Of(a,b){return a.C.has(b)?a.C.get(b).F():null}function Pf(a,b,c,d){const e=b.Z();let f=a.C.get(e);void 0===f&&(f=new olympe.dc.query.ua.et(b,a.R,a),a.C.set(e,f));f.L(c);eg(a,e,d)}function Qf(a,b,c){return dg(a,a.C,b,c)}function $f(a,b){return(a=a.C.get(b))?Array.from(a.C.keys()):[]}
599
599
  function ag(a,b){return(a=a.F.get(b))?Array.from(a.C.keys()):[]}function bg(a,b){const c=new Set;(a.L.get(b)||new Set).forEach(d=>{(d=a.C.get(d))&&c.add(d.F())});return c}function cg(a,b){const c=new Set;(a.L.get(b)||new Set).forEach(d=>{(d=a.F.get(d))&&c.add(d.F())});return c}function fg(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}
600
- function eg(a,b,c){let d=a.L.get(c);d?d.add(b):(d=(new Set).add(b),a.L.set(c,d))}function gg(a,b,c){var d=olympe.dc.Ha.sb;const e=b.Z();let f=a.F.get(e);void 0===f&&(f=new olympe.dc.query.ua.Zt(b,a.R),a.F.set(e,f));f.L(c);eg(a,e,d)}function dg(a,b,c,d){if(!b.has(c))return!1;const e=b.get(c);var f=e.C.get(d)-1;0===f?(e.C.delete(d),e.G.delete(d),f=0===e.C.size):(e.C.set(d,f),f=!1);return f?((d=Rf(a,c))&&a.L.get(d).delete(c),e.F().release(),b.delete(c),!0):0===e.C.get(d)}
601
- function hg(a,b){const c=b.Z();let d=a.G.get(c);d||(d=new olympe.dc.query.ua.Bu(b),a.G.set(c,d));d.counter++;return d}function ig(a){a.G.forEach(b=>b.update())}function jg(a,b,c){const d=a.C.get(b);d?c instanceof olympe.dc.query.Subscription?kg(d,c):lg(d,c):a.N.error(`Try to set the subscription ${c.Z()} as covered by a graphquery that is not registered (${b}).`)}olympe.dc.query.Xu=class{constructor(a,b){this.N=a;this.C=new Map;this.F=new Map;this.G=new Map;this.W=new Set;this.L=new Map;this.R=b}};olympe.dc.Wc=class{na(){}Wb(){}getTransform(){}la(){}toString(){}};olympe.dc.iq=class{F(){}};olympe.dc.yf=class{na(){}getValue(){}C(){}la(){}toString(){}};olympe.dc.query.P={Ea:'olympe.dc.query.Logger',Aa:'olympe.dc.query.QueryManager'};olympe.dc.query.Lb={Oe:'olympe.dc.query.SubscriptionRegistry',Dj:'olympe.dc.query.CallbackRegistry',To:'olympe.dc.query.GraphProcessor',So:'olympe.dc.query.GraphNotificationProcessor',Uo:'olympe.dc.query.GraphResultProcessor',xp:'olympe.dc.query.ListProcessor',Yj:'olympe.dc.query.ListNotificationProcessor',kq:'olympe.dc.query.QueryProcessor',il:'olympe.dc.query.CoverageProcessor'};olympe.dc.query.Config={Iq:'subscription.debug'};
602
- olympe.U.config(function(a){D(a,olympe.dc.query.Config.Iq,!1);C(a,olympe.dc.query.P.Ea,[olympe.ra.P.Aa],b=>b.Oc('dc.query'));A(a,olympe.dc.query.Lb.Oe,olympe.dc.query.Xu,olympe.dc.query.P.Ea,new olympe.U.fa(olympe.dc.query.Config.Iq));A(a,olympe.dc.query.Lb.Dj,olympe.dc.query.Bs,olympe.dc.query.P.Ea);A(a,olympe.dc.query.Lb.xp,olympe.dc.query.Ub.Fp,olympe.dc.query.P.Ea,olympe.dc.P.si,olympe.dc.query.Lb.Oe,olympe.dc.query.Lb.il,olympe.dc.transaction.P.Aa,new olympe.U.fa(olympe.dc.Config.Zg));A(a,olympe.dc.query.Lb.To,
603
- olympe.dc.query.Ub.Zo,olympe.dc.query.P.Ea,olympe.dc.query.Lb.Oe,new olympe.U.fa(olympe.dc.Config.Zg));A(a,olympe.dc.query.Lb.Uo,olympe.dc.query.Ub.$o,olympe.dc.query.P.Ea,olympe.dc.query.Lb.Oe,olympe.dc.query.Lb.Dj);A(a,olympe.dc.query.Lb.So,olympe.dc.query.Ub.Yo,olympe.dc.query.P.Ea,olympe.dc.query.Lb.Oe);A(a,olympe.dc.query.Lb.Yj,olympe.dc.query.Ub.Ep,olympe.dc.query.P.Ea,olympe.dc.P.si,olympe.dc.query.Lb.Oe);A(a,olympe.dc.query.Lb.kq,olympe.dc.query.Ub.Cu,olympe.dc.query.P.Ea,olympe.dc.query.Lb.Oe,
604
- olympe.dc.query.Lb.il,olympe.dc.query.Lb.Dj,olympe.dc.P.ne,olympe.dc.db.P.Aa);A(a,olympe.dc.query.Lb.il,olympe.dc.query.Ub.Es,olympe.dc.query.P.Ea,olympe.dc.query.Lb.Oe,olympe.dc.transaction.P.Aa);C(a,olympe.dc.query.P.Aa,[olympe.dc.query.P.Ea,new olympe.U.fa(olympe.dc.Config.Zg),olympe.dc.P.ne,olympe.dc.db.P.Aa,olympe.dc.query.Lb.Oe,olympe.dc.query.Lb.Dj,olympe.dc.query.Lb.xp,olympe.dc.query.Lb.To,olympe.dc.query.Lb.Uo,olympe.dc.query.Lb.So,olympe.dc.query.Lb.Yj,olympe.dc.query.Lb.kq],(b,c,d,e,f,
605
- g,h,k,l,n,p,q)=>new olympe.dc.query.Au(b,c,d,e,f,g,[h,k,l,n,p],q))});olympe.U.run([olympe.dc.query.Lb.Oe],a=>{olympe.dj().subscriptions=a});olympe.dc.query.ua={};function mg(){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')}
606
- olympe.dc.query.ua.Rq=class{constructor(a,b){this.C=new Map;this.G=new Map;this.R=a;this.da=b}F(){}L(a){var b=this.C.get(a);this.C.set(a,void 0!==b?b+1:1);b=this.G.get(a);this.G.set(a,void 0!==b?b:!1)}};function kg(a,b){const c=b.Z();a.W.set(c,b);olympe.D.La().onDestroy(()=>{a.W.delete(c)})}function lg(a,b){const c=b.Z();a.$.set(c,b);olympe.D.La().onDestroy(()=>{a.$.delete(c)})}olympe.dc.query.ua.ft=class extends olympe.dc.query.ua.Rq{constructor(a,b,c){super(a,b);this.ua=c;this.W=new Map;this.$=new Map;b&&mg()}F(){return this.R}};olympe.dc.query.ua.Zt=class extends olympe.dc.query.ua.Rq{constructor(a,b){super(a,b);this.W=new Map}F(){return this.R}L(a){super.L(a);if(this.da){const b='md_'+olympe.X.ec();this.W.set(b,mg());olympe.D.La().onDestroy(()=>{this.W.delete(b)})}}};function ng(a,b){let c;a.C!==b&&(null==(c=a.C)?void 0:c.hash)!==b.hash&&(a.C=b,og(a,!1),a.G.forEach(d=>d(b)))}function og(a,b){var c=Be(a.query);if(c!==olympe.dc.Ha.sb&&c!==olympe.dc.Ha.Mc){var d;c=null!=(d=a.C)?d:olympe.dc.Xa.empty();Wc(a.R,null,b?Ie(c):Je(c))}}function pg(a,b){const c=a.W++;a.G.set(c,b);a.C&&b(a.C);return()=>a.G.delete(c)}
607
- olympe.dc.query.ua.Bu=class{constructor(a){this.query=a;this.R=olympe.dc.xd();this.id=a.Z();this.C=null;this.F=new olympe.dc.ba.gq(a);this.counter=this.W=0;this.G=new Map;this.L=[]}update(){var a=this.F;a.F?(a.F=!1,a=!0):a=!1;if(a){var b;a=null!=(b=this.C)?b:olympe.dc.Xa.empty();b=olympe.dc.Xa.from(a,this.F);ng(this,b)}}onDestroy(a){this.L.push(a)}destroy(){og(this,!0);this.L.forEach(a=>a())}};olympe.dc.query.Ub={};function qg(a,b,c,d,e){a.N.debug('CoverageProcessor: [ID:',d,'] - checking coverage of remote query over',b.length,'paths.');const f=new olympe.async.ng(olympe.D.La()),g=k=>{f.add((l,n)=>{k.jb(p=>{p?n(`The query ${d} is not covered by an existing graphdef, `+`and the specific graphdef id ${k.Z()} has encountered an error: ${p}`):l()});jg(a.ua,k.Z(),c)})},h=Array.from(bg(a.ua,olympe.dc.Ha.Mc));b.forEach(k=>{const l=mf(k);let n=!1;for(let p=0,q=h.length;p<q;p++){const r=h[p];if(r.wr(l)){g(r.nh,!1);
608
- n=!0;break}}n?a.N.debug('CoverageProcessor: [ID:',d,'] - graphPath',k,' is covered'):g(k,!0)});ac(f,(k,l)=>e(l));f.start()}function rg(a,b,c){const d=[b.Ld()],e=g=>g instanceof olympe.dc.Y.wf,f=(b.Cg()||[]).filter(e);for(const g of f)d.push(g.Ld()),f.push(...(g.Cg()||[]).filter(e));te(a.C,()=>{olympe.D.yc(d,()=>{const g=b.be();qg(a,g,b,b.Z(),c)})})}function sg(a,b,c,d){const e=b.Z(),f=[ze(b,c)];te(a.C,()=>qg(a,f,b,e,d))}olympe.dc.query.Ub.Es=class{constructor(a,b,c){this.N=a;this.ua=b;this.C=c}};olympe.dc.query.Ub.Yo=class{constructor(a,b){this.N=a;this.ua=b}process(a,b,c){const d=b.Z();this.ua.C.has(d)?(Of(this.ua,d).ja(b),olympe.dc.xd().$e(b.data,a),c(null,b)):c(Error(`Received a notification for the graphdef ${d} which does not exist.`),b)}};olympe.dc.query.Ub.Yo.ma=[olympe.dc.og];olympe.dc.query.Ub.Zo=class{constructor(a,b,c){this.N=a;this.ua=b;this.C=c}process(a,b,c){var d=b.Z();if(a===olympe.dc.Ha.sb||this.ua.C.has(d)){if(c(null,b),a=Of(this.ua,d),this.C||a&&a.L)a=olympe.dc.Ha.sb,d=new olympe.dc.query.Ai(d,a,a,new olympe.dc.db.uc),Vf(olympe.dc.Nf(),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.Ub.Zo.ma=[olympe.dc.og];olympe.dc.query.Ub.$o=class{constructor(a,b,c){this.N=a;this.C=b;this.F=c}process(a,b,c){const d=b.Z();if(this.C.C.has(d)){const f=Of(this.C,d);if(b instanceof olympe.dc.query.errors.Rj)Qf(this.C,d,a);else if(!f.L){f.da(b);const g=olympe.dc.xd();Wc(g,f.W());g.$e(b.xc,b.destination);f.onDestroy(()=>{Wc(g,null,f.W())});vf(f)}}let e;b instanceof olympe.dc.query.errors.Rj&&(e=`graph subscription "${d}" failed to create the initial result: ${b.da()}`,this.N.error(e));af(this.F,b.Z(),b);c(e?Error(e):null,
609
- b)}};olympe.dc.query.Ub.$o.ma=[olympe.dc.og];const tg=[],ug=new Map;function vg(a,b,c,d){Ac(a.db,d,e=>{e?b.Eg(c)?a.N.warn('Adding the same index twice (should never happen) for sub #'+b.Z()+', index #'+c+', tag #'+d):b.Vb(c,d):wg(a,b,c,d)},c)}function wg(a,b,c,d){Bc(a.db,d,c,!0);b.bc(c);tg.length=0;b.zc(function(e,f){tg[e]=f});c=a=0;for(d=tg.length;a<d;a++)'string'===typeof tg[a]&&(tg[c++]=tg[a]);tg.length=c;b.Ab(tg)}
610
- olympe.dc.query.Ub.Ep=class{constructor(a,b,c){this.N=a;this.db=b;this.ua=c}process(a,b,c){const d=b.Z();a=b.C;const e=Sf(this.ua,d);if(null===e)c(Error(`Received list notification for undefined subscription "${d}"`),b);else{tg.length=a.length;e.zc((f,g)=>{if(f=e.kh(g)){f=f.T();var h=ug.get(f);void 0===h?ug.set(f,g):'string'===typeof h?ug.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.')});
611
- for(let f=0,g=a.length;f<g;f++){const h=a[f];let k=ug.get(h);void 0===k?(k=olympe.X.ec(),vg(this,e,k,h)):'string'===typeof k?ug.delete(h):(k=k.pop(),0===k.length&&ug.delete(h));tg[f]=k}for(const [f,g]of ug){if('string'===typeof g)wg(this,e,g,f);else for(let h=0,k=g.length;h<k;h++)wg(this,e,g[h],f);ug.delete(f)}e.Ab(tg);c(null,b)}}};olympe.dc.query.Ub.Ep.ma=[olympe.dc.og];function xg(a,b,c,d){const e=c.Z();a.N.debug('ListProcessor: [ID:',e,'] - processing with source ',b);gg(a.ua,c,b);if(fg(a.ua,e,olympe.dc.Ha.sb))a.N.debug('ListProcessor: [ID:',e,'] - id already processed');else{a.N.debug('ListProcessor: [ID:',e,'] - NOT processed yet.');const f=c.Xc();a.F||f===olympe.dc.Ha.sb?(a.N.debug('QueryMGR: [ID:',e,'] - Local subscription, no need for coverage check, booting subscription '),yg(a,c)):c.Bh().run(()=>{rg(a.C,c,g=>{g?a.N.error(g):yg(a,c)})})}b===olympe.dc.Ha.sb||
600
+ function eg(a,b,c){let d=a.L.get(c);d?d.add(b):(d=(new Set).add(b),a.L.set(c,d))}function gg(a,b,c){var d=olympe.dc.Ha.sb;const e=b.Z();let f=a.F.get(e);void 0===f&&(f=new olympe.dc.query.ua.Yt(b,a.R),a.F.set(e,f));f.L(c);eg(a,e,d)}function dg(a,b,c,d){if(!b.has(c))return!1;const e=b.get(c);var f=e.C.get(d)-1;0===f?(e.C.delete(d),e.G.delete(d),f=0===e.C.size):(e.C.set(d,f),f=!1);return f?((d=Rf(a,c))&&a.L.get(d).delete(c),e.F().release(),b.delete(c),!0):0===e.C.get(d)}
601
+ function hg(a,b){const c=b.Z();let d=a.G.get(c);d||(d=new olympe.dc.query.ua.Au(b),a.G.set(c,d));d.counter++;return d}function ig(a){a.G.forEach(b=>b.update())}function jg(a,b,c){const d=a.C.get(b);d?c instanceof olympe.dc.query.Subscription?kg(d,c):lg(d,c):a.N.error(`Try to set the subscription ${c.Z()} as covered by a graphquery that is not registered (${b}).`)}olympe.dc.query.Wu=class{constructor(a,b){this.N=a;this.C=new Map;this.F=new Map;this.G=new Map;this.W=new Set;this.L=new Map;this.R=b}};olympe.dc.Wc=class{na(){}Wb(){}getTransform(){}la(){}toString(){}};olympe.dc.hq=class{F(){}};olympe.dc.yf=class{na(){}getValue(){}C(){}la(){}toString(){}};olympe.dc.query.P={Ea:'olympe.dc.query.Logger',Aa:'olympe.dc.query.QueryManager'};olympe.dc.query.Lb={Oe:'olympe.dc.query.SubscriptionRegistry',Cj:'olympe.dc.query.CallbackRegistry',So:'olympe.dc.query.GraphProcessor',Ro:'olympe.dc.query.GraphNotificationProcessor',To:'olympe.dc.query.GraphResultProcessor',wp:'olympe.dc.query.ListProcessor',Xj:'olympe.dc.query.ListNotificationProcessor',jq:'olympe.dc.query.QueryProcessor',hl:'olympe.dc.query.CoverageProcessor'};olympe.dc.query.Config={Hq:'subscription.debug'};
602
+ olympe.U.config(function(a){D(a,olympe.dc.query.Config.Hq,!1);C(a,olympe.dc.query.P.Ea,[olympe.ra.P.Aa],b=>b.Oc('dc.query'));A(a,olympe.dc.query.Lb.Oe,olympe.dc.query.Wu,olympe.dc.query.P.Ea,new olympe.U.fa(olympe.dc.query.Config.Hq));A(a,olympe.dc.query.Lb.Cj,olympe.dc.query.As,olympe.dc.query.P.Ea);A(a,olympe.dc.query.Lb.wp,olympe.dc.query.Ub.Ep,olympe.dc.query.P.Ea,olympe.dc.P.si,olympe.dc.query.Lb.Oe,olympe.dc.query.Lb.hl,olympe.dc.transaction.P.Aa,new olympe.U.fa(olympe.dc.Config.Zg));A(a,olympe.dc.query.Lb.So,
603
+ olympe.dc.query.Ub.Yo,olympe.dc.query.P.Ea,olympe.dc.query.Lb.Oe,new olympe.U.fa(olympe.dc.Config.Zg));A(a,olympe.dc.query.Lb.To,olympe.dc.query.Ub.Zo,olympe.dc.query.P.Ea,olympe.dc.query.Lb.Oe,olympe.dc.query.Lb.Cj);A(a,olympe.dc.query.Lb.Ro,olympe.dc.query.Ub.Xo,olympe.dc.query.P.Ea,olympe.dc.query.Lb.Oe);A(a,olympe.dc.query.Lb.Xj,olympe.dc.query.Ub.Dp,olympe.dc.query.P.Ea,olympe.dc.P.si,olympe.dc.query.Lb.Oe);A(a,olympe.dc.query.Lb.jq,olympe.dc.query.Ub.Bu,olympe.dc.query.P.Ea,olympe.dc.query.Lb.Oe,
604
+ olympe.dc.query.Lb.hl,olympe.dc.query.Lb.Cj,olympe.dc.P.ne,olympe.dc.db.P.Aa);A(a,olympe.dc.query.Lb.hl,olympe.dc.query.Ub.Ds,olympe.dc.query.P.Ea,olympe.dc.query.Lb.Oe,olympe.dc.transaction.P.Aa);C(a,olympe.dc.query.P.Aa,[olympe.dc.query.P.Ea,new olympe.U.fa(olympe.dc.Config.Zg),olympe.dc.P.ne,olympe.dc.db.P.Aa,olympe.dc.query.Lb.Oe,olympe.dc.query.Lb.Cj,olympe.dc.query.Lb.wp,olympe.dc.query.Lb.So,olympe.dc.query.Lb.To,olympe.dc.query.Lb.Ro,olympe.dc.query.Lb.Xj,olympe.dc.query.Lb.jq],(b,c,d,e,f,
605
+ g,h,k,l,n,p,q)=>new olympe.dc.query.zu(b,c,d,e,f,g,[h,k,l,n,p],q))});olympe.U.run([olympe.dc.query.Lb.Oe],a=>{olympe.dj().subscriptions=a});olympe.dc.query.ua={};function mg(){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')}
606
+ olympe.dc.query.ua.Qq=class{constructor(a,b){this.C=new Map;this.G=new Map;this.R=a;this.da=b}F(){}L(a){var b=this.C.get(a);this.C.set(a,void 0!==b?b+1:1);b=this.G.get(a);this.G.set(a,void 0!==b?b:!1)}};function kg(a,b){const c=b.Z();a.W.set(c,b);olympe.D.La().onDestroy(()=>{a.W.delete(c)})}function lg(a,b){const c=b.Z();a.$.set(c,b);olympe.D.La().onDestroy(()=>{a.$.delete(c)})}olympe.dc.query.ua.et=class extends olympe.dc.query.ua.Qq{constructor(a,b,c){super(a,b);this.ua=c;this.W=new Map;this.$=new Map;b&&mg()}F(){return this.R}};olympe.dc.query.ua.Yt=class extends olympe.dc.query.ua.Qq{constructor(a,b){super(a,b);this.W=new Map}F(){return this.R}L(a){super.L(a);if(this.da){const b='md_'+olympe.X.ec();this.W.set(b,mg());olympe.D.La().onDestroy(()=>{this.W.delete(b)})}}};function ng(a,b){let c;a.C!==b&&(null==(c=a.C)?void 0:c.hash)!==b.hash&&(a.C=b,og(a,!1),a.G.forEach(d=>d(b)))}function og(a,b){var c=Be(a.query);if(c!==olympe.dc.Ha.sb&&c!==olympe.dc.Ha.Mc){var d;c=null!=(d=a.C)?d:olympe.dc.Xa.empty();Wc(a.R,null,b?Ie(c):Je(c))}}function pg(a,b){const c=a.W++;a.G.set(c,b);a.C&&b(a.C);return()=>a.G.delete(c)}
607
+ olympe.dc.query.ua.Au=class{constructor(a){this.query=a;this.R=olympe.dc.xd();this.id=a.Z();this.C=null;this.F=new olympe.dc.ba.fq(a);this.counter=this.W=0;this.G=new Map;this.L=[]}update(){var a=this.F;a.F?(a.F=!1,a=!0):a=!1;if(a){var b;a=null!=(b=this.C)?b:olympe.dc.Xa.empty();b=olympe.dc.Xa.from(a,this.F);ng(this,b)}}onDestroy(a){this.L.push(a)}destroy(){og(this,!0);this.L.forEach(a=>a())}};olympe.dc.query.Ub={};function qg(a,b,c,d,e){a.N.debug('CoverageProcessor: [ID:',d,'] - checking coverage of remote query over',b.length,'paths.');const f=new olympe.async.ng(olympe.D.La()),g=k=>{f.add((l,n)=>{k.jb(p=>{p?n(`The query ${d} is not covered by an existing graphdef, `+`and the specific graphdef id ${k.Z()} has encountered an error: ${p}`):l()});jg(a.ua,k.Z(),c)})},h=Array.from(bg(a.ua,olympe.dc.Ha.Mc));b.forEach(k=>{const l=mf(k);let n=!1;for(let p=0,q=h.length;p<q;p++){const r=h[p];if(r.vr(l)){g(r.nh,!1);
608
+ n=!0;break}}n?a.N.debug('CoverageProcessor: [ID:',d,'] - graphPath',k,' is covered'):g(k,!0)});ac(f,(k,l)=>e(l));f.start()}function rg(a,b,c){const d=[b.Ld()],e=g=>g instanceof olympe.dc.Y.wf,f=(b.Cg()||[]).filter(e);for(const g of f)d.push(g.Ld()),f.push(...(g.Cg()||[]).filter(e));te(a.C,()=>{olympe.D.yc(d,()=>{const g=b.be();qg(a,g,b,b.Z(),c)})})}function sg(a,b,c,d){const e=b.Z(),f=[ze(b,c)];te(a.C,()=>qg(a,f,b,e,d))}olympe.dc.query.Ub.Ds=class{constructor(a,b,c){this.N=a;this.ua=b;this.C=c}};olympe.dc.query.Ub.Xo=class{constructor(a,b){this.N=a;this.ua=b}process(a,b,c){const d=b.Z();this.ua.C.has(d)?(Of(this.ua,d).ja(b),olympe.dc.xd().$e(b.data,a),c(null,b)):c(Error(`Received a notification for the graphdef ${d} which does not exist.`),b)}};olympe.dc.query.Ub.Xo.ma=[olympe.dc.og];olympe.dc.query.Ub.Yo=class{constructor(a,b,c){this.N=a;this.ua=b;this.C=c}process(a,b,c){var d=b.Z();if(a===olympe.dc.Ha.sb||this.ua.C.has(d)){if(c(null,b),a=Of(this.ua,d),this.C||a&&a.L)a=olympe.dc.Ha.sb,d=new olympe.dc.query.Ai(d,a,a,new olympe.dc.db.uc),Vf(olympe.dc.Nf(),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.Ub.Yo.ma=[olympe.dc.og];olympe.dc.query.Ub.Zo=class{constructor(a,b,c){this.N=a;this.C=b;this.F=c}process(a,b,c){const d=b.Z();if(this.C.C.has(d)){const f=Of(this.C,d);if(b instanceof olympe.dc.query.errors.Qj)Qf(this.C,d,a);else if(!f.L){f.da(b);const g=olympe.dc.xd();Wc(g,f.W());g.$e(b.xc,b.destination);f.onDestroy(()=>{Wc(g,null,f.W())});vf(f)}}let e;b instanceof olympe.dc.query.errors.Qj&&(e=`graph subscription "${d}" failed to create the initial result: ${b.da()}`,this.N.error(e));af(this.F,b.Z(),b);c(e?Error(e):null,
609
+ b)}};olympe.dc.query.Ub.Zo.ma=[olympe.dc.og];const tg=[],ug=new Map;function vg(a,b,c,d){Ac(a.db,d,e=>{e?b.Eg(c)?a.N.warn('Adding the same index twice (should never happen) for sub #'+b.Z()+', index #'+c+', tag #'+d):b.Vb(c,d):wg(a,b,c,d)},c)}function wg(a,b,c,d){Bc(a.db,d,c,!0);b.bc(c);tg.length=0;b.zc(function(e,f){tg[e]=f});c=a=0;for(d=tg.length;a<d;a++)'string'===typeof tg[a]&&(tg[c++]=tg[a]);tg.length=c;b.Ab(tg)}
610
+ olympe.dc.query.Ub.Dp=class{constructor(a,b,c){this.N=a;this.db=b;this.ua=c}process(a,b,c){const d=b.Z();a=b.C;const e=Sf(this.ua,d);if(null===e)c(Error(`Received list notification for undefined subscription "${d}"`),b);else{tg.length=a.length;e.zc((f,g)=>{if(f=e.kh(g)){f=f.T();var h=ug.get(f);void 0===h?ug.set(f,g):'string'===typeof h?ug.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.')});
611
+ for(let f=0,g=a.length;f<g;f++){const h=a[f];let k=ug.get(h);void 0===k?(k=olympe.X.ec(),vg(this,e,k,h)):'string'===typeof k?ug.delete(h):(k=k.pop(),0===k.length&&ug.delete(h));tg[f]=k}for(const [f,g]of ug){if('string'===typeof g)wg(this,e,g,f);else for(let h=0,k=g.length;h<k;h++)wg(this,e,g[h],f);ug.delete(f)}e.Ab(tg);c(null,b)}}};olympe.dc.query.Ub.Dp.ma=[olympe.dc.og];function xg(a,b,c,d){const e=c.Z();a.N.debug('ListProcessor: [ID:',e,'] - processing with source ',b);gg(a.ua,c,b);if(fg(a.ua,e,olympe.dc.Ha.sb))a.N.debug('ListProcessor: [ID:',e,'] - id already processed');else{a.N.debug('ListProcessor: [ID:',e,'] - NOT processed yet.');const f=c.Xc();a.F||f===olympe.dc.Ha.sb?(a.N.debug('QueryMGR: [ID:',e,'] - Local subscription, no need for coverage check, booting subscription '),yg(a,c)):c.Bh().run(()=>{rg(a.C,c,g=>{g?a.N.error(g):yg(a,c)})})}b===olympe.dc.Ha.sb||
612
612
  fg(a.ua,e,b)||a.notify(b,c);d(null,c)}
613
- function yg(a,b){if(b.W())a.N.debug('ListProcessor: [ID:',b.Z(),'] - Subscription already booted, ignoring');else{a.N.debug('ListProcessor: [ID:',b.Z(),'] - Booting subscription');var c=new olympe.dc.pc.Qq(a.db,a.N),d=zg(a,b,c),e=b.Z();b.Bh().run(()=>{olympe.D.yc([b.Ld()],f=>{const g=olympe.dc.za(f);a.N.debug('ListProcessor: [ID:',b.Z(),'] - Booting with baseTag',g);b.We()||b.ph();Ac(a.db,g,h=>d(h,g),e);olympe.D.La().R(()=>Bc(a.db,g,e));a.db.Db(g.valueOf())||Ag(c);b.W()||(Ag(c),b.Ab([]))})})}}
614
- function zg(a,b,c){const d=new olympe.dc.pc.Bj;let e=!1;const f=b.Bh(),g=b.Cg(),h=[];h[g?g.length:0]=f.F((k,l,n,p)=>{f.$()||f.G()||(k?b.Eg(n)?a.N.warn('Adding the same index twice (should never happen) for sub #',b.Z(),', index #',n,', tag #',l):(a.N.debug('ListProcessor: [ID:',b.Z(),'] - Adding Instance',l,'to the subscription'),b.Vb(n,l)):(a.N.debug('ListProcessor: [ID:',b.Z(),'] - Removing Instance',l,'from the subscription'),b.bc(n)),e||(Bg(c,()=>{p.tg();Ag(c)}),p.Jc().Kg(b.Ab.bind(b)),e=!0),
613
+ function yg(a,b){if(b.W())a.N.debug('ListProcessor: [ID:',b.Z(),'] - Subscription already booted, ignoring');else{a.N.debug('ListProcessor: [ID:',b.Z(),'] - Booting subscription');var c=new olympe.dc.pc.Pq(a.db,a.N),d=zg(a,b,c),e=b.Z();b.Bh().run(()=>{olympe.D.yc([b.Ld()],f=>{const g=olympe.dc.za(f);a.N.debug('ListProcessor: [ID:',b.Z(),'] - Booting with baseTag',g);b.We()||b.ph();Ac(a.db,g,h=>d(h,g),e);olympe.D.La().R(()=>Bc(a.db,g,e));a.db.Db(g.valueOf())||Ag(c);b.W()||(Ag(c),b.Ab([]))})})}}
614
+ function zg(a,b,c){const d=new olympe.dc.pc.Aj;let e=!1;const f=b.Bh(),g=b.Cg(),h=[];h[g?g.length:0]=f.F((k,l,n,p)=>{f.$()||f.G()||(k?b.Eg(n)?a.N.warn('Adding the same index twice (should never happen) for sub #',b.Z(),', index #',n,', tag #',l):(a.N.debug('ListProcessor: [ID:',b.Z(),'] - Adding Instance',l,'to the subscription'),b.Vb(n,l)):(a.N.debug('ListProcessor: [ID:',b.Z(),'] - Removing Instance',l,'from the subscription'),b.bc(n)),e||(Bg(c,()=>{p.tg();Ag(c)}),p.Jc().Kg(b.Ab.bind(b)),e=!0),
615
615
  Cg(c,n))});if(null!==g){const k=olympe.dc.Jc();for(let l=g.length-1;0<=l;l--)h[l]=f.F(g[l].getTransform(k,c,h[l+1]))}return(k,l)=>{const n=b.Z();c.register(n,null);const p=d.C(k,l,n,null);if(null!==p)h[0](k,l,n,Dg(p,k,l,n))}}
616
- olympe.dc.query.Ub.Fp=class{constructor(a,b,c,d,e,f){this.N=a;this.db=b;this.ua=c;this.C=d;this.F=f}process(a,b,c){xg(this,a,b,c)}notify(a,b){const c=b.Z();this.N.debug(`Register notification of list subscription ${c} for destination ${a}`);const d=()=>{const f=new olympe.dc.query.Dp(c);b.ae(g=>f.F(g));Xf(olympe.dc.Nf(),f)};let e=!1;b.forEach(()=>{e&&d()});b.Ke(()=>{e=!0;d()})}};olympe.dc.query.Ub.Fp.ma=[olympe.dc.og];function Nf(a,b,c){const d=b.Z(),e=Be(b),f=a.ua.G.has(d),g=hg(a.ua,b);return new rxjs.Observable(h=>{const k=pg(g,h.next.bind(h)),l=()=>{k();h.complete();n&&c.be(n);{var p=a.ua;const r=p.G.get(d);var q;if(q=r)q=r,0<q.counter?q.counter--:olympe.ra.Ya('dc').warn('Try to decrement counter of query metadata below 0. Investigate...'),q=0===q.counter;q&&(r.destroy(),p.G.delete(d),p.W.delete(d))}},n=c.R(l);if(!f)if(e===olympe.dc.Ha.Mc)sg(a.L,b,!0,p=>{p?(h.error(p),l()):Eg(a,d,b,g)});else if(e===olympe.dc.Ha.sb)Eg(a,
617
- d,b,g);else{const p=M(Dc(new olympe.dc.ha(olympe.dc.ha.ia.cm,b,[e]),c),q=>{q&&(h.error(q.message),l())});a.G.send(p)}return l})}
618
- function Fg(a){const b=olympe.dc.ha.ia.bm,c=(d,e)=>Le(d,f=>{Wc(a.F,Array.from(f.de()).filter(g=>g.re()).map(g=>g.tag()));a.F.$e(f,e)},e);a.G.C(olympe.dc.ha.ia.QUERY_RESULT,(d,{i:e,r:f,s:g})=>{d=c(f,g);null===d?(d=a.C,$e(d,e,`Error while deserialization of QueryResult for query ${e}`,d.G,`Query result of query ${e} has no associated handler in the datacloud`)):(f=a.C,$e(f,e,d,f.G,`Query result of query ${e} has no associated handler in the datacloud`))});a.G.C(b,(d,{i:e,r:f,s:g})=>{if(d=c(f,g)){let h;
616
+ olympe.dc.query.Ub.Ep=class{constructor(a,b,c,d,e,f){this.N=a;this.db=b;this.ua=c;this.C=d;this.F=f}process(a,b,c){xg(this,a,b,c)}notify(a,b){const c=b.Z();this.N.debug(`Register notification of list subscription ${c} for destination ${a}`);const d=()=>{const f=new olympe.dc.query.Cp(c);b.ae(g=>f.F(g));Xf(olympe.dc.Nf(),f)};let e=!1;b.forEach(()=>{e&&d()});b.Ke(()=>{e=!0;d()})}};olympe.dc.query.Ub.Ep.ma=[olympe.dc.og];function Nf(a,b,c){const d=b.Z(),e=Be(b),f=a.ua.G.has(d),g=hg(a.ua,b);return new rxjs.Observable(h=>{const k=pg(g,h.next.bind(h)),l=()=>{k();h.complete();n&&c.be(n);{var p=a.ua;const r=p.G.get(d);var q;if(q=r)q=r,0<q.counter?q.counter--:olympe.ra.Ya('dc').warn('Try to decrement counter of query metadata below 0. Investigate...'),q=0===q.counter;q&&(r.destroy(),p.G.delete(d),p.W.delete(d))}},n=c.R(l);if(!f)if(e===olympe.dc.Ha.Mc)sg(a.L,b,!0,p=>{p?(h.error(p),l()):Eg(a,d,b,g)});else if(e===olympe.dc.Ha.sb)Eg(a,
617
+ d,b,g);else{const p=M(Dc(new olympe.dc.ha(olympe.dc.ha.ia.bm,b,[e]),c),q=>{q&&(h.error(q.message),l())});a.G.send(p)}return l})}
618
+ function Fg(a){const b=olympe.dc.ha.ia.am,c=(d,e)=>Le(d,f=>{Wc(a.F,Array.from(f.de()).filter(g=>g.re()).map(g=>g.tag()));a.F.$e(f,e)},e);a.G.C(olympe.dc.ha.ia.QUERY_RESULT,(d,{i:e,r:f,s:g})=>{d=c(f,g);null===d?(d=a.C,$e(d,e,`Error while deserialization of QueryResult for query ${e}`,d.G,`Query result of query ${e} has no associated handler in the datacloud`)):(f=a.C,$e(f,e,d,f.G,`Query result of query ${e} has no associated handler in the datacloud`))});a.G.C(b,(d,{i:e,r:f,s:g})=>{if(d=c(f,g)){let h;
619
619
  null==(h=a.ua.G.get(e))||ng(h,d)}});Vc(a.F,()=>ig(a.ua))}function Eg(a,b,c,d){let e=(p,q)=>{p?a.N.debug(`New result tuple for query ${b}, ${q}`):a.N.debug(`Removed result tuple for query ${b}, ${q}`)};const f=c.C,g=f.reduce((p,q)=>{p.push(q.F(p[p.length-1]));return p},[0]),h=d.F;for(let p=f.length-1;0<=p;p--)e=f[p].observe(h,g[p],e);const k=a.F.view,l=c.G,n=Ac(k,l,(p,q)=>{p?h.insert(q,0,null):h.remove(q,0,null);e(p,q,null,b)});d.onDestroy(()=>Bc(k,l,n));Pe(h);d.update()}
620
- olympe.dc.query.Ub.Cu=class{constructor(a,b,c,d,e,f){this.N=a;this.ua=b;this.L=c;this.C=d;this.G=e;this.F=f;Fg(this)}jb(a,b){return new Promise((c,d)=>{var e=Be(a);if(e===olympe.dc.Ha.Mc)sg(this.L,a,!1,f=>{f?d(f):c(this.Ic(a))});else if(e===olympe.dc.Ha.sb)c(this.Ic(a));else{const f=a.Z(),g=this.C.C.has(f),h=l=>{var n=this.C;Ze(n,f,n.G);d(l||`The execution of the query ${f} has been interrupted`)},k=b.R(h);bf(this.C,f,(l,n)=>{b.be(k);l?d(l.message):(b.R(()=>{Wc(this.F,null,Ie(n))}),c(n))});g||(e=
621
- M(Dc(new olympe.dc.ha(olympe.dc.ha.ia.am,a,[e]),b),l=>l&&h(l.message)),this.G.send(e))}})}Ic(a){const b=new olympe.dc.ba.gq(a);b.insert(a.G,0,null);let c=0;for(const d of a.C)d.jb(b,c),c=d.F(c);return olympe.dc.Xa.from(olympe.dc.Xa.empty(),b)}};olympe.dc.query.errors={};olympe.dc.query.errors.Rj=class extends olympe.dc.query.Ai{constructor(a,b,c,d){super(a,b,c,new olympe.dc.db.uc);this.error=d}da(){return this.error}};olympe.dc.pc={};function Dg(a,b,c,d){b?a.W[d]=c:delete a.W[d];null===a.F&&(a.F=new olympe.dc.pc.Ij(a.C,a));return a.F}function Gg(a,b){for(let c=0;c<b;c++)if(null!==a.F)a=a.F;else break;return a}function Hg(a,b){a=a.W;if(null!==a)for(let c in a)Object.prototype.hasOwnProperty.call(a,c)&&b.push(c)}olympe.dc.pc.Ij=class{constructor(a,b){this.C=a;this.depth=b?b.depth+1:0;this.W=Object.create(null);this.F=null}Jc(){return this.C}tg(){this.C.R()?this.C.G():this.C.$(this.depth-1)}};olympe.dc.pc.pa=class{constructor(){}C(){}R(){}$(){}G(){}Kg(){}};olympe.dc.pc.Bj=class{constructor(){this.W=this.L=this.index=this.F=null}R(){return null!==this.F}$(a){if(null!==this.F)throw Error('Manager already activated (depth='+this.F+')');this.F=a;this.G()}C(a,b,c){b=this.L;if(a&&null!==b)throw Error('The AutoManger handles only a single item.');a?(b=new olympe.dc.pc.Ij(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=
622
- [];null!==this.L&&(0<=this.F?Hg(Gg(this.L,this.F),a):a.push(this.index));this.W(a)}}Kg(a){this.W=a}};olympe.dc.pc.Bj.ma=[olympe.dc.pc.pa];function Ig(a,b){olympe.D.Vf(a.value)?(a.node=olympe.D.Uk(a.value,b),Xa(a.node)||b()):b()}function Jg(a,b){if(olympe.D.Vf(a.value)){const c=olympe.D.La(),d=a.R;olympe.D.yc([a.value],e=>{d!==e.valueOf()&&(c.run(()=>Ig(a,b)),olympe.D.La().destroy())})}}
623
- class Kg extends olympe.dc.pc.Ij{constructor(a,b,c){super(a);this.index=b;this.value=c;this.R=this.$a();this.position=this.node=null;this.$=!1;this.L=null}$a(){const a=olympe.D.$a(this.value);return a?a.valueOf():a}destroy(){this.node&&(this.node.destroy(),this.node=null);this.L=this.value=null}G(){return null===this.value}}
620
+ olympe.dc.query.Ub.Bu=class{constructor(a,b,c,d,e,f){this.N=a;this.ua=b;this.L=c;this.C=d;this.G=e;this.F=f;Fg(this)}jb(a,b){return new Promise((c,d)=>{var e=Be(a);if(e===olympe.dc.Ha.Mc)sg(this.L,a,!1,f=>{f?d(f):c(this.Ic(a))});else if(e===olympe.dc.Ha.sb)c(this.Ic(a));else{const f=a.Z(),g=this.C.C.has(f),h=l=>{var n=this.C;Ze(n,f,n.G);d(l||`The execution of the query ${f} has been interrupted`)},k=b.R(h);bf(this.C,f,(l,n)=>{b.be(k);l?d(l.message):(b.R(()=>{Wc(this.F,null,Ie(n))}),c(n))});g||(e=
621
+ M(Dc(new olympe.dc.ha(olympe.dc.ha.ia.$l,a,[e]),b),l=>l&&h(l.message)),this.G.send(e))}})}Ic(a){const b=new olympe.dc.ba.fq(a);b.insert(a.G,0,null);let c=0;for(const d of a.C)d.jb(b,c),c=d.F(c);return olympe.dc.Xa.from(olympe.dc.Xa.empty(),b)}};olympe.dc.query.errors={};olympe.dc.query.errors.Qj=class extends olympe.dc.query.Ai{constructor(a,b,c,d){super(a,b,c,new olympe.dc.db.uc);this.error=d}da(){return this.error}};olympe.dc.pc={};function Dg(a,b,c,d){b?a.W[d]=c:delete a.W[d];null===a.F&&(a.F=new olympe.dc.pc.Hj(a.C,a));return a.F}function Gg(a,b){for(let c=0;c<b;c++)if(null!==a.F)a=a.F;else break;return a}function Hg(a,b){a=a.W;if(null!==a)for(let c in a)Object.prototype.hasOwnProperty.call(a,c)&&b.push(c)}olympe.dc.pc.Hj=class{constructor(a,b){this.C=a;this.depth=b?b.depth+1:0;this.W=Object.create(null);this.F=null}Jc(){return this.C}tg(){this.C.R()?this.C.G():this.C.$(this.depth-1)}};olympe.dc.pc.pa=class{constructor(){}C(){}R(){}$(){}G(){}Kg(){}};olympe.dc.pc.Aj=class{constructor(){this.W=this.L=this.index=this.F=null}R(){return null!==this.F}$(a){if(null!==this.F)throw Error('Manager already activated (depth='+this.F+')');this.F=a;this.G()}C(a,b,c){b=this.L;if(a&&null!==b)throw Error('The AutoManger handles only a single item.');a?(b=new olympe.dc.pc.Hj(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=
622
+ [];null!==this.L&&(0<=this.F?Hg(Gg(this.L,this.F),a):a.push(this.index));this.W(a)}}Kg(a){this.W=a}};olympe.dc.pc.Aj.ma=[olympe.dc.pc.pa];function Ig(a,b){olympe.D.Vf(a.value)?(a.node=olympe.D.Tk(a.value,b),Xa(a.node)||b()):b()}function Jg(a,b){if(olympe.D.Vf(a.value)){const c=olympe.D.La(),d=a.R;olympe.D.yc([a.value],e=>{d!==e.valueOf()&&(c.run(()=>Ig(a,b)),olympe.D.La().destroy())})}}
623
+ class Kg extends olympe.dc.pc.Hj{constructor(a,b,c){super(a);this.index=b;this.value=c;this.R=this.$a();this.position=this.node=null;this.$=!1;this.L=null}$a(){const a=olympe.D.$a(this.value);return a?a.valueOf():a}destroy(){this.node&&(this.node.destroy(),this.node=null);this.L=this.value=null}G(){return null===this.value}}
624
624
  function Lg(a,b){if(!b.G()){var c=a.F;const d=a.ta,e=b.$a();let f=0,g=c.length,h=0,k;for(null!==b.position&&--g;g>f;){h=Math.floor((f+g)/2);k=d(c[h].R,e);if(0===k||2>g-f){0>k&&null!==b.position&&b.position<=h&&(k=d(c[g].R,e));h=0>k?g:h;break}0>k?f=h:g=h}c=h;b.R=b.$a();c!==b.position&&(a.insert(b,c),b.$&&a.G())}}function Mg(a){const b=a.ta;a.F.sort((c,d)=>b(c.$a(),d.$a()))}
625
- olympe.dc.pc.Pq=class{constructor(a){this.ta=a;this.L=null;this.F=[];this.W=[];this.da=null;this.ja=new Map}C(a,b,c,d){b='$'+c;const e=this.F;let f;if(a)f=new Kg(this,c,d),this.ja.set(b,f),this.R()?Ig(f,()=>Lg(this,f)):(f.position=e.length,e.push(f));else{f=this.ja.get(b);if(void 0===f)throw Error('Trying to remove an non-registered item: "'+c+'"');this.ja.delete(b);null!==f.position&&(this.R()?this.remove(f):delete e[f.position]);f.destroy()}return f}R(){return null!==this.L}$(a){if(null!==this.L)throw Error('Manager already activated (depth='+
625
+ olympe.dc.pc.Oq=class{constructor(a){this.ta=a;this.L=null;this.F=[];this.W=[];this.da=null;this.ja=new Map}C(a,b,c,d){b='$'+c;const e=this.F;let f;if(a)f=new Kg(this,c,d),this.ja.set(b,f),this.R()?Ig(f,()=>Lg(this,f)):(f.position=e.length,e.push(f));else{f=this.ja.get(b);if(void 0===f)throw Error('Trying to remove an non-registered item: "'+c+'"');this.ja.delete(b);null!==f.position&&(this.R()?this.remove(f):delete e[f.position]);f.destroy()}return f}R(){return null!==this.L}$(a){if(null!==this.L)throw Error('Manager already activated (depth='+
626
626
  this.L+')');this.L=a;Mg(this);for(let b=0,c=this.F.length;b<c;b++){const d=this.F[b];d.position=b;Jg(d,()=>Lg(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.$){var b=e,c=this.L;b.$=!0;b.L=Gg(b,c)}0>this.L?this.W.push(e.index):e.L&&Hg(e.L,this.W)}this.da&&this.da(this.W)}Kg(a){this.da=a}insert(a,b){const c=this.F;var d=c.length;let e=a.position;null===
627
- e&&(e=d);if(b<e)for(d=e;d>b;d--)c[d]=c[d-1],c[d].position=d;else for(d=e;d<b;d++)c[d]=c[d+1],c[d].position=d;c[b]=a;c[b].position=b}remove(a){const b=this.F,c=b.length-1;if(null!==a.position){for(a=a.position;a<c;a++)b[a]=b[a+1],b[a].position=a;b.length=c}}};olympe.dc.pc.Pq.ma=[olympe.dc.pc.pa];class Ng extends olympe.dc.pc.Ij{constructor(a,b,c){super(a);this.index=b;this.tag=c;this.$=this.R=this.L=!1;this.G=null}}
627
+ e&&(e=d);if(b<e)for(d=e;d>b;d--)c[d]=c[d-1],c[d].position=d;else for(d=e;d<b;d++)c[d]=c[d+1],c[d].position=d;c[b]=a;c[b].position=b}remove(a){const b=this.F,c=b.length-1;if(null!==a.position){for(a=a.position;a<c;a++)b[a]=b[a+1],b[a].position=a;b.length=c}}};olympe.dc.pc.Oq.ma=[olympe.dc.pc.pa];class Ng extends olympe.dc.pc.Hj{constructor(a,b,c){super(a);this.index=b;this.tag=c;this.$=this.R=this.L=!1;this.G=null}}
628
628
  function Og(a,b,c,d,e){const f=Object.create(null),g=a.order,h=a.L;let k,l,n;a.ja=!0;l=0;for(n=g.length;l<n;l++)f[g[l]]=null;g.length=0;l=c;for(n=Math.min(b.length,d);l<n;l++)k=b[l],c=h[k],void 0!==c&&(delete f[k],g.push(k),c.L||(c.L=!0,e(!0,c.tag,c.index,c)));for(k in f)Object.prototype.hasOwnProperty.call(f,k)&&(c=h[k],c.L&&(c.L=!1,e(!1,c.tag,c.index,c)),c.R&&(c.G=null,delete h[k]),delete f[k]);a.ja=!1;null!==a.F&&a.G()}
629
- olympe.dc.pc.Nl=class{constructor(){this.L={};this.order=[];this.F=null;this.ja=!1;this.W=[];this.da=null}R(){return null!==this.F}$(a){if(null!==this.F)throw Error('Manager already activated (depth='+this.F+')');this.F=a;this.G()}G(){if(null===this.F)throw Error('Manager not activated, need to set a depth before updating ranks');if(!this.ja){var a=this.order,b=a.length,c=this.L,d;for(d=this.W.length=0;d<b;d++){var e=c[a[d]];if(0>this.F)this.W.push(e.index);else{if(!e.$){var f=e,g=this.F;f.$=!0;f.G=
630
- Gg(f,g)}null!==e.G&&Hg(e.G,this.W)}}this.da&&this.da(this.W)}}Kg(a){this.da=a}C(a,b,c){let d=this.L[c];a?void 0===d?(d=new Ng(this,c,b),this.L[c]=d):(d.tag=b,d.R=!1):void 0!==d&&(d.R=!0);return d}};olympe.dc.pc.Nl.ma=[olympe.dc.pc.pa];function Ag(a){if(!a.F){for(let b in a.G)Pg(a.G[b]);a.F=!0}a.L=null;a.R=null}function Bg(a,b,c){a.G[c||'root'].W=b}function Cg(a,b,c){a.G[c||'root'].tg(b)}function Qg(a,b,c,d){const e=a.R,f=b+d+c;let g=e[f];void 0===g&&(g=Md(a.db,b,c,d),e[f]=g);return g}function Rg(a,b){a.F||a.C.tg(b)}function Sg(a,b,c,d,e){if(!a.F){let f=Qg(a,c,d,e||olympe.dc.Ca.DESTINATION);e||(f+=Qg(a,c,d,olympe.dc.Ca.ORIGIN));0===f&&Rg(a,b)}}
629
+ olympe.dc.pc.Ml=class{constructor(){this.L={};this.order=[];this.F=null;this.ja=!1;this.W=[];this.da=null}R(){return null!==this.F}$(a){if(null!==this.F)throw Error('Manager already activated (depth='+this.F+')');this.F=a;this.G()}G(){if(null===this.F)throw Error('Manager not activated, need to set a depth before updating ranks');if(!this.ja){var a=this.order,b=a.length,c=this.L,d;for(d=this.W.length=0;d<b;d++){var e=c[a[d]];if(0>this.F)this.W.push(e.index);else{if(!e.$){var f=e,g=this.F;f.$=!0;f.G=
630
+ Gg(f,g)}null!==e.G&&Hg(e.G,this.W)}}this.da&&this.da(this.W)}}Kg(a){this.da=a}C(a,b,c){let d=this.L[c];a?void 0===d?(d=new Ng(this,c,b),this.L[c]=d):(d.tag=b,d.R=!1):void 0!==d&&(d.R=!0);return d}};olympe.dc.pc.Ml.ma=[olympe.dc.pc.pa];function Ag(a){if(!a.F){for(let b in a.G)Pg(a.G[b]);a.F=!0}a.L=null;a.R=null}function Bg(a,b,c){a.G[c||'root'].W=b}function Cg(a,b,c){a.G[c||'root'].tg(b)}function Qg(a,b,c,d){const e=a.R,f=b+d+c;let g=e[f];void 0===g&&(g=Md(a.db,b,c,d),e[f]=g);return g}function Rg(a,b){a.F||a.C.tg(b)}function Sg(a,b,c,d,e){if(!a.F){let f=Qg(a,c,d,e||olympe.dc.Ca.DESTINATION);e||(f+=Qg(a,c,d,olympe.dc.Ca.ORIGIN));0===f&&Rg(a,b)}}
631
631
  function Tg(a,b){const c=a.G[b];void 0!==c?(a.N&&a.N.debug('Set current block to',b,null!==c.G?'parent = '+c.G.Z():''),a.C=c):a.N&&a.N.error('Try to set a block that does not exists:',b)}function Ug(a){const b=String(++a.W),c=a.C;a.G[b]=new Vg(b,c);Wg(c,b);c.L||(c.L=()=>Tg(a,c.Z()));return b}function Xg(a,b){const c=a.C;a.C.L=()=>{Tg(a,c.Z());b()}}function Yg(a,b){Pg(b?a.G[b]:a.C)}
632
- olympe.dc.pc.Qq=class{constructor(a,b){this.db=a;this.N=b||null;this.L=Object.create(null);this.R=Object.create(null);this.F=!1;this.W=0;this.C=new Vg('root');this.G=Object.create(null);this.G.root=this.C}register(a,b,c,d,e){this.F||(null!==b&&c&&d&&e?(c=Qg(this,c,d,e),d=this.L[b]||0,this.L[b]=++d,this.C.C===b&&c<=d&&(this.C.C=a)):this.C.C=a)}};function Wg(a,b){null===a.F&&(a.F=Object.create(null));a.F[b]=!1}function Pg(a){a.R=!0;null!==a.G&&a.G.notify(a.id)}
633
- class Vg{constructor(a,b){this.id=a;this.G=b||null;this.C=this.W=this.L=this.F=null;this.R=!1}Z(){return this.id}tg(a){const b=this.W;if(this.R||this.C===a||null===a)b&&b(),!b&&Pg(this)}notify(a){const b=this.L,c=this.F;if(this.R)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.oa={};olympe.dc.oa.uf=class{na(){return O(olympe.dc.oa.uf)}C(){return[]}getValue(a,b){return b}la(){return'{"c":"'+this.na()+'","a":[]}'}toString(){return'Tag()'}};N('olympe.dc.valuedefs.Tag',olympe.dc.oa.uf);olympe.dc.oa.uf.ma=[olympe.dc.yf];olympe.dc.oa.Bd=class{constructor(a){this.value=a}na(){return O(olympe.dc.oa.Bd)}C(){return[]}getValue(){return this.value}la(a){a=Mf(a,this.value);return`{"c":"${this.na()}","a":[${a}]}`}toString(){return`Constant(${Lf(this.value)})`}};N('olympe.dc.valuedefs.Constant',olympe.dc.oa.Bd);olympe.dc.oa.Bd.ma=[olympe.dc.yf];function Zg(a,b,c,d){const e=olympe.dc.Ja(),f=new olympe.dc.pc.Bj,g=new olympe.dc.pc.Qq(e);let h=!1;const k=Object.create(null),l=r=>{if(0<r.length)for(const t in k)r[0]===t&&d(k[t])};let n=(r,t,u,v)=>{const w=olympe.D.La();w.$()||w.G()||(h||(Bg(g,()=>{v.tg();Ag(g)}),v.Jc().Kg(l),h=!0),r?k[u]=t:delete k[u],Cg(g,u))};const p=olympe.D.La();if(null!==c)for(let r=c.length-1;0<=r;r--)n=c[r].getTransform(a,g,p.F(n));n=p.F(n);const q=olympe.X.ec();Ac(e,b,(r,t)=>{g.register(q,null);const u=f.C(r,b,q,null);
632
+ olympe.dc.pc.Pq=class{constructor(a,b){this.db=a;this.N=b||null;this.L=Object.create(null);this.R=Object.create(null);this.F=!1;this.W=0;this.C=new Vg('root');this.G=Object.create(null);this.G.root=this.C}register(a,b,c,d,e){this.F||(null!==b&&c&&d&&e?(c=Qg(this,c,d,e),d=this.L[b]||0,this.L[b]=++d,this.C.C===b&&c<=d&&(this.C.C=a)):this.C.C=a)}};function Wg(a,b){null===a.F&&(a.F=Object.create(null));a.F[b]=!1}function Pg(a){a.R=!0;null!==a.G&&a.G.notify(a.id)}
633
+ class Vg{constructor(a,b){this.id=a;this.G=b||null;this.C=this.W=this.L=this.F=null;this.R=!1}Z(){return this.id}tg(a){const b=this.W;if(this.R||this.C===a||null===a)b&&b(),!b&&Pg(this)}notify(a){const b=this.L,c=this.F;if(this.R)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.oa={};olympe.dc.oa.uf=class{na(){return O(olympe.dc.oa.uf)}C(){return[]}getValue(a,b){return b}la(){return'{"c":"'+this.na()+'","a":[]}'}toString(){return'Tag()'}};N('olympe.dc.valuedefs.Tag',olympe.dc.oa.uf);olympe.dc.oa.uf.ma=[olympe.dc.yf];olympe.dc.oa.Bd=class{constructor(a){this.value=a}na(){return O(olympe.dc.oa.Bd)}C(){return[]}getValue(){return this.value}la(a){a=Mf(a,this.value);return`{"c":"${this.na()}","a":[${a}]}`}toString(){return`Constant(${Lf(this.value)})`}};N('olympe.dc.valuedefs.Constant',olympe.dc.oa.Bd);olympe.dc.oa.Bd.ma=[olympe.dc.yf];function Zg(a,b,c,d){const e=olympe.dc.Ja(),f=new olympe.dc.pc.Aj,g=new olympe.dc.pc.Pq(e);let h=!1;const k=Object.create(null),l=r=>{if(0<r.length)for(const t in k)r[0]===t&&d(k[t])};let n=(r,t,u,v)=>{const w=olympe.D.La();w.$()||w.G()||(h||(Bg(g,()=>{v.tg();Ag(g)}),v.Jc().Kg(l),h=!0),r?k[u]=t:delete k[u],Cg(g,u))};const p=olympe.D.La();if(null!==c)for(let r=c.length-1;0<=r;r--)n=c[r].getTransform(a,g,p.F(n));n=p.F(n);const q=olympe.X.ec();Ac(e,b,(r,t)=>{g.register(q,null);const u=f.C(r,b,q,null);
634
634
  n(r,t,q,Dg(u,r,b,q))},q);p.onDestroy(()=>{Bc(e,b,q)});e.Db(b)||Ag(g)}function $g(a,b,c){const d=c.node,e=olympe.dc.Ja(),f=a.G(),g=Fd(e,b,a.Ze,d.F(h=>{null!==h&&(h=f(h));null===h?c.clear():c.update(h)}));d.onDestroy(()=>e.F(b,a.Ze,g))}
635
635
  olympe.dc.oa.Lc=class{constructor(a,b,c){this.Ze=a&&a.T?a.T():a;this.Y=b&&b.filter(d=>d instanceof olympe.dc.Y.Sb||d instanceof olympe.dc.Y.Bc)||null;this.F=c||null;this.defaultValue=null}na(){}Wb(){}G(){}C(){return(this.Y||[]).reduce((a,b)=>a.concat(olympe.dc.query.Relation.from(b)),[])}bf(a){this.defaultValue=a;return this}Cg(){return this.Y}Ld(){return this.F}getValue(a,b){const c=olympe.D.Qc(this.Wb()||Object,'AbstractProperty valueType');null!==this.defaultValue&&rb(c,this.defaultValue);b=this.F||
636
- b;null!==this.Y?Zg(a,b,this.Y,d=>{$g(this,d,c)}):$g(this,b,c);return c.Ib()}la(a){const b=Mf(a,this.Ze),c=Mf(a,this.F);let d='null';this.Y&&(d=this.Y.map(function(e){return e.la(a)}).join(','));return`{"c":"${this.na()}","a":["${b}",${d},${c}]}`}toString(){const a=Lf(this.Ze),b=this.F?','+Lf(this.F):'';let c='';this.Y&&(c=','+this.Y.join(','));return this.na().replace(/^.+\./,'')+'('+a+c+b+')'}};olympe.dc.oa.Lc.ma=[olympe.dc.yf];olympe.dc.oa.le=class extends olympe.dc.oa.Lc{constructor(a,b,c){super(a,b,c)}na(){return O(olympe.dc.oa.le)}G(){return olympe.dc.X.Tb.Fm}Wb(){return olympe.D.ga}};N('olympe.dc.valuedefs.NumberProperty',olympe.dc.oa.le);olympe.dc.oa.pe=class extends olympe.dc.oa.Lc{constructor(a,b,c){super(a,b,c)}na(){return O(olympe.dc.oa.pe)}G(){return olympe.dc.X.Tb.Gm}Wb(){return olympe.D.Za}};N('olympe.dc.valuedefs.StringProperty',olympe.dc.oa.pe);olympe.dc.oa.ue=class extends olympe.dc.oa.Lc{constructor(a,b,c){super(a,b,c)}na(){return O(olympe.dc.oa.ue)}G(){return olympe.dc.X.Tb.Dm}Wb(){return olympe.D.sa}};N('olympe.dc.valuedefs.BooleanProperty',olympe.dc.oa.ue);olympe.dc.oa.je=class extends olympe.dc.oa.Lc{constructor(a,b,c){super(a,b,c)}na(){return O(olympe.dc.oa.je)}G(){return olympe.dc.X.Tb.Em}Wb(){return olympe.D.ib}};N('olympe.dc.valuedefs.DateTimeProperty',olympe.dc.oa.je);olympe.dc.oa.Gn=class{constructor(a,b){if(olympe.D.Vf(a))throw Error('Dataflows of Property not supported by AnyProperty');const c=a.T();var d=olympe.dc.Ja();const e=d.fc(a,olympe.dm.Property.typeRel);if(!e)throw Error('Type of property '+a+'unavailable locally, cannot proceed with AnyProperty');a=d.Pf(e,olympe.dc.CloudObject.extendRel,olympe.dm.rf);d=null;switch(1<a.length?a[a.length-2]:e){case olympe.dm.String.O.T():d=new olympe.dc.oa.pe(c,b);break;case olympe.dm.Number.O.T():d=new olympe.dc.oa.le(c,
637
- b);break;case olympe.dm.Boolean.O.T():d=new olympe.dc.oa.ue(c,b);break;case olympe.dm.DateTime.O.T():d=new olympe.dc.oa.je(c,b)}this.F=d}na(){return this.F.na()}C(){return this.F.C()}getValue(a,b){return this.F.getValue(a,b)}la(a){return this.F.la(a)}toString(){return this.F.toString()}};olympe.dc.oa.Gn.ma=[olympe.dc.yf];olympe.dc.Bb={};olympe.dc.Bb.Number=class{constructor(a){this.C=a}na(){return O(olympe.dc.Bb.Number)}R(){return this.C.C()}L(a,b){return this.C.getValue(a,b)}G(a,b){return a!==b?a>b?1:-1:0}la(a){return`{"c":"${this.na()}",a:[${this.C.la(a)}]}`}toString(){return`Number(${this.C.toString()})`}};N('olympe.dc.comparators.Number',olympe.dc.Bb.Number);olympe.dc.Bb.Number.ma=[olympe.dc.Me];olympe.dc.Bb.String=class{constructor(a){this.C=a}na(){return O(olympe.dc.Bb.String)}R(){return this.C.C()}L(a,b){return olympe.D.Fa([this.C.getValue(a,b)],c=>c.toLowerCase(),olympe.D.Za)}G(a,b){return void 0===a?void 0===b?0:1:a!==b?a>b?1:-1:0}la(a){return`{"c":"${this.na()}",a:[${this.C.la(a)}]}`}toString(){return`String(${this.C.toString()})`}};N('olympe.dc.comparators.String',olympe.dc.Bb.String);olympe.dc.Bb.String.ma=[olympe.dc.Me];olympe.dc.Bb.DateTime=class{constructor(a){this.C=a}na(){return O(olympe.dc.Bb.DateTime)}R(){return this.C.C()}L(a,b){return this.C.getValue(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}la(a){return'{"c":"'+this.na()+'",a:['+this.C.la(a)+']}'}toString(){return'Number('+this.C.toString()+')'}};N('olympe.dc.comparators.DateTime',olympe.dc.Bb.DateTime);olympe.dc.Bb.DateTime.ma=[olympe.dc.Me];let ah=0;olympe.dc.Bb.Ng=class{constructor(){this.id=ah++}na(){return'CustomLocalComparator#'+ah}R(){return[]}L(){throw Error('GetComparedValue function was not implemented.');}G(){throw Error('Compare function was not implemented.');}la(){return`{"c":"${this.na()}"}`}toString(){return this.na()+'()'}};olympe.dc.Bb.Ng.ma=[olympe.dc.Me];olympe.dc.V={};olympe.dc.V.jd=class{constructor(a){this.G=a}na(){return O(olympe.dc.V.jd)}F(){return this.G.F()}C(a,b){return olympe.D.Uk(this.G.C(a,b),c=>!c.valueOf())}la(a){return`{"c":"${this.na()}","a":[${this.G.la(a)}]}`}toString(){return'Not('+this.G.toString()+')'}};N('olympe.dc.predicates.Not',olympe.dc.V.jd);olympe.dc.V.jd.ma=[olympe.dc.bb];olympe.dc.V.Qd=class{constructor(a){this.V=[];for(let b=arguments.length,c=0;c<b;c++)Array.isArray(arguments[c])?this.V=this.V.concat(arguments[c]):this.V.push(arguments[c])}na(){return O(olympe.dc.V.Qd)}F(){return this.V.reduce((a,b)=>a.concat(b.F()),[])}C(a,b){return olympe.D.cf(this.V.map(c=>c.C(a,b)),function(){for(let c=arguments.length,d=0;d<c;d++)if(!arguments[d].valueOf())return!1;return!0})}la(a){const b=this.V.map(c=>c.la(a));return'{"c":"'+this.na()+'","a":['+b.join(',')+']}'}toString(){return'And('+
636
+ b;null!==this.Y?Zg(a,b,this.Y,d=>{$g(this,d,c)}):$g(this,b,c);return c.Ib()}la(a){const b=Mf(a,this.Ze),c=Mf(a,this.F);let d='null';this.Y&&(d=this.Y.map(function(e){return e.la(a)}).join(','));return`{"c":"${this.na()}","a":["${b}",${d},${c}]}`}toString(){const a=Lf(this.Ze),b=this.F?','+Lf(this.F):'';let c='';this.Y&&(c=','+this.Y.join(','));return this.na().replace(/^.+\./,'')+'('+a+c+b+')'}};olympe.dc.oa.Lc.ma=[olympe.dc.yf];olympe.dc.oa.le=class extends olympe.dc.oa.Lc{constructor(a,b,c){super(a,b,c)}na(){return O(olympe.dc.oa.le)}G(){return olympe.dc.X.Tb.Em}Wb(){return olympe.D.ga}};N('olympe.dc.valuedefs.NumberProperty',olympe.dc.oa.le);olympe.dc.oa.pe=class extends olympe.dc.oa.Lc{constructor(a,b,c){super(a,b,c)}na(){return O(olympe.dc.oa.pe)}G(){return olympe.dc.X.Tb.Fm}Wb(){return olympe.D.Za}};N('olympe.dc.valuedefs.StringProperty',olympe.dc.oa.pe);olympe.dc.oa.ue=class extends olympe.dc.oa.Lc{constructor(a,b,c){super(a,b,c)}na(){return O(olympe.dc.oa.ue)}G(){return olympe.dc.X.Tb.Cm}Wb(){return olympe.D.sa}};N('olympe.dc.valuedefs.BooleanProperty',olympe.dc.oa.ue);olympe.dc.oa.je=class extends olympe.dc.oa.Lc{constructor(a,b,c){super(a,b,c)}na(){return O(olympe.dc.oa.je)}G(){return olympe.dc.X.Tb.Dm}Wb(){return olympe.D.ib}};N('olympe.dc.valuedefs.DateTimeProperty',olympe.dc.oa.je);olympe.dc.oa.Fn=class{constructor(a,b){if(olympe.D.Vf(a))throw Error('Dataflows of Property not supported by AnyProperty');const c=a.T();var d=olympe.dc.Ja();const e=d.fc(a,olympe.dm.Property.typeRel);if(!e)throw Error('Type of property '+a+'unavailable locally, cannot proceed with AnyProperty');a=d.Pf(e,olympe.dc.CloudObject.extendRel,olympe.dm.rf);d=null;switch(1<a.length?a[a.length-2]:e){case olympe.dm.String.O.T():d=new olympe.dc.oa.pe(c,b);break;case olympe.dm.Number.O.T():d=new olympe.dc.oa.le(c,
637
+ b);break;case olympe.dm.Boolean.O.T():d=new olympe.dc.oa.ue(c,b);break;case olympe.dm.DateTime.O.T():d=new olympe.dc.oa.je(c,b)}this.F=d}na(){return this.F.na()}C(){return this.F.C()}getValue(a,b){return this.F.getValue(a,b)}la(a){return this.F.la(a)}toString(){return this.F.toString()}};olympe.dc.oa.Fn.ma=[olympe.dc.yf];olympe.dc.Bb={};olympe.dc.Bb.Number=class{constructor(a){this.C=a}na(){return O(olympe.dc.Bb.Number)}R(){return this.C.C()}L(a,b){return this.C.getValue(a,b)}G(a,b){return a!==b?a>b?1:-1:0}la(a){return`{"c":"${this.na()}",a:[${this.C.la(a)}]}`}toString(){return`Number(${this.C.toString()})`}};N('olympe.dc.comparators.Number',olympe.dc.Bb.Number);olympe.dc.Bb.Number.ma=[olympe.dc.Me];olympe.dc.Bb.String=class{constructor(a){this.C=a}na(){return O(olympe.dc.Bb.String)}R(){return this.C.C()}L(a,b){return olympe.D.Fa([this.C.getValue(a,b)],c=>c.toLowerCase(),olympe.D.Za)}G(a,b){return void 0===a?void 0===b?0:1:a!==b?a>b?1:-1:0}la(a){return`{"c":"${this.na()}",a:[${this.C.la(a)}]}`}toString(){return`String(${this.C.toString()})`}};N('olympe.dc.comparators.String',olympe.dc.Bb.String);olympe.dc.Bb.String.ma=[olympe.dc.Me];olympe.dc.Bb.DateTime=class{constructor(a){this.C=a}na(){return O(olympe.dc.Bb.DateTime)}R(){return this.C.C()}L(a,b){return this.C.getValue(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}la(a){return'{"c":"'+this.na()+'",a:['+this.C.la(a)+']}'}toString(){return'Number('+this.C.toString()+')'}};N('olympe.dc.comparators.DateTime',olympe.dc.Bb.DateTime);olympe.dc.Bb.DateTime.ma=[olympe.dc.Me];let ah=0;olympe.dc.Bb.Ng=class{constructor(){this.id=ah++}na(){return'CustomLocalComparator#'+ah}R(){return[]}L(){throw Error('GetComparedValue function was not implemented.');}G(){throw Error('Compare function was not implemented.');}la(){return`{"c":"${this.na()}"}`}toString(){return this.na()+'()'}};olympe.dc.Bb.Ng.ma=[olympe.dc.Me];olympe.dc.V={};olympe.dc.V.jd=class{constructor(a){this.G=a}na(){return O(olympe.dc.V.jd)}F(){return this.G.F()}C(a,b){return olympe.D.Tk(this.G.C(a,b),c=>!c.valueOf())}la(a){return`{"c":"${this.na()}","a":[${this.G.la(a)}]}`}toString(){return'Not('+this.G.toString()+')'}};N('olympe.dc.predicates.Not',olympe.dc.V.jd);olympe.dc.V.jd.ma=[olympe.dc.bb];olympe.dc.V.Qd=class{constructor(a){this.V=[];for(let b=arguments.length,c=0;c<b;c++)Array.isArray(arguments[c])?this.V=this.V.concat(arguments[c]):this.V.push(arguments[c])}na(){return O(olympe.dc.V.Qd)}F(){return this.V.reduce((a,b)=>a.concat(b.F()),[])}C(a,b){return olympe.D.cf(this.V.map(c=>c.C(a,b)),function(){for(let c=arguments.length,d=0;d<c;d++)if(!arguments[d].valueOf())return!1;return!0})}la(a){const b=this.V.map(c=>c.la(a));return'{"c":"'+this.na()+'","a":['+b.join(',')+']}'}toString(){return'And('+
638
638
  this.V.map(a=>a.toString()).join(',')+')'}};N('olympe.dc.predicates.And',olympe.dc.V.Qd);olympe.dc.V.Qd.ma=[olympe.dc.bb];olympe.dc.V.Zd=class{constructor(a){this.V=[];for(let b=arguments.length,c=0;c<b;c++)Array.isArray(arguments[c])?this.V=this.V.concat(arguments[c]):this.V.push(arguments[c])}na(){return O(olympe.dc.V.Zd)}F(){return this.V.reduce((a,b)=>a.concat(b.F()),[])}C(a,b){return olympe.D.cf(this.V.map(c=>c.C(a,b)),function(){for(let c=arguments.length,d=0;d<c;d++)if(arguments[d].valueOf())return!0;return!1})}la(a){const b=this.V.map(c=>c.la(a));return'{"c":"'+this.na()+'","a":['+b.join(',')+']}'}toString(){return'Or('+
639
- this.V.map(a=>a.toString()).join(',')+')'}};N('olympe.dc.predicates.Or',olympe.dc.V.Zd);olympe.dc.V.Zd.ma=[olympe.dc.bb];olympe.dc.V.al=class{constructor(a,b){this.G=a;this.L=b}na(){}F(){return[this.G.C(),this.L.C()]}C(a,b){return olympe.D.Fa([this.G.getValue(a,b),this.L.getValue(a,b)],(c,d)=>{c=c.valueOf();d=d.valueOf();return this.R('string'===typeof c?c:Number(c),'string'===typeof d?d:Number(d))},Boolean)}R(){}la(a){return'{"c":"'+this.na()+'","a":['+this.G.la(a)+','+this.L.la(a)+']}'}toString(){return this.na().replace(/^.+\./,'')+'('+this.G.toString()+','+this.L.toString()+')'}};olympe.dc.V.al.ma=[olympe.dc.bb];olympe.dc.V.Fc=class{constructor(a,b){this.G=a;this.L=b}na(){return O(olympe.dc.V.Fc)}F(){return[this.G.C(),this.L.C()]}C(a,b){return olympe.D.Fa([this.G.getValue(a,b),this.L.getValue(a,b)],(c,d)=>'object'===typeof c&&void 0!==c.Pd?c.Pd(d):'object'===typeof d&&void 0!==d.Pd?d.Pd(c):olympe.D.wc(c.valueOf()===d.valueOf()),olympe.D.sa,'Test equal predicate')}la(a){return'{"c":"'+this.na()+'","a":['+this.G.la(a)+','+this.L.la(a)+']}'}toString(){return'Equals('+this.G.toString()+','+this.L.toString()+
640
- ')'}};N('olympe.dc.predicates.Equals',olympe.dc.V.Fc);olympe.dc.V.Fc.ma=[olympe.dc.bb];olympe.dc.V.Ss=class extends olympe.dc.V.Fc{constructor(a,b){super(a,new olympe.dc.oa.Bd(b))}};olympe.dc.V.Ss.ma=[olympe.dc.bb];olympe.dc.V.ze=class extends olympe.dc.V.al{constructor(a,b){super(a,b)}na(){return O(olympe.dc.V.ze)}R(a,b){return a>b}};N('olympe.dc.predicates.Greater',olympe.dc.V.ze);olympe.dc.V.Ge=class extends olympe.dc.V.al{constructor(a,b){super(a,b)}na(){return O(olympe.dc.V.Ge)}R(a,b){return a<b}};N('olympe.dc.predicates.Smaller',olympe.dc.V.Ge);olympe.dc.V.Sc=class{constructor(a,b,c){this.source=a;this.value=b;this.G=c?c:!1}na(){return O(olympe.dc.V.Sc)}F(){return[this.source.C(),this.value.C()]}getValue(){return this.value}C(a,b){return olympe.D.Fa([this.source.getValue(a,b),this.value.getValue(a,b),this.G],(c,d,e)=>{c=String(c);d=String(d);e.valueOf()||(c=c.toLowerCase(),d=d.toLowerCase());return olympe.D.wc(c.includes(d))},olympe.D.sa)}la(a){const b=this.source.la(a),c=this.value.la(a);a=Mf(a,this.G);return'{"c":"'+this.na()+'","a":['+
639
+ this.V.map(a=>a.toString()).join(',')+')'}};N('olympe.dc.predicates.Or',olympe.dc.V.Zd);olympe.dc.V.Zd.ma=[olympe.dc.bb];olympe.dc.V.$k=class{constructor(a,b){this.G=a;this.L=b}na(){}F(){return[this.G.C(),this.L.C()]}C(a,b){return olympe.D.Fa([this.G.getValue(a,b),this.L.getValue(a,b)],(c,d)=>{c=c.valueOf();d=d.valueOf();return this.R('string'===typeof c?c:Number(c),'string'===typeof d?d:Number(d))},Boolean)}R(){}la(a){return'{"c":"'+this.na()+'","a":['+this.G.la(a)+','+this.L.la(a)+']}'}toString(){return this.na().replace(/^.+\./,'')+'('+this.G.toString()+','+this.L.toString()+')'}};olympe.dc.V.$k.ma=[olympe.dc.bb];olympe.dc.V.Fc=class{constructor(a,b){this.G=a;this.L=b}na(){return O(olympe.dc.V.Fc)}F(){return[this.G.C(),this.L.C()]}C(a,b){return olympe.D.Fa([this.G.getValue(a,b),this.L.getValue(a,b)],(c,d)=>'object'===typeof c&&void 0!==c.Pd?c.Pd(d):'object'===typeof d&&void 0!==d.Pd?d.Pd(c):olympe.D.wc(c.valueOf()===d.valueOf()),olympe.D.sa,'Test equal predicate')}la(a){return'{"c":"'+this.na()+'","a":['+this.G.la(a)+','+this.L.la(a)+']}'}toString(){return'Equals('+this.G.toString()+','+this.L.toString()+
640
+ ')'}};N('olympe.dc.predicates.Equals',olympe.dc.V.Fc);olympe.dc.V.Fc.ma=[olympe.dc.bb];olympe.dc.V.Rs=class extends olympe.dc.V.Fc{constructor(a,b){super(a,new olympe.dc.oa.Bd(b))}};olympe.dc.V.Rs.ma=[olympe.dc.bb];olympe.dc.V.ze=class extends olympe.dc.V.$k{constructor(a,b){super(a,b)}na(){return O(olympe.dc.V.ze)}R(a,b){return a>b}};N('olympe.dc.predicates.Greater',olympe.dc.V.ze);olympe.dc.V.Ge=class extends olympe.dc.V.$k{constructor(a,b){super(a,b)}na(){return O(olympe.dc.V.Ge)}R(a,b){return a<b}};N('olympe.dc.predicates.Smaller',olympe.dc.V.Ge);olympe.dc.V.Sc=class{constructor(a,b,c){this.source=a;this.value=b;this.G=c?c:!1}na(){return O(olympe.dc.V.Sc)}F(){return[this.source.C(),this.value.C()]}getValue(){return this.value}C(a,b){return olympe.D.Fa([this.source.getValue(a,b),this.value.getValue(a,b),this.G],(c,d,e)=>{c=String(c);d=String(d);e.valueOf()||(c=c.toLowerCase(),d=d.toLowerCase());return olympe.D.wc(c.includes(d))},olympe.D.sa)}la(a){const b=this.source.la(a),c=this.value.la(a);a=Mf(a,this.G);return'{"c":"'+this.na()+'","a":['+
641
641
  b+','+c+','+a+']}'}toString(){const a=Lf(this.G);return'Contains('+this.source.toString()+','+this.value.toString()+','+a+')'}};N('olympe.dc.predicates.Contains',olympe.dc.V.Sc);olympe.dc.V.Sc.ma=[olympe.dc.bb];olympe.dc.V.ud=class{constructor(a,b,c){this.source=a;this.L=b;this.G=void 0===c?!0:c}na(){return O(olympe.dc.V.ud)}F(){return[this.source.C()]}C(a,b){return olympe.D.cf([this.source.getValue(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)})}la(a){const b=this.source.la(a),c=Mf(a,this.L);a=Mf(a,this.G);return'{"c":"'+this.na()+'","a":['+b+','+c+','+a+']}'}toString(){const a=Lf(this.G);return'Regex('+this.source.toString()+
642
642
  ','+this.L+','+a+')'}};N('olympe.dc.predicates.Regex',olympe.dc.V.ud);olympe.dc.V.ud.ma=[olympe.dc.bb];olympe.dc.V.mf=class{constructor(a){this.G=new Set;a instanceof Array?a.forEach(b=>{this.G.add(olympe.dc.za(b))}):this.G.add(olympe.dc.za(a))}na(){return O(olympe.dc.V.mf)}F(){return[]}C(a,b){const c=olympe.D.createNode(Boolean),d=olympe.dc.Ja();let e=[];const f=()=>{e.forEach(h=>{d.C(h.tag,h.C,h.id)});e=[]},g=(h,k)=>{if(h)if(k===olympe.dc.za(olympe.dc.CloudObject))K(c,this.G.has(k)),f();else{for(const l of e)if(l.tag===k)throw Error(`You should never extend a model to itself (${k})`);this.G.has(k)?
643
643
  (K(c,!0),f()):(h=new bh(k,olympe.dc.CloudObject.extendRel),e.push(h),V(d,h.tag,h.C,g,h.id))}};a=new bh(b,olympe.dc.CloudObject.modelRel);e.push(a);V(d,a.tag,a.C,g,a.id);c.onDestroy(f);Xa(c)||K(c,!1);return c}la(){return'{"c":"'+this.na()+'","a":['+JSON.stringify(Array.from(this.G))+']}'}toString(){return'InstanceOf('+Array.from(this.G).join(', ')+')'}};class bh{constructor(a,b){this.tag=a;this.C=b;this.id=olympe.X.yg()}}N('olympe.dc.predicates.InstanceOf',olympe.dc.V.mf);olympe.dc.V.mf.ma=[olympe.dc.bb];function ch(a){return a.Oa.map(b=>b.T())}function dh(a){return a.Oa.map(b=>b.Ra())}
644
644
  olympe.dc.V.lf=class{constructor(a,b,c){this.Oa=[];this.G=c instanceof Array?c:void 0!==c?[olympe.dc.za(c)]:[];a=Array.isArray(a)?a:[a];for(let d=0,e=a.length;d<e;d++)c=a[d],c instanceof olympe.dc.Y.Bc?this.Oa.push(new eh(c.T(),c.Ra(),c.F,c.C)):this.Oa.push(new eh(olympe.dc.za(c),b[d],1,1))}na(){return O(olympe.dc.V.lf)}F(){return[this.Oa.reduce((a,b)=>a.concat(b),[])]}C(a,b){const c=olympe.D.createNode(Boolean),d=olympe.X.ec(),e=olympe.dc.Ja();let f=0;a=(h,k)=>{0!==this.G.length&&!this.G.includes(k)||
645
645
  c.G()||(f+=h?1:-1,K(c,0<f))};const g=this.Oa;for(let h=g.length-1;0<=h;h--)a=fh(g[h],e,a,d+h);Ac(e,b,a,d);olympe.D.La().onDestroy(()=>{Bc(e,b,d)});c.bf(!1);return c}la(){return'{"c":"'+this.na()+'","a":['+JSON.stringify(this.Oa.map(a=>a.la()))+(0!==this.G.length?',"'+this.G.toString():'')+'"]}'}toString(){return'HasRelated('+(0!==this.G.length?'#'+this.G.toString()+', ':'')+this.Oa.map(a=>a.la())+')'}};N('olympe.dc.predicates.HasRelated',olympe.dc.V.lf);
646
- function fh(a,b,c,d){const e=Object.create(null);d+=olympe.X.yg();const f=(g,h,k)=>{k>=a.F&&c(g,h);if(!(0<=a.C&&k>=a.C)){var l=d+k;g?e[h]||(e[h]=!0,V(b,h,a,(n,p)=>{f(n,p,k+1)},l)):(delete e[h],b.C(h,a,l))}};return(g,h)=>f(g,h,0)}class eh extends olympe.dc.query.Relation{constructor(a,b,c,d){super(a,b,1!==c||1!==d);this.F=c;this.C=d}la(){return`${this.T()}, ${this.Ra()}, ${this.F}, ${this.C}`}}olympe.dc.V.lf.ma=[olympe.dc.bb];olympe.dc.V.hl=class{constructor(a,b){this.G=a;this.value=b}C(a,b){return olympe.D.cf([this.G,this.value.getValue(a,b)],(c,d)=>{c=c.valueOf();return(Number(c)&Number(d.valueOf()))===Number(c)})}na(){return O(olympe.dc.V.hl)}F(){return[this.value.C()]}la(a){const b=olympe.D.nb(this.G)?this.G.Pa.Kb.valueOf():this.G.valueOf();return'{"c":"'+this.na()+'","a":['+b+','+this.value.la(a)+']}'}toString(){const a=olympe.D.nb(this.G)?this.G.Pa.Kb.valueOf():this.G.valueOf();return this.na().replace(/^.+\./,'')+
647
- '('+a.toString()+','+this.value.toString()+')'}};N('olympe.dc.predicates.BitMask',olympe.dc.V.hl);olympe.dc.V.hl.ma=[olympe.dc.bb];let gh=0;olympe.dc.V.Ng=class{constructor(){this.id=gh++}na(){return'CustomLocalPredicate#'+this.id}F(){return[]}C(){throw Error('Test function was not implemented.');}la(){return`{"c":"${this.na()}"}`}toString(){return this.na()+'()'}};olympe.dc.V.Ng.ma=[olympe.dc.bb];olympe.dc.V.zl=class{constructor(a,b,c){this.Oa=[];this.G=void 0!==c?c.map(olympe.dc.za):null;a=Array.isArray(a)?a:[a];for(let d=0,e=a.length;d<e;d++)c=a[d],c instanceof olympe.dc.Y.Bc?this.Oa.push(new hh(c.T(),c.Ra(),c.F,c.C)):this.Oa.push(new hh(olympe.dc.za(c),b[d],1,1))}na(){return O(olympe.dc.V.zl)}F(){return[this.Oa.reduce((a,b)=>a.concat(b),[])]}C(a,b){const c=olympe.D.createNode(Boolean),d=olympe.dc.Ja(),e=olympe.X.yg();a=(h,k,l)=>{k&&(null===this.G||this.G.includes(l))&&h(1)};const f=this.Oa;
648
- for(let h=f.length-1;0<=h;h--)a=f[h].getTransform(d,a,e+h);let g=0;Ac(d,b,a.bind(null,h=>{c.$()||c.G()||(g+=h,K(c,0<g))}),e);olympe.D.La().onDestroy(()=>Bc(d,b,e));c.bf(!1);return c}la(){return'{"c":"'+this.na()+'","a":['+JSON.stringify(this.Oa.map(a=>a.la()))+(null!==this.G?',"'+this.G.toString():'')+'"]}'}toString(){return'HasRelatedTree('+(null!==this.G?'#['+this.G.toString()+'], ':'')+this.Oa.map(a=>a.la())+')'}};N('olympe.dc.predicates.HasRelatedTree',olympe.dc.V.zl);
646
+ function fh(a,b,c,d){const e=Object.create(null);d+=olympe.X.yg();const f=(g,h,k)=>{k>=a.F&&c(g,h);if(!(0<=a.C&&k>=a.C)){var l=d+k;g?e[h]||(e[h]=!0,V(b,h,a,(n,p)=>{f(n,p,k+1)},l)):(delete e[h],b.C(h,a,l))}};return(g,h)=>f(g,h,0)}class eh extends olympe.dc.query.Relation{constructor(a,b,c,d){super(a,b,1!==c||1!==d);this.F=c;this.C=d}la(){return`${this.T()}, ${this.Ra()}, ${this.F}, ${this.C}`}}olympe.dc.V.lf.ma=[olympe.dc.bb];olympe.dc.V.gl=class{constructor(a,b){this.G=a;this.value=b}C(a,b){return olympe.D.cf([this.G,this.value.getValue(a,b)],(c,d)=>{c=c.valueOf();return(Number(c)&Number(d.valueOf()))===Number(c)})}na(){return O(olympe.dc.V.gl)}F(){return[this.value.C()]}la(a){const b=olympe.D.nb(this.G)?this.G.Pa.Kb.valueOf():this.G.valueOf();return'{"c":"'+this.na()+'","a":['+b+','+this.value.la(a)+']}'}toString(){const a=olympe.D.nb(this.G)?this.G.Pa.Kb.valueOf():this.G.valueOf();return this.na().replace(/^.+\./,'')+
647
+ '('+a.toString()+','+this.value.toString()+')'}};N('olympe.dc.predicates.BitMask',olympe.dc.V.gl);olympe.dc.V.gl.ma=[olympe.dc.bb];let gh=0;olympe.dc.V.Ng=class{constructor(){this.id=gh++}na(){return'CustomLocalPredicate#'+this.id}F(){return[]}C(){throw Error('Test function was not implemented.');}la(){return`{"c":"${this.na()}"}`}toString(){return this.na()+'()'}};olympe.dc.V.Ng.ma=[olympe.dc.bb];olympe.dc.V.yl=class{constructor(a,b,c){this.Oa=[];this.G=void 0!==c?c.map(olympe.dc.za):null;a=Array.isArray(a)?a:[a];for(let d=0,e=a.length;d<e;d++)c=a[d],c instanceof olympe.dc.Y.Bc?this.Oa.push(new hh(c.T(),c.Ra(),c.F,c.C)):this.Oa.push(new hh(olympe.dc.za(c),b[d],1,1))}na(){return O(olympe.dc.V.yl)}F(){return[this.Oa.reduce((a,b)=>a.concat(b),[])]}C(a,b){const c=olympe.D.createNode(Boolean),d=olympe.dc.Ja(),e=olympe.X.yg();a=(h,k,l)=>{k&&(null===this.G||this.G.includes(l))&&h(1)};const f=this.Oa;
648
+ for(let h=f.length-1;0<=h;h--)a=f[h].getTransform(d,a,e+h);let g=0;Ac(d,b,a.bind(null,h=>{c.$()||c.G()||(g+=h,K(c,0<g))}),e);olympe.D.La().onDestroy(()=>Bc(d,b,e));c.bf(!1);return c}la(){return'{"c":"'+this.na()+'","a":['+JSON.stringify(this.Oa.map(a=>a.la()))+(null!==this.G?',"'+this.G.toString():'')+'"]}'}toString(){return'HasRelatedTree('+(null!==this.G?'#['+this.G.toString()+'], ':'')+this.Oa.map(a=>a.la())+')'}};N('olympe.dc.predicates.HasRelatedTree',olympe.dc.V.yl);
649
649
  class hh extends olympe.dc.query.Relation{constructor(a,b,c,d){super(a,b,1!==c||1!==d);this.F=c;this.C=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,l,n)=>{e.has(l)?e.get(l).set(c+n,k):e.set(l,(new Map).set(c+n,k))},h=(k,l,n,p,q)=>{const r=olympe.X.yg();if(p){const t=n+q,u=v=>{const w=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!==w&&
650
- null!==w&&(f.add(t),d.set(q,(d.get(q)||0)+v),Array.from(w.values()).forEach(y=>y(v)));f.delete(t)};g(k,q,n);d.has(q)?k(d.get(q)):(l>=this.F&&b(v=>{d.set(q,(d.get(q)||0)+v);k(v)},p,q),(0>this.C||l<=this.C)&&q!==n&&V(a,q,this,h.bind(this,u,l+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.C(q,this,r))};return(k,l,n)=>h(k,0,'origin',l,n)}la(){return`${this.T()}, ${this.Ra()}, ${this.F}, ${this.C}`}}olympe.dc.V.zl.ma=[olympe.dc.bb];olympe.dc.Y={};olympe.dc.Y.kk={Xs:1,jt:-1,kp:0};olympe.dc.Y.rB={Ty:!0,rz:!1};olympe.dc.Y.Sb=class extends olympe.dc.ua.Relation{constructor(a,b){super(a,b||olympe.dc.Ca.DESTINATION)}Wb(){return Pc(this)}na(){return O(olympe.dc.Y.Sb)}Ec(){return new olympe.dc.Y.Sb(this.tag,this.direction===olympe.dc.Ca.DESTINATION?olympe.dc.Ca.ORIGIN:olympe.dc.Ca.DESTINATION)}getTransform(a,b,c){const d=olympe.dc.Ja(),e=this.T(),f=this.Ra();return(g,h,k,l)=>{Sg(b,k,h,e,f);g?V(d,h,this,(n,p)=>{const q=olympe.X.ob(k+f+e+p,20),r=Dg(l,n,p,q);n&&b.register(q,k,h,e,f);c(n,p,q,r)},k):d.C(h,this,k)}}la(){return'{"c":"'+
650
+ null!==w&&(f.add(t),d.set(q,(d.get(q)||0)+v),Array.from(w.values()).forEach(y=>y(v)));f.delete(t)};g(k,q,n);d.has(q)?k(d.get(q)):(l>=this.F&&b(v=>{d.set(q,(d.get(q)||0)+v);k(v)},p,q),(0>this.C||l<=this.C)&&q!==n&&V(a,q,this,h.bind(this,u,l+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.C(q,this,r))};return(k,l,n)=>h(k,0,'origin',l,n)}la(){return`${this.T()}, ${this.Ra()}, ${this.F}, ${this.C}`}}olympe.dc.V.yl.ma=[olympe.dc.bb];olympe.dc.Y={};olympe.dc.Y.jk={Ws:1,it:-1,jp:0};olympe.dc.Y.qB={Sy:!0,qz:!1};olympe.dc.Y.Sb=class extends olympe.dc.ua.Relation{constructor(a,b){super(a,b||olympe.dc.Ca.DESTINATION)}Wb(){return Pc(this)}na(){return O(olympe.dc.Y.Sb)}Ec(){return new olympe.dc.Y.Sb(this.tag,this.direction===olympe.dc.Ca.DESTINATION?olympe.dc.Ca.ORIGIN:olympe.dc.Ca.DESTINATION)}getTransform(a,b,c){const d=olympe.dc.Ja(),e=this.T(),f=this.Ra();return(g,h,k,l)=>{Sg(b,k,h,e,f);g?V(d,h,this,(n,p)=>{const q=olympe.X.ob(k+f+e+p,20),r=Dg(l,n,p,q);n&&b.register(q,k,h,e,f);c(n,p,q,r)},k):d.C(h,this,k)}}la(){return'{"c":"'+
651
651
  this.na()+'","a":["'+this.T()+'","'+this.Ra()+'"]}'}toString(){return'Related('+this.Ra()+this.T()+')'}};N('olympe.dc.transformers.Related',olympe.dc.Y.Sb);olympe.dc.Y.Sb.ma=[olympe.dc.Wc];olympe.dc.Y.Bc=class extends olympe.dc.ua.Relation{constructor(a,b=olympe.dc.Ca.DESTINATION,c=1,d=-1){super(a,b);this.F=c;this.C=d}Wb(){return Pc(this)}na(){return O(olympe.dc.Y.Bc)}getTransform(a,b,c){const d=olympe.dc.Ja(),e=Object.create(null),f=olympe.dc.Ca.ORIGIN,g=olympe.dc.Ca.DESTINATION,h=this.T(),k=this.Ra(),l=(p,q,r)=>{if(!(0<=this.C&&p>=this.C)){var t=d.ub(r,this);p+=1;for(let u=0,v=t.length;u<v;u++){if(void 0!==e[t[u]]||r===t[u])continue;const w=olympe.X.ob(q+k+(h+'_'+p)+t[u],20);b.register(w,
652
652
  q,r,h,k||g);null===k&&b.register(w,q,r,h,f)}}},n=(p,q,r,t,u,v)=>{u&&!b.F&&l(p,t,v);p>=this.F?c(u,v,t,Dg(r,u,v,t)):Sg(b,t,v,h,k);0<=this.C&&p>=this.C||(u?e[v]||(e[v]=!0,V(d,v,this,(w,y)=>{const B=p+1,E=olympe.X.ob(t+k+(h+'_'+B)+y,20);n(B,v,r,E,w,y)},t)):(d.C(v,this,t),delete e[v]))};return(p,q,r,t)=>n(0,null,t,r,p,q)}la(){return'{"c":"'+this.na()+'","a":["'+this.T()+'","'+this.Ra()+'",'+this.F+','+this.C+']}'}toString(){return'RecursiveRelated('+this.Ra()+this.T()+'['+this.F+'..'+this.C+'])'}};
653
653
  N('olympe.dc.transformers.RecursiveRelated',olympe.dc.Y.Bc);olympe.dc.Y.Bc.ma=[olympe.dc.Wc];function ih(a){return a.Oa.map(b=>b.T())}
654
654
  olympe.dc.Y.Ce=class{constructor(a,b){this.direction=b||olympe.dc.Ca.DESTINATION;this.Oa=a.map(c=>new olympe.dc.ua.Relation(c,this.direction))}Wb(){return olympe.dc.CloudObject}na(){return O(olympe.dc.Y.Ce)}Ra(){return this.direction}getTransform(a,b,c){const d=olympe.dc.Ja(),e=(f,g,h,k)=>V(d,f,k,(l,n)=>{var p=k.Ra();var q=k.T();p=olympe.X.ob(g+p+q+n,20);q=Dg(h,l,n,p);l&&b.register(p,g,f,k.T(),k.Ra());c(l,n,p,q)},g);return(f,g,h,k)=>{f?this.Oa.forEach(l=>{Sg(b,h,g,l.T(),l.Ra());e(g,h,k,l)}):this.Oa.forEach(l=>
655
- {d.C(g,l,h)})}}la(){return'{"c":"'+this.na()+'","a":['+JSON.stringify(ih(this))+',"'+this.direction+'"]}'}toString(){return'MultiRelated('+this.Ra()+'['+ih(this).join(',')+'])'}};N('olympe.dc.transformers.MultiRelated',olympe.dc.Y.Ce);olympe.dc.Y.Ce.ma=[olympe.dc.Wc];olympe.dc.Y.tl=class{constructor(a,b,c,d){this.C=new olympe.dc.ua.Relation(olympe.dc.za(a),c||olympe.dc.Ca.DESTINATION);this.F=new olympe.dc.ua.Relation(olympe.dc.za(b),d||olympe.dc.Ca.DESTINATION)}Wb(){return Pc(this.C)}na(){return O(olympe.dc.Y.tl)}getTransform(a,b,c){const d=olympe.dc.Ja(),e={},f=this.C.T(),g=this.C.Ra(),h=this.F.T(),k=this.F.Ra();let l=null,n=null;const p=(r,t,u,v,w,y)=>{if(w){if(w=()=>{const B=olympe.X.ob(u+g+(f+'_'+r)+y,20),E=Dg(t,!0,y,B);l=r;n=()=>{c(!1,y,B,Dg(t,!1,y,B))};
656
- b.register(B,u,v,f,g);c(!0,y,B,E)},w.Pr=r,e[v]=w,null===l||r<l)n&&n(),w()}else if(l===r){n();e[v]=!0;w=Infinity;let B=null;for(let E=Object.keys(e),S=E.length,I=0;I<S;I++){let aa=e[E[I]];aa.Pr<w&&(w=aa.Pr,B=aa)}B&&B()}},q=(r,t,u,v,w)=>{v?e[w]||(e[w]=!0,Sg(b,u,w,f,g),Sg(b,u,w,h,k),V(d,w,this.C,p.bind(this,r,t,u,w),u+'_val'),V(d,w,this.F,q.bind(this,r+1,t,u),u+'_follow')):(d.C(w,this.F,u+'_follow'),d.C(w,this.C,u+'_val'),delete e[w])};return(r,t,u,v)=>q(0,v,u,r,t)}la(){return'{"c":"'+this.na()+'","a":["'+
657
- this.C.toString()+'","'+this.F.toString()+'"]}'}toString(){return'FirstRelated('+this.C.toString()+', '+this.F.toString()+')'}};N('olympe.dc.transformers.FirstRelated',olympe.dc.Y.tl);olympe.dc.Y.tl.ma=[olympe.dc.Wc];olympe.dc.Y.xe=class{Wb(){return null}na(){return O(olympe.dc.Y.xe)}getTransform(a,b,c){const d={};return function(e,f,g,h){e?void 0===d[f]?(d[f]=1,b.C.C!==g||b.F||(b.C.C=f),c(!0,f,f,Dg(h,!0,f,f))):(d[f]++,Rg(b,g)):void 0!==d[f]&&0>=--d[f]&&(delete d[f],c(!1,f,f,Dg(h,!1,f,f)))}}la(){return'{"c":"'+this.na()+'"}'}toString(){return'Distinct()'}};N('olympe.dc.transformers.Distinct',olympe.dc.Y.xe);olympe.dc.Y.xe.ma=[olympe.dc.Wc];olympe.dc.Y.Hd=class{constructor(a,b){this.Id=a;this.C=void 0===b?!0:!!b}Wb(){return null}na(){return O(olympe.dc.Y.Hd)}F(){return[this.Id.R()]}getTransform(a,b,c){const d=new olympe.dc.pc.Pq(this.C?this.Id.G.bind(this.Id):(e,f)=>this.Id.G(f,e));return(e,f,g)=>{var h=e?this.Id.L(a,f):void 0;h=d.C(e,f,g,h);c(e,f,g,h)}}la(a){return'{"c":"'+this.na()+'","a":['+this.Id.la(a)+','+JSON.stringify(this.C)+']}'}toString(){return'Sort('+this.Id.toString()+','+JSON.stringify(this.C)+')'}};
658
- N('olympe.dc.transformers.Sort',olympe.dc.Y.Hd);olympe.dc.Y.Hd.ma=[olympe.dc.Wc,olympe.dc.iq];olympe.dc.Y.rc=class{constructor(a){this.C=a}Wb(){return null}na(){return O(olympe.dc.Y.rc)}F(){return this.C.F()}getTransform(a,b,c){function d(f,g,h,k){k=k.valueOf();!1===k&&Rg(b,g);k!==!!e[g]&&(e[g]=k,c(k,f,g,Dg(h,k,f,g)))}const e={};return(f,g,h,k)=>{const l='@'+h;f?(f=this.C.C(a,g),olympe.D.nb(f)&&(f=f.Pa),olympe.D.Uf(f)?(b.F||void 0!==olympe.D.$a(f)||Rg(b,h),e[l]=f,olympe.D.yc([f],n=>{d(g,h,k,n)},'filterResultHandler')):d(g,h,k,f)):(void 0!==e[l]&&(e[l].destroy(),delete e[l]),d(g,h,k,!1),delete e[h])}}la(a){return'{"c":"'+
659
- this.na()+'","a":['+this.C.la(a)+']}'}toString(){return'Filter('+this.C.toString()+')'}};N('olympe.dc.transformers.Filter',olympe.dc.Y.rc);olympe.dc.Y.rc.ma=[olympe.dc.Wc,olympe.dc.iq];olympe.dc.Y.Xd=class{constructor(a,b){this.start=a;this.C=b}Wb(){return null}na(){return O(olympe.dc.Y.Xd)}getTransform(a,b,c){const d=new olympe.dc.pc.Nl;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.C.C=e[0>n-1?0:Math.min(e.length,n)-1]);Og(d,e,f,n,c)}};olympe.D.ie([this.start,this.C],(n,p)=>{f=n.valueOf();g=p.valueOf();k()});Xg(b,k);const l=Ug(b);Tg(b,l);return(n,p,q,r)=>{h||(r.Jc().Kg(t=>{e=t;Yg(b,l)}),Bg(b,()=>r.tg(),l),h=!0);d.C(n,p,q,null);Cg(b,q,l)}}la(a){return'{"c":"'+
655
+ {d.C(g,l,h)})}}la(){return'{"c":"'+this.na()+'","a":['+JSON.stringify(ih(this))+',"'+this.direction+'"]}'}toString(){return'MultiRelated('+this.Ra()+'['+ih(this).join(',')+'])'}};N('olympe.dc.transformers.MultiRelated',olympe.dc.Y.Ce);olympe.dc.Y.Ce.ma=[olympe.dc.Wc];olympe.dc.Y.sl=class{constructor(a,b,c,d){this.C=new olympe.dc.ua.Relation(olympe.dc.za(a),c||olympe.dc.Ca.DESTINATION);this.F=new olympe.dc.ua.Relation(olympe.dc.za(b),d||olympe.dc.Ca.DESTINATION)}Wb(){return Pc(this.C)}na(){return O(olympe.dc.Y.sl)}getTransform(a,b,c){const d=olympe.dc.Ja(),e={},f=this.C.T(),g=this.C.Ra(),h=this.F.T(),k=this.F.Ra();let l=null,n=null;const p=(r,t,u,v,w,y)=>{if(w){if(w=()=>{const B=olympe.X.ob(u+g+(f+'_'+r)+y,20),E=Dg(t,!0,y,B);l=r;n=()=>{c(!1,y,B,Dg(t,!1,y,B))};
656
+ b.register(B,u,v,f,g);c(!0,y,B,E)},w.Nr=r,e[v]=w,null===l||r<l)n&&n(),w()}else if(l===r){n();e[v]=!0;w=Infinity;let B=null;for(let E=Object.keys(e),S=E.length,I=0;I<S;I++){let aa=e[E[I]];aa.Nr<w&&(w=aa.Nr,B=aa)}B&&B()}},q=(r,t,u,v,w)=>{v?e[w]||(e[w]=!0,Sg(b,u,w,f,g),Sg(b,u,w,h,k),V(d,w,this.C,p.bind(this,r,t,u,w),u+'_val'),V(d,w,this.F,q.bind(this,r+1,t,u),u+'_follow')):(d.C(w,this.F,u+'_follow'),d.C(w,this.C,u+'_val'),delete e[w])};return(r,t,u,v)=>q(0,v,u,r,t)}la(){return'{"c":"'+this.na()+'","a":["'+
657
+ this.C.toString()+'","'+this.F.toString()+'"]}'}toString(){return'FirstRelated('+this.C.toString()+', '+this.F.toString()+')'}};N('olympe.dc.transformers.FirstRelated',olympe.dc.Y.sl);olympe.dc.Y.sl.ma=[olympe.dc.Wc];olympe.dc.Y.xe=class{Wb(){return null}na(){return O(olympe.dc.Y.xe)}getTransform(a,b,c){const d={};return function(e,f,g,h){e?void 0===d[f]?(d[f]=1,b.C.C!==g||b.F||(b.C.C=f),c(!0,f,f,Dg(h,!0,f,f))):(d[f]++,Rg(b,g)):void 0!==d[f]&&0>=--d[f]&&(delete d[f],c(!1,f,f,Dg(h,!1,f,f)))}}la(){return'{"c":"'+this.na()+'"}'}toString(){return'Distinct()'}};N('olympe.dc.transformers.Distinct',olympe.dc.Y.xe);olympe.dc.Y.xe.ma=[olympe.dc.Wc];olympe.dc.Y.Hd=class{constructor(a,b){this.Id=a;this.C=void 0===b?!0:!!b}Wb(){return null}na(){return O(olympe.dc.Y.Hd)}F(){return[this.Id.R()]}getTransform(a,b,c){const d=new olympe.dc.pc.Oq(this.C?this.Id.G.bind(this.Id):(e,f)=>this.Id.G(f,e));return(e,f,g)=>{var h=e?this.Id.L(a,f):void 0;h=d.C(e,f,g,h);c(e,f,g,h)}}la(a){return'{"c":"'+this.na()+'","a":['+this.Id.la(a)+','+JSON.stringify(this.C)+']}'}toString(){return'Sort('+this.Id.toString()+','+JSON.stringify(this.C)+')'}};
658
+ N('olympe.dc.transformers.Sort',olympe.dc.Y.Hd);olympe.dc.Y.Hd.ma=[olympe.dc.Wc,olympe.dc.hq];olympe.dc.Y.rc=class{constructor(a){this.C=a}Wb(){return null}na(){return O(olympe.dc.Y.rc)}F(){return this.C.F()}getTransform(a,b,c){function d(f,g,h,k){k=k.valueOf();!1===k&&Rg(b,g);k!==!!e[g]&&(e[g]=k,c(k,f,g,Dg(h,k,f,g)))}const e={};return(f,g,h,k)=>{const l='@'+h;f?(f=this.C.C(a,g),olympe.D.nb(f)&&(f=f.Pa),olympe.D.Uf(f)?(b.F||void 0!==olympe.D.$a(f)||Rg(b,h),e[l]=f,olympe.D.yc([f],n=>{d(g,h,k,n)},'filterResultHandler')):d(g,h,k,f)):(void 0!==e[l]&&(e[l].destroy(),delete e[l]),d(g,h,k,!1),delete e[h])}}la(a){return'{"c":"'+
659
+ this.na()+'","a":['+this.C.la(a)+']}'}toString(){return'Filter('+this.C.toString()+')'}};N('olympe.dc.transformers.Filter',olympe.dc.Y.rc);olympe.dc.Y.rc.ma=[olympe.dc.Wc,olympe.dc.hq];olympe.dc.Y.Xd=class{constructor(a,b){this.start=a;this.C=b}Wb(){return null}na(){return O(olympe.dc.Y.Xd)}getTransform(a,b,c){const d=new olympe.dc.pc.Ml;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.C.C=e[0>n-1?0:Math.min(e.length,n)-1]);Og(d,e,f,n,c)}};olympe.D.ie([this.start,this.C],(n,p)=>{f=n.valueOf();g=p.valueOf();k()});Xg(b,k);const l=Ug(b);Tg(b,l);return(n,p,q,r)=>{h||(r.Jc().Kg(t=>{e=t;Yg(b,l)}),Bg(b,()=>r.tg(),l),h=!0);d.C(n,p,q,null);Cg(b,q,l)}}la(a){return'{"c":"'+
660
660
  this.na()+'","a":['+Mf(a,this.start)+','+Mf(a,this.C)+']}'}toString(){return`Limit(${olympe.D.$a(this.start)},${olympe.D.$a(this.C)})`}};N('olympe.dc.transformers.Limit',olympe.dc.Y.Xd);olympe.dc.Y.Xd.ma=[olympe.dc.Wc];function jh(a,b,c,d,e,f){function g(p,q){if(l)for(var r=l.length-1;0<=r;r--)f=l[r].getTransform(b,e,n.F(f));f=n.F(f);e.register(h,null);r=d.C(p,q,c,null);f(p,q,h,Dg(r,p,q,h))}const h=olympe.X.ec(),k=olympe.dc.Ja(),l=a.Y,n=olympe.D.La();olympe.D.yc([a.C],p=>{kh(k,p,g,h);void 0===k.model(p)&&Ag(e)})}function kh(a,b,c,d){const e=b&&b.valueOf();e&&(Ac(a,e,c,d),olympe.D.La().R(()=>Bc(a,e,d)))}
661
- olympe.dc.Y.wf=class{constructor(a,b){this.Y=this.C=null;a instanceof olympe.dc.Da?(this.C=a.Ld(),this.Y=a.Gl()):(this.C=a,b&&(this.Y=b))}Wb(){return null}na(){return O(olympe.dc.Y.wf)||''}Cg(){return this.Y}Ld(){return this.C}getTransform(a,b,c){const d=new olympe.dc.pc.Nl,e=new olympe.dc.pc.Bj;let f=[],g=[],h=!1,k=!1;const l=Ug(b),n=Ug(b);Xg(b,()=>{const p=f.concat(g);0<p.length?b.F||(b.C.C=p[p.length-1]):Yg(b);Og(d,p,0,p.length,c)});Tg(b,n);jh(this,a,this.C,e,b,(p,q,r,t)=>{const u=olympe.D.La();
661
+ olympe.dc.Y.wf=class{constructor(a,b){this.Y=this.C=null;a instanceof olympe.dc.Da?(this.C=a.Ld(),this.Y=a.Fl()):(this.C=a,b&&(this.Y=b))}Wb(){return null}na(){return O(olympe.dc.Y.wf)||''}Cg(){return this.Y}Ld(){return this.C}getTransform(a,b,c){const d=new olympe.dc.pc.Ml,e=new olympe.dc.pc.Aj;let f=[],g=[],h=!1,k=!1;const l=Ug(b),n=Ug(b);Xg(b,()=>{const p=f.concat(g);0<p.length?b.F||(b.C.C=p[p.length-1]):Yg(b);Og(d,p,0,p.length,c)});Tg(b,n);jh(this,a,this.C,e,b,(p,q,r,t)=>{const u=olympe.D.La();
662
662
  u.$()||u.G()||(k||(t.Jc().Kg(v=>{g=v;Yg(b,n)}),Bg(b,()=>t.tg(),n),k=!0),d.C(p,q,r),Cg(b,r,n))});Tg(b,l);return(p,q,r,t)=>{h||(t.Jc().Kg(u=>{f=u;Yg(b,l)}),Bg(b,()=>t.tg(),l),h=!0);d.C(p,q,r,l);Cg(b,r,l)}}la(a){const b=this.Y?'['+this.Y.map(c=>c.la(a)).join(',')+']':'null';return'{"c":"'+this.na()+'","a":['+Mf(a,this.C)+','+b+']}'}toString(){const a=olympe.D.nb(this.C)?'N:'+this.C.Pa.Z():this.C.valueOf(),b=this.Y?','+this.Y.map(c=>c.toString()).join(','):'';return'Union('+a+b+')'}};
663
- N('olympe.dc.transformers.Union',olympe.dc.Y.wf);olympe.dc.Y.wf.ma=[olympe.dc.Wc];olympe.dc.Lg={};function lh(a,b){let c=Hc.get(b)||null,d=null;for(;!c&&b&&b!==d;){d=b;b=a.db.Df(b);if(null===b)break;c=Hc.get(b)||null}return c||null}olympe.dc.Lg.SyncManager=class{constructor(a,b,c){this.N=a;this.db=b;this.C=c}};olympe.dc.Lg.P={Ea:'dc.syncs.Logger',Aa:'dc.syncs.SyncManager'};olympe.U.config(function(a){C(a,olympe.dc.Lg.P.Ea,[olympe.ra.P.Aa],b=>b.Oc('dc'));A(a,olympe.dc.Lg.P.Aa,olympe.dc.Lg.SyncManager,olympe.dc.Lg.P.Ea,olympe.dc.P.si,olympe.U.P.dg)});olympe.dc.X={};olympe.dc.X.aD=function(a){a=olympe.dc.za(a);const b=olympe.D.Qc(olympe.D.Za,'getInstanceName'),c=olympe.dc.Ja(),d=Fd(c,a,olympe.dc.CloudObject.nameProp,b.update.bind(b));olympe.D.La().R(c.F.bind(c,a,olympe.dc.CloudObject.nameProp,d));return b.Ib()};olympe.dc.X.dD=function(a){return olympe.D.Fa([a],b=>olympe.D.hy(olympe.dc.Ja().jj(b)),olympe.D.sa)};olympe.dc.X.eD=function(a){return(a=olympe.D.$a(a))?olympe.dc.Ja().jj(a):!1};olympe.dc.X.Ii=class a{constructor(b=olympe.dc.Ha.Mc){this.G=b}C(b){const c=new olympe.dc.db.uc;this.F(b,c);return c}R(b,c,d){const e=new olympe.dc.db.uc(b),f=new olympe.dc.query.Ai(b,this.G,c,e);this.F(d,e,(g,h)=>{h=h||[];const k=f.C.get(g)||new Set;for(const l of h)k.add(l);f.C.set(g,k)});return f}L(b,c){const d=new olympe.dc.db.uc(b),e=new olympe.dc.query.gt(b,d);this.F(c,d,(f,g,h)=>{h=h||[];const k=new rf(f);k.add=g||[];k.remove=h;e.C.set(f,k)});return e}F(b,c,d){const e=olympe.dc.Yb.Gd;for(const f of b)switch(b=
664
- f.i?f.i:-1,f.o){case 1:const g=a.C(f.p||{});g.has(e)||g.set(e,this.G);c.F(f.t,g,b);break;case 2:c.qc(f.t,a.C(f.p),!0,b);break;case 3:c.Dc(f.t,f.f,b);break;case 4:c.Ta(f.m,f.l,f.r,b);break;case 5:c.cc(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 C(b){const c=new Map;for(const [d,e]of Object.entries(b)){b=d;if(b===olympe.dc.Yb.Gd||b===olympe.dc.Yb.VERSION){c.set(b,e);continue}else if('v'===d){c.set(olympe.dc.Yb.VERSION,e);continue}let f=
663
+ N('olympe.dc.transformers.Union',olympe.dc.Y.wf);olympe.dc.Y.wf.ma=[olympe.dc.Wc];olympe.dc.Lg={};function lh(a,b){let c=Hc.get(b)||null,d=null;for(;!c&&b&&b!==d;){d=b;b=a.db.Df(b);if(null===b)break;c=Hc.get(b)||null}return c||null}olympe.dc.Lg.SyncManager=class{constructor(a,b,c){this.N=a;this.db=b;this.C=c}};olympe.dc.Lg.P={Ea:'dc.syncs.Logger',Aa:'dc.syncs.SyncManager'};olympe.U.config(function(a){C(a,olympe.dc.Lg.P.Ea,[olympe.ra.P.Aa],b=>b.Oc('dc'));A(a,olympe.dc.Lg.P.Aa,olympe.dc.Lg.SyncManager,olympe.dc.Lg.P.Ea,olympe.dc.P.si,olympe.U.P.dg)});olympe.dc.X={};olympe.dc.X.$C=function(a){a=olympe.dc.za(a);const b=olympe.D.Qc(olympe.D.Za,'getInstanceName'),c=olympe.dc.Ja(),d=Fd(c,a,olympe.dc.CloudObject.nameProp,b.update.bind(b));olympe.D.La().R(c.F.bind(c,a,olympe.dc.CloudObject.nameProp,d));return b.Ib()};olympe.dc.X.cD=function(a){return olympe.D.Fa([a],b=>olympe.D.gy(olympe.dc.Ja().jj(b)),olympe.D.sa)};olympe.dc.X.dD=function(a){return(a=olympe.D.$a(a))?olympe.dc.Ja().jj(a):!1};olympe.dc.X.Ii=class a{constructor(b=olympe.dc.Ha.Mc){this.G=b}C(b){const c=new olympe.dc.db.uc;this.F(b,c);return c}R(b,c,d){const e=new olympe.dc.db.uc(b),f=new olympe.dc.query.Ai(b,this.G,c,e);this.F(d,e,(g,h)=>{h=h||[];const k=f.C.get(g)||new Set;for(const l of h)k.add(l);f.C.set(g,k)});return f}L(b,c){const d=new olympe.dc.db.uc(b),e=new olympe.dc.query.ft(b,d);this.F(c,d,(f,g,h)=>{h=h||[];const k=new rf(f);k.add=g||[];k.remove=h;e.C.set(f,k)});return e}F(b,c,d){const e=olympe.dc.Yb.Gd;for(const f of b)switch(b=
664
+ f.i?f.i:-1,f.o){case 1:const g=a.C(f.p||{});g.has(e)||g.set(e,this.G);c.F(f.t,g,b);break;case 2:c.qc(f.t,a.C(f.p),!0,b);break;case 3:c.Dc(f.t,f.f,b);break;case 4:c.Ua(f.m,f.l,f.r,b);break;case 5:c.cc(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 C(b){const c=new Map;for(const [d,e]of Object.entries(b)){b=d;if(b===olympe.dc.Yb.Gd||b===olympe.dc.Yb.VERSION){c.set(b,e);continue}else if('v'===d){c.set(olympe.dc.Yb.VERSION,e);continue}let f=
665
665
  typeof e;b.startsWith('fd')&&(b=olympe.dc.Tg.ic+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&&
666
- e.M-1||0,e.d||1,e.h,e.m,e.s,e.S)));break;case '7':c.set(b,new olympe.D.Color(e.r,e.g,e.b,e.a));break;case '8':c.set(b,new olympe.dc.Cc(e.t));break;case 'untyped':null===e&&c.set(b,null)}}return c}};olympe.dc.X.Tb={};olympe.dc.X.Tb.Gm=a=>'string'===typeof a||'number'===typeof a||'boolean'===typeof a||a instanceof String?olympe.D.yb(a):a instanceof olympe.D.Za?a:null;olympe.dc.X.Tb.Dm=a=>'boolean'===typeof a||a instanceof Boolean?olympe.D.wc(a):a instanceof olympe.D.sa?a:null;olympe.dc.X.Tb.Fm=a=>'number'===typeof a||a instanceof Number?olympe.D.Ba(a):'string'===typeof a||a instanceof String?olympe.D.Ba(Number.parseFloat(a.valueOf())):a instanceof olympe.D.ga?a:null;
667
- olympe.dc.X.Tb.Em=function(a){return'number'===typeof a||a instanceof Number?tb(a.valueOf()):'string'===typeof a||a instanceof String?new olympe.D.ib(new Date(a.valueOf().valueOf())):a instanceof Date?new olympe.D.ib(a):a instanceof olympe.D.ib?a:null};olympe.dc.X.Tb.sr=function(a){return a instanceof olympe.D.Color?a:'string'===typeof a||a instanceof String?xb(a.valueOf()):null};olympe.dc.X.Tb.tr=a=>a instanceof olympe.dc.CloudObject?a:a instanceof olympe.dc.Cc?Ec(a):null;
668
- olympe.dc.X.Tb.fh=a=>a instanceof olympe.dc.Cc?Ec(a):a;olympe.dc.X.Tb.LC=a=>{switch(typeof a){case 'boolean':return olympe.D.wc(a);case 'number':return olympe.D.Ba(a);case 'string':return olympe.D.yb(a);case 'object':if(a instanceof Date)return olympe.D.Ux(a)}return a};
669
- olympe.dc.X.Tb.YC=a=>{switch(a){case olympe.D.sa:return olympe.dc.X.Tb.Dm;case olympe.D.Za:return olympe.dc.X.Tb.Gm;case olympe.D.ga:return olympe.dc.X.Tb.Fm;case olympe.D.ib:return olympe.dc.X.Tb.Em;case olympe.D.Color:return olympe.dc.X.Tb.sr;case olympe.dc.CloudObject:return olympe.dc.X.Tb.tr;default:return olympe.dc.X.Tb.fh}};olympe.dc.P={Aa:'dc.Manager',et:'dc.Graph',si:'dc.DBView',Ea:'dc.Logger',av:'dc.TransactionLogger',wi:'dc.FileServiceManager',ne:'dc.Router'};olympe.dc.Config={eg:'dc.debug',Zg:'dc.subscribeAll',oo:'dc.defaultSource',Eo:'dc.fileCache',xo:'dc.errorOnAbstractInstantiation'};
670
- olympe.U.config(function(a){D(a,olympe.dc.Config.eg,!1);D(a,olympe.dc.Config.Zg,!1);D(a,olympe.dc.Config.oo,olympe.dc.Ha.Mc);D(a,olympe.dc.Config.Eo,!0);D(a,olympe.dc.Config.xo,!0);C(a,olympe.dc.P.Ea,[olympe.ra.P.Aa],b=>b.Oc('dc'));sa(a,olympe.dc.P.av,olympe.dc.transaction.P.Ea);sa(a,olympe.dc.P.si,olympe.dc.db.P.hb);A(a,olympe.dc.P.wi,olympe.dc.at,olympe.dc.P.Ea,olympe.net.P.Aa,olympe.dc.P.ne,olympe.X.P.th,new olympe.U.fa(olympe.dc.Config.Eo));ta(a,olympe.dc.P.ne);A(a,olympe.dc.P.Aa,olympe.dc.pa,
671
- olympe.dc.P.Ea,olympe.dc.db.P.Aa,olympe.dc.query.P.Aa,olympe.dc.transaction.P.Aa,olympe.dc.Lg.P.Aa,olympe.dc.P.wi)},'olympe.dc');olympe.U.run([olympe.dc.db.P.Aa,olympe.dc.query.P.Aa,olympe.dc.transaction.P.Aa,olympe.dc.Lg.P.Aa,olympe.dc.P.Aa,olympe.dc.P.wi],(a,b,c,d,e,f)=>{olympe.dc.xd=()=>a;olympe.dc.Nf=()=>b;olympe.dc.di=()=>c;olympe.dc.Nr=()=>d;olympe.dc.Jc=()=>e;olympe.dc.Bw=()=>f},'DC singleton getter initialization');function mh(a){const b=olympe.dc.Ja(),c=new Map;b.Hk(a).forEach(d=>{b.ub(d,olympe.dc.CloudObject.propertyRel).forEach(e=>{const f=b.name(e);c.has(f)||c.set(f,e)})});return c}olympe.dc.CloudObject=class{constructor(a,b){this.tag=b;this.db=olympe.dc.Ja();this.model=null}static get(a){{var b=olympe.dc.Nr();a=olympe.dc.za(a);const c=lh(b,b.db.model(a));null===c?(b.N.error(`Instantiation of a CloudObject (tag = '${a}') that does not exist (or incompletely exists) in the local database.\n
666
+ e.M-1||0,e.d||1,e.h,e.m,e.s,e.S)));break;case '7':c.set(b,new olympe.D.Color(e.r,e.g,e.b,e.a));break;case '8':c.set(b,new olympe.dc.Cc(e.t));break;case 'untyped':null===e&&c.set(b,null)}}return c}};olympe.dc.X.Tb={};olympe.dc.X.Tb.Fm=a=>'string'===typeof a||'number'===typeof a||'boolean'===typeof a||a instanceof String?olympe.D.yb(a):a instanceof olympe.D.Za?a:null;olympe.dc.X.Tb.Cm=a=>'boolean'===typeof a||a instanceof Boolean?olympe.D.wc(a):a instanceof olympe.D.sa?a:null;olympe.dc.X.Tb.Em=a=>'number'===typeof a||a instanceof Number?olympe.D.Ba(a):'string'===typeof a||a instanceof String?olympe.D.Ba(Number.parseFloat(a.valueOf())):a instanceof olympe.D.ga?a:null;
667
+ olympe.dc.X.Tb.Dm=function(a){return'number'===typeof a||a instanceof Number?tb(a.valueOf()):'string'===typeof a||a instanceof String?new olympe.D.ib(new Date(a.valueOf().valueOf())):a instanceof Date?new olympe.D.ib(a):a instanceof olympe.D.ib?a:null};olympe.dc.X.Tb.rr=function(a){return a instanceof olympe.D.Color?a:'string'===typeof a||a instanceof String?xb(a.valueOf()):null};olympe.dc.X.Tb.sr=a=>a instanceof olympe.dc.CloudObject?a:a instanceof olympe.dc.Cc?Ec(a):null;
668
+ olympe.dc.X.Tb.fh=a=>a instanceof olympe.dc.Cc?Ec(a):a;olympe.dc.X.Tb.KC=a=>{switch(typeof a){case 'boolean':return olympe.D.wc(a);case 'number':return olympe.D.Ba(a);case 'string':return olympe.D.yb(a);case 'object':if(a instanceof Date)return olympe.D.Tx(a)}return a};
669
+ olympe.dc.X.Tb.XC=a=>{switch(a){case olympe.D.sa:return olympe.dc.X.Tb.Cm;case olympe.D.Za:return olympe.dc.X.Tb.Fm;case olympe.D.ga:return olympe.dc.X.Tb.Em;case olympe.D.ib:return olympe.dc.X.Tb.Dm;case olympe.D.Color:return olympe.dc.X.Tb.rr;case olympe.dc.CloudObject:return olympe.dc.X.Tb.sr;default:return olympe.dc.X.Tb.fh}};olympe.dc.P={Aa:'dc.Manager',dt:'dc.Graph',si:'dc.DBView',Ea:'dc.Logger',$u:'dc.TransactionLogger',wi:'dc.FileServiceManager',ne:'dc.Router'};olympe.dc.Config={eg:'dc.debug',Zg:'dc.subscribeAll',no:'dc.defaultSource',Do:'dc.fileCache',wo:'dc.errorOnAbstractInstantiation'};
670
+ olympe.U.config(function(a){D(a,olympe.dc.Config.eg,!1);D(a,olympe.dc.Config.Zg,!1);D(a,olympe.dc.Config.no,olympe.dc.Ha.Mc);D(a,olympe.dc.Config.Do,!0);D(a,olympe.dc.Config.wo,!0);C(a,olympe.dc.P.Ea,[olympe.ra.P.Aa],b=>b.Oc('dc'));sa(a,olympe.dc.P.$u,olympe.dc.transaction.P.Ea);sa(a,olympe.dc.P.si,olympe.dc.db.P.hb);A(a,olympe.dc.P.wi,olympe.dc.$s,olympe.dc.P.Ea,olympe.net.P.Aa,olympe.dc.P.ne,olympe.X.P.th,new olympe.U.fa(olympe.dc.Config.Do));ta(a,olympe.dc.P.ne);A(a,olympe.dc.P.Aa,olympe.dc.pa,
671
+ olympe.dc.P.Ea,olympe.dc.db.P.Aa,olympe.dc.query.P.Aa,olympe.dc.transaction.P.Aa,olympe.dc.Lg.P.Aa,olympe.dc.P.wi)},'olympe.dc');olympe.U.run([olympe.dc.db.P.Aa,olympe.dc.query.P.Aa,olympe.dc.transaction.P.Aa,olympe.dc.Lg.P.Aa,olympe.dc.P.Aa,olympe.dc.P.wi],(a,b,c,d,e,f)=>{olympe.dc.xd=()=>a;olympe.dc.Nf=()=>b;olympe.dc.di=()=>c;olympe.dc.Mr=()=>d;olympe.dc.Jc=()=>e;olympe.dc.Aw=()=>f},'DC singleton getter initialization');function mh(a){const b=olympe.dc.Ja(),c=new Map;b.Gk(a).forEach(d=>{b.ub(d,olympe.dc.CloudObject.propertyRel).forEach(e=>{const f=b.name(e);c.has(f)||c.set(f,e)})});return c}olympe.dc.CloudObject=class{constructor(a,b){this.tag=b;this.db=olympe.dc.Ja();this.model=null}static get(a){{var b=olympe.dc.Mr();a=olympe.dc.za(a);const c=lh(b,b.db.model(a));null===c?(b.N.error(`Instantiation of a CloudObject (tag = '${a}') that does not exist (or incompletely exists) in the local database.\n
672
672
  This could lead to unwanted behaviour and must be fixed.
673
- For more information, activate the database debug mode or call "dbMonitor.debug(${a})" from this console.`),b=new olympe.dc.CloudObject(void 0,a)):b=c.instantiate(a,b.C)}return b}static yr(a,b,c=olympe.dc.Ha.ic){if('undefined'===typeof olympe.sc)throw Error('Method CloudObject.createWith should only be used at runtime, when sc package exists');const d=olympe.dc.Ja();let e=null;const f=h=>{null===e&&(e=mh(b||this));return e.has(h)?e.get(h):null},g=new Map;a.forEach((h,k)=>{d.Db(olympe.dc.za(k))?
674
- g.set(k,h):(k=f(k))&&g.set(k,h)});a=new olympe.sc.Transaction(!1);c=a.create(b||this,g,c);a.jb().catch(h=>olympe.ra.Ya('dc').error(`Error occurred for transaction executed by CloudObject.createWith: ${h}`));return this.get(c)}static zv(){return this.get(this)}static Lk(a){return olympe.dc.gb.Lk(a)}static dd(){return olympe.dc.Ja().ub(this,olympe.dc.CloudObject.propertyRel).map(a=>new olympe.dc.ua.Property(a))}static ed(){const a=olympe.dc.Ja();return a.ub(this,olympe.dc.CloudObject.G).map(b=>new olympe.dc.ua.Relation(b)).concat(a.ub(this,
675
- olympe.dc.CloudObject.R).map(b=>new olympe.dc.ua.Relation(b,olympe.dc.Ca.ORIGIN)))}static Lf(a){return olympe.dc.CloudObject.get(a)}static Gw(a){var b=lh(olympe.dc.Nr(),olympe.dc.za(a));b=b&&b.C;return new olympe.dc.Da(olympe.dc.za(a),olympe.dc.CloudObject.instancesRel,b)}T(){return this.tag}name(){return this.db.name(this)}na(){return this.Eb(olympe.dc.CloudObject.nameProp)}Mf(){this.model||(this.model=olympe.dc.CloudObject.get(this.db.model(this)));return this.model}query(){return olympe.dc.gb.from(this)}Wf(){return this.db.Wf(this)}ox(){return this.db.version(this)}Ct(){return this.db.source(this)}Gr(){return olympe.D.Fa([this.na()],
676
- a=>olympe.D.yb(a),olympe.D.Za,'getDisplayName',olympe.D.yb('('+this.toString()+')'))}Nb(){return this.model?this.model.T():this.db.model(this)}observe(a,b,c=!0){const d='function'===typeof a.Ua?a.C.C:a;return new rxjs.Observable(e=>{const f=this.db.cb(this.tag,b);c||null!==f||e.next(f);const g=Fd(this.db,this.tag,b,h=>{null===h||void 0===h?e.next(null):e.next(h)});d.R(()=>{e.complete();this.db.F(this.tag,b,g)});return()=>this.db.F(this.tag,b,g)})}jn(a){const b='function'===typeof a.Ua?a.C.C:a;return new rxjs.Observable(c=>
677
- {const d=Gd(this.db,this.tag,(e,f)=>{null===f||void 0===f?c.next([new olympe.dc.ua.Property(e),null]):c.next([new olympe.dc.ua.Property(e),f])});b.R(()=>{c.complete();Hd(this.db,this.tag,d)});return()=>Hd(this.db,this.tag,d)})}Zx(a){return this.observe(olympe.D.La(),a)}get(a){return this.db.cb(this.tag,a,!0)}cb(a){return this.get(a)}rb(a){return olympe.dc.gb.from(this).rb(a)}Cr(a){return olympe.dc.kd.from(this).rb(a)}ow(){return this.oc(olympe.dc.CloudObject.Hb,olympe.dc.CloudObject)}Sm(){return this.ub(olympe.dc.CloudObject.containsRel,
678
- olympe.dc.CloudObject)}Of(a,b,c){const d=olympe.D.Qc(c,'Sync valueType'),e=Fd(this.db,this.tag,a,olympe.D.La().F(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.F(this.tag,a,e));return d.node}Eb(a){return L(this.Of(a,olympe.dc.X.Tb.Gm,olympe.D.Za))}Ie(a){return L(this.Of(a,olympe.dc.X.Tb.Fm,olympe.D.ga))}Bg(a){return L(this.Of(a,olympe.dc.X.Tb.Dm,olympe.D.sa))}gj(a){return L(this.Of(a,olympe.dc.X.Tb.Em,olympe.D.ib))}Lr(){return L(this.Of(olympe.dm.Color.valueProp,
679
- olympe.dc.X.Tb.sr,olympe.D.Color))}Mr(){return L(this.Of(olympe.sc.workflow.Transition.processRefProp,olympe.dc.X.Tb.tr,olympe.dc.CloudObject))}ub(a,b){a=a instanceof olympe.dc.Y.Sb?a:new olympe.dc.Y.Sb(a.T(),a.Ra());return new olympe.dc.Da(this.T(),a,b)}oc(a,b){return this.ub(a,b).Pc()}Dr(a,b){const c=this.db,d=olympe.X.ec(),e=olympe.D.La(),f=new Map;V(c,this.tag,a,(g,h)=>{g?(g=new olympe.D.Zb(`forEachRelated: (${this.tag})-[:${a.T()}]-(${h})`,e),f.set(h,g),g.run(b,olympe.dc.CloudObject.get(h))):
680
- f.has(h)&&(f.get(h).destroy(),f.delete(h))},d);e.R(()=>{c.C(this.tag,a,d)})}Ly(){return new olympe.dc.Da(this.T(),[],Nc(this.T()))}transform(...a){return(new olympe.dc.Da(this.T(),[],this.constructor)).transform(...a)}Rc(){return this.Gr()}toString(){if(!this.db.Db(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}`:`orphan object (no model) #${this.tag}${b}`}toJSON(){if(!this.db.Db(this.tag))return{CloudObject:'Unknown tag'};
681
- const a=this.db.model(this.tag),b=this.db.name(a),c=this.db.name(this.tag);return{CloudObject:this.tag,Name:c,Model:`${b} (${a})`}}rh(a=!1,b=!0){const c={};this.db.dd(this,b).forEach((d,e)=>{e=a?this.db.name(e):e;c[e]=d instanceof olympe.dc.Cc?Ec(d):d});return c}mb(a){return a instanceof olympe.dc.CloudObject?this.T()===a.T():!1}Pd(a){return olympe.D.Fa([a],b=>olympe.D.wc(this.mb(b)),olympe.D.sa)}Rv(a){const b=this.db;let c=!1;if(void 0===a||null===a)a=new olympe.dc.Transaction,c=!0;const d=olympe.dc.Ca.ORIGIN;
682
- for(const [e,f,g]of Jd(b,this))f===d?a.cc(e,g,this):e!==olympe.dc.CloudObject.modelRel.T()&&a.cc(e,this,g);a.delete(this,olympe.dc.Qb.NONE);c&&a.jb()}};olympe.dc.CloudObject.prototype.equals=olympe.dc.CloudObject.prototype.mb;olympe.dc.CloudObject.prototype.toObject=olympe.dc.CloudObject.prototype.rh;olympe.dc.CloudObject.prototype.followSingle=olympe.dc.CloudObject.prototype.Cr;olympe.dc.CloudObject.prototype.follow=olympe.dc.CloudObject.prototype.rb;olympe.dc.CloudObject.prototype.getProperty=olympe.dc.CloudObject.prototype.cb;
683
- olympe.dc.CloudObject.prototype.get=olympe.dc.CloudObject.prototype.get;olympe.dc.CloudObject.prototype.observeProperty=olympe.dc.CloudObject.prototype.Zx;olympe.dc.CloudObject.prototype.observeProperties=olympe.dc.CloudObject.prototype.jn;olympe.dc.CloudObject.prototype.observe=olympe.dc.CloudObject.prototype.observe;olympe.dc.CloudObject.prototype.getModelTag=olympe.dc.CloudObject.prototype.Nb;olympe.dc.CloudObject.prototype.isPersisted=olympe.dc.CloudObject.prototype.Wf;
684
- olympe.dc.CloudObject.prototype.query=olympe.dc.CloudObject.prototype.query;olympe.dc.CloudObject.prototype.getModel=olympe.dc.CloudObject.prototype.Mf;olympe.dc.CloudObject.prototype.name=olympe.dc.CloudObject.prototype.name;olympe.dc.CloudObject.prototype.getTag=olympe.dc.CloudObject.prototype.T;olympe.dc.CloudObject.getInstancesOf=olympe.dc.CloudObject.Gw;olympe.dc.CloudObject.getInstance=olympe.dc.CloudObject.Lf;olympe.dc.CloudObject.getRelations=olympe.dc.CloudObject.ed;
685
- olympe.dc.CloudObject.getProperties=olympe.dc.CloudObject.dd;olympe.dc.CloudObject.instancesOf=olympe.dc.CloudObject.Lk;olympe.dc.CloudObject.asInstance=olympe.dc.CloudObject.zv;olympe.dc.CloudObject.createWith=olympe.dc.CloudObject.yr;olympe.dc.CloudObject.get=olympe.dc.CloudObject.get;olympe.dc.CloudObject.O=olympe.dc.ya.C('ff021000000000000001',olympe.dc.CloudObject);olympe.dc.CloudObject.lj=olympe.dc.CloudObject.O.xa(olympe.dc.Yb.VERSION);olympe.dc.CloudObject.nameProp=olympe.dc.CloudObject.O.xa('ff023000000000000011');
673
+ For more information, activate the database debug mode or call "dbMonitor.debug(${a})" from this console.`),b=new olympe.dc.CloudObject(void 0,a)):b=c.instantiate(a,b.C)}return b}static xr(a,b,c=olympe.dc.Ha.ic){if('undefined'===typeof olympe.sc)throw Error('Method CloudObject.createWith should only be used at runtime, when sc package exists');const d=olympe.dc.Ja();let e=null;const f=h=>{null===e&&(e=mh(b||this));return e.has(h)?e.get(h):null},g=new Map;a.forEach((h,k)=>{d.Db(olympe.dc.za(k))?
674
+ g.set(k,h):(k=f(k))&&g.set(k,h)});a=new olympe.sc.Transaction(!1);c=a.create(b||this,g,c);a.jb().catch(h=>olympe.ra.Ya('dc').error(`Error occurred for transaction executed by CloudObject.createWith: ${h}`));return this.get(c)}static yv(){return this.get(this)}static Kk(a){return olympe.dc.gb.Kk(a)}static dd(){return olympe.dc.Ja().ub(this,olympe.dc.CloudObject.propertyRel).map(a=>new olympe.dc.ua.Property(a))}static ed(){const a=olympe.dc.Ja();return a.ub(this,olympe.dc.CloudObject.G).map(b=>new olympe.dc.ua.Relation(b)).concat(a.ub(this,
675
+ olympe.dc.CloudObject.R).map(b=>new olympe.dc.ua.Relation(b,olympe.dc.Ca.ORIGIN)))}static Lf(a){return olympe.dc.CloudObject.get(a)}static Fw(a){var b=lh(olympe.dc.Mr(),olympe.dc.za(a));b=b&&b.C;return new olympe.dc.Da(olympe.dc.za(a),olympe.dc.CloudObject.instancesRel,b)}T(){return this.tag}name(){return this.db.name(this)}na(){return this.Eb(olympe.dc.CloudObject.nameProp)}Mf(){this.model||(this.model=olympe.dc.CloudObject.get(this.db.model(this)));return this.model}query(){return olympe.dc.gb.from(this)}Wf(){return this.db.Wf(this)}nx(){return this.db.version(this)}Bt(){return this.db.source(this)}Fr(){return olympe.D.Fa([this.na()],
676
+ a=>olympe.D.yb(a),olympe.D.Za,'getDisplayName',olympe.D.yb('('+this.toString()+')'))}Nb(){return this.model?this.model.T():this.db.model(this)}observe(a,b,c=!0){const d='function'===typeof a.Sa?a.C.C:a;return new rxjs.Observable(e=>{const f=this.db.cb(this.tag,b);c||null!==f||e.next(f);const g=Fd(this.db,this.tag,b,h=>{null===h||void 0===h?e.next(null):e.next(h)});d.R(()=>{e.complete();this.db.F(this.tag,b,g)});return()=>this.db.F(this.tag,b,g)})}hn(a){const b='function'===typeof a.Sa?a.C.C:a;return new rxjs.Observable(c=>
677
+ {const d=Gd(this.db,this.tag,(e,f)=>{null===f||void 0===f?c.next([new olympe.dc.ua.Property(e),null]):c.next([new olympe.dc.ua.Property(e),f])});b.R(()=>{c.complete();Hd(this.db,this.tag,d)});return()=>Hd(this.db,this.tag,d)})}Yx(a){return this.observe(olympe.D.La(),a)}get(a){return this.db.cb(this.tag,a,!0)}cb(a){return this.get(a)}rb(a){return olympe.dc.gb.from(this).rb(a)}Br(a){return olympe.dc.kd.from(this).rb(a)}nw(){return this.oc(olympe.dc.CloudObject.Hb,olympe.dc.CloudObject)}Rm(){return this.ub(olympe.dc.CloudObject.containsRel,
678
+ olympe.dc.CloudObject)}Of(a,b,c){const d=olympe.D.Qc(c,'Sync valueType'),e=Fd(this.db,this.tag,a,olympe.D.La().F(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.F(this.tag,a,e));return d.node}Eb(a){return L(this.Of(a,olympe.dc.X.Tb.Fm,olympe.D.Za))}Ie(a){return L(this.Of(a,olympe.dc.X.Tb.Em,olympe.D.ga))}Bg(a){return L(this.Of(a,olympe.dc.X.Tb.Cm,olympe.D.sa))}gj(a){return L(this.Of(a,olympe.dc.X.Tb.Dm,olympe.D.ib))}Kr(){return L(this.Of(olympe.dm.Color.valueProp,
679
+ olympe.dc.X.Tb.rr,olympe.D.Color))}Lr(){return L(this.Of(olympe.sc.workflow.Transition.processRefProp,olympe.dc.X.Tb.sr,olympe.dc.CloudObject))}ub(a,b){a=a instanceof olympe.dc.Y.Sb?a:new olympe.dc.Y.Sb(a.T(),a.Ra());return new olympe.dc.Da(this.T(),a,b)}oc(a,b){return this.ub(a,b).Pc()}Cr(a,b){const c=this.db,d=olympe.X.ec(),e=olympe.D.La(),f=new Map;V(c,this.tag,a,(g,h)=>{g?(g=new olympe.D.Zb(`forEachRelated: (${this.tag})-[:${a.T()}]-(${h})`,e),f.set(h,g),g.run(b,olympe.dc.CloudObject.get(h))):
680
+ f.has(h)&&(f.get(h).destroy(),f.delete(h))},d);e.R(()=>{c.C(this.tag,a,d)})}Ky(){return new olympe.dc.Da(this.T(),[],Nc(this.T()))}transform(...a){return(new olympe.dc.Da(this.T(),[],this.constructor)).transform(...a)}Rc(){return this.Fr()}toString(){if(!this.db.Db(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}`:`orphan object (no model) #${this.tag}${b}`}toJSON(){if(!this.db.Db(this.tag))return{CloudObject:'Unknown tag'};
681
+ const a=this.db.model(this.tag),b=this.db.name(a),c=this.db.name(this.tag);return{CloudObject:this.tag,Name:c,Model:`${b} (${a})`}}rh(a=!1,b=!0){const c={};this.db.dd(this,b).forEach((d,e)=>{e=a?this.db.name(e):e;c[e]=d instanceof olympe.dc.Cc?Ec(d):d});return c}mb(a){return a instanceof olympe.dc.CloudObject?this.T()===a.T():!1}Pd(a){return olympe.D.Fa([a],b=>olympe.D.wc(this.mb(b)),olympe.D.sa)}Qv(a){const b=this.db;let c=!1;if(void 0===a||null===a)a=new olympe.dc.Transaction,c=!0;const d=olympe.dc.Ca.ORIGIN;
682
+ for(const [e,f,g]of Jd(b,this))f===d?a.cc(e,g,this):e!==olympe.dc.CloudObject.modelRel.T()&&a.cc(e,this,g);a.delete(this,olympe.dc.Qb.NONE);c&&a.jb()}};olympe.dc.CloudObject.prototype.equals=olympe.dc.CloudObject.prototype.mb;olympe.dc.CloudObject.prototype.toObject=olympe.dc.CloudObject.prototype.rh;olympe.dc.CloudObject.prototype.followSingle=olympe.dc.CloudObject.prototype.Br;olympe.dc.CloudObject.prototype.follow=olympe.dc.CloudObject.prototype.rb;olympe.dc.CloudObject.prototype.getProperty=olympe.dc.CloudObject.prototype.cb;
683
+ olympe.dc.CloudObject.prototype.get=olympe.dc.CloudObject.prototype.get;olympe.dc.CloudObject.prototype.observeProperty=olympe.dc.CloudObject.prototype.Yx;olympe.dc.CloudObject.prototype.observeProperties=olympe.dc.CloudObject.prototype.hn;olympe.dc.CloudObject.prototype.observe=olympe.dc.CloudObject.prototype.observe;olympe.dc.CloudObject.prototype.getModelTag=olympe.dc.CloudObject.prototype.Nb;olympe.dc.CloudObject.prototype.isPersisted=olympe.dc.CloudObject.prototype.Wf;
684
+ olympe.dc.CloudObject.prototype.query=olympe.dc.CloudObject.prototype.query;olympe.dc.CloudObject.prototype.getModel=olympe.dc.CloudObject.prototype.Mf;olympe.dc.CloudObject.prototype.name=olympe.dc.CloudObject.prototype.name;olympe.dc.CloudObject.prototype.getTag=olympe.dc.CloudObject.prototype.T;olympe.dc.CloudObject.getInstancesOf=olympe.dc.CloudObject.Fw;olympe.dc.CloudObject.getInstance=olympe.dc.CloudObject.Lf;olympe.dc.CloudObject.getRelations=olympe.dc.CloudObject.ed;
685
+ olympe.dc.CloudObject.getProperties=olympe.dc.CloudObject.dd;olympe.dc.CloudObject.instancesOf=olympe.dc.CloudObject.Kk;olympe.dc.CloudObject.asInstance=olympe.dc.CloudObject.yv;olympe.dc.CloudObject.createWith=olympe.dc.CloudObject.xr;olympe.dc.CloudObject.get=olympe.dc.CloudObject.get;olympe.dc.CloudObject.O=olympe.dc.ya.C('ff021000000000000001',olympe.dc.CloudObject);olympe.dc.CloudObject.lj=olympe.dc.CloudObject.O.xa(olympe.dc.Yb.VERSION);olympe.dc.CloudObject.nameProp=olympe.dc.CloudObject.O.xa('ff023000000000000011');
686
686
  z('olympe.dc.CloudObject.nameProp',olympe.dc.CloudObject.nameProp);olympe.dc.CloudObject.W=olympe.dc.CloudObject.O.xa('ff023000000000000012');olympe.dc.CloudObject.G=olympe.dc.CloudObject.O.Ga('ff02200000000000000a');olympe.dc.CloudObject.R=olympe.dc.CloudObject.O.Ga('ff02200000000000000b',olympe.dc.Ca.ORIGIN);olympe.dc.CloudObject.$d=olympe.dc.CloudObject.O.Ga('017e9c4ba4c847d71cbf');olympe.dc.CloudObject.vd=olympe.dc.CloudObject.O.Ga('017ea013caf8e89cedb2');olympe.dc.CloudObject.propertyRel=olympe.dc.CloudObject.O.Ga('ff02200000000000000c');
687
687
  z('olympe.dc.CloudObject.propertyRel',olympe.dc.CloudObject.propertyRel);olympe.dc.CloudObject.typeRel=olympe.dc.CloudObject.O.Ga('ff02200000000000000d',olympe.dc.Ca.ORIGIN);olympe.dc.CloudObject.modelRel=olympe.dc.CloudObject.O.Ga(olympe.dc.jc.Tc);z('olympe.dc.CloudObject.modelRel',olympe.dc.CloudObject.modelRel);olympe.dc.CloudObject.instancesRel=P(olympe.dc.CloudObject.O,olympe.dc.CloudObject.modelRel);z('olympe.dc.CloudObject.instancesRel',olympe.dc.CloudObject.instancesRel);
688
- olympe.dc.CloudObject.extendRel=olympe.dc.CloudObject.O.Ga(olympe.dc.jc.vi);z('olympe.dc.CloudObject.extendRel',olympe.dc.CloudObject.extendRel);olympe.dc.CloudObject.extendedByRel=P(olympe.dc.CloudObject.O,olympe.dc.CloudObject.extendRel);z('olympe.dc.CloudObject.extendedByRel',olympe.dc.CloudObject.extendedByRel);olympe.dc.CloudObject.containsRel=olympe.dc.CloudObject.O.Ga(olympe.dc.jc.Xn);z('olympe.dc.CloudObject.containsRel',olympe.dc.CloudObject.containsRel);
689
- olympe.dc.CloudObject.Hb=P(olympe.dc.CloudObject.O,olympe.dc.CloudObject.containsRel);olympe.dc.CloudObject.Qv=olympe.dc.CloudObject.O.Ga('018282d3ac0a474a0bf4');z('olympe.dc.CloudObject.deleteAlsoRel',olympe.dc.CloudObject.Qv);olympe.dc.sB=olympe.dc.CloudObject;olympe.dc.CloudObject.ma=[olympe.dc.Ae];m=olympe.dc.CloudObject.prototype;m.T.K=new olympe.D.J(()=>String,[]);m.name.K=new olympe.D.J(()=>String,[]);m.na.K=olympe.D.J.F;m.Mf.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);
690
- m.ox.K=new olympe.D.J(()=>Number,[]);m.Ct.K=new olympe.D.J(()=>String,[]);m.Gr.K=olympe.D.J.F;m.Nb.K=new olympe.D.J(()=>String,[]);m.ow.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.Sm.K=new olympe.D.J(()=>olympe.dc.Da,[]);m.Of.K=new olympe.D.J(()=>olympe.D.Node,[]);m.Eb.K=olympe.D.J.F;m.Ie.K=olympe.D.J.G;m.Bg.K=olympe.D.J.R;m.gj.K=new olympe.D.J(()=>olympe.D.ib,[]);m.Lr.K=new olympe.D.J(()=>olympe.D.Color,[]);m.Mr.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);
691
- m.ub.K=new olympe.D.J(()=>olympe.dc.Da,[]);m.oc.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.Dr.K=new olympe.D.J(()=>{},[]);m.Ly.K=new olympe.D.J(()=>olympe.dc.Da,[]);m.transform.K=new olympe.D.J(()=>olympe.dc.Da,[]);m.Rc.K=olympe.D.J.F;m.toString.K=olympe.D.J.C;m.mb.K=olympe.D.J.C;m.Pd.K=olympe.D.J.R;m.Rv.K=new olympe.D.J(()=>{},[]);olympe.dc.$j=class{constructor(a){this.instance=a}T(){return this.instance.T()}ij(){return ob(this.instance.Bg(olympe.dc.CloudObject.W))}zw(){return this.instance.oc(olympe.dc.CloudObject.extendRel,olympe.dc.CloudObject)}Hk(){return this.instance.transform(new olympe.dc.Y.Bc(olympe.dc.CloudObject.extendRel.T(),olympe.dc.Ca.DESTINATION,olympe.dc.Y.kk.Xs))}Wm(){return this.instance.transform(new olympe.dc.Y.Bc(olympe.dc.CloudObject.extendRel.T(),olympe.dc.Ca.DESTINATION,olympe.dc.Y.kk.kp))}dd(){return this.Wm().transform(olympe.dc.CloudObject.propertyRel,
692
- new olympe.dc.Y.xe)}Qw(){return this.instance.transform(olympe.dc.CloudObject.propertyRel)}ed(){return this.Wm().transform(olympe.dc.CloudObject.G,new olympe.dc.Y.xe)}Rw(){return this.instance.transform(olympe.dc.CloudObject.G)}static from(a){return olympe.D.Fa([a],b=>{const c=b.T(),d=olympe.dc.Ja();if(!d.jj(c))throw Error(`Instance "${d.name(c)}" (tag=${c}) is not a model.`);return new olympe.dc.$j(b)},olympe.dc.$j,'transformToModelInfo')}static ij(){return ob((void 0).Bg(olympe.dc.CloudObject.W))}};
693
- olympe.dc.$j.ma=[olympe.dc.Ae];m=olympe.dc.$j.prototype;m.zw.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.Hk.K=new olympe.D.J(()=>olympe.dc.Da,[]);m.Wm.K=new olympe.D.J(()=>olympe.dc.Da,[]);m.dd.K=new olympe.D.J(()=>olympe.dc.Da,[]);m.Qw.K=new olympe.D.J(()=>olympe.dc.Da,[]);m.ed.K=new olympe.D.J(()=>olympe.dc.Da,[]);m.Rw.K=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.dc.zA=class{};olympe.dc.ea={};olympe.dc.ea.pp=class{constructor(a){this.N=a}};olympe.dc.ea.pp.cd={Pi:0,RA:1,SA:3,BA:4};olympe.dc.ea.Tj=class{};function Y(a){if(a.W)throw Error('Cannot modify definition after definition is written');}
694
- olympe.dc.ea.Xb=class{constructor(a,b){a=this.C=a;if(a.C)throw b=a.C.na(),a=a.C.T(),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.C=this;this.tag=b;this.F=new Map;this.nj=olympe.dc.CloudObject.O.T();this.ja=new Map;this.da=new Map;this.W=this.$=!1;this.R=null}rn(a){Y(this);this.nj=a;return this}Nb(){return this.nj}gi(a){Y(this);
695
- this.R=a;return this}yy(){this.$=!0;return this}xy(a){Y(this);const b=new Map;if('string'===typeof a){const c=olympe.dc.CloudObject.nameProp.T();b.set(c,a||'')}else Object.keys(a).forEach(c=>{b.set(c,a[c])});this.F=b;return this}hi(a){Y(this);Object.keys(a).forEach(b=>{this.F.set(b,a[b])});return this}setProperty(a,b){Y(this);this.F.set(a,b);return this}Wk(a){Y(this);const b=olympe.dc.CloudObject.nameProp.T();this.F.set(b,a);return this}Am(a,b){Y(this);if(!a)throw Error('Cannot relate an object to another without a relation tag');
696
- if(a===olympe.dc.CloudObject.containsRel.T())throw Error('Container must be defined using dedicated helpers setContainedIn');b&&this.ja.set(a+'.'+b,[a,b]);return this}zm(a,b){Y(this);if(!a)throw Error('Cannot relate an object to another without a relation tag');if(a===olympe.dc.CloudObject.containsRel.T())throw Error('Container must be defined using dedicated helper setContainedIn');b&&this.da.set(a+'.'+b,[a,b]);return this}done(){if(this.W)return this;const a=nh(this.C,this.$);a.F(this.tag,this.F,
697
- -1);oh(this.C,this);a.Ta(olympe.dc.jc.Tc,this.tag,this.nj,-1);this.R&&a.Ta(olympe.dc.jc.Xn,this.R,this.tag,-1);this.G(-1);this.ja.forEach(b=>{a.Ta(b[0],this.tag,b[1],-1)});this.da.forEach(b=>{a.Ta(b[0],b[1],this.tag,-1)});this.W=!0;this.C.C=void 0;return this}G(){}T(){return this.tag}na(){return this.F.get('ff023000000000000011')}};olympe.dc.ea.Xb.prototype.getName=olympe.dc.ea.Xb.prototype.na;olympe.dc.ea.Xb.prototype.getTag=olympe.dc.ea.Xb.prototype.T;olympe.dc.ea.Xb.prototype.done=olympe.dc.ea.Xb.prototype.done;
698
- olympe.dc.ea.Xb.prototype.addRelationFrom=olympe.dc.ea.Xb.prototype.zm;olympe.dc.ea.Xb.prototype.addRelationTo=olympe.dc.ea.Xb.prototype.Am;olympe.dc.ea.Xb.prototype.setName=olympe.dc.ea.Xb.prototype.Wk;olympe.dc.ea.Xb.prototype.setProperty=olympe.dc.ea.Xb.prototype.setProperty;olympe.dc.ea.Xb.prototype.setProperties=olympe.dc.ea.Xb.prototype.hi;olympe.dc.ea.Xb.prototype.setNameOrProperties=olympe.dc.ea.Xb.prototype.xy;olympe.dc.ea.Xb.prototype.setOptional=olympe.dc.ea.Xb.prototype.yy;
699
- olympe.dc.ea.Xb.prototype.setContainedIn=olympe.dc.ea.Xb.prototype.gi;olympe.dc.ea.Xb.prototype.setModelTag=olympe.dc.ea.Xb.prototype.rn;olympe.dc.ea.$c=class extends olympe.dc.ea.Xb{constructor(a,b){super(a,b);this.ta=this.C.OBJECT;this.Ka=new Map;this.Va=new Map}Yr(a){Y(this);this.ta=a;return this}extends(a){return this.Yr(a)}Ti(){Y(this);this.setProperty(olympe.dc.CloudObject.W.T(),!0);return this}defineProperty(a,b,c,d,e){Y(this);this.Ka.set(a,new olympe.dc.ea.$c.Property(a,b,c,d));void 0!==d&&super.setProperty(olympe.dc.Tg.ic+a,d);void 0!==e&&(this.C.push(),this.C.Gg(this.C.Ik(a),olympe.sc.mc.O.T()).setProperty(olympe.sc.mc.C.T(),
700
- e).gi(this.tag).Am(olympe.sc.mc.F.T(),a).done(),this.C.pop());return this}gh(a,b,c,d,e,{Wi:f=0,sj:g=0,Xk:h=d,Vi:k=olympe.dm.Kc.NONE,pj:l=olympe.dm.Relation.L|k}={}){Y(this);b=new olympe.dc.ea.$c.Relation(a,this.T(),b,c||'',d,e,g,h,f,l,k);this.Va.set(a,b);return this}G(a){super.G(a);nh(this.C).Ta(olympe.dc.CloudObject.extendRel.T(),this.tag,this.ta,a);this.Ka.forEach(b=>{const c={[olympe.dc.CloudObject.nameProp.T()]:b.name||''},d=olympe.dc.za(olympe.dm.Property),e=olympe.dc.CloudObject.propertyRel.T(),
701
- f=b.tag;this.C.push();this.C.Gg(f,d).hi(c).done();this.C.pop();b=b.type;nh(this.C).Ta(e,this.T(),f,a);nh(this.C).Ta(olympe.dm.Property.typeRel.T(),f,b,a)});this.Va.forEach(b=>{this.C.gh(b.C,b.G,b.F,b.name,b.Br,b.zr,{sj:b.sj,Xk:b.Xk,Wi:b.Wi,pj:b.pj,Vi:b.Vi},a)})}};olympe.dc.ea.$c.prototype.defineRelation=olympe.dc.ea.$c.prototype.gh;olympe.dc.ea.$c.prototype.defineProperty=olympe.dc.ea.$c.prototype.defineProperty;olympe.dc.ea.$c.prototype['abstract']=olympe.dc.ea.$c.prototype.Ti;
702
- olympe.dc.ea.$c.prototype['extends']=olympe.dc.ea.$c.prototype.extends;olympe.dc.ea.$c.prototype.setParentTag=olympe.dc.ea.$c.prototype.Yr;olympe.dc.ea.$c.Property=class{constructor(a,b,c,d){this.tag=a;this.type=b;this.name=c||'';this.defaultValue=d}};olympe.dc.ea.$c.Relation=class{constructor(a,b,c,d,e,f,g,h,k,l,n){this.C=a;this.G=b;this.F=c;this.name=d;this.Br=e;this.zr=f;this.sj=g;this.Xk=h;this.Wi=k;this.pj=l;this.Vi=n}};function nh(a,b){return b?a.W:a.F}function oh(a,b){0<a.L.length&&(b.R||a.F.Ta(olympe.dc.CloudObject.containsRel.T(),a.L[a.L.length-1].T(),b.T(),-1))}
703
- olympe.dc.ea.Sa=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.td(!0);this.W=new olympe.dc.transaction.td(!0);this.N=a||null;this.ta=!1;this.G=null;this.ja=new Map;this.$=null;this.da=Object.create(null);this.C=void 0;this.L=[];this.R=!0;this.Vr=/eval \(eval at process .*<anonymous>:(\d+):(\d+)\)/m;this.DEFAULT=olympe.dc.Tg.ic;this.OBJECT=olympe.dc.CloudObject.O.T();
704
- this.PROPERTY=olympe.dm.Property.O.T();this.RELATION=olympe.dm.Relation.O.T();this.STRING=olympe.dm.String.O.T();this.BOOLEAN=olympe.dm.Boolean.O.T();this.NUMBER=olympe.dm.Number.O.T();this.DATETIME=olympe.dm.DateTime.O.T();this.COLOR=olympe.dm.Color.O.T();this.FILE=olympe.dm.File.O.T();this.ROLE=olympe.dm.ad.O.T();this.USER=olympe.dm.User.O.T();this.ONE_ONE=olympe.dm.Relation.F.iu;this.ONE_MANY=olympe.dm.Relation.F.Ql;this.MANY_ONE=olympe.dm.Relation.F.au;this.MANY_MANY=olympe.dm.Relation.F.Ml;this.NONE=
705
- olympe.dm.Kc.NONE;this.DESTINATION_READ=olympe.dm.Kc.Is;this.DESTINATION_CREATE=olympe.dm.Kc.ro;this.DESTINATION_WRITE=olympe.dm.Kc.Js;this.DESTINATION_DELETE=olympe.dm.Kc.Fs;this.DESTINATION_LINK=olympe.dm.Kc.Hs;this.DESTINATION_FULL=olympe.dm.Kc.Gs;this.ORIGIN_READ=olympe.dm.Kc.nu;this.ORIGIN_CREATE=olympe.dm.Kc.ku;this.ORIGIN_WRITE=olympe.dm.Kc.ou;this.ORIGIN_DELETE=olympe.dm.Kc.lu;this.ORIGIN_LINK=olympe.dm.Kc.Xp;this.ORIGIN_FULL=olympe.dm.Kc.mu;this.FULL=olympe.dm.Kc.Zs;this.DUMP_IGNORE=olympe.dm.Relation.C.Bl;
706
- this.DUMP_REF=olympe.dm.Relation.C.qq;this.DUMP_REVERSE_REF=olympe.dm.Relation.C.Iu;this.DUMP_UNILATERAL=olympe.dm.Relation.C.vk;this.DUMP_REVERSE_UNILATERAL=olympe.dm.Relation.C.jk;this.DUMP_EVERYTHING=olympe.dm.Relation.C.yo;this.DUMP_DEFAULT=olympe.dm.Relation.C.ic;this.DUMP_REV_DEFAULT=olympe.dm.Relation.C.Hu;this.DELETE_REF=this.DUMP_BOTH_REF=olympe.dm.Relation.C.el;this.DELETE_REF_AND_DESTINATION=olympe.dm.Relation.C.Eu;this.DELETE_REF_AND_ORIGIN=olympe.dm.Relation.C.Fu;this.DELETE_EVERYTHING=
707
- olympe.dm.Relation.C.yo;this.OLYMPE_AUTHENTICATED_USERS=olympe.dm.ad.F}push(){this.L.push(this.C);this.C=void 0}pop(){if(this.C)throw Error('Cannot unstack definition: current definition not closed');this.C=this.L.pop()}bw(){const a=new Map,b=olympe.dc.ea.Uu.C(this.$,this.F,this.W);for(const [c,d]of b.entries())a.set(c,d.rh());return a}Zw(){return this.$}wy(a){this.R=a}log(...a){this.R&&this.N&&this.N.log(...a)}cn(...a){this.R&&this.N&&this.N.debug(...a)}Bx(...a){this.R&&this.N&&this.N.warn(...a)}Pk(...a){this.R&&
708
- this.N&&this.N.error(...a)}Bv(a){if(a&&20===a.length&&!this.ta){if(this.da[a])throw Error('Tag '+a+' is used to define more than one keyword');return this.da[a]=a}this.G=null===this.G?olympe.X.ih():olympe.X.Xw(this.G);this.log('Generating new tag to replace '+a+'. New tag is: '+this.G);return this.G}Ik(a){const b=this.ja.get(a)||1,c=olympe.X.Ik(a,b);this.ja.set(a,b+1);return c}Dy(a){this.ta=a}Tv(){}By(a){this.$=a}Gg(a,b){return(new olympe.dc.ea.Xb(this,a)).rn(b)}Rx(a,b){return(new olympe.dc.ea.$c(this,
709
- a)).Wk(b)}Qx(a,b){return(new olympe.dc.ea.$c(this,a)).Wk(b).Ti()}Sx(a){return new olympe.dc.ea.xf(this,a)}Rk(a,b,c){this.F.Ta(a,b,c,-1)}defineProperty(a,b,c,d,e){this.cn('Defining property ',d,' on model ',a);d={[olympe.dc.CloudObject.nameProp.T()]:d||''};void 0!==e&&this.qc(a,{[olympe.dc.Tg.ic+c]:e});this.C?(this.push(),this.Gg(c,olympe.dm.Property.O.T()).hi(d).done(),this.pop()):this.Gg(c,olympe.dm.Property.O.T()).hi(d).gi(a).done();this.Rk(olympe.dc.CloudObject.propertyRel.T(),a,c);this.Rk(olympe.dm.Property.typeRel.T(),
710
- c,b)}gh(a,b,c,d,e,f,{Wi:g=olympe.dm.Relation.F.Ql,sj:h=olympe.dm.Relation.C.Bl,Xk:k=e,Vi:l=olympe.dm.Kc.NONE,pj:n=olympe.dm.Relation.L|l}={},p=-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 q=
711
- olympe.dm.Relation;d={[olympe.dc.CloudObject.nameProp.T()]:d||'',[q.Cm.T()]:g,[q.kn.T()]:n,[q.Km.T()]:e,[q.Jm.T()]:f,[q.pn.T()]:h,[q.tn.T()]:k,[q.qr.T()]:l};this.C?(this.push(),this.Gg(a,q.O.T()).hi(d).done(),this.pop()):this.Gg(a,q.O.T()).hi(d).gi(b).done();this.F.Ta(q.originModelRel.T(),b,a,p);this.F.Ta(q.destinationModelRel.T(),a,c,p)}zx(a,b){this.F.Ta(olympe.dm.ad.C.T(),a,b,-1)}qc(a,b,c=!1){this.cn('Updating instance ',a);delete b[olympe.dc.Yb.Gd];delete b[olympe.dc.Yb.VERSION];const d=new Map;
712
- Object.keys(b).forEach(e=>{d.set(e,b[e])});this.F.qc(a,d,c,-1)}assign(a,b,c){this.Rk(b,a,c)}Av(a,b,c){this.W.Ta(b,a,c,-1)}Ov(a){return new olympe.dc.Cc(a)}Jv(a,b,c,d){const e={c:7};e.r=a;e.g=b;e.b=c;e.a=d;return e}Kv({year:a=1970,month:b=1,day:c=1,hour:d=1,minute:e=0,second:f=0,gD:g=0,sD: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}ew(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();b.m=a.getMinutes();
713
- b.s=a.getSeconds();b.S=a.getMilliseconds();b.z=-a.getTimezoneOffset();return b}Lv(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}aj(a,b,c){return olympe.auth.Jb.Fe.aj(a,c)}Er(a,b){return olympe.auth.Jb.Fe.aj(a,b)}cc(){throw Error('DeleteRelation method on OSaveFile is deprecated');}Dc(){throw Error('DeleteInstance method on OSaveFile is deprecated');
714
- }};olympe.dc.ea.Sa.prototype.deleteInstance=olympe.dc.ea.Sa.prototype.Dc;olympe.dc.ea.Sa.prototype.deleteRelation=olympe.dc.ea.Sa.prototype.cc;olympe.dc.ea.Sa.prototype.generateAuthenticationData=olympe.dc.ea.Sa.prototype.Er;olympe.dc.ea.Sa.prototype.generateAuthData=olympe.dc.ea.Sa.prototype.aj;olympe.dc.ea.Sa.prototype.createDateTimeLegacy=olympe.dc.ea.Sa.prototype.Lv;olympe.dc.ea.Sa.prototype.fromISODate=olympe.dc.ea.Sa.prototype.ew;olympe.dc.ea.Sa.prototype.createDateTime=olympe.dc.ea.Sa.prototype.Kv;
715
- olympe.dc.ea.Sa.prototype.createColor=olympe.dc.ea.Sa.prototype.Jv;olympe.dc.ea.Sa.prototype.createReference=olympe.dc.ea.Sa.prototype.Ov;olympe.dc.ea.Sa.prototype.assignOptional=olympe.dc.ea.Sa.prototype.Av;olympe.dc.ea.Sa.prototype.assign=olympe.dc.ea.Sa.prototype.assign;olympe.dc.ea.Sa.prototype.updateInstance=olympe.dc.ea.Sa.prototype.qc;olympe.dc.ea.Sa.prototype.linkRoleToUser=olympe.dc.ea.Sa.prototype.zx;olympe.dc.ea.Sa.prototype.defineRelation=olympe.dc.ea.Sa.prototype.gh;
716
- olympe.dc.ea.Sa.prototype.defineProperty=olympe.dc.ea.Sa.prototype.defineProperty;olympe.dc.ea.Sa.prototype.newRelation=olympe.dc.ea.Sa.prototype.Rk;olympe.dc.ea.Sa.prototype.newUser=olympe.dc.ea.Sa.prototype.Sx;olympe.dc.ea.Sa.prototype.newAbstractModel=olympe.dc.ea.Sa.prototype.Qx;olympe.dc.ea.Sa.prototype.newModel=olympe.dc.ea.Sa.prototype.Rx;olympe.dc.ea.Sa.prototype.newInstance=olympe.dc.ea.Sa.prototype.Gg;olympe.dc.ea.Sa.prototype.setRootInstanceTag=olympe.dc.ea.Sa.prototype.By;
717
- olympe.dc.ea.Sa.prototype.disableChecks=olympe.dc.ea.Sa.prototype.Tv;olympe.dc.ea.Sa.prototype.setUseNewTags=olympe.dc.ea.Sa.prototype.Dy;olympe.dc.ea.Sa.prototype.assignTag=olympe.dc.ea.Sa.prototype.Bv;olympe.dc.ea.Sa.prototype.logError=olympe.dc.ea.Sa.prototype.Pk;olympe.dc.ea.Sa.prototype.logWarn=olympe.dc.ea.Sa.prototype.Bx;olympe.dc.ea.Sa.prototype.logDebug=olympe.dc.ea.Sa.prototype.cn;olympe.dc.ea.Sa.prototype.log=olympe.dc.ea.Sa.prototype.log;olympe.dc.ea.Sa.prototype.setLoggingEnabled=olympe.dc.ea.Sa.prototype.wy;
718
- olympe.dc.ea.Sa.prototype.getRootInstanceTag=olympe.dc.ea.Sa.prototype.Zw;olympe.dc.ea.Sa.prototype.flushContents=olympe.dc.ea.Sa.prototype.bw;olympe.dc.ea.qg=class extends olympe.dc.ea.$c{constructor(a,b,c){super(a,b);this.L=this.description=null;this.setProperty(olympe.dm.BrickMetadata.Ua.T(),olympe.dm.BrickMetadata.Ab.tu);null!==c&&this.nr(c)}nr(a){this.gi(a);this.zm(olympe.dm.Pb.C.T(),a);return this}vy(a){this.F.set(olympe.dm.we.Va.T(),a);return this}ty(a){Y(this);this.description=a;return this}Cy(a){Y(this);this.L=a;return this}G(a){super.G(a);if(null!==this.description||null!==this.L)this.C.push(),a=this.C.Gg(this.C.Ik(this.tag),olympe.sc.mc.O.T()),
719
- this.description&&a.setProperty(olympe.sc.mc.C.T(),this.description),this.L&&a.setProperty(olympe.sc.mc.L.T(),this.L),a.gi(this.tag).Am(olympe.sc.mc.F.T(),this.tag).done(),this.C.pop()}};olympe.dc.ea.qg.prototype.setSummary=olympe.dc.ea.qg.prototype.Cy;olympe.dc.ea.qg.prototype.setDescription=olympe.dc.ea.qg.prototype.ty;olympe.dc.ea.qg.prototype.setIcon=olympe.dc.ea.qg.prototype.vy;olympe.dc.ea.qg.prototype.addToFolder=olympe.dc.ea.qg.prototype.nr;olympe.dc.ea.Uu=class a{constructor(b,c,d){this.F=b;this.va=c||[];this.C=d||[]}static C(b,c,d){if(c instanceof olympe.dc.transaction.td&&d instanceof olympe.dc.transaction.td){c=he(c);var e=he(d)}else e=new olympe.dc.transaction.td(!0),c.Nc(e),c=he(e),d.Nc(e),e=he(e);d=new Map;var f=new a(b,c.wg,e.wg);f.Sf()||d.set('delRel',f);f=new a(b,c.Re,e.Re);f.Sf()||d.set('detInst',f);f=new a(b,c.Hg,e.Hg);f.Sf()||d.set('newInst',f);f=new a(b,c.$f,e.$f);f.Sf()||d.set('updateInst',f);b=new a(b,c.Ig,e.Ig);b.Sf()||
720
- d.set('newRel',b);return d}Sf(){return 0===this.va.length+this.C.length}static fn(b){const c=Object.create(null),d=[],e=[];b.forEach(f=>{0===Object.keys(c).length&&(c.rootTag=f.rootTag);d.push(...(f.operations||[]));e.push(...(f.optionalOperations||[]))});0!==d.length&&(c.operations=d);0!==e.length&&(c.optionalOperations=e);return c}rh(){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):
721
- 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);this.va.sort(b);this.C.sort(b);c.rootTag=this.F;c.operations=this.va;c.optionalOperations=this.C;return c}};olympe.dc.ea.xf=class extends olympe.dc.ea.Xb{constructor(a,b){super(a,b);this.password=this.L=null;this.rn(olympe.dc.za(olympe.dm.User))}Ey(a){Y(this);this.L=a;return this}sn(a){Y(this);this.password=a;return this}uy(){return this}Cv(a){Y(this);this.zm(olympe.dm.User.C.T(),a);return this}G(a){super.G(a);if(null==this.L||''===this.L)throw Error('A username must be set when calling new User');if(null==this.password||''===this.password)throw Error('A password must be set when calling new User');const b=
722
- this.C.Er(this.L,this.password),c=new Map;c.set(olympe.dm.User.loginProp.T(),b.login);c.set(olympe.dm.User.saltProp.T(),b.salt);c.set(olympe.dm.User.verifierProp.T(),b.verifier);nh(this.C).qc(this.T(),c,!1,a)}};olympe.dc.ea.xf.prototype.awardRole=olympe.dc.ea.xf.prototype.Cv;olympe.dc.ea.xf.prototype.setDomain=olympe.dc.ea.xf.prototype.uy;olympe.dc.ea.xf.prototype.setPassword=olympe.dc.ea.xf.prototype.sn;olympe.dc.ea.xf.prototype.setUsername=olympe.dc.ea.xf.prototype.Ey;olympe.dc.ea.P={qt:'dc.io.IOService',zh:'dc.io.IOUrlsProvider'};olympe.U.config(function(a){ta(a,olympe.dc.ea.P.zh);C(a,olympe.dc.ea.P.qt,[olympe.ra.P.Aa,olympe.net.P.Aa,olympe.auth.P.Aa,olympe.dc.ea.P.zh],b=>new olympe.dc.ea.pp(b.Oc('dc.io')))},'olympe.dc.io');olympe.dc.ea.fD=function(a,b,c=!1){if(a.startsWith('@')||a.startsWith('v'))return!1;a.startsWith(olympe.dc.Tg.ic)&&(a=a.substring(1));const d=olympe.dc.Ja();return b?c?Ld(d,a,b):Ld(d,a,d.model(b)):d.Db(a)};olympe.dm={};olympe.dm.Kc={NONE:0,Is:1,ro:2,Js:4,Fs:8,Hs:16,Gs:31,nu:32,ku:64,ou:128,lu:256,Xp:512,mu:992,Zs:1023};olympe.dm.ad=class extends olympe.dc.CloudObject{constructor(a,b){super(a,b)}na(){return this.Eb(olympe.dc.CloudObject.nameProp)}C(){return olympe.D.Za.EMPTY}F(){return olympe.D.sa.C}};olympe.dm.ad.O=olympe.dc.ya.C('ff021000000000000002',olympe.dm.ad);olympe.dm.ad.da=olympe.dm.ad.O.xa('ff023000000000000035');olympe.dm.ad.C=olympe.dm.ad.O.Ga('ff022000000000000005');olympe.dm.ad.F=Mc('ff011000000000000001','AUTHENTICATED_USERS');olympe.dm.ad.$=Mc('ff011000000000000002','PROJECT_RUNNER_USERS_ROLE');
723
- olympe.dm.ad.L=Mc('014831d95f83635090ea','ADMIN_USERS_ROLE');olympe.dm.ad.prototype.na.K=olympe.D.J.F;olympe.dm.ad.prototype.C.K=olympe.D.J.F;olympe.dm.ad.prototype.F.K=olympe.D.J.R;olympe.dm.User=class extends olympe.dc.CloudObject{constructor(a,b){super(a,b)}Cw(){return this.Um()}na(){return this.Um()}Um(){return this.Eb(olympe.dm.User.loginProp)}Et(){return this.Eb(olympe.dm.User.F)}Dt(){return olympe.D.Za.EMPTY}ax(){return this.Eb(olympe.dm.User.saltProp)}nx(){return this.Eb(olympe.dm.User.verifierProp)}Yw(){return this.ub(olympe.dm.User.C,olympe.dm.ad)}};olympe.dm.User.O=olympe.dc.ya.C('ff021000000000000003',olympe.dm.User);olympe.dm.User.loginProp=olympe.dm.User.O.xa('ff023000000000000001');
688
+ olympe.dc.CloudObject.extendRel=olympe.dc.CloudObject.O.Ga(olympe.dc.jc.vi);z('olympe.dc.CloudObject.extendRel',olympe.dc.CloudObject.extendRel);olympe.dc.CloudObject.extendedByRel=P(olympe.dc.CloudObject.O,olympe.dc.CloudObject.extendRel);z('olympe.dc.CloudObject.extendedByRel',olympe.dc.CloudObject.extendedByRel);olympe.dc.CloudObject.containsRel=olympe.dc.CloudObject.O.Ga(olympe.dc.jc.Wn);z('olympe.dc.CloudObject.containsRel',olympe.dc.CloudObject.containsRel);
689
+ olympe.dc.CloudObject.Hb=P(olympe.dc.CloudObject.O,olympe.dc.CloudObject.containsRel);olympe.dc.CloudObject.Pv=olympe.dc.CloudObject.O.Ga('018282d3ac0a474a0bf4');z('olympe.dc.CloudObject.deleteAlsoRel',olympe.dc.CloudObject.Pv);olympe.dc.rB=olympe.dc.CloudObject;olympe.dc.CloudObject.ma=[olympe.dc.Ae];m=olympe.dc.CloudObject.prototype;m.T.K=new olympe.D.J(()=>String,[]);m.name.K=new olympe.D.J(()=>String,[]);m.na.K=olympe.D.J.F;m.Mf.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);
690
+ m.nx.K=new olympe.D.J(()=>Number,[]);m.Bt.K=new olympe.D.J(()=>String,[]);m.Fr.K=olympe.D.J.F;m.Nb.K=new olympe.D.J(()=>String,[]);m.nw.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.Rm.K=new olympe.D.J(()=>olympe.dc.Da,[]);m.Of.K=new olympe.D.J(()=>olympe.D.Node,[]);m.Eb.K=olympe.D.J.F;m.Ie.K=olympe.D.J.G;m.Bg.K=olympe.D.J.R;m.gj.K=new olympe.D.J(()=>olympe.D.ib,[]);m.Kr.K=new olympe.D.J(()=>olympe.D.Color,[]);m.Lr.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);
691
+ m.ub.K=new olympe.D.J(()=>olympe.dc.Da,[]);m.oc.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.Cr.K=new olympe.D.J(()=>{},[]);m.Ky.K=new olympe.D.J(()=>olympe.dc.Da,[]);m.transform.K=new olympe.D.J(()=>olympe.dc.Da,[]);m.Rc.K=olympe.D.J.F;m.toString.K=olympe.D.J.C;m.mb.K=olympe.D.J.C;m.Pd.K=olympe.D.J.R;m.Qv.K=new olympe.D.J(()=>{},[]);olympe.dc.Zj=class{constructor(a){this.instance=a}T(){return this.instance.T()}ij(){return ob(this.instance.Bg(olympe.dc.CloudObject.W))}yw(){return this.instance.oc(olympe.dc.CloudObject.extendRel,olympe.dc.CloudObject)}Gk(){return this.instance.transform(new olympe.dc.Y.Bc(olympe.dc.CloudObject.extendRel.T(),olympe.dc.Ca.DESTINATION,olympe.dc.Y.jk.Ws))}Vm(){return this.instance.transform(new olympe.dc.Y.Bc(olympe.dc.CloudObject.extendRel.T(),olympe.dc.Ca.DESTINATION,olympe.dc.Y.jk.jp))}dd(){return this.Vm().transform(olympe.dc.CloudObject.propertyRel,
692
+ new olympe.dc.Y.xe)}Pw(){return this.instance.transform(olympe.dc.CloudObject.propertyRel)}ed(){return this.Vm().transform(olympe.dc.CloudObject.G,new olympe.dc.Y.xe)}Qw(){return this.instance.transform(olympe.dc.CloudObject.G)}static from(a){return olympe.D.Fa([a],b=>{const c=b.T(),d=olympe.dc.Ja();if(!d.jj(c))throw Error(`Instance "${d.name(c)}" (tag=${c}) is not a model.`);return new olympe.dc.Zj(b)},olympe.dc.Zj,'transformToModelInfo')}static ij(){return ob((void 0).Bg(olympe.dc.CloudObject.W))}};
693
+ olympe.dc.Zj.ma=[olympe.dc.Ae];m=olympe.dc.Zj.prototype;m.yw.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.Gk.K=new olympe.D.J(()=>olympe.dc.Da,[]);m.Vm.K=new olympe.D.J(()=>olympe.dc.Da,[]);m.dd.K=new olympe.D.J(()=>olympe.dc.Da,[]);m.Pw.K=new olympe.D.J(()=>olympe.dc.Da,[]);m.ed.K=new olympe.D.J(()=>olympe.dc.Da,[]);m.Qw.K=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.dc.yA=class{};olympe.dc.ea={};olympe.dc.ea.op=class{constructor(a){this.N=a}};olympe.dc.ea.op.cd={Pi:0,QA:1,RA:3,AA:4};olympe.dc.ea.Sj=class{};function Y(a){if(a.W)throw Error('Cannot modify definition after definition is written');}
694
+ olympe.dc.ea.Xb=class{constructor(a,b){a=this.C=a;if(a.C)throw b=a.C.na(),a=a.C.T(),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.C=this;this.tag=b;this.F=new Map;this.$=olympe.dc.CloudObject.O.T();this.ta=new Map;this.ja=new Map;this.W=this.da=!1;this.R=null}qn(a){Y(this);this.$=a;return this}Nb(){return this.$}gi(a){Y(this);
695
+ this.R=a;return this}xy(){this.da=!0;return this}wy(a){Y(this);const b=new Map;if('string'===typeof a){const c=olympe.dc.CloudObject.nameProp.T();b.set(c,a||'')}else Object.keys(a).forEach(c=>{b.set(c,a[c])});this.F=b;return this}hi(a){Y(this);Object.keys(a).forEach(b=>{this.F.set(b,a[b])});return this}setProperty(a,b){Y(this);this.F.set(a,b);return this}Vk(a){Y(this);const b=olympe.dc.CloudObject.nameProp.T();this.F.set(b,a);return this}zm(a,b){Y(this);if(!a)throw Error('Cannot relate an object to another without a relation tag');
696
+ if(a===olympe.dc.CloudObject.containsRel.T())throw Error('Container must be defined using dedicated helpers setContainedIn');b&&this.ta.set(a+'.'+b,[a,b]);return this}ym(a,b){Y(this);if(!a)throw Error('Cannot relate an object to another without a relation tag');if(a===olympe.dc.CloudObject.containsRel.T())throw Error('Container must be defined using dedicated helper setContainedIn');b&&this.ja.set(a+'.'+b,[a,b]);return this}done(){if(this.W)return this;const a=nh(this.C,this.da);a.F(this.tag,this.F,
697
+ -1);oh(this.C,this);a.Ua(olympe.dc.jc.Tc,this.tag,this.$,-1);this.R&&a.Ua(olympe.dc.jc.Wn,this.R,this.tag,-1);this.G(-1);this.ta.forEach(b=>{a.Ua(b[0],this.tag,b[1],-1)});this.ja.forEach(b=>{a.Ua(b[0],b[1],this.tag,-1)});this.W=!0;this.C.C=void 0;return this}G(){}T(){return this.tag}na(){return this.F.get('ff023000000000000011')}};olympe.dc.ea.Xb.prototype.getName=olympe.dc.ea.Xb.prototype.na;olympe.dc.ea.Xb.prototype.getTag=olympe.dc.ea.Xb.prototype.T;olympe.dc.ea.Xb.prototype.done=olympe.dc.ea.Xb.prototype.done;
698
+ olympe.dc.ea.Xb.prototype.addRelationFrom=olympe.dc.ea.Xb.prototype.ym;olympe.dc.ea.Xb.prototype.addRelationTo=olympe.dc.ea.Xb.prototype.zm;olympe.dc.ea.Xb.prototype.setName=olympe.dc.ea.Xb.prototype.Vk;olympe.dc.ea.Xb.prototype.setProperty=olympe.dc.ea.Xb.prototype.setProperty;olympe.dc.ea.Xb.prototype.setProperties=olympe.dc.ea.Xb.prototype.hi;olympe.dc.ea.Xb.prototype.setNameOrProperties=olympe.dc.ea.Xb.prototype.wy;olympe.dc.ea.Xb.prototype.setOptional=olympe.dc.ea.Xb.prototype.xy;
699
+ olympe.dc.ea.Xb.prototype.setContainedIn=olympe.dc.ea.Xb.prototype.gi;olympe.dc.ea.Xb.prototype.setModelTag=olympe.dc.ea.Xb.prototype.qn;olympe.dc.ea.$c=class extends olympe.dc.ea.Xb{constructor(a,b){super(a,b);this.Ka=this.C.OBJECT;this.Va=new Map;this.Sa=new Map}Xr(a){Y(this);this.Ka=a;return this}extends(a){return this.Xr(a)}Ti(){Y(this);this.setProperty(olympe.dc.CloudObject.W.T(),!0);return this}defineProperty(a,b,c,d,e){Y(this);this.Va.set(a,new olympe.dc.ea.$c.Property(a,b,c,d));void 0!==d&&super.setProperty(olympe.dc.Tg.ic+a,d);void 0!==e&&(this.C.push(),this.C.Gg(this.C.Hk(a),olympe.sc.mc.O.T()).setProperty(olympe.sc.mc.C.T(),
700
+ e).gi(this.tag).zm(olympe.sc.mc.F.T(),a).done(),this.C.pop());return this}gh(a,b,c,d,e,{Wi:f=0,rj:g=0,Wk:h=d,Vi:k=olympe.dm.Kc.NONE,oj:l=olympe.dm.Relation.L|k}={}){Y(this);b=new olympe.dc.ea.$c.Relation(a,this.T(),b,c||'',d,e,g,h,f,l,k);this.Sa.set(a,b);return this}G(a){super.G(a);nh(this.C).Ua(olympe.dc.CloudObject.extendRel.T(),this.tag,this.Ka,a);this.Va.forEach(b=>{const c={[olympe.dc.CloudObject.nameProp.T()]:b.name||''},d=olympe.dc.za(olympe.dm.Property),e=olympe.dc.CloudObject.propertyRel.T(),
701
+ f=b.tag;this.C.push();this.C.Gg(f,d).hi(c).done();this.C.pop();b=b.type;nh(this.C).Ua(e,this.T(),f,a);nh(this.C).Ua(olympe.dm.Property.typeRel.T(),f,b,a)});this.Sa.forEach(b=>{this.C.gh(b.C,b.G,b.F,b.name,b.Ar,b.yr,{rj:b.rj,Wk:b.Wk,Wi:b.Wi,oj:b.oj,Vi:b.Vi},a)})}};olympe.dc.ea.$c.prototype.defineRelation=olympe.dc.ea.$c.prototype.gh;olympe.dc.ea.$c.prototype.defineProperty=olympe.dc.ea.$c.prototype.defineProperty;olympe.dc.ea.$c.prototype['abstract']=olympe.dc.ea.$c.prototype.Ti;
702
+ olympe.dc.ea.$c.prototype['extends']=olympe.dc.ea.$c.prototype.extends;olympe.dc.ea.$c.prototype.setParentTag=olympe.dc.ea.$c.prototype.Xr;olympe.dc.ea.$c.Property=class{constructor(a,b,c,d){this.tag=a;this.type=b;this.name=c||'';this.defaultValue=d}};olympe.dc.ea.$c.Relation=class{constructor(a,b,c,d,e,f,g,h,k,l,n){this.C=a;this.G=b;this.F=c;this.name=d;this.Ar=e;this.yr=f;this.rj=g;this.Wk=h;this.Wi=k;this.oj=l;this.Vi=n}};function nh(a,b){return b?a.W:a.F}function oh(a,b){0<a.L.length&&(b.R||a.F.Ua(olympe.dc.CloudObject.containsRel.T(),a.L[a.L.length-1].T(),b.T(),-1))}
703
+ olympe.dc.ea.Ta=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.td(!0);this.W=new olympe.dc.transaction.td(!0);this.N=a||null;this.ta=!1;this.G=null;this.ja=new Map;this.$=null;this.da=Object.create(null);this.C=void 0;this.L=[];this.R=!0;this.Ur=/eval \(eval at process .*<anonymous>:(\d+):(\d+)\)/m;this.DEFAULT=olympe.dc.Tg.ic;this.OBJECT=olympe.dc.CloudObject.O.T();
704
+ this.PROPERTY=olympe.dm.Property.O.T();this.RELATION=olympe.dm.Relation.O.T();this.STRING=olympe.dm.String.O.T();this.BOOLEAN=olympe.dm.Boolean.O.T();this.NUMBER=olympe.dm.Number.O.T();this.DATETIME=olympe.dm.DateTime.O.T();this.COLOR=olympe.dm.Color.O.T();this.FILE=olympe.dm.File.O.T();this.ROLE=olympe.dm.ad.O.T();this.USER=olympe.dm.User.O.T();this.ONE_ONE=olympe.dm.Relation.F.hu;this.ONE_MANY=olympe.dm.Relation.F.Pl;this.MANY_ONE=olympe.dm.Relation.F.$t;this.MANY_MANY=olympe.dm.Relation.F.Ll;this.NONE=
705
+ olympe.dm.Kc.NONE;this.DESTINATION_READ=olympe.dm.Kc.Hs;this.DESTINATION_CREATE=olympe.dm.Kc.qo;this.DESTINATION_WRITE=olympe.dm.Kc.Is;this.DESTINATION_DELETE=olympe.dm.Kc.Es;this.DESTINATION_LINK=olympe.dm.Kc.Gs;this.DESTINATION_FULL=olympe.dm.Kc.Fs;this.ORIGIN_READ=olympe.dm.Kc.mu;this.ORIGIN_CREATE=olympe.dm.Kc.ju;this.ORIGIN_WRITE=olympe.dm.Kc.nu;this.ORIGIN_DELETE=olympe.dm.Kc.ku;this.ORIGIN_LINK=olympe.dm.Kc.Wp;this.ORIGIN_FULL=olympe.dm.Kc.lu;this.FULL=olympe.dm.Kc.Ys;this.DUMP_IGNORE=olympe.dm.Relation.C.Al;
706
+ this.DUMP_REF=olympe.dm.Relation.C.pq;this.DUMP_REVERSE_REF=olympe.dm.Relation.C.Hu;this.DUMP_UNILATERAL=olympe.dm.Relation.C.uk;this.DUMP_REVERSE_UNILATERAL=olympe.dm.Relation.C.ik;this.DUMP_EVERYTHING=olympe.dm.Relation.C.xo;this.DUMP_DEFAULT=olympe.dm.Relation.C.ic;this.DUMP_REV_DEFAULT=olympe.dm.Relation.C.Gu;this.DELETE_REF=this.DUMP_BOTH_REF=olympe.dm.Relation.C.dl;this.DELETE_REF_AND_DESTINATION=olympe.dm.Relation.C.Du;this.DELETE_REF_AND_ORIGIN=olympe.dm.Relation.C.Eu;this.DELETE_EVERYTHING=
707
+ olympe.dm.Relation.C.xo;this.OLYMPE_AUTHENTICATED_USERS=olympe.dm.ad.F}push(){this.L.push(this.C);this.C=void 0}pop(){if(this.C)throw Error('Cannot unstack definition: current definition not closed');this.C=this.L.pop()}aw(){const a=new Map,b=olympe.dc.ea.Tu.C(this.$,this.F,this.W);for(const [c,d]of b.entries())a.set(c,d.rh());return a}Yw(){return this.$}vy(a){this.R=a}log(...a){this.R&&this.N&&this.N.log(...a)}bn(...a){this.R&&this.N&&this.N.debug(...a)}Ax(...a){this.R&&this.N&&this.N.warn(...a)}Ok(...a){this.R&&
708
+ this.N&&this.N.error(...a)}Av(a){if(a&&20===a.length&&!this.ta){if(this.da[a])throw Error('Tag '+a+' is used to define more than one keyword');return this.da[a]=a}this.G=null===this.G?olympe.X.ih():olympe.X.Ww(this.G);this.log('Generating new tag to replace '+a+'. New tag is: '+this.G);return this.G}Hk(a){const b=this.ja.get(a)||1,c=olympe.X.Hk(a,b);this.ja.set(a,b+1);return c}Cy(a){this.ta=a}Sv(){}Ay(a){this.$=a}Gg(a,b){return(new olympe.dc.ea.Xb(this,a)).qn(b)}Qx(a,b){return(new olympe.dc.ea.$c(this,
709
+ a)).Vk(b)}Px(a,b){return(new olympe.dc.ea.$c(this,a)).Vk(b).Ti()}Rx(a){return new olympe.dc.ea.xf(this,a)}Qk(a,b,c){this.F.Ua(a,b,c,-1)}defineProperty(a,b,c,d,e){this.bn('Defining property ',d,' on model ',a);d={[olympe.dc.CloudObject.nameProp.T()]:d||''};void 0!==e&&this.qc(a,{[olympe.dc.Tg.ic+c]:e});this.C?(this.push(),this.Gg(c,olympe.dm.Property.O.T()).hi(d).done(),this.pop()):this.Gg(c,olympe.dm.Property.O.T()).hi(d).gi(a).done();this.Qk(olympe.dc.CloudObject.propertyRel.T(),a,c);this.Qk(olympe.dm.Property.typeRel.T(),
710
+ c,b)}gh(a,b,c,d,e,f,{Wi:g=olympe.dm.Relation.F.Pl,rj:h=olympe.dm.Relation.C.Al,Wk:k=e,Vi:l=olympe.dm.Kc.NONE,oj:n=olympe.dm.Relation.L|l}={},p=-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 q=
711
+ olympe.dm.Relation;d={[olympe.dc.CloudObject.nameProp.T()]:d||'',[q.Bm.T()]:g,[q.jn.T()]:n,[q.Jm.T()]:e,[q.Im.T()]:f,[q.nn.T()]:h,[q.sn.T()]:k,[q.nr.T()]:l};this.C?(this.push(),this.Gg(a,q.O.T()).hi(d).done(),this.pop()):this.Gg(a,q.O.T()).hi(d).gi(b).done();this.F.Ua(q.originModelRel.T(),b,a,p);this.F.Ua(q.destinationModelRel.T(),a,c,p)}yx(a,b){this.F.Ua(olympe.dm.ad.C.T(),a,b,-1)}qc(a,b,c=!1){this.bn('Updating instance ',a);delete b[olympe.dc.Yb.Gd];delete b[olympe.dc.Yb.VERSION];const d=new Map;
712
+ Object.keys(b).forEach(e=>{d.set(e,b[e])});this.F.qc(a,d,c,-1)}assign(a,b,c){this.Qk(b,a,c)}zv(a,b,c){this.W.Ua(b,a,c,-1)}Nv(a){return new olympe.dc.Cc(a)}Iv(a,b,c,d){const e={c:7};e.r=a;e.g=b;e.b=c;e.a=d;return e}Jv({year:a=1970,month:b=1,day:c=1,hour:d=1,minute:e=0,second:f=0,fD:g=0,rD: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}dw(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();b.m=a.getMinutes();
713
+ b.s=a.getSeconds();b.S=a.getMilliseconds();b.z=-a.getTimezoneOffset();return b}Kv(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}aj(a,b,c){return olympe.auth.Jb.Fe.aj(a,c)}Dr(a,b){return olympe.auth.Jb.Fe.aj(a,b)}cc(){throw Error('DeleteRelation method on OSaveFile is deprecated');}Dc(){throw Error('DeleteInstance method on OSaveFile is deprecated');
714
+ }};olympe.dc.ea.Ta.prototype.deleteInstance=olympe.dc.ea.Ta.prototype.Dc;olympe.dc.ea.Ta.prototype.deleteRelation=olympe.dc.ea.Ta.prototype.cc;olympe.dc.ea.Ta.prototype.generateAuthenticationData=olympe.dc.ea.Ta.prototype.Dr;olympe.dc.ea.Ta.prototype.generateAuthData=olympe.dc.ea.Ta.prototype.aj;olympe.dc.ea.Ta.prototype.createDateTimeLegacy=olympe.dc.ea.Ta.prototype.Kv;olympe.dc.ea.Ta.prototype.fromISODate=olympe.dc.ea.Ta.prototype.dw;olympe.dc.ea.Ta.prototype.createDateTime=olympe.dc.ea.Ta.prototype.Jv;
715
+ olympe.dc.ea.Ta.prototype.createColor=olympe.dc.ea.Ta.prototype.Iv;olympe.dc.ea.Ta.prototype.createReference=olympe.dc.ea.Ta.prototype.Nv;olympe.dc.ea.Ta.prototype.assignOptional=olympe.dc.ea.Ta.prototype.zv;olympe.dc.ea.Ta.prototype.assign=olympe.dc.ea.Ta.prototype.assign;olympe.dc.ea.Ta.prototype.updateInstance=olympe.dc.ea.Ta.prototype.qc;olympe.dc.ea.Ta.prototype.linkRoleToUser=olympe.dc.ea.Ta.prototype.yx;olympe.dc.ea.Ta.prototype.defineRelation=olympe.dc.ea.Ta.prototype.gh;
716
+ olympe.dc.ea.Ta.prototype.defineProperty=olympe.dc.ea.Ta.prototype.defineProperty;olympe.dc.ea.Ta.prototype.newRelation=olympe.dc.ea.Ta.prototype.Qk;olympe.dc.ea.Ta.prototype.newUser=olympe.dc.ea.Ta.prototype.Rx;olympe.dc.ea.Ta.prototype.newAbstractModel=olympe.dc.ea.Ta.prototype.Px;olympe.dc.ea.Ta.prototype.newModel=olympe.dc.ea.Ta.prototype.Qx;olympe.dc.ea.Ta.prototype.newInstance=olympe.dc.ea.Ta.prototype.Gg;olympe.dc.ea.Ta.prototype.setRootInstanceTag=olympe.dc.ea.Ta.prototype.Ay;
717
+ olympe.dc.ea.Ta.prototype.disableChecks=olympe.dc.ea.Ta.prototype.Sv;olympe.dc.ea.Ta.prototype.setUseNewTags=olympe.dc.ea.Ta.prototype.Cy;olympe.dc.ea.Ta.prototype.assignTag=olympe.dc.ea.Ta.prototype.Av;olympe.dc.ea.Ta.prototype.logError=olympe.dc.ea.Ta.prototype.Ok;olympe.dc.ea.Ta.prototype.logWarn=olympe.dc.ea.Ta.prototype.Ax;olympe.dc.ea.Ta.prototype.logDebug=olympe.dc.ea.Ta.prototype.bn;olympe.dc.ea.Ta.prototype.log=olympe.dc.ea.Ta.prototype.log;olympe.dc.ea.Ta.prototype.setLoggingEnabled=olympe.dc.ea.Ta.prototype.vy;
718
+ olympe.dc.ea.Ta.prototype.getRootInstanceTag=olympe.dc.ea.Ta.prototype.Yw;olympe.dc.ea.Ta.prototype.flushContents=olympe.dc.ea.Ta.prototype.aw;olympe.dc.ea.qg=class extends olympe.dc.ea.$c{constructor(a,b,c){super(a,b);this.L=this.description=null;this.setProperty(olympe.dm.BrickMetadata.Sa.T(),olympe.dm.BrickMetadata.Ab.su);null!==c&&this.mr(c)}mr(a){this.gi(a);this.ym(olympe.dm.Pb.C.T(),a);return this}uy(a){this.F.set(olympe.dm.we.Va.T(),a);return this}sy(a){Y(this);this.description=a;return this}By(a){Y(this);this.L=a;return this}G(a){super.G(a);if(null!==this.description||null!==this.L)this.C.push(),a=this.C.Gg(this.C.Hk(this.tag),olympe.sc.mc.O.T()),
719
+ this.description&&a.setProperty(olympe.sc.mc.C.T(),this.description),this.L&&a.setProperty(olympe.sc.mc.L.T(),this.L),a.gi(this.tag).zm(olympe.sc.mc.F.T(),this.tag).done(),this.C.pop()}};olympe.dc.ea.qg.prototype.setSummary=olympe.dc.ea.qg.prototype.By;olympe.dc.ea.qg.prototype.setDescription=olympe.dc.ea.qg.prototype.sy;olympe.dc.ea.qg.prototype.setIcon=olympe.dc.ea.qg.prototype.uy;olympe.dc.ea.qg.prototype.addToFolder=olympe.dc.ea.qg.prototype.mr;olympe.dc.ea.Tu=class a{constructor(b,c,d){this.F=b;this.va=c||[];this.C=d||[]}static C(b,c,d){if(c instanceof olympe.dc.transaction.td&&d instanceof olympe.dc.transaction.td){c=he(c);var e=he(d)}else e=new olympe.dc.transaction.td(!0),c.Nc(e),c=he(e),d.Nc(e),e=he(e);d=new Map;var f=new a(b,c.wg,e.wg);f.Sf()||d.set('delRel',f);f=new a(b,c.Re,e.Re);f.Sf()||d.set('detInst',f);f=new a(b,c.Hg,e.Hg);f.Sf()||d.set('newInst',f);f=new a(b,c.$f,e.$f);f.Sf()||d.set('updateInst',f);b=new a(b,c.Ig,e.Ig);b.Sf()||
720
+ d.set('newRel',b);return d}Sf(){return 0===this.va.length+this.C.length}static en(b){const c=Object.create(null),d=[],e=[];b.forEach(f=>{0===Object.keys(c).length&&(c.rootTag=f.rootTag);d.push(...(f.operations||[]));e.push(...(f.optionalOperations||[]))});0!==d.length&&(c.operations=d);0!==e.length&&(c.optionalOperations=e);return c}rh(){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):
721
+ 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);this.va.sort(b);this.C.sort(b);c.rootTag=this.F;c.operations=this.va;c.optionalOperations=this.C;return c}};olympe.dc.ea.xf=class extends olympe.dc.ea.Xb{constructor(a,b){super(a,b);this.password=this.L=null;this.qn(olympe.dc.za(olympe.dm.User))}Dy(a){Y(this);this.L=a;return this}rn(a){Y(this);this.password=a;return this}ty(){return this}Bv(a){Y(this);this.ym(olympe.dm.User.C.T(),a);return this}G(a){super.G(a);if(null==this.L||''===this.L)throw Error('A username must be set when calling new User');if(null==this.password||''===this.password)throw Error('A password must be set when calling new User');const b=
722
+ this.C.Dr(this.L,this.password),c=new Map;c.set(olympe.dm.User.loginProp.T(),b.login);c.set(olympe.dm.User.saltProp.T(),b.salt);c.set(olympe.dm.User.verifierProp.T(),b.verifier);nh(this.C).qc(this.T(),c,!1,a)}};olympe.dc.ea.xf.prototype.awardRole=olympe.dc.ea.xf.prototype.Bv;olympe.dc.ea.xf.prototype.setDomain=olympe.dc.ea.xf.prototype.ty;olympe.dc.ea.xf.prototype.setPassword=olympe.dc.ea.xf.prototype.rn;olympe.dc.ea.xf.prototype.setUsername=olympe.dc.ea.xf.prototype.Dy;olympe.dc.ea.P={pt:'dc.io.IOService',zh:'dc.io.IOUrlsProvider'};olympe.U.config(function(a){ta(a,olympe.dc.ea.P.zh);C(a,olympe.dc.ea.P.pt,[olympe.ra.P.Aa,olympe.net.P.Aa,olympe.auth.P.Aa,olympe.dc.ea.P.zh],b=>new olympe.dc.ea.op(b.Oc('dc.io')))},'olympe.dc.io');olympe.dc.ea.eD=function(a,b,c=!1){if(a.startsWith('@')||a.startsWith('v'))return!1;a.startsWith(olympe.dc.Tg.ic)&&(a=a.substring(1));const d=olympe.dc.Ja();return b?c?Ld(d,a,b):Ld(d,a,d.model(b)):d.Db(a)};olympe.dm={};olympe.dm.Kc={NONE:0,Hs:1,qo:2,Is:4,Es:8,Gs:16,Fs:31,mu:32,ju:64,nu:128,ku:256,Wp:512,lu:992,Ys:1023};olympe.dm.ad=class extends olympe.dc.CloudObject{constructor(a,b){super(a,b)}na(){return this.Eb(olympe.dc.CloudObject.nameProp)}C(){return olympe.D.Za.EMPTY}F(){return olympe.D.sa.C}};olympe.dm.ad.O=olympe.dc.ya.C('ff021000000000000002',olympe.dm.ad);olympe.dm.ad.da=olympe.dm.ad.O.xa('ff023000000000000035');olympe.dm.ad.C=olympe.dm.ad.O.Ga('ff022000000000000005');olympe.dm.ad.F=Mc('ff011000000000000001','AUTHENTICATED_USERS');olympe.dm.ad.$=Mc('ff011000000000000002','PROJECT_RUNNER_USERS_ROLE');
723
+ olympe.dm.ad.L=Mc('014831d95f83635090ea','ADMIN_USERS_ROLE');olympe.dm.ad.prototype.na.K=olympe.D.J.F;olympe.dm.ad.prototype.C.K=olympe.D.J.F;olympe.dm.ad.prototype.F.K=olympe.D.J.R;olympe.dm.User=class extends olympe.dc.CloudObject{constructor(a,b){super(a,b)}Bw(){return this.Tm()}na(){return this.Tm()}Tm(){return this.Eb(olympe.dm.User.loginProp)}Dt(){return this.Eb(olympe.dm.User.F)}Ct(){return olympe.D.Za.EMPTY}$w(){return this.Eb(olympe.dm.User.saltProp)}mx(){return this.Eb(olympe.dm.User.verifierProp)}Xw(){return this.ub(olympe.dm.User.C,olympe.dm.ad)}};olympe.dm.User.O=olympe.dc.ya.C('ff021000000000000003',olympe.dm.User);olympe.dm.User.loginProp=olympe.dm.User.O.xa('ff023000000000000001');
724
724
  z('olympe.dm.User.loginProp',olympe.dm.User.loginProp);olympe.dm.User.F=olympe.dm.User.O.xa('ff023000000000000002');olympe.dm.User.da=olympe.dm.User.O.xa('ff023000000000000003');olympe.dm.User.saltProp=olympe.dm.User.O.xa('ff023000000000000004');z('olympe.dm.User.saltProp',olympe.dm.User.saltProp);olympe.dm.User.verifierProp=olympe.dm.User.O.xa('ff023000000000000005');z('olympe.dm.User.verifierProp',olympe.dm.User.verifierProp);olympe.dm.User.$=olympe.dm.User.O.xa('ff023000000000000020');
725
- olympe.dm.User.SAMLnameIdProp=olympe.dm.User.O.xa('ff023000000000000036');z('olympe.dm.User.SAMLnameIdProp',olympe.dm.User.SAMLnameIdProp);olympe.dm.User.C=P(olympe.dm.User.O,olympe.dm.ad.C);olympe.dm.User.ja=olympe.dm.User.O.Ga('ff022000000000000002');olympe.dm.User.L=Mc('0163d9653067b6237f62','GUEST_USER');m=olympe.dm.User.prototype;m.Cw.K=olympe.D.J.F;m.na.K=olympe.D.J.F;m.Um.K=olympe.D.J.F;m.Et.K=olympe.D.J.F;m.Dt.K=olympe.D.J.F;m.ax.K=olympe.D.J.F;m.nx.K=olympe.D.J.F;
726
- m.Yw.K=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.dm.we=class extends olympe.dc.CloudObject{da(){return this.Sm()}qb(){return this.Eb(olympe.dm.we.Va)}};olympe.dm.we.O=olympe.dc.ya.C('01621fb84e3300000000',olympe.dm.we);olympe.dm.we.Va=olympe.dm.we.O.xa('01609de3f292e3c2c6ff');olympe.dm.we.prototype.da.K=new olympe.D.J(()=>olympe.D.md,[]);olympe.dm.we.prototype.qb.K=olympe.D.J.F;olympe.dm.BrickMetadata=class extends olympe.dm.we{Hb(){return this.Eb(olympe.dm.BrickMetadata.Ua)}Od(){return this.Eb(olympe.dm.BrickMetadata.qb)}C(){return null}};olympe.dm.BrickMetadata.O=Qc(olympe.dc.ya.C('01621fb84e3500000000',olympe.dm.BrickMetadata));olympe.dm.BrickMetadata.Ua=olympe.dm.BrickMetadata.O.xa('01621fb84e320000f001');olympe.dm.BrickMetadata.qb=olympe.dm.BrickMetadata.O.xa('01703376c4a81c0e9d94');olympe.dm.BrickMetadata.be=olympe.dm.BrickMetadata.O.Ga('0161ae97622bb21f335b');
727
- olympe.dm.BrickMetadata.Ab={KA:'private',tu:'public'};olympe.dm.BrickMetadata.Hc=Mc('01703376c4a81c0e9d95','BRICK_STATUS');olympe.dm.BrickMetadata.cd={zz:'experimental',VA:'stable',qz:'deprecated'};olympe.dm.BrickMetadata.prototype.Hb.K=olympe.D.J.F;olympe.dm.BrickMetadata.prototype.Od.K=olympe.D.J.F;olympe.dm.BrickMetadata.prototype.C.K=new olympe.D.J(()=>String,[]);olympe.dm.Pb=class extends olympe.dm.BrickMetadata{R(){return new olympe.dc.Da(this.T(),[new olympe.dc.Y.Bc(olympe.dm.Pb.F.T(),olympe.dc.Ca.DESTINATION,olympe.dc.Y.kk.kp,olympe.dc.Y.kk.jt),olympe.dm.Pb.C])}C(){return null}F(){return this.ub(olympe.dm.Pb.F,olympe.dm.Pb)}W(){return this.ub(olympe.dm.Pb.C)}};olympe.dm.Pb.O=olympe.dc.ya.C('01612df1db9749227626',olympe.dm.Pb);olympe.dm.Pb.F=olympe.dm.Pb.O.Ga('016a697ef00ce7554691');olympe.dm.Pb.Ka=P(olympe.dm.Pb.O,olympe.dm.Pb.F);olympe.dm.Pb.C=olympe.dm.Pb.O.Ga('016a697ef00ce7554692');
725
+ olympe.dm.User.SAMLnameIdProp=olympe.dm.User.O.xa('ff023000000000000036');z('olympe.dm.User.SAMLnameIdProp',olympe.dm.User.SAMLnameIdProp);olympe.dm.User.C=P(olympe.dm.User.O,olympe.dm.ad.C);olympe.dm.User.ja=olympe.dm.User.O.Ga('ff022000000000000002');olympe.dm.User.L=Mc('0163d9653067b6237f62','GUEST_USER');m=olympe.dm.User.prototype;m.Bw.K=olympe.D.J.F;m.na.K=olympe.D.J.F;m.Tm.K=olympe.D.J.F;m.Dt.K=olympe.D.J.F;m.Ct.K=olympe.D.J.F;m.$w.K=olympe.D.J.F;m.mx.K=olympe.D.J.F;
726
+ m.Xw.K=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.dm.we=class extends olympe.dc.CloudObject{da(){return this.Rm()}qb(){return this.Eb(olympe.dm.we.Va)}};olympe.dm.we.O=olympe.dc.ya.C('01621fb84e3300000000',olympe.dm.we);olympe.dm.we.Va=olympe.dm.we.O.xa('01609de3f292e3c2c6ff');olympe.dm.we.prototype.da.K=new olympe.D.J(()=>olympe.D.md,[]);olympe.dm.we.prototype.qb.K=olympe.D.J.F;olympe.dm.BrickMetadata=class extends olympe.dm.we{Hb(){return this.Eb(olympe.dm.BrickMetadata.Sa)}Od(){return this.Eb(olympe.dm.BrickMetadata.qb)}C(){return null}};olympe.dm.BrickMetadata.O=Qc(olympe.dc.ya.C('01621fb84e3500000000',olympe.dm.BrickMetadata));olympe.dm.BrickMetadata.Sa=olympe.dm.BrickMetadata.O.xa('01621fb84e320000f001');olympe.dm.BrickMetadata.qb=olympe.dm.BrickMetadata.O.xa('01703376c4a81c0e9d94');olympe.dm.BrickMetadata.be=olympe.dm.BrickMetadata.O.Ga('0161ae97622bb21f335b');
727
+ olympe.dm.BrickMetadata.Ab={JA:'private',su:'public'};olympe.dm.BrickMetadata.Hc=Mc('01703376c4a81c0e9d95','BRICK_STATUS');olympe.dm.BrickMetadata.cd={yz:'experimental',UA:'stable',pz:'deprecated'};olympe.dm.BrickMetadata.prototype.Hb.K=olympe.D.J.F;olympe.dm.BrickMetadata.prototype.Od.K=olympe.D.J.F;olympe.dm.BrickMetadata.prototype.C.K=new olympe.D.J(()=>String,[]);olympe.dm.Pb=class extends olympe.dm.BrickMetadata{R(){return new olympe.dc.Da(this.T(),[new olympe.dc.Y.Bc(olympe.dm.Pb.F.T(),olympe.dc.Ca.DESTINATION,olympe.dc.Y.jk.jp,olympe.dc.Y.jk.it),olympe.dm.Pb.C])}C(){return null}F(){return this.ub(olympe.dm.Pb.F,olympe.dm.Pb)}W(){return this.ub(olympe.dm.Pb.C)}};olympe.dm.Pb.O=olympe.dc.ya.C('01612df1db9749227626',olympe.dm.Pb);olympe.dm.Pb.F=olympe.dm.Pb.O.Ga('016a697ef00ce7554691');olympe.dm.Pb.Ka=P(olympe.dm.Pb.O,olympe.dm.Pb.F);olympe.dm.Pb.C=olympe.dm.Pb.O.Ga('016a697ef00ce7554692');
728
728
  P(olympe.dc.CloudObject.O,olympe.dm.Pb.C);olympe.dm.Pb.prototype.R.K=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.dm.Pb.prototype.F.K=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.dm.Pb.prototype.W.K=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.dm.Vc=class extends olympe.dm.Pb{F(){return this.T()===olympe.dm.Vc.ta?this.ub(olympe.dm.Vc.$,olympe.dm.Pb):this.ub(olympe.dm.Vc.da,olympe.dm.Pb)}};olympe.dm.Vc.O=olympe.dc.ya.C('ff021000000000000020',olympe.dm.Vc);olympe.dm.Vc.da=olympe.dm.Vc.O.Ga('017e9c34cf48bd6965c1');olympe.dm.Vc.$=olympe.dm.Vc.O.Ga('017e9c2e013e06bfffd9');olympe.dm.Vc.fe=olympe.dm.Vc.O.Ga('01811f12ad77673770d4');olympe.dm.Vc.ta=Mc('10000000000000000000','ROOT_OF_ROOTS');olympe.dm.Vc.zc=Mc('10000000000000000001','OLYMPE_FOLDER');
729
- olympe.dm.Vc.prototype.F.K=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.dm.Module=class extends olympe.dc.CloudObject{Aw(){return this.Eb(olympe.dm.Module.da)}Mw(){return this.Ie(olympe.dm.Module.ja)}Ft(){return this.Eb(olympe.dm.Module.F)}Sw(){return this.Eb(olympe.dm.Module.ta)}mw(){return this.Eb(olympe.dm.Module.L)}Nw(){return this.ub(olympe.dm.Module.$,olympe.dm.Module)}bx(){return this.ub(olympe.dm.Module.C,olympe.dm.Dd)}};olympe.dm.Module.O=olympe.dc.ya.C('ff021000000000000040',olympe.dm.Module);olympe.dm.Module.da=olympe.dm.Module.O.xa('ff023000000000000042');
729
+ olympe.dm.Vc.prototype.F.K=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.dm.Module=class extends olympe.dc.CloudObject{zw(){return this.Eb(olympe.dm.Module.da)}Lw(){return this.Ie(olympe.dm.Module.ja)}Et(){return this.Eb(olympe.dm.Module.F)}Rw(){return this.Eb(olympe.dm.Module.ta)}lw(){return this.Eb(olympe.dm.Module.L)}Mw(){return this.ub(olympe.dm.Module.$,olympe.dm.Module)}ax(){return this.ub(olympe.dm.Module.C,olympe.dm.Dd)}};olympe.dm.Module.O=olympe.dc.ya.C('ff021000000000000040',olympe.dm.Module);olympe.dm.Module.da=olympe.dm.Module.O.xa('ff023000000000000042');
730
730
  olympe.dm.Module.ja=olympe.dm.Module.O.xa('ff023000000000000043');olympe.dm.Module.F=olympe.dm.Module.O.xa('ff023000000000000044');olympe.dm.Module.ta=olympe.dm.Module.O.xa('ff023000000000000045');olympe.dm.Module.L=olympe.dm.Module.O.xa('ff023000000000000046');olympe.dm.Module.creationDateProp=olympe.dm.Module.O.xa('ff023000000000000049');olympe.dm.Module.C=olympe.dm.Module.O.Ga('ff022000000000000013');olympe.dm.Module.$=olympe.dm.Module.O.Ga('ff022000000000000014');
731
- olympe.dm.Module.Ka=Mc('016a69b9bceabd815b77','OLYMPE_SERVER_MODULE');m=olympe.dm.Module.prototype;m.Aw.K=olympe.D.J.F;m.Mw.K=olympe.D.J.G;m.Ft.K=olympe.D.J.F;m.Sw.K=olympe.D.J.F;m.mw.K=olympe.D.J.F;m.Nw.K=new olympe.D.J(()=>olympe.dc.Da,[]);m.bx.K=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.dm.File=class extends olympe.dc.CloudObject{constructor(a,b,c,d,e){super(a,b);this.F=c;this.G=d;this.C=e}Vm(){return this.Eb(olympe.dm.File.mimeTypeProp)}Fk(a,b){const c=olympe.D.La().F(a),d=b&&olympe.D.La().F(b);(a=this.db.cb(this,olympe.dm.File.urlProp,!0))&&a.startsWith('blob:')?this.C.F(a,e=>{this.C.G(e,c)},d):Cc(this.F,this,e=>{this.C.G(e,c)},e=>{d&&d(e)})}Rm(a,b){this.Fk(c=>{a(Ea(c))},b)}Gk(a,b){const c=olympe.D.La().F(a);b=b&&olympe.D.La().F(b);const d=this.db.cb(this,olympe.dm.File.C),
732
- e=this.db.cb(this,olympe.dm.File.urlProp),f=g=>{const h=this.db.cb(this,olympe.dm.File.mimeTypeProp);this.C.G(g,k=>{c(`data:${h};base64,${this.C.C(k)}`)})};d&&d.valueOf()?Cc(this.F,this,f.bind(this),b):e&&e.startsWith('blob:')?this.C.F(e,f.bind(this),b):a(e)}rename(a,b){const c=b&&olympe.D.La().F(b);olympe.D.Ur([a],d=>{const e=new olympe.dc.Transaction;e.update(this,olympe.dc.CloudObject.nameProp,d);e.update(this,olympe.dm.File.nameProp,d);e.jb(f=>{c&&c(f)})})}sy(){this.G.R(this.db.cb(this,olympe.dm.File.mimeTypeProp))}Fl(){return this.Eb(olympe.dm.File.urlProp)}sp(){return this.Eb(olympe.dm.File.nameProp)}pw(){return this.gj(olympe.dm.File.creationDateProp)}Lw(){return this.gj(olympe.dm.File.modificationDateProp)}Qr(){return this.Bg(olympe.dm.File.C)}static Mv(a,
733
- b,c,d,e,f){d=d||'application/data';c=olympe.X.ai().L(new Blob([c],{type:d}));return olympe.dm.File.xr(a,b,c,d,e,f)}static xr(a,b,c,d,e,f){const g=olympe.D.ib.now();b=(new Map).set(olympe.dm.File.nameProp,b||'file').set(olympe.dm.File.urlProp,c).set(olympe.dm.File.creationDateProp,g).set(olympe.dm.File.modificationDateProp,g).set(olympe.dm.File.mimeTypeProp,d||'application/data').set(olympe.dm.File.C,!1);return a.create(olympe.dm.File,b,e||olympe.dc.Ha.ic,f)}};olympe.dm.File.createFromURL=olympe.dm.File.xr;
734
- olympe.dm.File.createFromContent=olympe.dm.File.Mv;olympe.dm.File.prototype.saveAs=olympe.dm.File.prototype.sy;olympe.dm.File.prototype.getContentUrl=olympe.dm.File.prototype.Gk;olympe.dm.File.prototype.getContentAsString=olympe.dm.File.prototype.Rm;olympe.dm.File.prototype.getContentAsBinary=olympe.dm.File.prototype.Fk;olympe.dm.File.O=olympe.dc.ya.C('ff021000000000000030',olympe.dm.File,olympe.dc.P.wi,olympe.net.P.Aa,olympe.X.P.th);olympe.dm.File.nameProp=olympe.dm.File.O.xa('ff023000000000000050');
731
+ olympe.dm.Module.Ka=Mc('016a69b9bceabd815b77','OLYMPE_SERVER_MODULE');m=olympe.dm.Module.prototype;m.zw.K=olympe.D.J.F;m.Lw.K=olympe.D.J.G;m.Et.K=olympe.D.J.F;m.Rw.K=olympe.D.J.F;m.lw.K=olympe.D.J.F;m.Mw.K=new olympe.D.J(()=>olympe.dc.Da,[]);m.ax.K=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.dm.File=class extends olympe.dc.CloudObject{constructor(a,b,c,d,e){super(a,b);this.F=c;this.G=d;this.C=e}Um(){return this.Eb(olympe.dm.File.mimeTypeProp)}Ek(a,b){const c=olympe.D.La().F(a),d=b&&olympe.D.La().F(b);(a=this.db.cb(this,olympe.dm.File.urlProp,!0))&&a.startsWith('blob:')?this.C.F(a,e=>{this.C.G(e,c)},d):Cc(this.F,this,e=>{this.C.G(e,c)},e=>{d&&d(e)})}Qm(a,b){this.Ek(c=>{a(Ea(c))},b)}Fk(a,b){const c=olympe.D.La().F(a);b=b&&olympe.D.La().F(b);const d=this.db.cb(this,olympe.dm.File.C),
732
+ e=this.db.cb(this,olympe.dm.File.urlProp),f=g=>{const h=this.db.cb(this,olympe.dm.File.mimeTypeProp);this.C.G(g,k=>{c(`data:${h};base64,${this.C.C(k)}`)})};d&&d.valueOf()?Cc(this.F,this,f.bind(this),b):e&&e.startsWith('blob:')?this.C.F(e,f.bind(this),b):a(e)}rename(a,b){const c=b&&olympe.D.La().F(b);olympe.D.Tr([a],d=>{const e=new olympe.dc.Transaction;e.update(this,olympe.dc.CloudObject.nameProp,d);e.update(this,olympe.dm.File.nameProp,d);e.jb(f=>{c&&c(f)})})}qy(){this.G.R(this.db.cb(this,olympe.dm.File.mimeTypeProp))}El(){return this.Eb(olympe.dm.File.urlProp)}rp(){return this.Eb(olympe.dm.File.nameProp)}ow(){return this.gj(olympe.dm.File.creationDateProp)}Kw(){return this.gj(olympe.dm.File.modificationDateProp)}Pr(){return this.Bg(olympe.dm.File.C)}static Lv(a,
733
+ b,c,d,e,f){d=d||'application/data';c=olympe.X.ai().L(new Blob([c],{type:d}));return olympe.dm.File.wr(a,b,c,d,e,f)}static wr(a,b,c,d,e,f){const g=olympe.D.ib.now();b=(new Map).set(olympe.dm.File.nameProp,b||'file').set(olympe.dm.File.urlProp,c).set(olympe.dm.File.creationDateProp,g).set(olympe.dm.File.modificationDateProp,g).set(olympe.dm.File.mimeTypeProp,d||'application/data').set(olympe.dm.File.C,!1);return a.create(olympe.dm.File,b,e||olympe.dc.Ha.ic,f)}};olympe.dm.File.createFromURL=olympe.dm.File.wr;
734
+ olympe.dm.File.createFromContent=olympe.dm.File.Lv;olympe.dm.File.prototype.saveAs=olympe.dm.File.prototype.qy;olympe.dm.File.prototype.getContentUrl=olympe.dm.File.prototype.Fk;olympe.dm.File.prototype.getContentAsString=olympe.dm.File.prototype.Qm;olympe.dm.File.prototype.getContentAsBinary=olympe.dm.File.prototype.Ek;olympe.dm.File.O=olympe.dc.ya.C('ff021000000000000030',olympe.dm.File,olympe.dc.P.wi,olympe.net.P.Aa,olympe.X.P.th);olympe.dm.File.nameProp=olympe.dm.File.O.xa('ff023000000000000050');
735
735
  z('olympe.dm.File.nameProp',olympe.dm.File.nameProp);olympe.dm.File.creationDateProp=olympe.dm.File.O.xa('ff023000000000000051');z('olympe.dm.File.creationDateProp',olympe.dm.File.creationDateProp);olympe.dm.File.modificationDateProp=olympe.dm.File.O.xa('ff023000000000000055');z('olympe.dm.File.modificationDateProp',olympe.dm.File.modificationDateProp);olympe.dm.File.mimeTypeProp=olympe.dm.File.O.xa('ff023000000000000052');z('olympe.dm.File.mimeTypeProp',olympe.dm.File.mimeTypeProp);
736
- olympe.dm.File.urlProp=olympe.dm.File.O.xa('ff023000000000000053');z('olympe.dm.File.urlProp',olympe.dm.File.urlProp);olympe.dm.File.C=olympe.dm.File.O.xa('ff023000000000000054');olympe.dm.File.ma=[olympe.D.File];m=olympe.dm.File.prototype;m.Vm.K=olympe.D.J.F;m.Fk.K=new olympe.D.J(()=>{},[]);m.Rm.K=new olympe.D.J(()=>{},[]);m.Gk.K=new olympe.D.J(()=>{},[]);m.rename.K=olympe.D.J.C;m.Fl.K=olympe.D.J.F;m.sp.K=olympe.D.J.F;m.pw.K=new olympe.D.J(()=>olympe.D.ib,[]);
737
- m.Lw.K=new olympe.D.J(()=>olympe.D.ib,[]);m.Qr.K=olympe.D.J.R;olympe.dm.Dd=class extends olympe.dc.CloudObject{C(){return this.Eb(olympe.dm.Dd.F)}G(){return this.Ie(olympe.dm.Dd.L)}F(){return this.ub(olympe.dm.Dd.C,olympe.dm.Module)}};olympe.dm.Dd.O=olympe.dc.ya.C('ff021000000000000041',olympe.dm.Dd);olympe.dm.Dd.F=olympe.dm.Dd.O.xa('ff023000000000000047');olympe.dm.Dd.L=olympe.dm.Dd.O.xa('ff023000000000000048');olympe.dm.Dd.C=olympe.dm.Module.C.Ec();olympe.dm.Dd.prototype.C.K=olympe.D.J.F;olympe.dm.Dd.prototype.G.K=olympe.D.J.G;
736
+ olympe.dm.File.urlProp=olympe.dm.File.O.xa('ff023000000000000053');z('olympe.dm.File.urlProp',olympe.dm.File.urlProp);olympe.dm.File.C=olympe.dm.File.O.xa('ff023000000000000054');olympe.dm.File.ma=[olympe.D.File];m=olympe.dm.File.prototype;m.Um.K=olympe.D.J.F;m.Ek.K=new olympe.D.J(()=>{},[]);m.Qm.K=new olympe.D.J(()=>{},[]);m.Fk.K=new olympe.D.J(()=>{},[]);m.rename.K=olympe.D.J.C;m.El.K=olympe.D.J.F;m.rp.K=olympe.D.J.F;m.ow.K=new olympe.D.J(()=>olympe.D.ib,[]);
737
+ m.Kw.K=new olympe.D.J(()=>olympe.D.ib,[]);m.Pr.K=olympe.D.J.R;olympe.dm.Dd=class extends olympe.dc.CloudObject{C(){return this.Eb(olympe.dm.Dd.F)}G(){return this.Ie(olympe.dm.Dd.L)}F(){return this.ub(olympe.dm.Dd.C,olympe.dm.Module)}};olympe.dm.Dd.O=olympe.dc.ya.C('ff021000000000000041',olympe.dm.Dd);olympe.dm.Dd.F=olympe.dm.Dd.O.xa('ff023000000000000047');olympe.dm.Dd.L=olympe.dm.Dd.O.xa('ff023000000000000048');olympe.dm.Dd.C=olympe.dm.Module.C.Ec();olympe.dm.Dd.prototype.C.K=olympe.D.J.F;olympe.dm.Dd.prototype.G.K=olympe.D.J.G;
738
738
  olympe.dm.Dd.prototype.F.K=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.dm.Mb=class extends olympe.dm.Vc{F(){return this.ub(olympe.dm.Pb.F,olympe.dm.Pb)}L(){return this.Eb(olympe.dm.Mb.ja)}$(){return this.Eb(olympe.dm.Mb.bc)}G(){return this.ub(olympe.dm.Mb.L,olympe.dm.Mb)}};olympe.dm.Mb.O=olympe.dc.ya.C('0163d9594700fcf61e54',olympe.dm.Mb);olympe.dm.Mb.ja=olympe.dm.Mb.O.xa('017869c7d2833c9492c1');olympe.dm.Mb.bc=olympe.dm.Mb.O.xa('017869c80bb9929c76d0');olympe.dm.Mb.L=olympe.dm.Mb.O.Ga('ff02200000000000002b');olympe.dm.Mb.Kd=P(olympe.dm.Mb.O,olympe.dm.Mb.L);
739
739
  olympe.dm.Mb.Vb=olympe.dm.Mb.O.Ga('ff02200000000000002a');olympe.dm.Mb.od=olympe.dm.Mb.O.Ga('017e9c412e2b944bd590');olympe.dm.Mb.ph=olympe.dm.Mb.O.Ga('017e9c416872a89d3415');olympe.dm.Mb.We=olympe.dm.Mb.O.Ga('017ebf8fe5c506662098');P(olympe.dc.CloudObject.O,olympe.dm.Mb.Vb);olympe.dm.Mb.Xc=Mc('100000000000000000dd','PRIMORDIAL');olympe.dm.Mb.prototype.F.K=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.dm.Mb.prototype.L.K=olympe.D.J.F;olympe.dm.Mb.prototype.$.K=olympe.D.J.F;
740
- olympe.dm.Mb.prototype.G.K=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.dm.Property=class extends olympe.dc.CloudObject{F(){return this.oc(olympe.dm.Property.definingModelRel,olympe.dc.CloudObject)}C(){return this.oc(olympe.dm.Property.typeRel,olympe.dc.CloudObject)}Rc(){return this.F().na().vr(this.na())}};olympe.dm.Property.O=olympe.dc.ya.C('ff021000000000000005',olympe.dm.Property);olympe.dm.Property.definingModelRel=P(olympe.dm.Property.O,olympe.dc.CloudObject.propertyRel);z('olympe.dm.Property.definingModelRel',olympe.dm.Property.definingModelRel);
741
- olympe.dm.Property.typeRel=P(olympe.dm.Property.O,olympe.dc.CloudObject.typeRel);z('olympe.dm.Property.typeRel',olympe.dm.Property.typeRel);olympe.dm.Property.prototype.F.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.dm.Property.prototype.C.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.dm.Relation=class extends olympe.dc.CloudObject{constructor(a,b){super(a,b)}Iw(){return olympe.D.Za.EMPTY}jw(){return this.Ie(olympe.dm.Relation.Cm)}Tw(){return this.Ie(olympe.dm.Relation.kn)}Fr(){return this.ub(olympe.dm.Relation.destinationModelRel,olympe.dc.CloudObject).Pc()}Kr(){return this.ub(olympe.dm.Relation.originModelRel,olympe.dc.CloudObject).Pc()}Rc(){return this.Kr().na().concat(['-',this.na(),'->',this.Fr().na()])}};olympe.dm.Relation.O=olympe.dc.ya.C('ff021000000000000006',olympe.dm.Relation);
742
- olympe.dm.Relation.kn=olympe.dm.Relation.O.xa('ff023000000000000030');olympe.dm.Relation.Cm=olympe.dm.Relation.O.xa('ff023000000000000034');olympe.dm.Relation.Km=olympe.dm.Relation.O.xa('ff023000000000000037');olympe.dm.Relation.Jm=olympe.dm.Relation.O.xa('ff023000000000000137');olympe.dm.Relation.pn=olympe.dm.Relation.O.xa('ff023000000000000237');olympe.dm.Relation.tn=olympe.dm.Relation.O.xa('ff023000000000000337');olympe.dm.Relation.qr=olympe.dm.Relation.O.xa('ff023000000000000031');
743
- olympe.dm.Relation.originModelRel=P(olympe.dm.Relation.O,olympe.dc.CloudObject.G);z('olympe.dm.Relation.originModelRel',olympe.dm.Relation.originModelRel);olympe.dm.Relation.destinationModelRel=P(olympe.dm.Relation.O,olympe.dc.CloudObject.R);z('olympe.dm.Relation.destinationModelRel',olympe.dm.Relation.destinationModelRel);olympe.dc.Qb={NONE:null,uz:olympe.dm.Relation.Km.T(),Ac:olympe.dm.Relation.Jm.T(),tf:olympe.dm.Relation.pn.T(),UA:olympe.dm.Relation.tn.T()};
744
- olympe.dc.Qb.toString=function(a){for(const [b,c]of Object.entries(olympe.dc.Qb))if(c===a)return b;return null};olympe.dm.Relation.C={Bl:0,el:5,qq:1,Iu:4,vk:2,jk:8,yo:10,Eu:6,Fu:9,ic:6,Hu:9};olympe.dm.Relation.F={iu:3,Ql:4,au:5,Ml:6};olympe.dm.Relation.L=olympe.dm.Kc.Xp+olympe.dm.Kc.ro;m=olympe.dm.Relation.prototype;m.Iw.K=olympe.D.J.F;m.jw.K=olympe.D.J.G;m.Tw.K=olympe.D.J.G;m.Fr.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.Kr.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.dm.rf=class extends olympe.dc.CloudObject{getValue(){}};olympe.dm.rf.O=olympe.dc.ya.C('ff021000000000000019',olympe.dm.rf);olympe.dm.String=class extends olympe.dm.rf{getValue(){return this.Eb(olympe.dm.String.valueProp)}toString(){return this.get(olympe.dm.String.valueProp)}};olympe.dm.String.O=olympe.dc.ya.C('ff021000000000000011',olympe.dm.String);olympe.dm.String.valueProp=olympe.dm.String.O.xa('ff023000000000000026');z('olympe.dm.String.valueProp',olympe.dm.String.valueProp);olympe.dm.String.prototype.getValue.K=olympe.D.J.F;olympe.dm.String.prototype.toString.K=olympe.D.J.C;olympe.dm.Boolean=class extends olympe.dm.rf{getValue(){return this.Bg(olympe.dm.Boolean.valueProp)}};olympe.dm.Boolean.O=olympe.dc.ya.C('ff021000000000000012',olympe.dm.Boolean);olympe.dm.Boolean.valueProp=olympe.dm.Boolean.O.xa('ff023000000000000027');z('olympe.dm.Boolean.valueProp',olympe.dm.Boolean.valueProp);olympe.dm.Boolean.prototype.getValue.K=olympe.D.J.R;olympe.dm.Color=class extends olympe.dm.rf{getValue(){return this.Lr()}};olympe.dm.Color.O=olympe.dc.ya.C('ff021000000000000017',olympe.dm.Color);olympe.dm.Color.valueProp=olympe.dm.Color.O.xa('ff023000000000000032');z('olympe.dm.Color.valueProp',olympe.dm.Color.valueProp);olympe.dm.Color.prototype.getValue.K=new olympe.D.J(()=>olympe.D.Color,[]);olympe.dm.DateTime=class extends olympe.dm.rf{getValue(){return this.gj(olympe.dm.DateTime.valueProp)}};olympe.dm.DateTime.O=olympe.dc.ya.C('ff021000000000000014',olympe.dm.DateTime);olympe.dm.DateTime.valueProp=olympe.dm.DateTime.O.xa('ff023000000000000029');z('olympe.dm.DateTime.valueProp',olympe.dm.DateTime.valueProp);olympe.dm.DateTime.prototype.getValue.K=new olympe.D.J(()=>olympe.D.ib,[]);olympe.dm.Enum=class extends olympe.dm.String{na(){return olympe.D.Fa([super.na(),super.getValue()],(a,b)=>''!==a.valueOf()?a:b,olympe.D.Za)}ee(){return this.Ie(olympe.dm.Enum.rankProp)}static create(a,b,c,d,e){const f=olympe.dc.Ja();e=void 0!==e?e:f.Db(b)&&f.de(b).length||0;c=(new Map).set(olympe.dm.String.valueProp,c).set(olympe.dc.CloudObject.nameProp,d||c).set(olympe.dm.Enum.rankProp,e);return a.create(b,c)}};olympe.dm.Enum.create=olympe.dm.Enum.create;
745
- olympe.dm.Enum.O=olympe.dc.ya.C('016cdd861b32d56c81f7',olympe.dm.Enum);olympe.dm.Enum.rankProp=olympe.dm.Enum.O.xa('017a7690c915975ea995');olympe.dm.Enum.prototype.ee.K=olympe.D.J.G;olympe.dm.ig=class extends olympe.dm.BrickMetadata{mx(){return this.rb(olympe.dc.CloudObject.instancesRel).Yk(olympe.dm.Enum.rankProp,olympe.dc.ba.ek.ASC).Ic()}static create(a,b){b=a.create(olympe.dm.ig,(new Map).set(olympe.dc.CloudObject.nameProp,b));a.Ta(olympe.dc.CloudObject.extendRel,b,olympe.dm.Enum);return b}};olympe.dm.ig.create=olympe.dm.ig.create;olympe.dm.ig.prototype.getValues=olympe.dm.ig.prototype.mx;olympe.dm.ig.O=olympe.dc.ya.C('017a768f966fc08ebb98',olympe.dm.ig);olympe.dm.Number=class extends olympe.dm.rf{getValue(){return this.Ie(olympe.dm.Number.valueProp)}};olympe.dm.Number.O=olympe.dc.ya.C('ff021000000000000013',olympe.dm.Number);olympe.dm.Number.valueProp=olympe.dm.Number.O.xa('ff023000000000000028');z('olympe.dm.Number.valueProp',olympe.dm.Number.valueProp);olympe.dm.Number.prototype.getValue.K=olympe.D.J.G;olympe.ab={};olympe.ab.ah=class{constructor(a){this.N=a;this.W=new olympe.D.Zb(`${this.Z()} source context`);this.R=this.C=null}Z(){}L(){}close(){this.R&&this.R(this.Z(),olympe.dc.qk.ot);this.W.destroy()}};function ph(a){olympe.D.yc([qc(a.ja)],b=>{if(b.valueOf()){const c=a.G.keys();qh(a,d=>{if(d)a.N.error('An error occurred while auto synchronising:\n'+d.message);else if(a.N.debug('Auto synchronise transactions successfully'),a.$)for(const e of c)fc(a.F,f=>{a.N.error(`Could not clear transactions for ${e}: ${f}.`)})})}})}
740
+ olympe.dm.Mb.prototype.G.K=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.dm.Property=class extends olympe.dc.CloudObject{F(){return this.oc(olympe.dm.Property.definingModelRel,olympe.dc.CloudObject)}C(){return this.oc(olympe.dm.Property.typeRel,olympe.dc.CloudObject)}Rc(){return this.F().na().ur(this.na())}};olympe.dm.Property.O=olympe.dc.ya.C('ff021000000000000005',olympe.dm.Property);olympe.dm.Property.definingModelRel=P(olympe.dm.Property.O,olympe.dc.CloudObject.propertyRel);z('olympe.dm.Property.definingModelRel',olympe.dm.Property.definingModelRel);
741
+ olympe.dm.Property.typeRel=P(olympe.dm.Property.O,olympe.dc.CloudObject.typeRel);z('olympe.dm.Property.typeRel',olympe.dm.Property.typeRel);olympe.dm.Property.prototype.F.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.dm.Property.prototype.C.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.dm.Relation=class extends olympe.dc.CloudObject{constructor(a,b){super(a,b)}Hw(){return olympe.D.Za.EMPTY}iw(){return this.Ie(olympe.dm.Relation.Bm)}Sw(){return this.Ie(olympe.dm.Relation.jn)}Er(){return this.ub(olympe.dm.Relation.destinationModelRel,olympe.dc.CloudObject).Pc()}Jr(){return this.ub(olympe.dm.Relation.originModelRel,olympe.dc.CloudObject).Pc()}Rc(){return this.Jr().na().concat(['-',this.na(),'->',this.Er().na()])}};olympe.dm.Relation.O=olympe.dc.ya.C('ff021000000000000006',olympe.dm.Relation);
742
+ olympe.dm.Relation.jn=olympe.dm.Relation.O.xa('ff023000000000000030');olympe.dm.Relation.Bm=olympe.dm.Relation.O.xa('ff023000000000000034');olympe.dm.Relation.Jm=olympe.dm.Relation.O.xa('ff023000000000000037');olympe.dm.Relation.Im=olympe.dm.Relation.O.xa('ff023000000000000137');olympe.dm.Relation.nn=olympe.dm.Relation.O.xa('ff023000000000000237');olympe.dm.Relation.sn=olympe.dm.Relation.O.xa('ff023000000000000337');olympe.dm.Relation.nr=olympe.dm.Relation.O.xa('ff023000000000000031');
743
+ olympe.dm.Relation.originModelRel=P(olympe.dm.Relation.O,olympe.dc.CloudObject.G);z('olympe.dm.Relation.originModelRel',olympe.dm.Relation.originModelRel);olympe.dm.Relation.destinationModelRel=P(olympe.dm.Relation.O,olympe.dc.CloudObject.R);z('olympe.dm.Relation.destinationModelRel',olympe.dm.Relation.destinationModelRel);olympe.dc.Qb={NONE:null,sz:olympe.dm.Relation.Jm.T(),Ac:olympe.dm.Relation.Im.T(),tf:olympe.dm.Relation.nn.T(),TA:olympe.dm.Relation.sn.T()};
744
+ olympe.dc.Qb.toString=function(a){for(const [b,c]of Object.entries(olympe.dc.Qb))if(c===a)return b;return null};olympe.dm.Relation.C={Al:0,dl:5,pq:1,Hu:4,uk:2,ik:8,xo:10,Du:6,Eu:9,ic:6,Gu:9};olympe.dm.Relation.F={hu:3,Pl:4,$t:5,Ll:6};olympe.dm.Relation.L=olympe.dm.Kc.Wp+olympe.dm.Kc.qo;m=olympe.dm.Relation.prototype;m.Hw.K=olympe.D.J.F;m.iw.K=olympe.D.J.G;m.Sw.K=olympe.D.J.G;m.Er.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.Jr.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.dm.rf=class extends olympe.dc.CloudObject{getValue(){}};olympe.dm.rf.O=olympe.dc.ya.C('ff021000000000000019',olympe.dm.rf);olympe.dm.String=class extends olympe.dm.rf{getValue(){return this.Eb(olympe.dm.String.valueProp)}toString(){return this.get(olympe.dm.String.valueProp)}};olympe.dm.String.O=olympe.dc.ya.C('ff021000000000000011',olympe.dm.String);olympe.dm.String.valueProp=olympe.dm.String.O.xa('ff023000000000000026');z('olympe.dm.String.valueProp',olympe.dm.String.valueProp);olympe.dm.String.prototype.getValue.K=olympe.D.J.F;olympe.dm.String.prototype.toString.K=olympe.D.J.C;olympe.dm.Boolean=class extends olympe.dm.rf{getValue(){return this.Bg(olympe.dm.Boolean.valueProp)}};olympe.dm.Boolean.O=olympe.dc.ya.C('ff021000000000000012',olympe.dm.Boolean);olympe.dm.Boolean.valueProp=olympe.dm.Boolean.O.xa('ff023000000000000027');z('olympe.dm.Boolean.valueProp',olympe.dm.Boolean.valueProp);olympe.dm.Boolean.prototype.getValue.K=olympe.D.J.R;olympe.dm.Color=class extends olympe.dm.rf{getValue(){return this.Kr()}};olympe.dm.Color.O=olympe.dc.ya.C('ff021000000000000017',olympe.dm.Color);olympe.dm.Color.valueProp=olympe.dm.Color.O.xa('ff023000000000000032');z('olympe.dm.Color.valueProp',olympe.dm.Color.valueProp);olympe.dm.Color.prototype.getValue.K=new olympe.D.J(()=>olympe.D.Color,[]);olympe.dm.DateTime=class extends olympe.dm.rf{getValue(){return this.gj(olympe.dm.DateTime.valueProp)}};olympe.dm.DateTime.O=olympe.dc.ya.C('ff021000000000000014',olympe.dm.DateTime);olympe.dm.DateTime.valueProp=olympe.dm.DateTime.O.xa('ff023000000000000029');z('olympe.dm.DateTime.valueProp',olympe.dm.DateTime.valueProp);olympe.dm.DateTime.prototype.getValue.K=new olympe.D.J(()=>olympe.D.ib,[]);olympe.dm.Enum=class extends olympe.dm.String{na(){return olympe.D.Fa([super.na(),super.getValue()],(a,b)=>''!==a.valueOf()?a:b,olympe.D.Za)}ee(){return this.Ie(olympe.dm.Enum.rankProp)}static create(a,b,c,d,e){const f=olympe.dc.Ja();e=void 0!==e?e:f.Db(b)&&f.de(b).length||0;c=(new Map).set(olympe.dm.String.valueProp,c).set(olympe.dc.CloudObject.nameProp,d||c).set(olympe.dm.Enum.rankProp,e);return a.create(b,c)}};olympe.dm.Enum.create=olympe.dm.Enum.create;
745
+ olympe.dm.Enum.O=olympe.dc.ya.C('016cdd861b32d56c81f7',olympe.dm.Enum);olympe.dm.Enum.rankProp=olympe.dm.Enum.O.xa('017a7690c915975ea995');olympe.dm.Enum.prototype.ee.K=olympe.D.J.G;olympe.dm.ig=class extends olympe.dm.BrickMetadata{lx(){return this.rb(olympe.dc.CloudObject.instancesRel).Xk(olympe.dm.Enum.rankProp,olympe.dc.ba.dk.ASC).Ic()}static create(a,b){b=a.create(olympe.dm.ig,(new Map).set(olympe.dc.CloudObject.nameProp,b));a.Ua(olympe.dc.CloudObject.extendRel,b,olympe.dm.Enum);return b}};olympe.dm.ig.create=olympe.dm.ig.create;olympe.dm.ig.prototype.getValues=olympe.dm.ig.prototype.lx;olympe.dm.ig.O=olympe.dc.ya.C('017a768f966fc08ebb98',olympe.dm.ig);olympe.dm.Number=class extends olympe.dm.rf{getValue(){return this.Ie(olympe.dm.Number.valueProp)}};olympe.dm.Number.O=olympe.dc.ya.C('ff021000000000000013',olympe.dm.Number);olympe.dm.Number.valueProp=olympe.dm.Number.O.xa('ff023000000000000028');z('olympe.dm.Number.valueProp',olympe.dm.Number.valueProp);olympe.dm.Number.prototype.getValue.K=olympe.D.J.G;olympe.ab={};olympe.ab.ah=class{constructor(a){this.N=a;this.W=new olympe.D.Zb(`${this.Z()} source context`);this.R=this.C=null}Z(){}L(){}close(){this.R&&this.R(this.Z(),olympe.dc.pk.nt);this.W.destroy()}};function ph(a){olympe.D.yc([qc(a.ja)],b=>{if(b.valueOf()){const c=a.G.keys();qh(a,d=>{if(d)a.N.error('An error occurred while auto synchronising:\n'+d.message);else if(a.N.debug('Auto synchronise transactions successfully'),a.$)for(const e of c)fc(a.F,f=>{a.N.error(`Could not clear transactions for ${e}: ${f}.`)})})}})}
746
746
  function rh(a){let b;olympe.D.yc([qc(a.ja)],c=>{c.valueOf()?(a.$=!1,b&&(Lb(b),b=null)):(a.$=!0,b=Kb(()=>{if(a.da){a.da=!1;for(const d of a.G.keys())dc(a.F,d,a.G.get(d),()=>{},e=>{a.N.error(`Could persist transaction for ${d}: ${e}`)})}},5E3))})}
747
- function qh(a,b){const c=olympe.async.pk.create(),d=c.G;c.add((e,f)=>{a.F.storage.L(f)});c.add((e,f,g)=>{const h=olympe.dc.Ha.sb,k=g.get('files'),l=new olympe.async.ng(d);a.G.forEach((n,p)=>{if(p!==h){const q=a.ta.R(p);null!==q?(l.add(a.Ka.bind(a,n,q,k)),a.F.storage.C()):f(`The source: ${p} is not reachable.`)}});ac(l,(n,p)=>{n?e():f(p||void 0)});l.start()});ac(c,(e,f)=>{b(e?null:Error(f));e&&(a.da=!1,a.G.clear())});c.start()}
748
- function sh(a,b){const c=new olympe.async.pk(olympe.D.La());c.add((d,e)=>{ec(a.F,f=>null===f?d():e(f))});c.add(d=>{const e=olympe.dc.xd();a.G.forEach((f,g)=>{const h=Array.from(f.de()).map(k=>k.tag());Rc(e,olympe.D.La(),f,h,[],g)(!0)});d()});ac(c,(d,e)=>{b(e?Error(e):null)});c.start()}
749
- olympe.ab.Fi=class extends olympe.ab.ah{constructor(a,b,c,d,e){super(a);this.G=new Map;this.ja=c;this.F=d;this.ta=b;this.da=this.$=!1;e.get('syncTimeout');e.get('autoSync')&&ph(this);e.get('autoPersist')&&rh(this)}Ka(a,b,c,d,e){const f=olympe.dc.ha.ia.uk,g=olympe.dc.ha.ia.ll,h=new olympe.dc.db.uc,k=new olympe.async.ng(olympe.D.La()),l=(n,p,q)=>{const r=n.tag(),t=n.cb(olympe.dm.File.mimeTypeProp.T());hc(this.F,u=>{zc(olympe.dc.Bw(),r,u,t,v=>{n.xa(olympe.dm.File.urlProp.T(),v);const w=new Map;w.set(olympe.dm.File.urlProp.T(),
750
- v);h.qc(r,w);this.F.storage.C(q)})})};for(const n of c)(c=a.Lf(n))&&c.re()&&k.add(l.bind(this,c));ac(k,(n,p)=>{n?(n=M(new olympe.dc.ha(f,a,[b.Z()]),q=>{q?e(q.message):(this.C(b.Z(),g,h),q=Array.from(a.de()).map(r=>r.tag()),olympe.dc.xd().persist(q),d())}),b.L(n)):e(`Transaction synchronisation failed! ${p?p:''}`)});k.start()}Z(){return olympe.dc.Ha.sb}L(a){var b=olympe.dc.ha.ia.dh,c=olympe.dc.ha.ia.uh;const d=olympe.dc.ha.ia.yi,e=olympe.dc.ha.ia.xi,f=olympe.dc.ha.ia.Rg,g=olympe.dc.ha.ia.vl,h=olympe.dc.ha.ia.Qh,
751
- k=olympe.dc.ha.ia.ti,l=olympe.dc.ha.ia.vh;var n=olympe.dc.ha.ia.Mj;const p=a.type;switch(p){case f:a.validate(null);this.F.storage.F();sh(this,v=>{null!==v&&this.N.error(`Could not load transactions: ${v.message}`)});break;case b:case c:const q=a.content;a.C.forEach(v=>{let w=this.G.get(v);void 0===w&&(w=new olympe.dc.db.uc,this.G.set(v,w));q.Nc(w);this.$&&(this.da=!0)});a.validate(null);a=olympe.dc.transaction.rg.C.Op;this.C(olympe.dc.Ha.sb,n,{id:q.Z(),finalize:a});break;case e:case d:const r=a.C[0],
752
- t=a.content;a.validate(null);cc(this.F,t.Z(),v=>{this.N.warn('No graphresult for subscription : '+t.Z(),v,'\n',t.nh.toJSON());this.N.warn();this.C(r,g,new olympe.dc.query.Ai(t.Z(),r,olympe.dc.Ha.sb,new olympe.dc.db.uc))});break;case h:case l:case k:n=a.content;b=n.file;const u=n.Ye;c=n.se;p===h?gc(this.F,b,n.content,n.mimeType,u,c):p===l?hc(this.F,v=>{u(v)}):this.F.storage.C(c);a.validate(null)}}};olympe.ab.Fi.C='context';const th=olympe.dc.ha.ia.am,uh=olympe.dc.ha.ia.cm,vh=olympe.dc.ha.ia.QUERY_RESULT,wh=olympe.dc.ha.ia.bm,xh=olympe.dc.ha.ia.dh,yh=olympe.dc.ha.ia.uk,zh=olympe.dc.ha.ia.Mj,Ah=olympe.dc.ha.ia.uh,Bh=olympe.dc.ha.ia.Cj,Ch=olympe.dc.ha.ia.fl,Dh=olympe.dc.ha.ia.Qh,Eh=olympe.dc.ha.ia.vh,Fh=olympe.dc.ha.ia.ti,Gh=olympe.dc.ha.ia.lg;
747
+ function qh(a,b){const c=olympe.async.nk.create(),d=c.G;c.add((e,f)=>{a.F.storage.L(f)});c.add((e,f,g)=>{const h=olympe.dc.Ha.sb,k=g.get('files'),l=new olympe.async.ng(d);a.G.forEach((n,p)=>{if(p!==h){const q=a.ta.R(p);null!==q?(l.add(a.Ka.bind(a,n,q,k)),a.F.storage.C()):f(`The source: ${p} is not reachable.`)}});ac(l,(n,p)=>{n?e():f(p||void 0)});l.start()});ac(c,(e,f)=>{b(e?null:Error(f));e&&(a.da=!1,a.G.clear())});c.start()}
748
+ function sh(a,b){const c=new olympe.async.nk(olympe.D.La());c.add((d,e)=>{ec(a.F,f=>null===f?d():e(f))});c.add(d=>{const e=olympe.dc.xd();a.G.forEach((f,g)=>{const h=Array.from(f.de()).map(k=>k.tag());Rc(e,olympe.D.La(),f,h,[],g)(!0)});d()});ac(c,(d,e)=>{b(e?Error(e):null)});c.start()}
749
+ olympe.ab.Fi=class extends olympe.ab.ah{constructor(a,b,c,d,e){super(a);this.G=new Map;this.ja=c;this.F=d;this.ta=b;this.da=this.$=!1;e.get('syncTimeout');e.get('autoSync')&&ph(this);e.get('autoPersist')&&rh(this)}Ka(a,b,c,d,e){const f=olympe.dc.ha.ia.tk,g=olympe.dc.ha.ia.kl,h=new olympe.dc.db.uc,k=new olympe.async.ng(olympe.D.La()),l=(n,p,q)=>{const r=n.tag(),t=n.cb(olympe.dm.File.mimeTypeProp.T());hc(this.F,u=>{zc(olympe.dc.Aw(),r,u,t,v=>{n.xa(olympe.dm.File.urlProp.T(),v);const w=new Map;w.set(olympe.dm.File.urlProp.T(),
750
+ v);h.qc(r,w);this.F.storage.C(q)})})};for(const n of c)(c=a.Lf(n))&&c.re()&&k.add(l.bind(this,c));ac(k,(n,p)=>{n?(n=M(new olympe.dc.ha(f,a,[b.Z()]),q=>{q?e(q.message):(this.C(b.Z(),g,h),q=Array.from(a.de()).map(r=>r.tag()),olympe.dc.xd().persist(q),d())}),b.L(n)):e(`Transaction synchronisation failed! ${p?p:''}`)});k.start()}Z(){return olympe.dc.Ha.sb}L(a){var b=olympe.dc.ha.ia.dh,c=olympe.dc.ha.ia.uh;const d=olympe.dc.ha.ia.yi,e=olympe.dc.ha.ia.xi,f=olympe.dc.ha.ia.Rg,g=olympe.dc.ha.ia.ul,h=olympe.dc.ha.ia.Qh,
751
+ k=olympe.dc.ha.ia.ti,l=olympe.dc.ha.ia.vh;var n=olympe.dc.ha.ia.Lj;const p=a.type;switch(p){case f:a.validate(null);this.F.storage.F();sh(this,v=>{null!==v&&this.N.error(`Could not load transactions: ${v.message}`)});break;case b:case c:const q=a.content;a.C.forEach(v=>{let w=this.G.get(v);void 0===w&&(w=new olympe.dc.db.uc,this.G.set(v,w));q.Nc(w);this.$&&(this.da=!0)});a.validate(null);a=olympe.dc.transaction.rg.C.Np;this.C(olympe.dc.Ha.sb,n,{id:q.Z(),finalize:a});break;case e:case d:const r=a.C[0],
752
+ t=a.content;a.validate(null);cc(this.F,t.Z(),v=>{this.N.warn('No graphresult for subscription : '+t.Z(),v,'\n',t.nh.toJSON());this.N.warn();this.C(r,g,new olympe.dc.query.Ai(t.Z(),r,olympe.dc.Ha.sb,new olympe.dc.db.uc))});break;case h:case l:case k:n=a.content;b=n.file;const u=n.Ye;c=n.se;p===h?gc(this.F,b,n.content,n.mimeType,u,c):p===l?hc(this.F,v=>{u(v)}):this.F.storage.C(c);a.validate(null)}}};olympe.ab.Fi.C='context';const th=olympe.dc.ha.ia.$l,uh=olympe.dc.ha.ia.bm,vh=olympe.dc.ha.ia.QUERY_RESULT,wh=olympe.dc.ha.ia.am,xh=olympe.dc.ha.ia.dh,yh=olympe.dc.ha.ia.tk,zh=olympe.dc.ha.ia.Lj,Ah=olympe.dc.ha.ia.uh,Bh=olympe.dc.ha.ia.Bj,Ch=olympe.dc.ha.ia.el,Dh=olympe.dc.ha.ia.Qh,Eh=olympe.dc.ha.ia.vh,Fh=olympe.dc.ha.ia.ti,Gh=olympe.dc.ha.ia.lg;
753
753
  function Hh(a,b,c,d,e){const f=c.Z();c={t:th,q:c.la()};olympe.H.wa.fb.tb.get(b,c).then(g=>{g.t===vh?(d(null),a.C(b,e||vh,{i:f,r:g.r,s:b})):d(Error(g.e))}).catch(g=>d(Error(g)))}function Ih(a,b,c,d,e){const f=c.Z();Hh(a,b,c,g=>{if(g)e(g);else{Jh(a,b,f);g={t:uh,q:c.la()};var h=olympe.H.wa.fb.tb.observe(b,d,g).subscribe(k=>{const l=k.t;l===wh?(e(null),a.C(b,l,{i:f,r:k.r,s:b})):e(Error(k.e))});d.R(()=>h.unsubscribe())}},wh)}
754
- function Kh(a,b,c,d){const e=c.xc;c=new olympe.dc.transaction.td;e.Nc(c);c={t:xh,i:e.Z(),p:ie(c)};olympe.H.wa.fb.tb.send(b,c).then(()=>{d(null);a.C(b,zh,{id:e.Z(),finalize:olympe.dc.transaction.rg.C.Np})}).catch(f=>d(Error(f)))}function Lh(a,b,c,d,e){var f=c.xc;c=f.Z();const g=new olympe.dc.transaction.td;f.Nc(g);f={t:Ah,i:c,p:ie(g)};olympe.H.wa.fb.tb.publish(b,f).then(()=>e(null)).catch(h=>e(Error(h)));Mh(a,c,b,d)}
754
+ function Kh(a,b,c,d){const e=c.xc;c=new olympe.dc.transaction.td;e.Nc(c);c={t:xh,i:e.Z(),p:ie(c)};olympe.H.wa.fb.tb.send(b,c).then(()=>{d(null);a.C(b,zh,{id:e.Z(),finalize:olympe.dc.transaction.rg.C.Mp})}).catch(f=>d(Error(f)))}function Lh(a,b,c,d,e){var f=c.xc;c=f.Z();const g=new olympe.dc.transaction.td;f.Nc(g);f={t:Ah,i:c,p:ie(g)};olympe.H.wa.fb.tb.publish(b,f).then(()=>e(null)).catch(h=>e(Error(h)));Mh(a,c,b,d)}
755
755
  function Jh(a,b,c){const d=()=>{const f=setInterval(()=>{0===a.F.size?clearInterval(f):a.F.forEach((g,h)=>{olympe.H.wa.fb.tb.send(h,{t:Gh,s:Array.from(g)}).catch(k=>a.N.warn(`Error occurred while keeping alive subscription list: ${k}`))})},a.$)},e=a.F.get(b)||new Set;e.add(c);a.F.set(b,e);1===a.F.size&&d()}
756
756
  function Mh(a,b,c,d){const e=new olympe.H.wa.fb.tb(b,d);e.listen().subscribe(f=>{f=f.body();if(f.t===Bh){a.N.error(`Burst Transaction ${b} failed. Local rollback is not supported yet. Refresh the application`);const g=new olympe.dc.db.uc;a.C(c,Bh,{id:b,rollback:g,error:f.r})}});d.R(()=>e.stop())}
757
- olympe.ab.xu=class extends olympe.ab.ah{constructor(a,b,c){super(a);this.F=new Map;this.G=b;this.$=c}Z(){return olympe.dc.Ha.$p}L(a){const b=a.C[0],c=a.type,d=a.validate.bind(a),e=a.content;a=a.F;switch(c){case th:Hh(this,b,e,d);break;case uh:Ih(this,b,e,a,d);break;case xh:case yh:Kh(this,b,e,d);break;case Ah:Lh(this,b,e,a,d);break;case Ch:e.t=c;olympe.H.wa.fb.tb.publish(b,e).then(d).catch(f=>d(Error(f)));break;case Dh:case Eh:case Fh:olympe.H.wa.fb.tb.get(b,{t:c,f:e.file}).then(f=>{this.G.da(e.file,
758
- b,f);c===Dh?this.G.W(e.file,e.content,e.mimeType,e.Ye,e.se):c===Eh?this.G.R(e.file,e.url,e.mimeType,e.Ye,e.se):this.G.L(e.file,e.Ye,e.se)}).catch(e.se);break;default:this.N.info(`Messages of type ${c} is not supported by the source ${this.Z()}`)}}};olympe.ab.Buffer=class{constructor(){this.counter=0;this.Fb=new Map}buffer(a){const b=this.counter++;this.Fb.set(b,a);return this.clear.bind(this,b)}clear(a){this.Fb.delete(a)}};olympe.ab.pg=class a{constructor(b,c,d){this.N=b;this.W=c;this.da=new olympe.ab.Buffer(this);this.L=new Map;this.G=this.Hb(d);new olympe.D.Zb('Data Router context');this.F=new Map;this.$=new Map;this.Ua()}Ua(){this.N.info('Initializing DR layer');olympe.D.Xm(qc(this.W),()=>{this.N.info('Router: ONLINE')},()=>{this.N.log('Router: OFFLINE (no auth layer not online)');for(const b of this.da.Fb.values())this.ta(b)});this.N.log('DONE initializing DR layer (waiting for AUTH layer session to be established)')}send(b){M(b,
759
- this.da.buffer(b));this.ta(b)}C(b,c){const d=olympe.X.ec();let e=this.F.get(b);void 0===e&&(e=new Map,this.F.set(b,e));e.set(d,c)}ja(b){this.$.set(olympe.X.yg(),b)}Ka(b,c,d){this.F.has(c)&&this.F.get(c).forEach(e=>{e(b,d)})}Ab(b,c){this.L.set(b,c);c.C=this.Ka.bind(this);c.R=this.Va.bind(this)}R(b){return this.L.get(b)||this.L.get(olympe.dc.Ha.$p)}Va(b,c){this.$.forEach(d=>{d(b,c)})}ta(b){this.N.debug('Processing message',b.toString());this.qb(b).forEach(c=>{(c=this.R(c))&&c.L(b)})}qb(b){var c=olympe.dc.ha.ia.Rg,
760
- d=olympe.dc.ha.ia.xi,e=olympe.dc.ha.ia.yi,f=olympe.dc.ha.ia.dh,g=olympe.dc.ha.ia.uh;const h=olympe.dc.ha.ia.Qh,k=olympe.dc.ha.ia.ti,l=olympe.dc.ha.ia.vh;switch(b.type){case c:d=this.G.get(a.C.Rg)||[];break;case d:case e:d=this.G.get(a.C.$l)||[];break;case f:case g:d=this.G.get(a.C.TRANSACTION)||[];break;case h:case l:case k:d=this.G.get(a.C.Ws)||[];break;default:d=[]}c=b.content;e=olympe.auth.pa.C.Mg;f=olympe.auth.pa.C.yh;g=pc(this.W);e=!(g===e||g===f);for(var n of d)if(d=n,f=c&&c.Z&&c.Z(),g=d.get('type'),
761
- g===a.F.Fh&&e||g===a.F.ep&&d.get('id')===f||g===a.F.ic)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.C}Hb(b){const c=Object.values(olympe.ab.pg.C),d=Object.values(olympe.ab.pg.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 l=k.type;if(d.includes(l)){var n=k.destinations;n instanceof Array?(n=(new Map).set('type',
762
- l).set('destinations',n),h.push(n),l===a.F.ep&&n.set('id',k.id)):this.N.error('Routing rule',f,l,'is not valid. Destinations must be stored in an array')}else this.N.error('Routing rule',f,l,'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.ab.pg.C={Rg:'getContext',$l:'query',TRANSACTION:'transaction',Ws:'file'};
763
- olympe.ab.pg.F={ic:'default',Fh:'offline',ep:'id'};olympe.ab.pg.ma=[olympe.dc.pg];olympe.ab.Nj=class{da(){}W(){}R(){}L(){}};olympe.ab.P={Aa:'dr.Manager',Ea:'dr.Logger',ne:'dr.sources.Router',zp:'dr.sources.Local',im:'dr.sources.Server',bq:'dr.sources.Peer',Qg:'dr.sources.FileSource'};olympe.ab.Config={Ll:'dr.keepAliveTimeout',En:'dr.autoSync',Dn:'dr.autoPersist',Lq:'dr.syncTimeout',xq:'dr.routing'};
764
- olympe.U.config(function(a){D(a,olympe.ab.Config.xq,{});D(a,olympe.ab.Config.Ll,3E5);D(a,olympe.ab.Config.En,!1);D(a,olympe.ab.Config.Dn,!1);D(a,olympe.ab.Config.Lq,3E4);C(a,olympe.ab.P.Ea,[olympe.ra.P.Aa],b=>b.Oc('dr'));C(a,olympe.ab.P.zp,[olympe.ab.P.Ea,olympe.ab.P.ne,olympe.auth.P.Aa,olympe.hc.P.ko,new olympe.U.fa(olympe.ab.Config.En),new olympe.U.fa(olympe.ab.Config.Dn),new olympe.U.fa(olympe.ab.Config.Lq)],(b,c,d,e,f,g,h)=>{f=(new Map).set('autoSync',f).set('autoPersist',g).set('syncTimeout',
765
- h);return new olympe.ab.Fi(b,c,d,e,f)});ta(a,olympe.ab.P.im);A(a,olympe.ab.P.bq,olympe.ab.xu,olympe.ab.P.Ea,olympe.ab.P.Qg,new olympe.U.fa(olympe.ab.Config.Ll));ta(a,olympe.ab.P.Qg);A(a,olympe.ab.P.ne,olympe.ab.pg,olympe.ab.P.Ea,olympe.auth.P.Aa,new olympe.U.fa(olympe.ab.Config.xq));sa(a,olympe.dc.P.ne,olympe.ab.P.ne);C(a,olympe.dc.query.Lb.Yj,[olympe.dc.query.Lb.Yj],b=>new olympe.dc.Zl(b))},'olympe.dr');
766
- olympe.U.run([olympe.ab.P.ne,olympe.ab.P.zp,olympe.ab.P.im,olympe.ab.P.bq],(a,...b)=>{b.forEach(c=>a.Ab(c.Z(),c))});olympe.H={};olympe.H.Uc={ri:1,eg:2,ac:3,qf:4,hz:5,Bi:6,HA:7};olympe.H.ia={Bi:1,hv:2,Vs:3,lg:5};olympe.H.pa=class{Ab(){}connect(){}disconnect(){}od(){}We(){}$d(){}W(){}Hc(){}bc(){}ta(){}vd(){}};olympe.H.pa.C={INIT:'initialize',CONNECTING:'connecting',hg:'disconnected',pi:'connected',Xg:'reconnecting',Th:'waking',sh:'awake',ac:'error'};olympe.H.pa.G={Gh:1,bt:-1,pt:-2,Zu:-3};function Nh(a,b){const c=a.G.get(b)||a.Ka;a.G.delete(b);return`${c}/${b}`}
767
- olympe.H.Nj=class{constructor(a,b,c,d,e){this.N=a;this.F=b;this.ja=c;this.Ka=d;this.Va=e;this.C=new Map;this.G=new Map;this.$=new Map;this.ta=new olympe.D.Zb('File manager context')}da(a,b,c){b&&this.G.set(a,`${this.Va}/${b}`);c&&this.$.set(a,c)}W(a,b,c,d,e){const f=Pb(Nh(this,a),olympe.net.eb.Yd.fk,b,olympe.net.eb.ResponseType.dl);Qb(f,{[olympe.net.eb.Headers.ni]:this.Yc(a),[olympe.net.eb.Headers.Ej]:c||'application/octet-stream'});this.F.C(f,g=>{g=g.Od();g===olympe.net.eb.cd.Gh||g===olympe.net.eb.cd.jl?
768
- (g=new URL(f.C()),d(g.pathname)):e&&(g=`Failed to create file ${a}. Response code ${g}`,this.N.error(g),e(g))})}R(a,b,c,d,e){const f=olympe.D.La();d={Ye:f.F(d),se:e&&f.F(e)};if(this.C.has(a))this.C.get(a).push(d);else{this.C.set(a,[d]);if(null===b){var g=Pb(Nh(this,a));Qb(g,{[olympe.net.eb.Headers.ni]:this.Yc(a)})}else g=Pb(b);g.F=olympe.net.eb.ResponseType.dl;Qb(g,{[olympe.net.eb.Headers.Ej]:c||'application/octet-stream'});this.ta.run(()=>{this.F.C(g,h=>{const k=h.Od(),l=this.C.get(a);if(200<=k&&
757
+ olympe.ab.wu=class extends olympe.ab.ah{constructor(a,b,c){super(a);this.F=new Map;this.G=b;this.$=c}Z(){return olympe.dc.Ha.Zp}L(a){const b=a.C[0],c=a.type,d=a.validate.bind(a),e=a.content;a=a.F;switch(c){case th:Hh(this,b,e,d);break;case uh:Ih(this,b,e,a,d);break;case xh:case yh:Kh(this,b,e,d);break;case Ah:Lh(this,b,e,a,d);break;case Ch:e.t=c;olympe.H.wa.fb.tb.publish(b,e).then(d).catch(f=>d(Error(f)));break;case Dh:case Eh:case Fh:olympe.H.wa.fb.tb.get(b,{t:c,f:e.file}).then(f=>{this.G.da(e.file,
758
+ b,f);c===Dh?this.G.W(e.file,e.content,e.mimeType,e.Ye,e.se):c===Eh?this.G.R(e.file,e.url,e.mimeType,e.Ye,e.se):this.G.L(e.file,e.Ye,e.se)}).catch(e.se);break;default:this.N.info(`Messages of type ${c} is not supported by the source ${this.Z()}`)}}};olympe.ab.Buffer=class{constructor(){this.counter=0;this.Fb=new Map}buffer(a){const b=this.counter++;this.Fb.set(b,a);return this.clear.bind(this,b)}clear(a){this.Fb.delete(a)}};olympe.ab.pg=class a{constructor(b,c,d){this.N=b;this.W=c;this.da=new olympe.ab.Buffer(this);this.L=new Map;this.G=this.Hb(d);new olympe.D.Zb('Data Router context');this.F=new Map;this.$=new Map;this.Sa()}Sa(){this.N.info('Initializing DR layer');olympe.D.Wm(qc(this.W),()=>{this.N.info('Router: ONLINE')},()=>{this.N.log('Router: OFFLINE (no auth layer not online)');for(const b of this.da.Fb.values())this.ta(b)});this.N.log('DONE initializing DR layer (waiting for AUTH layer session to be established)')}send(b){M(b,
759
+ this.da.buffer(b));this.ta(b)}C(b,c){const d=olympe.X.ec();let e=this.F.get(b);void 0===e&&(e=new Map,this.F.set(b,e));e.set(d,c)}ja(b){this.$.set(olympe.X.yg(),b)}Ka(b,c,d){this.F.has(c)&&this.F.get(c).forEach(e=>{e(b,d)})}Ab(b,c){this.L.set(b,c);c.C=this.Ka.bind(this);c.R=this.Va.bind(this)}R(b){return this.L.get(b)||this.L.get(olympe.dc.Ha.Zp)}Va(b,c){this.$.forEach(d=>{d(b,c)})}ta(b){this.N.debug('Processing message',b.toString());this.qb(b).forEach(c=>{(c=this.R(c))&&c.L(b)})}qb(b){var c=olympe.dc.ha.ia.Rg,
760
+ d=olympe.dc.ha.ia.xi,e=olympe.dc.ha.ia.yi,f=olympe.dc.ha.ia.dh,g=olympe.dc.ha.ia.uh;const h=olympe.dc.ha.ia.Qh,k=olympe.dc.ha.ia.ti,l=olympe.dc.ha.ia.vh;switch(b.type){case c:d=this.G.get(a.C.Rg)||[];break;case d:case e:d=this.G.get(a.C.Zl)||[];break;case f:case g:d=this.G.get(a.C.TRANSACTION)||[];break;case h:case l:case k:d=this.G.get(a.C.Vs)||[];break;default:d=[]}c=b.content;e=olympe.auth.pa.C.Mg;f=olympe.auth.pa.C.yh;g=pc(this.W);e=!(g===e||g===f);for(var n of d)if(d=n,f=c&&c.Z&&c.Z(),g=d.get('type'),
761
+ g===a.F.Fh&&e||g===a.F.cp&&d.get('id')===f||g===a.F.ic)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.C}Hb(b){const c=Object.values(olympe.ab.pg.C),d=Object.values(olympe.ab.pg.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 l=k.type;if(d.includes(l)){var n=k.destinations;n instanceof Array?(n=(new Map).set('type',
762
+ l).set('destinations',n),h.push(n),l===a.F.cp&&n.set('id',k.id)):this.N.error('Routing rule',f,l,'is not valid. Destinations must be stored in an array')}else this.N.error('Routing rule',f,l,'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.ab.pg.C={Rg:'getContext',Zl:'query',TRANSACTION:'transaction',Vs:'file'};
763
+ olympe.ab.pg.F={ic:'default',Fh:'offline',cp:'id'};olympe.ab.pg.ma=[olympe.dc.pg];olympe.ab.Mj=class{da(){}W(){}R(){}L(){}};olympe.ab.P={Aa:'dr.Manager',Ea:'dr.Logger',ne:'dr.sources.Router',yp:'dr.sources.Local',hm:'dr.sources.Server',aq:'dr.sources.Peer',Qg:'dr.sources.FileSource'};olympe.ab.Config={Kl:'dr.keepAliveTimeout',Dn:'dr.autoSync',Cn:'dr.autoPersist',Kq:'dr.syncTimeout',wq:'dr.routing'};
764
+ olympe.U.config(function(a){D(a,olympe.ab.Config.wq,{});D(a,olympe.ab.Config.Kl,3E5);D(a,olympe.ab.Config.Dn,!1);D(a,olympe.ab.Config.Cn,!1);D(a,olympe.ab.Config.Kq,3E4);C(a,olympe.ab.P.Ea,[olympe.ra.P.Aa],b=>b.Oc('dr'));C(a,olympe.ab.P.yp,[olympe.ab.P.Ea,olympe.ab.P.ne,olympe.auth.P.Aa,olympe.hc.P.jo,new olympe.U.fa(olympe.ab.Config.Dn),new olympe.U.fa(olympe.ab.Config.Cn),new olympe.U.fa(olympe.ab.Config.Kq)],(b,c,d,e,f,g,h)=>{f=(new Map).set('autoSync',f).set('autoPersist',g).set('syncTimeout',
765
+ h);return new olympe.ab.Fi(b,c,d,e,f)});ta(a,olympe.ab.P.hm);A(a,olympe.ab.P.aq,olympe.ab.wu,olympe.ab.P.Ea,olympe.ab.P.Qg,new olympe.U.fa(olympe.ab.Config.Kl));ta(a,olympe.ab.P.Qg);A(a,olympe.ab.P.ne,olympe.ab.pg,olympe.ab.P.Ea,olympe.auth.P.Aa,new olympe.U.fa(olympe.ab.Config.wq));sa(a,olympe.dc.P.ne,olympe.ab.P.ne);C(a,olympe.dc.query.Lb.Xj,[olympe.dc.query.Lb.Xj],b=>new olympe.dc.Yl(b))},'olympe.dr');
766
+ olympe.U.run([olympe.ab.P.ne,olympe.ab.P.yp,olympe.ab.P.hm,olympe.ab.P.aq],(a,...b)=>{b.forEach(c=>a.Ab(c.Z(),c))});olympe.H={};olympe.H.Uc={ri:1,eg:2,ac:3,qf:4,gz:5,Bi:6,GA:7};olympe.H.ia={Bi:1,gv:2,Us:3,lg:5};olympe.H.pa=class{Ab(){}connect(){}disconnect(){}od(){}We(){}$d(){}W(){}Hc(){}bc(){}ta(){}vd(){}};olympe.H.pa.C={INIT:'initialize',CONNECTING:'connecting',hg:'disconnected',pi:'connected',Xg:'reconnecting',Th:'waking',sh:'awake',ac:'error'};olympe.H.pa.G={Gh:1,at:-1,ot:-2,Yu:-3};function Nh(a,b){const c=a.G.get(b)||a.Ka;a.G.delete(b);return`${c}/${b}`}
767
+ olympe.H.Mj=class{constructor(a,b,c,d,e){this.N=a;this.F=b;this.ja=c;this.Ka=d;this.Va=e;this.C=new Map;this.G=new Map;this.$=new Map;this.ta=new olympe.D.Zb('File manager context')}da(a,b,c){b&&this.G.set(a,`${this.Va}/${b}`);c&&this.$.set(a,c)}W(a,b,c,d,e){const f=Pb(Nh(this,a),olympe.net.eb.Yd.ek,b,olympe.net.eb.ResponseType.cl);Qb(f,{[olympe.net.eb.Headers.ni]:this.Yc(a),[olympe.net.eb.Headers.Dj]:c||'application/octet-stream'});this.F.C(f,g=>{g=g.Od();g===olympe.net.eb.cd.Gh||g===olympe.net.eb.cd.il?
768
+ (g=new URL(f.C()),d(g.pathname)):e&&(g=`Failed to create file ${a}. Response code ${g}`,this.N.error(g),e(g))})}R(a,b,c,d,e){const f=olympe.D.La();d={Ye:f.F(d),se:e&&f.F(e)};if(this.C.has(a))this.C.get(a).push(d);else{this.C.set(a,[d]);if(null===b){var g=Pb(Nh(this,a));Qb(g,{[olympe.net.eb.Headers.ni]:this.Yc(a)})}else g=Pb(b);g.F=olympe.net.eb.ResponseType.cl;Qb(g,{[olympe.net.eb.Headers.Dj]:c||'application/octet-stream'});this.ta.run(()=>{this.F.C(g,h=>{const k=h.Od(),l=this.C.get(a);if(200<=k&&
769
769
  300>k){const n=h.getData();l&&l.forEach(p=>{if(f.G()){const q=f.Xc(),r=f.Z();this.N.warn(`Context ${q} ${r} is being destroyed while file tag ${a} is being downloaded`)}p.Ye(n)})}else{const n=`Failed to download file ${a}. Response code ${k}`;l&&l.forEach(p=>{p.se&&p.se(n)})}this.C.delete(a)})})}}L(a,b,c){const d=Pb(Nh(this,a),olympe.net.eb.Yd.Ac);Qb(d,{[olympe.net.eb.Headers.ni]:this.Yc(a)});this.F.C(d,e=>{e=e.Od();200<=e&&300>e?b():(e=`Failed to delete file ${a}. Response code ${e}`,this.N.error(e),
770
- c&&c(e))})}Yc(a){const b=this.$.get(a);b&&this.$.delete(a);return b||olympe.D.$a(sc(this.ja))}};olympe.H.Nj.ma=[olympe.ab.Nj];const Oh=olympe.dc.ha.ia.Rg,Ph=olympe.dc.ha.ia.dh,Qh=olympe.dc.ha.ia.uk,Rh=olympe.dc.ha.ia.uh,Sh=olympe.dc.ha.ia.xi,Th=olympe.dc.ha.ia.yi,Uh=olympe.dc.ha.ia.Qo,Vh=olympe.dc.ha.ia.Ro,Wh=olympe.dc.ha.ia.vl,Xh=olympe.dc.ha.ia.ti,Yh=olympe.dc.ha.ia.vh,Zh=olympe.dc.ha.ia.Qh,$h=olympe.dc.ha.ia.Mj,ai=olympe.dc.ha.ia.gv,bi=olympe.dc.ha.ia.Du,ci=olympe.dc.ha.ia.ct,di=olympe.dc.ha.ia.fl,ei=olympe.dc.ha.ia.ws;
771
- function fi(a){a.G.ta(olympe.H.Uc.ri,a.Va.bind(a));olympe.D.yc([qc(a.ja)],b=>{b=b.valueOf()?olympe.dc.qk.Up:olympe.dc.qk.Fh;a.R&&a.R(a.Z(),b)},'Server source is online')}function gi(a,b,c){const d=b.xc;b=new olympe.dc.transaction.td(!0);d.Nc(b);hi(a,a.qb,Ph,!0,ie(b),e=>{c&&c(e);a.C(a.Z(),$h,{id:d.Z(),finalize:olympe.dc.transaction.rg.C.Np})})}
772
- function ii(a,b,c,d){const e=c.Z();a.N.log('Graphdef (ID ',e,') sent: ',c);const f=c instanceof olympe.dc.query.Dl?a.Ua:a.ta,g=(new olympe.H.aa.Pj).la(c);c=new olympe.async.ng(a.W);b===Th&&c.add((k,l)=>{a.F.set(e,{notification:null,ey:a.W.F(n=>n?l(n):k())});ji(a,b,g,n=>n&&l(n.message))});const h=olympe.D.La();c.add((k,l)=>{h.run(()=>{hi(a,f,Sh,!1,g,a.W.F(n=>n?l(n.message):k()))})});ac(c,(k,l)=>{const n=a.F.get(e);k&&n&&n.notification?a.C(a.Z(),Vh,n.notification):!k&&n&&ki(a,Uh,e,p=>p&&a.N.warn(p));
770
+ c&&c(e))})}Yc(a){const b=this.$.get(a);b&&this.$.delete(a);return b||olympe.D.$a(sc(this.ja))}};olympe.H.Mj.ma=[olympe.ab.Mj];const Oh=olympe.dc.ha.ia.Rg,Ph=olympe.dc.ha.ia.dh,Qh=olympe.dc.ha.ia.tk,Rh=olympe.dc.ha.ia.uh,Sh=olympe.dc.ha.ia.xi,Th=olympe.dc.ha.ia.yi,Uh=olympe.dc.ha.ia.Po,Vh=olympe.dc.ha.ia.Qo,Wh=olympe.dc.ha.ia.ul,Xh=olympe.dc.ha.ia.ti,Yh=olympe.dc.ha.ia.vh,Zh=olympe.dc.ha.ia.Qh,$h=olympe.dc.ha.ia.Lj,ai=olympe.dc.ha.ia.fv,bi=olympe.dc.ha.ia.Cu,ci=olympe.dc.ha.ia.bt,di=olympe.dc.ha.ia.el,ei=olympe.dc.ha.ia.vs;
771
+ function fi(a){a.G.ta(olympe.H.Uc.ri,a.Va.bind(a));olympe.D.yc([qc(a.ja)],b=>{b=b.valueOf()?olympe.dc.pk.Tp:olympe.dc.pk.Fh;a.R&&a.R(a.Z(),b)},'Server source is online')}function gi(a,b,c){const d=b.xc;b=new olympe.dc.transaction.td(!0);d.Nc(b);hi(a,a.qb,Ph,!0,ie(b),e=>{c&&c(e);a.C(a.Z(),$h,{id:d.Z(),finalize:olympe.dc.transaction.rg.C.Mp})})}
772
+ function ii(a,b,c,d){const e=c.Z();a.N.log('Graphdef (ID ',e,') sent: ',c);const f=c instanceof olympe.dc.query.Cl?a.Sa:a.ta,g=(new olympe.H.aa.Oj).la(c);c=new olympe.async.ng(a.W);b===Th&&c.add((k,l)=>{a.F.set(e,{notification:null,by:a.W.F(n=>n?l(n):k())});ji(a,b,g,n=>n&&l(n.message))});const h=olympe.D.La();c.add((k,l)=>{h.run(()=>{hi(a,f,Sh,!1,g,a.W.F(n=>n?l(n.message):k()))})});ac(c,(k,l)=>{const n=a.F.get(e);k&&n&&n.notification?a.C(a.Z(),Vh,n.notification):!k&&n&&ki(a,Uh,e,p=>p&&a.N.warn(p));
773
773
  a.F.delete(e);d(l?Error(l):null)});c.start()}function ki(a,b,c,d){a.N.log('Unsubscribe to: ',c);ji(a,b,{i:c},d)}function ji(a,b,c,d){b={c:b};Object.assign(b,c);a.G.W(olympe.H.Uc.ri,b,d&&(e=>{d(e)}))}function hi(a,b,c,d,e,f){if(a.G.Ab()){const g=olympe.H.Uc.ri;!d&&e&&Object.assign(e,{c});c=olympe.D.$a(sc(a.ja)).valueOf();a.G.Hc(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'))}
774
- olympe.H.ah=class extends olympe.ab.ah{constructor(a,b,c,d,e){super(a);this.G=b;this.ja=c;new olympe.H.aa.gb;this.$=new olympe.dc.X.Ii(this.Z());this.da=d;if(4!==e.length)throw Error('Some HTTP end points to the orchestrator are not specified ! Please check DI of olympe.communication module; wants 4 urls but got: '+e.length);this.Ka=e[0];this.Ua=e[1];this.ta=e[2];this.qb=e[3];this.F=new Map;fi(this)}Z(){return olympe.dc.Ha.Mc}L(a){var b=a.type;const c=a.validate.bind(a);a=a.content;switch(b){case Oh:hi(this,
774
+ olympe.H.ah=class extends olympe.ab.ah{constructor(a,b,c,d,e){super(a);this.G=b;this.ja=c;new olympe.H.aa.gb;this.$=new olympe.dc.X.Ii(this.Z());this.da=d;if(4!==e.length)throw Error('Some HTTP end points to the orchestrator are not specified ! Please check DI of olympe.communication module; wants 4 urls but got: '+e.length);this.Ka=e[0];this.Sa=e[1];this.ta=e[2];this.qb=e[3];this.F=new Map;fi(this)}Z(){return olympe.dc.Ha.Mc}L(a){var b=a.type;const c=a.validate.bind(a);a=a.content;switch(b){case Oh:hi(this,
775
775
  this.Ka,olympe.dc.ha.ia.Rg,!1,null,c);break;case Rh:b=new olympe.dc.transaction.td;var d=a.xc;a=a.oh;d.Nc(b);ji(this,Rh,{i:d.Z(),r:a,p:ie(b)});c(null);break;case di:b=new olympe.dc.transaction.td;a=a.xc;a.Nc(b);ji(this,di,{i:a.Z(),p:ie(b)},c);break;case Ph:b=new olympe.dc.transaction.td;d=a.xc;a=a.oh;d.Nc(b);ji(this,olympe.dc.ha.ia.dh,{i:d.Z(),r:a,p:ie(b)},c);break;case Qh:gi(this,a,c);break;case Sh:case Th:ii(this,b,a,c);break;case Uh:ki(this,b,a,c);break;case ai:ji(this,ai,{},c);break;case bi:ji(this,
776
- bi,{},c);break;case ci:ji(this,ci,{},c);break;case ei:ji(this,ei,{},c);break;case Yh:this.da.R(a.file,a.url,a.mimeType,a.Ye,a.se);break;case Xh:this.da.L(a.file,a.Ye,a.se);break;case Zh:this.da.W(a.file,a.content,a.mimeType,a.Ye,a.se);break;default:this.N.info(`Message of type ${b} not supported yet`)}}Va(a){var b=olympe.dc.ha.ia.ll,c=olympe.dc.ha.ia.Cj;const d=olympe.dc.ha.ia.ak,e=olympe.dc.ha.ia.Ru,f=olympe.dc.ha.ia.wp;var g=olympe.dc.ha.ia.dt;const h=a.c;h===b?(a=this.$.C(a.p),this.C(this.Z(),
777
- b,a)):h===c?(g=a.error.reason,b=this.$.C(a.p),this.C(this.Z(),c,{id:a.i,rollback:b,error:g})):h===Wh?(g=olympe.dc.Ha.sb,c=olympe.dc.Ha.Mc,b=a.i,0<a.s?g=new olympe.dc.query.errors.Rj(b,c,g,a.info.error.reason):(g=this.$.R(b,g,a.p),this.N.debug('< Graphdef Result (ID ',g.Z(),'):',a.p),this.N.log('< Graphdef Result (ID ',g.Z(),') with',g.xc.G(),'operations')),this.C(this.Z(),Wh,g)):h===Vh?(g=a.i,a=this.$.L(g,a.p),this.F.has(g)?(g=this.F.get(g),g.notification?qf(a,g.notification):g.notification=a):this.C(this.Z(),
778
- Vh,a)):h===f?(g=new olympe.dc.query.Dp(a.i),a.l.forEach(g.F.bind(g)),this.C(this.Z(),f,g)):h===d?(g=olympe.dc.transaction.rg.C.ak,c=0<a.s?a.info.error.reason:null,this.C(this.Z(),$h,{id:a.i,finalize:g,error:c})):h===e?(g=this.F.get(a.i))&&g.ey(0<a.s?a.info.error.reason:null):h===g&&(c=a.ids,b=a.undo_stack_size,a=a.redo_stack_size,this.C(this.Z(),g,{cD:c,tD:b,oD:a}))}};olympe.H.ah.F={lA:1,nB:2};olympe.H.ah.C={100:'Insufficient Rights',200:'Constraints',300:'IOException',400:'Unexpected',500:'Non Existing Subscription'};olympe.H.Tj=class{constructor(){}};olympe.H.Tj.ma=[olympe.dc.ea.Tj];olympe.H.wa={};function li(a,b,c,d,e){b=new olympe.H.wa.Fb.Response(c,a.L,b,d,e);return a.publish(b)}function mi(a,b,c){a.N.debug(`Bus: Subscribe to ${b}`);Ub(a.C,b,d=>{d=new olympe.H.wa.Fb.Request(d.dest,d.src,d.auth,d.seq,d.type,d.content);a.N.debug('Bus: Received',d);c(d)})}function ni(a,b,c){a.$.set(b,c)}function oi(a,b){return new Promise((c,d)=>{Vb(a.C,b,e=>e?d(e):c())})}
776
+ bi,{},c);break;case ci:ji(this,ci,{},c);break;case ei:ji(this,ei,{},c);break;case Yh:this.da.R(a.file,a.url,a.mimeType,a.Ye,a.se);break;case Xh:this.da.L(a.file,a.Ye,a.se);break;case Zh:this.da.W(a.file,a.content,a.mimeType,a.Ye,a.se);break;default:this.N.info(`Message of type ${b} not supported yet`)}}Va(a){var b=olympe.dc.ha.ia.kl,c=olympe.dc.ha.ia.Bj;const d=olympe.dc.ha.ia.$j,e=olympe.dc.ha.ia.Qu,f=olympe.dc.ha.ia.vp;var g=olympe.dc.ha.ia.ct;const h=a.c;h===b?(a=this.$.C(a.p),this.C(this.Z(),
777
+ b,a)):h===c?(g=a.error.reason,b=this.$.C(a.p),this.C(this.Z(),c,{id:a.i,rollback:b,error:g})):h===Wh?(g=olympe.dc.Ha.sb,c=olympe.dc.Ha.Mc,b=a.i,0<a.s?g=new olympe.dc.query.errors.Qj(b,c,g,a.info.error.reason):(g=this.$.R(b,g,a.p),this.N.debug('< Graphdef Result (ID ',g.Z(),'):',a.p),this.N.log('< Graphdef Result (ID ',g.Z(),') with',g.xc.G(),'operations')),this.C(this.Z(),Wh,g)):h===Vh?(g=a.i,a=this.$.L(g,a.p),this.F.has(g)?(g=this.F.get(g),g.notification?qf(a,g.notification):g.notification=a):this.C(this.Z(),
778
+ Vh,a)):h===f?(g=new olympe.dc.query.Cp(a.i),a.l.forEach(g.F.bind(g)),this.C(this.Z(),f,g)):h===d?(g=olympe.dc.transaction.rg.C.$j,c=0<a.s?a.info.error.reason:null,this.C(this.Z(),$h,{id:a.i,finalize:g,error:c})):h===e?(g=this.F.get(a.i))&&g.by(0<a.s?a.info.error.reason:null):h===g&&(c=a.ids,b=a.undo_stack_size,a=a.redo_stack_size,this.C(this.Z(),g,{bD:c,sD:b,nD:a}))}};olympe.H.ah.F={kA:1,mB:2};olympe.H.ah.C={100:'Insufficient Rights',200:'Constraints',300:'IOException',400:'Unexpected',500:'Non Existing Subscription'};olympe.H.Sj=class{constructor(){}};olympe.H.Sj.ma=[olympe.dc.ea.Sj];olympe.H.wa={};function li(a,b,c,d,e){b=new olympe.H.wa.Fb.Response(c,a.L,b,d,e);return a.publish(b)}function mi(a,b,c){a.N.debug(`Bus: Subscribe to ${b}`);Ub(a.C,b,d=>{d=new olympe.H.wa.Fb.Request(d.dest,d.src,d.auth,d.seq,d.type,d.content);a.N.debug('Bus: Received',d);c(d)})}function ni(a,b,c){a.$.set(b,c)}function oi(a,b){return new Promise((c,d)=>{Vb(a.C,b,e=>e?d(e):c())})}
779
779
  function pi(a,b){return new Promise((c,d)=>{const e=b.Yc(),f=a.ja.get(e);void 0!==f?c(f):a.F.mh(b.Yc(),(g,h)=>{g?d(g):(a.ja.set(e,h),c(h))})})}
780
- olympe.H.wa.pa=class{constructor(a,b,c,d){b=d.get('connectionOptions');this.N=a;this.F=c;a=new olympe.X.mm(b.messageTimeout);a.C=this.ta.bind(this);this.$=a;a=d.get('url');this.C=new olympe.net.ke(a,b);this.ja=new olympe.X.mm(b.tokenTimeout);this.da=d.get('allowGuest');this.W=1;this.L=olympe.X.ec();this.G=!1;this.R=[]}connect(){return new Promise((a,b)=>{!this.da&&vc(this.F)?b(Error('Guest user is not allowed to connect to RabbitMQ, you can allow guest with the bus.allowGuest oConfig parameter !!!')):
780
+ olympe.H.wa.pa=class{constructor(a,b,c,d){b=d.get('connectionOptions');this.N=a;this.F=c;a=new olympe.X.lm(b.messageTimeout);a.C=this.ta.bind(this);this.$=a;a=d.get('url');this.C=new olympe.net.ke(a,b);this.ja=new olympe.X.lm(b.tokenTimeout);this.da=d.get('allowGuest');this.W=1;this.L=olympe.X.ec();this.G=!1;this.R=[]}connect(){return new Promise((a,b)=>{!this.da&&vc(this.F)?b(Error('Guest user is not allowed to connect to RabbitMQ, you can allow guest with the bus.allowGuest oConfig parameter !!!')):
781
781
  Tb(this.C)||this.G?a():(this.da||rc(this.F,()=>this.disconnect().then(),'busLogoutCallback'),this.C.connect(olympe.D.$a(this.F.C.Ib()),()=>{this.N.debug('Connection to bus established. Listening to',this.L);Zb(this.C,c=>{this.N.error('Failed to connect/re-connect to the bus:',c)});Ub(this.C,this.L,c=>{c=new olympe.H.wa.Fb.Response(c.dest,c.src,c.seq,c.type,c.content);this.N.debug('Bus received message:',c);const d=c.G,e=this.$.get(d);this.$.delete(d);e&&e(c)});Yb(this.C,()=>{this.G=!0});Xb(this.C,
782
782
  ()=>{this.G=!0});Wb(this.C,()=>{if(this.G){this.G=!1;this.N.debug(`Reconnected to bus: Sending ${this.R.length} pending messages.`);for(const c of this.R)this.C.publish(c.L(),c.la());this.R=[]}});a()}))})}disconnect(){return new Promise(a=>{this.N.debug('Disconnecting from bus');this.F.W.delete('busLogoutCallback');this.C.end(!1,()=>a())})}publish(a){this.N.debug('Publishing on bus',a);return this.G?(this.N.debug('Disconnected, storing message in queue'),this.R.push(a),Promise.resolve()):new Promise((b,
783
- c)=>{this.C.publish(a.L(),a.la(),void 0,d=>d?c(d):b())})}te(a,b,c){return li(this,a.G,a.source,b,c)}request(a,b,c){const d=this.W;this.W++;const e=olympe.D.$a(sc(this.F));a=new olympe.H.wa.Fb.Request(a,this.L,e,d,b,c);return this.publish(a).then(()=>d)}notify(a,b,c){const d=this.W;this.W++;a=new olympe.H.wa.Fb.Response(b,a,d,olympe.H.wa.Fb.Response.ia.pm,c);return this.publish(a)}ta(a,b){b(new olympe.H.wa.Fb.Response(this.L,this.L,a,olympe.H.wa.Fb.Response.ia.ac,{reason:'Timeout'}))}};olympe.H.wa.Fb={};olympe.H.wa.Fb.Request=class{constructor(a,b,c,d,e,f){this.G=d;this.destination=a;this.source=b;this.R=c;this.C=e;this.F=f||null}L(){return this.destination}Yc(){return this.R}la(){return{dest:this.destination,src:this.source,seq:this.G,auth:this.R,type:this.C,content:this.F}}toString(){return JSON.stringify(this)}};olympe.H.wa.Fb.Request.ia={SEND:0,GET:1,PUBLISH:2,SUBSCRIBE:3};function qi(a){const b=olympe.H.wa.Fb.Response.ia.Tq;return a.F!==olympe.H.wa.Fb.Response.ia.lm?Promise.reject('Should only call `topicAck` on TOPIC responses'):li(olympe.H.wa.Jc(),a.G,a.source,b)}olympe.H.wa.Fb.Response=class{constructor(a,b,c,d,e){this.G=c;this.destination=a;this.source=b;this.F=d;this.C=e||null}L(){return this.destination}la(){return{dest:this.destination,src:this.source,seq:this.G,type:this.F,content:this.C}}toString(){return JSON.stringify(this)}};
784
- olympe.H.wa.Fb.Response.ia={pm:0,yn:1,lm:2,Tq:3,ac:4};olympe.H.wa.fb={};const ri=olympe.H.wa.Fb.Response.ia.yn,si=olympe.H.wa.Fb.Response.ia.ac,ti=olympe.H.wa.Fb.Response.ia.pm,ui=olympe.H.wa.Fb.Response.ia.lm,vi=olympe.H.wa.Fb.Request.ia.SEND,wi=olympe.H.wa.Fb.Request.ia.GET,xi=olympe.H.wa.Fb.Request.ia.PUBLISH,yi=olympe.H.wa.Fb.Request.ia.SUBSCRIBE;
785
- olympe.H.wa.fb.tb=class{constructor(a,b){this.C=olympe.H.wa.Jc();this.F=a;this.G=new olympe.D.Zb(`Service ${a}`,'function'===typeof b.Ua?b.C.C:b);this.N=olympe.ra.Ya(`Service ${this.F}`)}listen(){return new rxjs.Observable(a=>{const b=()=>{a.complete();oi(this.C,this.F).catch(c=>this.N.error('Failed to unsubscribe from '+this.F+', error: '+c))};this.G.onDestroy(b);this.C.connect().then(()=>{mi(this.C,this.F,c=>a.next(new olympe.H.wa.fb.ha(c,this.C)))}).catch(c=>this.N.error('Failed to connect to the bus: '+
783
+ c)=>{this.C.publish(a.L(),a.la(),void 0,d=>d?c(d):b())})}te(a,b,c){return li(this,a.G,a.source,b,c)}request(a,b,c){const d=this.W;this.W++;const e=olympe.D.$a(sc(this.F));a=new olympe.H.wa.Fb.Request(a,this.L,e,d,b,c);return this.publish(a).then(()=>d)}notify(a,b,c){const d=this.W;this.W++;a=new olympe.H.wa.Fb.Response(b,a,d,olympe.H.wa.Fb.Response.ia.om,c);return this.publish(a)}ta(a,b){b(new olympe.H.wa.Fb.Response(this.L,this.L,a,olympe.H.wa.Fb.Response.ia.ac,{reason:'Timeout'}))}};olympe.H.wa.Fb={};olympe.H.wa.Fb.Request=class{constructor(a,b,c,d,e,f){this.G=d;this.destination=a;this.source=b;this.R=c;this.C=e;this.F=f||null}L(){return this.destination}Yc(){return this.R}la(){return{dest:this.destination,src:this.source,seq:this.G,auth:this.R,type:this.C,content:this.F}}toString(){return JSON.stringify(this)}};olympe.H.wa.Fb.Request.ia={SEND:0,GET:1,PUBLISH:2,SUBSCRIBE:3};function qi(a){const b=olympe.H.wa.Fb.Response.ia.Sq;return a.F!==olympe.H.wa.Fb.Response.ia.km?Promise.reject('Should only call `topicAck` on TOPIC responses'):li(olympe.H.wa.Jc(),a.G,a.source,b)}olympe.H.wa.Fb.Response=class{constructor(a,b,c,d,e){this.G=c;this.destination=a;this.source=b;this.F=d;this.C=e||null}L(){return this.destination}la(){return{dest:this.destination,src:this.source,seq:this.G,type:this.F,content:this.C}}toString(){return JSON.stringify(this)}};
784
+ olympe.H.wa.Fb.Response.ia={om:0,xn:1,km:2,Sq:3,ac:4};olympe.H.wa.fb={};const ri=olympe.H.wa.Fb.Response.ia.xn,si=olympe.H.wa.Fb.Response.ia.ac,ti=olympe.H.wa.Fb.Response.ia.om,ui=olympe.H.wa.Fb.Response.ia.km,vi=olympe.H.wa.Fb.Request.ia.SEND,wi=olympe.H.wa.Fb.Request.ia.GET,xi=olympe.H.wa.Fb.Request.ia.PUBLISH,yi=olympe.H.wa.Fb.Request.ia.SUBSCRIBE;
785
+ olympe.H.wa.fb.tb=class{constructor(a,b){this.C=olympe.H.wa.Jc();this.F=a;this.G=new olympe.D.Zb(`Service ${a}`,'function'===typeof b.Sa?b.C.C:b);this.N=olympe.ra.Ya(`Service ${this.F}`)}listen(){return new rxjs.Observable(a=>{const b=()=>{a.complete();oi(this.C,this.F).catch(c=>this.N.error('Failed to unsubscribe from '+this.F+', error: '+c))};this.G.onDestroy(b);this.C.connect().then(()=>{mi(this.C,this.F,c=>a.next(new olympe.H.wa.fb.ha(c,this.C)))}).catch(c=>this.N.error('Failed to connect to the bus: '+
786
786
  c));return b})}stop(){this.G.destroy()}static publish(a,b){const c=olympe.H.wa.Jc();return c.connect().then(()=>c.request(a,xi,b)).then(()=>Promise.resolve())}static send(a,b){return new Promise((c,d)=>{const e=olympe.H.wa.Jc();e.connect().then(()=>e.request(a,vi,b)).then(f=>{ni(e,f,g=>{switch(g.F){case ri:c();break;case si:d(g.C.reason);break;default:d('Unsupported response type for a SEND request')}})}).catch(f=>d(f))})}static get(a,b){return new Promise((c,d)=>{const e=olympe.H.wa.Jc();e.connect().then(()=>
787
- e.request(a,wi,b)).then(f=>{ni(e,f,g=>{switch(g.F){case ti:(g=g.C)?c(g):d('No payload after request to service: '+a);break;case si:d(g.C.reason);break;default:d('Unsupported response type for a GET request')}})}).catch(f=>d(f))})}static observe(a,b,c){const d='function'===typeof b.Ua?b.C.C:b;return new rxjs.Observable(e=>{const f=olympe.H.wa.Jc();let g=null;const h=()=>{e.complete();g&&oi(f,g).catch(k=>olympe.ra.Ya('Service '+a).error('Failed to unsubscribe from a topic '+k))};d.R(h);f.connect().then(()=>
787
+ e.request(a,wi,b)).then(f=>{ni(e,f,g=>{switch(g.F){case ti:(g=g.C)?c(g):d('No payload after request to service: '+a);break;case si:d(g.C.reason);break;default:d('Unsupported response type for a GET request')}})}).catch(f=>d(f))})}static observe(a,b,c){const d='function'===typeof b.Sa?b.C.C:b;return new rxjs.Observable(e=>{const f=olympe.H.wa.Jc();let g=null;const h=()=>{e.complete();g&&oi(f,g).catch(k=>olympe.ra.Ya('Service '+a).error('Failed to unsubscribe from a topic '+k))};d.R(h);f.connect().then(()=>
788
788
  f.request(a,yi,c)).then(k=>{ni(f,k,l=>{switch(l.F){case ui:g=l.C.topic;mi(f,g,n=>{n.C===xi?e.next(n.F):(e.error('Unsupported notification message. It should be a publish'),h())});qi(l).catch(n=>{e.error(`Was unable to ack the subscription: ${n}`);h()});break;case si:e.error(l.C.reason);break;default:e.error('Unsupported response type for a SUBSCRIBE request')}})}).catch(k=>e.error(k));return h})}};olympe.H.wa.fb.tb.observe=olympe.H.wa.fb.tb.observe;olympe.H.wa.fb.tb.get=olympe.H.wa.fb.tb.get;
789
- olympe.H.wa.fb.tb.send=olympe.H.wa.fb.tb.send;olympe.H.wa.fb.tb.publish=olympe.H.wa.fb.tb.publish;olympe.H.wa.fb.tb.prototype.stop=olympe.H.wa.fb.tb.prototype.stop;olympe.H.wa.fb.tb.prototype.listen=olympe.H.wa.fb.tb.prototype.listen;const zi=olympe.H.wa.Fb.Response.ia.yn,Ai=olympe.H.wa.Fb.Response.ia.ac,Bi=olympe.H.wa.Fb.Response.ia.pm,Ci=olympe.H.wa.Fb.Response.ia.lm,Di=olympe.H.wa.Fb.Response.ia.Tq,Ei=olympe.H.wa.Fb.Request.ia.SEND,Fi=olympe.H.wa.Fb.Request.ia.GET,Gi=olympe.H.wa.Fb.Request.ia.SUBSCRIBE;
790
- olympe.H.wa.fb.ha=class{constructor(a,b){this.request=a;this.C=b;this.user=null}wj(){return null!==this.user?Promise.resolve(this.user):pi(this.C,this.request).then(a=>this.user=a)}source(){return this.request.source}body(){return this.request.F}Bk(){return this.request.C===Ei?this.C.te(this.request,zi,void 0):Promise.reject('Should only call `ack` on SEND requests')}te(a){return this.request.C===Fi?this.C.te(this.request,Bi,a):Promise.reject('Should only call `reply` on GET requests')}hn(a){return this.request.C!==
791
- Gi?Promise.reject('Should only call `notifyOn` on SUBSCRIBE requests'):this.C.te(this.request,Ci,{topic:a}).then(()=>new Promise((b,c)=>{ni(this.C,this.request.G,d=>{switch(d.F){case Di:b();break;case Ai:c(d.C.reason);break;default:c('Unsupported response type for a SUBSCRIBE request')}})}))}xg(a){return this.C.te(this.request,Ai,{reason:a.message})}};olympe.H.wa.fb.ha.prototype.fail=olympe.H.wa.fb.ha.prototype.xg;olympe.H.wa.fb.ha.prototype.notifyOn=olympe.H.wa.fb.ha.prototype.hn;
792
- olympe.H.wa.fb.ha.prototype.reply=olympe.H.wa.fb.ha.prototype.te;olympe.H.wa.fb.ha.prototype.ack=olympe.H.wa.fb.ha.prototype.Bk;olympe.H.wa.fb.ha.prototype.body=olympe.H.wa.fb.ha.prototype.body;olympe.H.wa.fb.ha.prototype.source=olympe.H.wa.fb.ha.prototype.source;olympe.H.wa.fb.ha.prototype.userTag=olympe.H.wa.fb.ha.prototype.wj;olympe.H.qa={};function Hi(a,b,c,d){c.c=b;a.C.W(olympe.H.Uc.qf,c,d)}
793
- olympe.H.qa.Wa=class{constructor(a,b,c,d,e,f,g,h,k){this.N=a;this.C=b;this.F=h;this.Ua=c;this.G=g;this.storage=k;const l=this.storage.C('AUTH');l&&(l.get('redirectTo',n=>{n&&(l.remove('redirectTo'),l.close(),this.F.redirect(n,null,olympe.auth.lk.C.GET))}),l.close())}W(a){this.C.od(a)}L(a){this.C.We(a)}R(a){this.C.$d(a)}Va(a){this.C.vd(olympe.H.Uc.qf,'logoutHandler');this.C.ta(olympe.H.Uc.qf,b=>{const c=b.c;c===olympe.H.qa.Wa.C.Vt?(this.C.bc(),a(olympe.auth.pa.F.xj,b)):c===olympe.H.qa.Wa.C.Ku&&a(olympe.auth.pa.F.fp,
794
- b)},'logoutHandler')}$(a,b){Hi(this,olympe.H.qa.Wa.C.qf,{token:a.Ve()},(c,d)=>{if(null!==c)b(c);else switch(d.c){case olympe.H.qa.Wa.C.ac:b(Error('Invalid token'));break;case olympe.H.qa.Wa.C.Pi: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.zq(d,f,g,h),c.C=e):'openid'===k&&(c=new olympe.auth.Ul(d,f,g,h))}b(null,c);break;default:b(Error('Unknown response from server'))}})}ta(a,b){Hi(this,olympe.H.qa.Wa.C.it,
795
- {I:a.yd()},(c,d)=>{if(null!==c)b(c);else switch(d.c){case olympe.H.qa.Wa.C.ac:b(Error(`Username '${a.yd()}' invalid, or password does not match`));break;case olympe.H.qa.Wa.C.Tu:c=d.payload;b(null,c.S,c.B);break;default:b(Error('Unknown response from server'))}})}Ka(a,b){Hi(this,olympe.H.qa.Wa.C.js,{A:a.get('a'),M:a.get('m1'),I:a.yd()},(c,d)=>{if(null!==c)b(c);else switch(d.c){case olympe.H.qa.Wa.C.ac:this.N.debug('Login failed, invalid username or password');b(Error('Invalid username or password'));
789
+ olympe.H.wa.fb.tb.send=olympe.H.wa.fb.tb.send;olympe.H.wa.fb.tb.publish=olympe.H.wa.fb.tb.publish;olympe.H.wa.fb.tb.prototype.stop=olympe.H.wa.fb.tb.prototype.stop;olympe.H.wa.fb.tb.prototype.listen=olympe.H.wa.fb.tb.prototype.listen;const zi=olympe.H.wa.Fb.Response.ia.xn,Ai=olympe.H.wa.Fb.Response.ia.ac,Bi=olympe.H.wa.Fb.Response.ia.om,Ci=olympe.H.wa.Fb.Response.ia.km,Di=olympe.H.wa.Fb.Response.ia.Sq,Ei=olympe.H.wa.Fb.Request.ia.SEND,Fi=olympe.H.wa.Fb.Request.ia.GET,Gi=olympe.H.wa.Fb.Request.ia.SUBSCRIBE;
790
+ olympe.H.wa.fb.ha=class{constructor(a,b){this.request=a;this.C=b;this.user=null}vj(){return null!==this.user?Promise.resolve(this.user):pi(this.C,this.request).then(a=>this.user=a)}source(){return this.request.source}body(){return this.request.F}Ak(){return this.request.C===Ei?this.C.te(this.request,zi,void 0):Promise.reject('Should only call `ack` on SEND requests')}te(a){return this.request.C===Fi?this.C.te(this.request,Bi,a):Promise.reject('Should only call `reply` on GET requests')}gn(a){return this.request.C!==
791
+ Gi?Promise.reject('Should only call `notifyOn` on SUBSCRIBE requests'):this.C.te(this.request,Ci,{topic:a}).then(()=>new Promise((b,c)=>{ni(this.C,this.request.G,d=>{switch(d.F){case Di:b();break;case Ai:c(d.C.reason);break;default:c('Unsupported response type for a SUBSCRIBE request')}})}))}xg(a){return this.C.te(this.request,Ai,{reason:a.message})}};olympe.H.wa.fb.ha.prototype.fail=olympe.H.wa.fb.ha.prototype.xg;olympe.H.wa.fb.ha.prototype.notifyOn=olympe.H.wa.fb.ha.prototype.gn;
792
+ olympe.H.wa.fb.ha.prototype.reply=olympe.H.wa.fb.ha.prototype.te;olympe.H.wa.fb.ha.prototype.ack=olympe.H.wa.fb.ha.prototype.Ak;olympe.H.wa.fb.ha.prototype.body=olympe.H.wa.fb.ha.prototype.body;olympe.H.wa.fb.ha.prototype.source=olympe.H.wa.fb.ha.prototype.source;olympe.H.wa.fb.ha.prototype.userTag=olympe.H.wa.fb.ha.prototype.vj;olympe.H.qa={};function Hi(a,b,c,d){c.c=b;a.C.W(olympe.H.Uc.qf,c,d)}
793
+ olympe.H.qa.Wa=class{constructor(a,b,c,d,e,f,g,h,k){this.N=a;this.C=b;this.F=h;this.Sa=c;this.G=g;this.storage=k;const l=this.storage.C('AUTH');l&&(l.get('redirectTo',n=>{n&&(l.remove('redirectTo'),l.close(),this.F.redirect(n,null,olympe.auth.kk.C.GET))}),l.close())}W(a){this.C.od(a)}L(a){this.C.We(a)}R(a){this.C.$d(a)}Va(a){this.C.vd(olympe.H.Uc.qf,'logoutHandler');this.C.ta(olympe.H.Uc.qf,b=>{const c=b.c;c===olympe.H.qa.Wa.C.Ut?(this.C.bc(),a(olympe.auth.pa.F.wj,b)):c===olympe.H.qa.Wa.C.Ju&&a(olympe.auth.pa.F.ep,
794
+ b)},'logoutHandler')}$(a,b){Hi(this,olympe.H.qa.Wa.C.qf,{token:a.Ve()},(c,d)=>{if(null!==c)b(c);else switch(d.c){case olympe.H.qa.Wa.C.ac:b(Error('Invalid token'));break;case olympe.H.qa.Wa.C.Pi: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.yq(d,f,g,h),c.C=e):'openid'===k&&(c=new olympe.auth.Tl(d,f,g,h))}b(null,c);break;default:b(Error('Unknown response from server'))}})}ta(a,b){Hi(this,olympe.H.qa.Wa.C.ht,
795
+ {I:a.yd()},(c,d)=>{if(null!==c)b(c);else switch(d.c){case olympe.H.qa.Wa.C.ac:b(Error(`Username '${a.yd()}' invalid, or password does not match`));break;case olympe.H.qa.Wa.C.Su:c=d.payload;b(null,c.S,c.B);break;default:b(Error('Unknown response from server'))}})}Ka(a,b){Hi(this,olympe.H.qa.Wa.C.hs,{A:a.get('a'),M:a.get('m1'),I:a.yd()},(c,d)=>{if(null!==c)b(c);else switch(d.c){case olympe.H.qa.Wa.C.ac:this.N.debug('Login failed, invalid username or password');b(Error('Invalid username or password'));
796
796
  break;case olympe.H.qa.Wa.C.Pi:c=d.payload;this.N.debug('Login successful, creating token');d=c.payload?JSON.parse(c.payload):void 0;b(null,new olympe.auth.vf(c.userName,c.userTag,c.rndCook,d));break;default:b(Error(`Unknown response from server (type ${d.c})`))}})}ja(a){Hi(this,olympe.H.qa.Wa.C.Ne,{},(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'))})}da(a){const b=olympe.D.$a(olympe.auth.Jc().C.Ib());if(b instanceof
797
- olympe.auth.Ul){const c=e=>{const f=Object.create(null);f.url=e;f.olympe_token=b.Ve();f.access_token=b.Vj().access_token||null;this.F.redirect(`${this.G}/logout`,f)};a=this.F.C();const d=new URL(a);if(0!==d.hash.length||0!==d.search.length){const e=this.storage.C('AUTH');d.hash='';d.search='';e&&e.set('redirectTo',a,()=>{e.close();c(d.toString())})}else c(a)}else this.C.W(olympe.H.Uc.qf,{c:olympe.H.qa.Wa.C.Wt},a)}fi(a){this.C.W(olympe.H.Uc.qf,{c:olympe.H.qa.Wa.C.lg},a)}mh(a,b,c){this.C.Hc(this.Ua+
798
- '/'+a,olympe.H.Uc.qf,b,!1,null,(d,e)=>{c(d,e)})}Jr(){return this.G}};olympe.H.qa.Wa.C={qf:1,Wt:2,ac:3,lg:5,Pi:6,it:10,Tu:11,js:12,Ne:13,Ku:14,Vt:20};olympe.H.qa.Wa.ma=[olympe.auth.Vu,olympe.auth.Jb.qa.Gi,olympe.auth.Jb.qa.Fe,olympe.auth.Jb.qa.Ne];olympe.H.aa={};olympe.H.aa.Wc=function(){};olympe.H.aa.Wc.prototype.la=function(){};olympe.H.aa.Me=function(){};olympe.H.aa.Me.prototype.la=function(){};olympe.H.aa.bb=function(){};olympe.H.aa.bb.prototype.la=function(){};olympe.H.aa.yf=function(){};olympe.H.aa.yf.prototype.la=function(){};olympe.H.aa.gb=function(){this.Y={};this.Bb={};this.V={};this.oa=Object.create(null);var a=new olympe.H.aa.Y.Sb;this.Y[O(olympe.dc.Y.Sb)]=a;a=new olympe.H.aa.Y.Ce;this.Y[O(olympe.dc.Y.Ce)]=a;a=new olympe.H.aa.Y.Bc;this.Y[O(olympe.dc.Y.Bc)]=a;this.Y[O(olympe.dc.Y.Hd)]=new olympe.H.aa.Y.Hd;this.Y[O(olympe.dc.Y.rc)]=new olympe.H.aa.Y.rc;this.Y[O(olympe.dc.Y.Xd)]=new olympe.H.aa.Y.Xd;this.Y[O(olympe.dc.Y.xe)]=new olympe.H.aa.Y.xe;a=new olympe.H.aa.Bb.Number;this.Bb[O(olympe.dc.Bb.Number)]=a;a=new olympe.H.aa.Bb.String;
797
+ olympe.auth.Tl){const c=e=>{const f=Object.create(null);f.url=e;f.olympe_token=b.Ve();f.access_token=b.Uj().access_token||null;this.F.redirect(`${this.G}/logout`,f)};a=this.F.C();const d=new URL(a);if(0!==d.hash.length||0!==d.search.length){const e=this.storage.C('AUTH');d.hash='';d.search='';e&&e.set('redirectTo',a,()=>{e.close();c(d.toString())})}else c(a)}else this.C.W(olympe.H.Uc.qf,{c:olympe.H.qa.Wa.C.Vt},a)}fi(a){this.C.W(olympe.H.Uc.qf,{c:olympe.H.qa.Wa.C.lg},a)}mh(a,b,c){this.C.Hc(this.Sa+
798
+ '/'+a,olympe.H.Uc.qf,b,!1,null,(d,e)=>{c(d,e)})}Ir(){return this.G}};olympe.H.qa.Wa.C={qf:1,Vt:2,ac:3,lg:5,Pi:6,ht:10,Su:11,hs:12,Ne:13,Ju:14,Ut:20};olympe.H.qa.Wa.ma=[olympe.auth.Uu,olympe.auth.Jb.qa.Gi,olympe.auth.Jb.qa.Fe,olympe.auth.Jb.qa.Ne];olympe.H.aa={};olympe.H.aa.Wc=function(){};olympe.H.aa.Wc.prototype.la=function(){};olympe.H.aa.Me=function(){};olympe.H.aa.Me.prototype.la=function(){};olympe.H.aa.bb=function(){};olympe.H.aa.bb.prototype.la=function(){};olympe.H.aa.yf=function(){};olympe.H.aa.yf.prototype.la=function(){};olympe.H.aa.gb=function(){this.Y={};this.Bb={};this.V={};this.oa=Object.create(null);var a=new olympe.H.aa.Y.Sb;this.Y[O(olympe.dc.Y.Sb)]=a;a=new olympe.H.aa.Y.Ce;this.Y[O(olympe.dc.Y.Ce)]=a;a=new olympe.H.aa.Y.Bc;this.Y[O(olympe.dc.Y.Bc)]=a;this.Y[O(olympe.dc.Y.Hd)]=new olympe.H.aa.Y.Hd;this.Y[O(olympe.dc.Y.rc)]=new olympe.H.aa.Y.rc;this.Y[O(olympe.dc.Y.Xd)]=new olympe.H.aa.Y.Xd;this.Y[O(olympe.dc.Y.xe)]=new olympe.H.aa.Y.xe;a=new olympe.H.aa.Bb.Number;this.Bb[O(olympe.dc.Bb.Number)]=a;a=new olympe.H.aa.Bb.String;
799
799
  this.Bb[O(olympe.dc.Bb.String)]=a;a=new olympe.H.aa.V.Fc;this.V[O(olympe.dc.V.Fc)]=a;this.V[O(olympe.dc.V.ze)]=new olympe.H.aa.V.ze;this.V[O(olympe.dc.V.Ge)]=new olympe.H.aa.V.Ge;a=new olympe.H.aa.V.Sc;this.V[O(olympe.dc.V.Sc)]=a;a=new olympe.H.aa.V.ud;this.V[O(olympe.dc.V.ud)]=a;this.V[O(olympe.dc.V.jd)]=new olympe.H.aa.V.jd;a=new olympe.H.aa.V.lf;this.V[O(olympe.dc.V.lf)]=a;a=new olympe.H.aa.V.mf;this.V[O(olympe.dc.V.mf)]=a;this.oa[O(olympe.dc.oa.Bd)]=new olympe.H.aa.oa.Bd;a=new olympe.H.aa.oa.le;
800
800
  this.oa[O(olympe.dc.oa.le)]=a;a=new olympe.H.aa.oa.pe;this.oa[O(olympe.dc.oa.pe)]=a;a=new olympe.H.aa.oa.ue;this.oa[O(olympe.dc.oa.ue)]=a;a=new olympe.H.aa.oa.je;this.oa[O(olympe.dc.oa.je)]=a;this.oa[O(olympe.dc.oa.uf)]=new olympe.H.aa.oa.uf};olympe.H.aa.gb.prototype.constructor=olympe.H.aa.gb;function Ii(a,b,c){var d=b.na(),e=a.V[d];if(void 0===e)throw Error('No predicate registered for predicate: '+d);return e.la(b,c,a)}
801
801
  function Ji(a,b,c){var d=b.na(),e=a.oa[d];if(void 0===e)throw Error('No valueDef registered for valueDef: '+d);return e.la(b,c,a)}
802
- function Ki(a,b){return a&&a.zf?'"$'+b.add(a)+'"':a instanceof olympe.D.sa||a instanceof olympe.D.ga?String(a):a instanceof olympe.D.Za?'"'+a+'"':a instanceof olympe.D.ib?(a=a.$r(),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.D.Color?'{"c":7,"r":'+a.Qf().valueOf()+',"g":'+a.Kf().valueOf()+',"b":'+a.Ff().valueOf()+',"a":'+a.Ef().valueOf()+
803
- '}':a instanceof olympe.dc.Cc?'{"c":8,"t":"'+a.T()+'"}':JSON.stringify(a)};olympe.H.aa.Pj=class{la(a){const b=Object.create(null);b.i=a.Z();b.b=[a.C];b.m=!0;b.v=!0;b.f=a instanceof olympe.dc.query.Dl?cf(a.nh):olympe.dc.Qb.NONE;b.q=uf(a).map(this.C.bind(this));return b}C(a){const b=a.Nd(),c=b.Ra()===olympe.dc.Ca.ORIGIN?olympe.H.aa.Y.Sb.C.Ei:olympe.H.aa.Y.Sb.C.Mi,d=Object.create(null);d.t=b.T();d.d=c;d.v=a.apply;d.r=b.recursive;d.q=a.jh().map(this.C.bind(this));return d}};olympe.H.aa.Y={};olympe.H.aa.Y.xe=class{la(){return'{"y":15}'}};olympe.H.aa.Y.xe.ma=[olympe.H.aa.Wc];olympe.H.aa.Y.rc=function(){};olympe.H.aa.Y.rc.prototype.constructor=olympe.H.aa.Y.rc;olympe.H.aa.Y.rc.prototype.la=function(a,b,c){return'{"y":21,"p":'+Ii(c,a.C,b)+'}'};olympe.H.aa.Y.rc.ma=[olympe.H.aa.Wc];olympe.H.aa.Y.Ce=function(){};olympe.H.aa.Y.Ce.prototype.constructor=olympe.H.aa.Y.Ce;olympe.H.aa.Y.Ce.prototype.la=function(a){var b=null!==a.Ra()?a.Ra()===olympe.dc.Ca.ORIGIN?olympe.H.aa.Y.Sb.C.Ei:olympe.H.aa.Y.Sb.C.Mi:olympe.H.aa.Y.Sb.C.Kn;return'{"y":12,"t":'+JSON.stringify(ih(a))+',"d":'+b+'}'};olympe.H.aa.Y.Ce.ma=[olympe.H.aa.Wc];olympe.H.aa.Y.Bc=function(){};olympe.H.aa.Y.Bc.prototype.constructor=olympe.H.aa.Y.Bc;olympe.H.aa.Y.Bc.prototype.la=function(a){const b=null!==a.Ra()?a.Ra()===olympe.dc.Ca.ORIGIN?olympe.H.aa.Y.Sb.C.Ei:olympe.H.aa.Y.Sb.C.Mi:olympe.H.aa.Y.Sb.C.Kn;return'{"y":11,"t":"'+a.T()+'","d":'+b+',"s":'+a.F+',"e":'+a.C+'}'};olympe.H.aa.Y.Bc.ma=[olympe.H.aa.Wc];olympe.H.aa.Y.Sb=function(){};olympe.H.aa.Y.Sb.C={Kn:0,Ei:1,Mi:2};olympe.H.aa.Y.Sb.prototype.constructor=olympe.H.aa.Y.Sb;olympe.H.aa.Y.Sb.prototype.la=function(a){const b=a.Ra()===olympe.dc.Ca.ORIGIN?olympe.H.aa.Y.Sb.C.Ei:olympe.H.aa.Y.Sb.C.Mi;return'{"y":10,"t":"'+a.T()+'","d":'+b+'}'};olympe.H.aa.Y.Sb.ma=[olympe.H.aa.Wc];olympe.H.aa.Y.Hd=function(){};olympe.H.aa.Y.Hd.prototype.constructor=olympe.H.aa.Y.Hd;olympe.H.aa.Y.Hd.prototype.la=function(a,b,c){var d=a.Id;const e=d.na();var f=c.Bb[e];if(void 0===f)throw Error('No comparator registered for comparator: '+e);return'{"y":20,"o":'+f.la(d,b,c)+(a.C?'':',"a":false')+'}'};olympe.H.aa.Y.Hd.ma=[olympe.H.aa.Wc];olympe.H.aa.Y.Xd=function(){};olympe.H.aa.Y.Xd.prototype.constructor=olympe.H.aa.Y.Xd;olympe.H.aa.Y.Xd.prototype.la=function(a,b){var c=a.start;c=c&&c.zf?'"$'+b.add(c)+'"':JSON.stringify(c);a=(a=a.C)&&a.zf?'"$'+b.add(a)+'"':JSON.stringify(a);return'{"y":22,"s":'+c+',"n":'+a+'}'};olympe.H.aa.Y.Xd.ma=[olympe.H.aa.Wc];olympe.H.aa.Bb={};olympe.H.aa.Bb.Number=class{constructor(){}la(a,b,c){return`{"y":11,"v":${Ji(c,a.C,b)}}`}};olympe.H.aa.Bb.Number.ma=[olympe.H.aa.Me];olympe.H.aa.Bb.String=class{constructor(){}la(a,b,c){return`{"y":10,"v":${Ji(c,a.C,b)}}`}};olympe.H.aa.Bb.String.ma=[olympe.H.aa.Me];olympe.H.aa.V={};olympe.H.aa.V.Sc=function(){};olympe.H.aa.V.Sc.prototype.constructor=olympe.H.aa.V.Sc;olympe.H.aa.V.Sc.prototype.la=function(a,b,c){const d=Ji(c,a.source,b);c=Ji(c,a.getValue(),b);a=Ki(a.G,b);return'{"y":20,"s":'+d+',"v":'+c+',"a":'+a+'}'};olympe.H.aa.V.Sc.ma=[olympe.H.aa.bb];olympe.H.aa.V.Fc=function(){};olympe.H.aa.V.Fc.prototype.constructor=olympe.H.aa.V.Fc;olympe.H.aa.V.Fc.prototype.la=function(a,b,c){const d=Ji(c,a.G,b);a=Ji(c,a.L,b);return'{"y":10,"l":'+d+',"r":'+a+'}'};olympe.H.aa.V.Fc.ma=[olympe.H.aa.bb];olympe.H.aa.V.ze=function(){};olympe.H.aa.V.ze.prototype.constructor=olympe.H.aa.V.ze;olympe.H.aa.V.ze.prototype.la=function(a,b,c){const d=Ji(c,a.G,b);a=Ji(c,a.L,b);return'{"y":11,"l":'+d+',"r":'+a+'}'};olympe.H.aa.V.ze.ma=[olympe.H.aa.bb];olympe.H.aa.V.lf=class{la(a){const b=ch(a).map(d=>'"'+d+'"'),c=dh(a).map(d=>d===olympe.dc.Ca.DESTINATION?'2':'1');a=a.G;return'{"y":81,"r":['+b.toString()+'],"d":['+c.toString()+']'+(0!==a.length?',"t":"'+a.toString()+'"':'')+'}'}};olympe.H.aa.V.lf.ma=[olympe.H.aa.bb];olympe.H.aa.V.mf=class{la(a){return'{"y":80,"m":['+Array.from(a.G).map(b=>'"'+b+'"').toString()+']}'}};olympe.H.aa.V.mf.ma=[olympe.H.aa.bb];olympe.H.aa.V.jd=class{la(a,b,c){return'{"y":30,"p":'+Ii(c,a.G,b)+'}'}};olympe.H.aa.V.jd.ma=[olympe.H.aa.bb];olympe.H.aa.V.ud=class{la(a,b,c){c=Ji(c,a.source,b);const d=a.L;a=Ki(a.G,b);return'{"y":23,"s":'+c+',"r":"'+d+'","a":'+a+'}'}};olympe.H.aa.V.ud.ma=[olympe.H.aa.bb];olympe.H.aa.V.Ge=function(){};olympe.H.aa.V.Ge.prototype.constructor=olympe.H.aa.V.Ge;olympe.H.aa.V.Ge.prototype.la=function(a,b,c){var d=Ji(c,a.G,b);a=Ji(c,a.L,b);return'{"y":12,"l":'+d+',"r":'+a+'}'};olympe.H.aa.V.Ge.ma=[olympe.H.aa.bb];olympe.H.aa.oa={};olympe.H.aa.oa.Lc=function(){};olympe.H.aa.oa.Lc.prototype.constructor=olympe.H.aa.oa.Lc;olympe.H.aa.oa.Lc.prototype.C=function(){};
804
- olympe.H.aa.oa.Lc.prototype.la=function(a,b,c){var d=Ki(a.Ze,b),e=a.Ld();e=e?',"b":'+Ki(e,b):'';if(a=a.Cg()){var f='[';for(let n=0,p=a.length;n<p;n++){var g=0===n?'':',';var h=c;var k=a[n],l=b;const q=k.na(),r=h.Y[q];if(void 0===r)throw Error('No serializer registered for transformer: '+q);h=r.la(k,l,h);f+=g+h}b=',"q":'+(f+']')}else b='';return'{"y":'+this.C()+',"t":'+d+e+b+'}'};olympe.H.aa.oa.Lc.ma=[olympe.H.aa.yf];olympe.H.aa.oa.ue=function(){olympe.H.aa.oa.Lc.call(this)};olympe.H.aa.oa.ue.prototype=Object.create(olympe.H.aa.oa.Lc.prototype);olympe.H.aa.oa.ue.prototype.constructor=olympe.H.aa.oa.ue;olympe.H.aa.oa.ue.prototype.C=function(){return 13};olympe.H.aa.oa.Bd=class{la(a,b){return'{"y":10,"v":'+Ki(a.value,b)+'}'}};olympe.H.aa.oa.Bd.ma=[olympe.H.aa.yf];olympe.H.aa.oa.je=function(){olympe.H.aa.oa.Lc.call(this)};olympe.H.aa.oa.je.prototype=Object.create(olympe.H.aa.oa.Lc.prototype);olympe.H.aa.oa.je.prototype.constructor=olympe.H.aa.oa.je;olympe.H.aa.oa.je.prototype.C=function(){return 14};olympe.H.aa.oa.le=function(){olympe.H.aa.oa.Lc.call(this)};olympe.H.aa.oa.le.prototype=Object.create(olympe.H.aa.oa.Lc.prototype);olympe.H.aa.oa.le.prototype.constructor=olympe.H.aa.oa.le;olympe.H.aa.oa.le.prototype.C=function(){return 11};olympe.H.aa.oa.pe=function(){olympe.H.aa.oa.Lc.call(this)};olympe.H.aa.oa.pe.prototype=Object.create(olympe.H.aa.oa.Lc.prototype);olympe.H.aa.oa.pe.prototype.constructor=olympe.H.aa.oa.pe;olympe.H.aa.oa.pe.prototype.C=function(){return 12};olympe.H.aa.oa.uf=class{la(){return'{"y":19}'}};olympe.H.aa.oa.uf.ma=[olympe.H.aa.yf];olympe.H.pd={};function Li(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.ta(olympe.H.Uc.ac,c=>{switch(c.c){case olympe.H.ia.hv:a.N.error('Unknown message sent to the server:',olympe.H.pa.F[c.s]);break;case olympe.H.ia.Vs:a.N.error('Fatal error, the last message is probably too big according to the websocket config.'),a.G.forEach((d,e)=>{null!==d.qn&&Mi(a,e,c.i)})}});b.get('autoConnect')&&(a.N.debug('Connecting automatically'),
805
- a.connect());olympe.D.Xm(a.R.Ib(),()=>{a.ph.forEach(c=>c());Kb(a.en.bind(a),a.iy);Kb(a.Kd.bind(a),a.be)},()=>{a.$=null;a.fe.forEach(c=>c(a.L[2]));a.Kd()});a.N.log('DONE initializing SERVER layer (waiting for NET layer connection to be opened)')}
806
- function Z(a,b){if(a.C!==b){a.N.debug('State change '+a.C+' --\x3e '+b);a.C=b;var c;null==(c=a.Ok)||c.call(a,b);switch(b){case olympe.H.pa.C.CONNECTING:break;case olympe.H.pa.C.pi:a.R.update(olympe.D.sa.F);break;case olympe.H.pa.C.Xg:a.L[0]=0;a.L[1]=0;a.connect();break;case olympe.H.pa.C.ac:a.N.error('Connection to server',a.ja.C(),'aborted due to error');a.R.update(olympe.D.sa.C);break;case olympe.H.pa.C.Th:break;case olympe.H.pa.C.sh:a.connect();break;case olympe.H.pa.C.hg:a.R.update(olympe.D.sa.C);
802
+ function Ki(a,b){return a&&a.zf?'"$'+b.add(a)+'"':a instanceof olympe.D.sa||a instanceof olympe.D.ga?String(a):a instanceof olympe.D.Za?'"'+a+'"':a instanceof olympe.D.ib?(a=a.Zr(),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.D.Color?'{"c":7,"r":'+a.Qf().valueOf()+',"g":'+a.Kf().valueOf()+',"b":'+a.Ff().valueOf()+',"a":'+a.Ef().valueOf()+
803
+ '}':a instanceof olympe.dc.Cc?'{"c":8,"t":"'+a.T()+'"}':JSON.stringify(a)};olympe.H.aa.Oj=class{la(a){const b=Object.create(null);b.i=a.Z();b.b=[a.C];b.m=!0;b.v=!0;b.f=a instanceof olympe.dc.query.Cl?cf(a.nh):olympe.dc.Qb.NONE;b.q=uf(a).map(this.C.bind(this));return b}C(a){const b=a.Nd(),c=b.Ra()===olympe.dc.Ca.ORIGIN?olympe.H.aa.Y.Sb.C.Ei:olympe.H.aa.Y.Sb.C.Mi,d=Object.create(null);d.t=b.T();d.d=c;d.v=a.apply;d.r=b.recursive;d.q=a.jh().map(this.C.bind(this));return d}};olympe.H.aa.Y={};olympe.H.aa.Y.xe=class{la(){return'{"y":15}'}};olympe.H.aa.Y.xe.ma=[olympe.H.aa.Wc];olympe.H.aa.Y.rc=function(){};olympe.H.aa.Y.rc.prototype.constructor=olympe.H.aa.Y.rc;olympe.H.aa.Y.rc.prototype.la=function(a,b,c){return'{"y":21,"p":'+Ii(c,a.C,b)+'}'};olympe.H.aa.Y.rc.ma=[olympe.H.aa.Wc];olympe.H.aa.Y.Ce=function(){};olympe.H.aa.Y.Ce.prototype.constructor=olympe.H.aa.Y.Ce;olympe.H.aa.Y.Ce.prototype.la=function(a){var b=null!==a.Ra()?a.Ra()===olympe.dc.Ca.ORIGIN?olympe.H.aa.Y.Sb.C.Ei:olympe.H.aa.Y.Sb.C.Mi:olympe.H.aa.Y.Sb.C.Jn;return'{"y":12,"t":'+JSON.stringify(ih(a))+',"d":'+b+'}'};olympe.H.aa.Y.Ce.ma=[olympe.H.aa.Wc];olympe.H.aa.Y.Bc=function(){};olympe.H.aa.Y.Bc.prototype.constructor=olympe.H.aa.Y.Bc;olympe.H.aa.Y.Bc.prototype.la=function(a){const b=null!==a.Ra()?a.Ra()===olympe.dc.Ca.ORIGIN?olympe.H.aa.Y.Sb.C.Ei:olympe.H.aa.Y.Sb.C.Mi:olympe.H.aa.Y.Sb.C.Jn;return'{"y":11,"t":"'+a.T()+'","d":'+b+',"s":'+a.F+',"e":'+a.C+'}'};olympe.H.aa.Y.Bc.ma=[olympe.H.aa.Wc];olympe.H.aa.Y.Sb=function(){};olympe.H.aa.Y.Sb.C={Jn:0,Ei:1,Mi:2};olympe.H.aa.Y.Sb.prototype.constructor=olympe.H.aa.Y.Sb;olympe.H.aa.Y.Sb.prototype.la=function(a){const b=a.Ra()===olympe.dc.Ca.ORIGIN?olympe.H.aa.Y.Sb.C.Ei:olympe.H.aa.Y.Sb.C.Mi;return'{"y":10,"t":"'+a.T()+'","d":'+b+'}'};olympe.H.aa.Y.Sb.ma=[olympe.H.aa.Wc];olympe.H.aa.Y.Hd=function(){};olympe.H.aa.Y.Hd.prototype.constructor=olympe.H.aa.Y.Hd;olympe.H.aa.Y.Hd.prototype.la=function(a,b,c){var d=a.Id;const e=d.na();var f=c.Bb[e];if(void 0===f)throw Error('No comparator registered for comparator: '+e);return'{"y":20,"o":'+f.la(d,b,c)+(a.C?'':',"a":false')+'}'};olympe.H.aa.Y.Hd.ma=[olympe.H.aa.Wc];olympe.H.aa.Y.Xd=function(){};olympe.H.aa.Y.Xd.prototype.constructor=olympe.H.aa.Y.Xd;olympe.H.aa.Y.Xd.prototype.la=function(a,b){var c=a.start;c=c&&c.zf?'"$'+b.add(c)+'"':JSON.stringify(c);a=(a=a.C)&&a.zf?'"$'+b.add(a)+'"':JSON.stringify(a);return'{"y":22,"s":'+c+',"n":'+a+'}'};olympe.H.aa.Y.Xd.ma=[olympe.H.aa.Wc];olympe.H.aa.Bb={};olympe.H.aa.Bb.Number=class{constructor(){}la(a,b,c){return`{"y":11,"v":${Ji(c,a.C,b)}}`}};olympe.H.aa.Bb.Number.ma=[olympe.H.aa.Me];olympe.H.aa.Bb.String=class{constructor(){}la(a,b,c){return`{"y":10,"v":${Ji(c,a.C,b)}}`}};olympe.H.aa.Bb.String.ma=[olympe.H.aa.Me];olympe.H.aa.V={};olympe.H.aa.V.Sc=function(){};olympe.H.aa.V.Sc.prototype.constructor=olympe.H.aa.V.Sc;olympe.H.aa.V.Sc.prototype.la=function(a,b,c){const d=Ji(c,a.source,b);c=Ji(c,a.getValue(),b);a=Ki(a.G,b);return'{"y":20,"s":'+d+',"v":'+c+',"a":'+a+'}'};olympe.H.aa.V.Sc.ma=[olympe.H.aa.bb];olympe.H.aa.V.Fc=function(){};olympe.H.aa.V.Fc.prototype.constructor=olympe.H.aa.V.Fc;olympe.H.aa.V.Fc.prototype.la=function(a,b,c){const d=Ji(c,a.G,b);a=Ji(c,a.L,b);return'{"y":10,"l":'+d+',"r":'+a+'}'};olympe.H.aa.V.Fc.ma=[olympe.H.aa.bb];olympe.H.aa.V.ze=function(){};olympe.H.aa.V.ze.prototype.constructor=olympe.H.aa.V.ze;olympe.H.aa.V.ze.prototype.la=function(a,b,c){const d=Ji(c,a.G,b);a=Ji(c,a.L,b);return'{"y":11,"l":'+d+',"r":'+a+'}'};olympe.H.aa.V.ze.ma=[olympe.H.aa.bb];olympe.H.aa.V.lf=class{la(a){const b=ch(a).map(d=>'"'+d+'"'),c=dh(a).map(d=>d===olympe.dc.Ca.DESTINATION?'2':'1');a=a.G;return'{"y":81,"r":['+b.toString()+'],"d":['+c.toString()+']'+(0!==a.length?',"t":"'+a.toString()+'"':'')+'}'}};olympe.H.aa.V.lf.ma=[olympe.H.aa.bb];olympe.H.aa.V.mf=class{la(a){return'{"y":80,"m":['+Array.from(a.G).map(b=>'"'+b+'"').toString()+']}'}};olympe.H.aa.V.mf.ma=[olympe.H.aa.bb];olympe.H.aa.V.jd=class{la(a,b,c){return'{"y":30,"p":'+Ii(c,a.G,b)+'}'}};olympe.H.aa.V.jd.ma=[olympe.H.aa.bb];olympe.H.aa.V.ud=class{la(a,b,c){c=Ji(c,a.source,b);const d=a.L;a=Ki(a.G,b);return'{"y":23,"s":'+c+',"r":"'+d+'","a":'+a+'}'}};olympe.H.aa.V.ud.ma=[olympe.H.aa.bb];olympe.H.aa.V.Ge=function(){};olympe.H.aa.V.Ge.prototype.constructor=olympe.H.aa.V.Ge;olympe.H.aa.V.Ge.prototype.la=function(a,b,c){var d=Ji(c,a.G,b);a=Ji(c,a.L,b);return'{"y":12,"l":'+d+',"r":'+a+'}'};olympe.H.aa.V.Ge.ma=[olympe.H.aa.bb];olympe.H.aa.oa={};olympe.H.aa.oa.Lc=function(){};olympe.H.aa.oa.Lc.prototype.constructor=olympe.H.aa.oa.Lc;olympe.H.aa.oa.Lc.prototype.C=function(){};
804
+ olympe.H.aa.oa.Lc.prototype.la=function(a,b,c){var d=Ki(a.Ze,b),e=a.Ld();e=e?',"b":'+Ki(e,b):'';if(a=a.Cg()){var f='[';for(let n=0,p=a.length;n<p;n++){var g=0===n?'':',';var h=c;var k=a[n],l=b;const q=k.na(),r=h.Y[q];if(void 0===r)throw Error('No serializer registered for transformer: '+q);h=r.la(k,l,h);f+=g+h}b=',"q":'+(f+']')}else b='';return'{"y":'+this.C()+',"t":'+d+e+b+'}'};olympe.H.aa.oa.Lc.ma=[olympe.H.aa.yf];olympe.H.aa.oa.ue=function(){olympe.H.aa.oa.Lc.call(this)};olympe.H.aa.oa.ue.prototype=Object.create(olympe.H.aa.oa.Lc.prototype);olympe.H.aa.oa.ue.prototype.constructor=olympe.H.aa.oa.ue;olympe.H.aa.oa.ue.prototype.C=function(){return 13};olympe.H.aa.oa.Bd=class{la(a,b){return'{"y":10,"v":'+Ki(a.value,b)+'}'}};olympe.H.aa.oa.Bd.ma=[olympe.H.aa.yf];olympe.H.aa.oa.je=function(){olympe.H.aa.oa.Lc.call(this)};olympe.H.aa.oa.je.prototype=Object.create(olympe.H.aa.oa.Lc.prototype);olympe.H.aa.oa.je.prototype.constructor=olympe.H.aa.oa.je;olympe.H.aa.oa.je.prototype.C=function(){return 14};olympe.H.aa.oa.le=function(){olympe.H.aa.oa.Lc.call(this)};olympe.H.aa.oa.le.prototype=Object.create(olympe.H.aa.oa.Lc.prototype);olympe.H.aa.oa.le.prototype.constructor=olympe.H.aa.oa.le;olympe.H.aa.oa.le.prototype.C=function(){return 11};olympe.H.aa.oa.pe=function(){olympe.H.aa.oa.Lc.call(this)};olympe.H.aa.oa.pe.prototype=Object.create(olympe.H.aa.oa.Lc.prototype);olympe.H.aa.oa.pe.prototype.constructor=olympe.H.aa.oa.pe;olympe.H.aa.oa.pe.prototype.C=function(){return 12};olympe.H.aa.oa.uf=class{la(){return'{"y":19}'}};olympe.H.aa.oa.uf.ma=[olympe.H.aa.yf];olympe.H.pd={};function Li(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.ta(olympe.H.Uc.ac,c=>{switch(c.c){case olympe.H.ia.gv:a.N.error('Unknown message sent to the server:',olympe.H.pa.F[c.s]);break;case olympe.H.ia.Us:a.N.error('Fatal error, the last message is probably too big according to the websocket config.'),a.G.forEach((d,e)=>{null!==d.pn&&Mi(a,e,c.i)})}});b.get('autoConnect')&&(a.N.debug('Connecting automatically'),
805
+ a.connect());olympe.D.Wm(a.R.Ib(),()=>{a.ph.forEach(c=>c());Kb(a.dn.bind(a),a.hy);Kb(a.Kd.bind(a),a.be)},()=>{a.$=null;a.fe.forEach(c=>c(a.L[2]));a.Kd()});a.N.log('DONE initializing SERVER layer (waiting for NET layer connection to be opened)')}
806
+ function Z(a,b){if(a.C!==b){a.N.debug('State change '+a.C+' --\x3e '+b);a.C=b;var c;null==(c=a.Nk)||c.call(a,b);switch(b){case olympe.H.pa.C.CONNECTING:break;case olympe.H.pa.C.pi:a.R.update(olympe.D.sa.F);break;case olympe.H.pa.C.Xg:a.L[0]=0;a.L[1]=0;a.connect();break;case olympe.H.pa.C.ac:a.N.error('Connection to server',a.ja.C(),'aborted due to error');a.R.update(olympe.D.sa.C);break;case olympe.H.pa.C.Th:break;case olympe.H.pa.C.sh:a.connect();break;case olympe.H.pa.C.hg:a.R.update(olympe.D.sa.C);
807
807
  a.Hb&&(a.N.info('Disconnected, will try to auto reconnect in',a.Vb,'ms'),Jb(()=>{a.connect()},a.Vb));break;default:throw Error('State machine error in server manager. Should not get in state '+b);}}}
808
- function Ni(a,b){const c=olympe.H.pa.L.Pi,d=olympe.H.pa.L.eu;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.pa.F[g]?`Status code = ${g} [${olympe.H.pa.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}`);
809
- h=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)}}}function Oi(a,b,c){var d=c.message;a.N.G()&&a.N.debug('>',Pi(d));(d=a.F.send(JSON.stringify(d)))?null===c.Wh?a.G.delete(b):c.qn=Date.now():Z(a,olympe.H.pa.C.Xg);return d}
810
- function Pi(a){var b=JSON.parse(JSON.stringify(a));a=olympe.X.Hr;const c=b.messageFamily,d=a(olympe.H.Uc,c),e=b.payload;b='';switch(c){case olympe.H.Uc.ri:b=a(olympe.dc.ha.ia,e.c);break;case olympe.H.Uc.ac:b=a(olympe.H.ia,e.c);break;case olympe.H.Uc.qf:b=a(olympe.H.qa.Wa.C,e.c);break;case olympe.H.Uc.Bi:2===e.c&&(b=a(olympe.H.pa.G,e.status))}a=`${d} message`;b&&0<b.length&&(a+=` with payload "${b}"`);return a}
808
+ function Ni(a,b){const c=olympe.H.pa.L.Pi,d=olympe.H.pa.L.du;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.pa.F[g]?`Status code = ${g} [${olympe.H.pa.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}`);
809
+ h=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)}}}function Oi(a,b,c){var d=c.message;a.N.G()&&a.N.debug('>',Pi(d));(d=a.F.send(JSON.stringify(d)))?null===c.Wh?a.G.delete(b):c.pn=Date.now():Z(a,olympe.H.pa.C.Xg);return d}
810
+ function Pi(a){var b=JSON.parse(JSON.stringify(a));a=olympe.X.Gr;const c=b.messageFamily,d=a(olympe.H.Uc,c),e=b.payload;b='';switch(c){case olympe.H.Uc.ri:b=a(olympe.dc.ha.ia,e.c);break;case olympe.H.Uc.ac:b=a(olympe.H.ia,e.c);break;case olympe.H.Uc.qf:b=a(olympe.H.qa.Wa.C,e.c);break;case olympe.H.Uc.Bi:2===e.c&&(b=a(olympe.H.pa.G,e.status))}a=`${d} message`;b&&0<b.length&&(a+=` with payload "${b}"`);return a}
811
811
  function Mi(a,b,c){if(a.G.has(b)){const {Wh:d}=a.G.get(b);a.G.delete(b);d&&d({s:23,info:c})}}function Qi(a,b){a.N.error(b);Z(a,olympe.H.pa.C.ac)}function Ri(a,b,c){a.N.info('Connected to',a.ja.C(),' | ',b?'server version:'+b:'',null!==c?`activity timeout: ${c}s`:'');b=Array.from(a.G).sort(([d],[e])=>d-e);for(const [d,e]of b)if(!Oi(a,d,e))return;Z(a,olympe.H.pa.C.pi)}
812
- olympe.H.pd.pa=class{constructor(a,b,c,d,e){this.N=a;this.qb=b;this.ja=c;this.F=null;this.config=e;this.Vb=this.config.get('reconnectionDelay');this.Ua=d;this.Ok=null;this.iy=this.config.get('pingInterval');this.ny=this.Vb/2;this.Hb=e.get('autoConnect');this.oy=e.get('retryHttpOverload');this.be=e.get('messageTimeout');this.da=La(e.get('clientVersion'));this.Va=La(e.get('serverVersion'));this.C=olympe.H.pa.C.INIT;this.zc=e.get('getContextMode');this.lj=1;this.$=null;this.L=[0,0,0];this.Ka=new Map;
813
- this.R=olympe.D.Qc(olympe.D.sa,'Server is online');this.ph=new Map;this.fe=new Map;this.G=new Map;this.Vx=new Map;Li(this,e)}Ab(){return this.C===olympe.H.pa.C.pi}connect(){const a=olympe.H.pa.C.INIT,b=olympe.H.pa.C.CONNECTING,c=olympe.H.pa.C.pi,d=olympe.H.pa.C.hg,e=olympe.H.pa.C.Xg,f=olympe.H.pa.C.Th,g=olympe.H.pa.C.sh,h=olympe.H.pa.C.ac;null!==this.F&&(this.F.$(null),this.F.close());this.Hb=!0;this.N.log(`Asking NET layer for a connection to ${Mb(this.ja)}:${this.ja.port}...`);this.F=this.qb.G(this.ja);
814
- this.F.ja(this.bc.bind(this));this.F.da(this.Xc.bind(this));this.F.$(()=>{this.F=null;this.C===c?Z(this,e):this.C!==h&&this.C!==f&&Z(this,d)});this.Ua&&this.C===a&&this.F.F(()=>{this.F.F(null);if(this.C===b){var k=Nb(this.Ua);this.N.info(`Trying to wakeup orchestrator with ${k}`);Z(this,f);var l=this.qb.G(this.Ua);l.da(n=>{const p=JSON.parse(n);this.N.info(`${k}: ${null==p?void 0:p.status}`);switch(null==p?void 0:p.status){case 'ready':Z(this,g);l.close();break;case 'asleep':this.N.info(`Trying to wakeup orchestrator with ${k}`);
815
- l.send('{"action": "wakeup"}');Z(this,f);break;case 'waking-up':break;default:this.N.warn(`Invalid message from ${k}: ${n}`),l.close(),Z(this,d)}});l.F(()=>{this.N.warn(`Communication with ${k} failed.`);l.close();Z(this,d)});l.ja(()=>{this.N.info(`Checking orchestrator status with ${k}`);l.send('{"action": "status"}')})}this.Ua=null});this.C!==e&&Z(this,b)}disconnect(){const a=olympe.H.pa.C.CONNECTING;if(this.C===olympe.H.pa.C.pi||this.C===a)this.Hb=!1,Z(this,olympe.H.pa.C.hg)}od(a){const b=olympe.X.ec();
816
- this.ph.set(b,a);olympe.D.$a(this.R)===olympe.D.sa.F&&a()}We(a){var b;void 0===b&&(b=olympe.X.ec());this.fe.set(b,a);olympe.D.$a(this.R)===olympe.D.sa.C&&a(this.L[2])}bc(){this.N.debug('Websocket connected, sending handshake. Client version:',Ma(this.da),'subscribeEverything:',this.zc?'NO':'YES');this.W(olympe.H.Uc.Bi,{c:olympe.H.ia.Bi,cv:Ma(this.da),m:this.zc?0:1,s:this.$},this.Nx.bind(this))}W(a,b,c){const d=this.lj;this.lj++;b={message:{seqId:d,messageFamily:a,payload:b},Wh:c?Ni(this,c):null,qn:null};
817
- this.G.set(d,b);c=[olympe.H.pa.C.CONNECTING,olympe.H.pa.C.Xg];(this.Ab()||a===olympe.H.Uc.Bi&&c.includes(this.C))&&Oi(this,d,b)}Hc(a,b,c,d,e,f){c&&''!==c||this.N.warn('Trying to send an http request with an invalid authorizationToken');const g=Pb(a);if(e){g.method=olympe.net.eb.Yd.Wl;e=d?e:{messageFamily:b,seqId:1,payload:e};const k=JSON.stringify(e);g.body=k;Qb(g,{'Content-Type':'application/json'});this.N.log('HTTP POST >',Pi(e))}else this.N.log('HTTP GET call to',a);g.F=olympe.net.eb.ResponseType.sk;
818
- Qb(g,{Authorization:c});const h=()=>{this.qb.C(g,k=>{switch(k.Od()){case olympe.net.eb.cd.Gh:case olympe.net.eb.cd.jl:case olympe.net.eb.cd.xj:k=k.getData();if(b!==olympe.H.Uc.ri||d){f&&f(null,k);break}k=this.Xc(k);f&&f(k);k&&this.N.error(k.message);break;case olympe.net.eb.cd.Mu:Jb(h,this.oy);break;case olympe.net.eb.cd.ss:this.N.debug(`HTTP request canceled (${a}).`);f&&f(null);break;case olympe.net.eb.cd.fv:k=Error(`HTTP request authorization denied: ${a}`);f&&f(k);break;default:k=Error(`Server is currently not available, http status: ${k.Od()}`),
819
- f&&f(k)}})};h()}ta(a,b,c){void 0===c&&(c=olympe.X.ec());let d=this.Ka.get(a);void 0===d&&(d=new Map,this.Ka.set(a,d));d.set(c,b)}vd(a,b){a=this.Ka.get(a);void 0!==a&&a.delete(b)}$d(a){this.Ok=a}Nx(a,b){if(a)Qi(this,'Error in receiving handshake response: '+a.message);else{this.N.debug('Handshake response received');var c=olympe.H.pa.G;a=b.sv||'undefined';var d=b.activityTimeout?Math.max(b.activityTimeout-60,5):null;switch(b.status){case c.pt:Qi(this,`Framework version (${Ma(this.da)}) provided to the orchestrator was not valid. See orchestrator logs for more info.`);
820
- return;case c.Zu:Qi(this,`Framework version (${Ma(this.da)}) is not compatible with the orchestrator in use. See orchestrator logs for more info.`);return;case c.bt:Qi(this,'Handshake failed. See orchestrator logs for more info.');return}if(this.Va.mb(olympe.X.Sh.C))this.N.warn('Handshake successful but received server version',a,'is invalid. Cannot check against it');else try{var e=La(a);if(e.uj(this.Va)){Qi(this,`Framework v${Ma(this.da)} is expecting Orchestrator to be at least in v${Ma(this.Va)}`);
821
- return}this.N.log('Handshake successful. Orchestrator version: ',e,'required:',Ma(this.Va))}catch(f){Qi(this,f);return}e=olympe.H.pa.C.hg;if(this.C===olympe.H.pa.C.Xg&&null!==this.$&&this.$!==b.sessionId)this.N.warn('Trying to do a session recovering, but got another session id so retry from disconnected state'),Z(this,e);else{if(e=b.identityProviders)for(const [f,g]of Object.entries(e))this.Vx.set(f,g);this.$=b.sessionId||null;Ri(this,a,d)}}}en(){this.L[0]-this.L[1]>this.ny?(this.N.debug('Ping did not get answer, try to reconnect'),
812
+ olympe.H.pd.pa=class{constructor(a,b,c,d,e){this.N=a;this.qb=b;this.ja=c;this.F=null;this.config=e;this.Vb=this.config.get('reconnectionDelay');this.Sa=d;this.Nk=null;this.hy=this.config.get('pingInterval');this.my=this.Vb/2;this.Hb=e.get('autoConnect');this.ny=e.get('retryHttpOverload');this.be=e.get('messageTimeout');this.da=La(e.get('clientVersion'));this.Va=La(e.get('serverVersion'));this.C=olympe.H.pa.C.INIT;this.zc=e.get('getContextMode');this.lj=1;this.$=null;this.L=[0,0,0];this.Ka=new Map;
813
+ this.R=olympe.D.Qc(olympe.D.sa,'Server is online');this.ph=new Map;this.fe=new Map;this.G=new Map;this.Ux=new Map;Li(this,e)}Ab(){return this.C===olympe.H.pa.C.pi}connect(){const a=olympe.H.pa.C.INIT,b=olympe.H.pa.C.CONNECTING,c=olympe.H.pa.C.pi,d=olympe.H.pa.C.hg,e=olympe.H.pa.C.Xg,f=olympe.H.pa.C.Th,g=olympe.H.pa.C.sh,h=olympe.H.pa.C.ac;null!==this.F&&(this.F.$(null),this.F.close());this.Hb=!0;this.N.log(`Asking NET layer for a connection to ${Mb(this.ja)}:${this.ja.port}...`);this.F=this.qb.G(this.ja);
814
+ this.F.ja(this.bc.bind(this));this.F.da(this.Xc.bind(this));this.F.$(()=>{this.F=null;this.C===c?Z(this,e):this.C!==h&&this.C!==f&&Z(this,d)});this.Sa&&this.C===a&&this.F.F(()=>{this.F.F(null);if(this.C===b){var k=Nb(this.Sa);this.N.info(`Trying to wakeup orchestrator with ${k}`);Z(this,f);var l=this.qb.G(this.Sa);l.da(n=>{const p=JSON.parse(n);this.N.info(`${k}: ${null==p?void 0:p.status}`);switch(null==p?void 0:p.status){case 'ready':Z(this,g);l.close();break;case 'asleep':this.N.info(`Trying to wakeup orchestrator with ${k}`);
815
+ l.send('{"action": "wakeup"}');Z(this,f);break;case 'waking-up':break;default:this.N.warn(`Invalid message from ${k}: ${n}`),l.close(),Z(this,d)}});l.F(()=>{this.N.warn(`Communication with ${k} failed.`);l.close();Z(this,d)});l.ja(()=>{this.N.info(`Checking orchestrator status with ${k}`);l.send('{"action": "status"}')})}this.Sa=null});this.C!==e&&Z(this,b)}disconnect(){const a=olympe.H.pa.C.CONNECTING;if(this.C===olympe.H.pa.C.pi||this.C===a)this.Hb=!1,Z(this,olympe.H.pa.C.hg)}od(a){const b=olympe.X.ec();
816
+ this.ph.set(b,a);olympe.D.$a(this.R)===olympe.D.sa.F&&a()}We(a){var b;void 0===b&&(b=olympe.X.ec());this.fe.set(b,a);olympe.D.$a(this.R)===olympe.D.sa.C&&a(this.L[2])}bc(){this.N.debug('Websocket connected, sending handshake. Client version:',Ma(this.da),'subscribeEverything:',this.zc?'NO':'YES');this.W(olympe.H.Uc.Bi,{c:olympe.H.ia.Bi,cv:Ma(this.da),m:this.zc?0:1,s:this.$},this.Mx.bind(this))}W(a,b,c){const d=this.lj;this.lj++;b={message:{seqId:d,messageFamily:a,payload:b},Wh:c?Ni(this,c):null,pn:null};
817
+ this.G.set(d,b);c=[olympe.H.pa.C.CONNECTING,olympe.H.pa.C.Xg];(this.Ab()||a===olympe.H.Uc.Bi&&c.includes(this.C))&&Oi(this,d,b)}Hc(a,b,c,d,e,f){c&&''!==c||this.N.warn('Trying to send an http request with an invalid authorizationToken');const g=Pb(a);if(e){g.method=olympe.net.eb.Yd.Vl;e=d?e:{messageFamily:b,seqId:1,payload:e};const k=JSON.stringify(e);g.body=k;Qb(g,{'Content-Type':'application/json'});this.N.log('HTTP POST >',Pi(e))}else this.N.log('HTTP GET call to',a);g.F=olympe.net.eb.ResponseType.rk;
818
+ Qb(g,{Authorization:c});const h=()=>{this.qb.C(g,k=>{switch(k.Od()){case olympe.net.eb.cd.Gh:case olympe.net.eb.cd.il:case olympe.net.eb.cd.wj:k=k.getData();if(b!==olympe.H.Uc.ri||d){f&&f(null,k);break}k=this.Xc(k);f&&f(k);k&&this.N.error(k.message);break;case olympe.net.eb.cd.Lu:Jb(h,this.ny);break;case olympe.net.eb.cd.rs:this.N.debug(`HTTP request canceled (${a}).`);f&&f(null);break;case olympe.net.eb.cd.ev:k=Error(`HTTP request authorization denied: ${a}`);f&&f(k);break;default:k=Error(`Server is currently not available, http status: ${k.Od()}`),
819
+ f&&f(k)}})};h()}ta(a,b,c){void 0===c&&(c=olympe.X.ec());let d=this.Ka.get(a);void 0===d&&(d=new Map,this.Ka.set(a,d));d.set(c,b)}vd(a,b){a=this.Ka.get(a);void 0!==a&&a.delete(b)}$d(a){this.Nk=a}Mx(a,b){if(a)Qi(this,'Error in receiving handshake response: '+a.message);else{this.N.debug('Handshake response received');var c=olympe.H.pa.G;a=b.sv||'undefined';var d=b.activityTimeout?Math.max(b.activityTimeout-60,5):null;switch(b.status){case c.ot:Qi(this,`Framework version (${Ma(this.da)}) provided to the orchestrator was not valid. See orchestrator logs for more info.`);
820
+ return;case c.Yu:Qi(this,`Framework version (${Ma(this.da)}) is not compatible with the orchestrator in use. See orchestrator logs for more info.`);return;case c.at:Qi(this,'Handshake failed. See orchestrator logs for more info.');return}if(this.Va.mb(olympe.X.Sh.C))this.N.warn('Handshake successful but received server version',a,'is invalid. Cannot check against it');else try{var e=La(a);if(e.tj(this.Va)){Qi(this,`Framework v${Ma(this.da)} is expecting Orchestrator to be at least in v${Ma(this.Va)}`);
821
+ return}this.N.log('Handshake successful. Orchestrator version: ',e,'required:',Ma(this.Va))}catch(f){Qi(this,f);return}e=olympe.H.pa.C.hg;if(this.C===olympe.H.pa.C.Xg&&null!==this.$&&this.$!==b.sessionId)this.N.warn('Trying to do a session recovering, but got another session id so retry from disconnected state'),Z(this,e);else{if(e=b.identityProviders)for(const [f,g]of Object.entries(e))this.Ux.set(f,g);this.$=b.sessionId||null;Ri(this,a,d)}}}dn(){this.L[0]-this.L[1]>this.my?(this.N.debug('Ping did not get answer, try to reconnect'),
822
822
  Z(this,olympe.H.pa.C.Xg)):(this.N.trace('Sending Ping'),this.L[0]=Date.now(),this.F.send('ping')||(this.N.debug('Impossible to send ping, try to reconnect'),Z(this,olympe.H.pa.C.Xg)))}Xc(a){this.L[2]=Date.now();if(a.startsWith('pong'))return this.L[1]=this.L[2],null;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.G()&&this.N.debug('<',Pi(b));a=b.seqId;const c=b.messageFamily;b=b.payload;
823
- if(this.G.has(a)){const {Wh:d}=this.G.get(a);this.G.delete(a);d&&d(b)}a=this.Ka.get(c);if(void 0!==a)for(const d of a.values())d(b);return null}Kd(){const a=Date.now();for(const [b,{qn:c}]of this.G)null!==c&&a-c>this.be&&(this.N.warn(`No response was received from the server for the seqId = ${b}`),Mi(this,b,{error:{reason:'Message timeout: never receive acknowledge'}}))}};olympe.H.pa.L={Pi:0,eu:18,mA:23};
823
+ if(this.G.has(a)){const {Wh:d}=this.G.get(a);this.G.delete(a);d&&d(b)}a=this.Ka.get(c);if(void 0!==a)for(const d of a.values())d(b);return null}Kd(){const a=Date.now();for(const [b,{pn:c}]of this.G)null!==c&&a-c>this.be&&(this.N.warn(`No response was received from the server for the seqId = ${b}`),Mi(this,b,{error:{reason:'Message timeout: never receive acknowledge'}}))}};olympe.H.pa.L={Pi:0,du:18,lA:23};
824
824
  olympe.H.pa.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',
825
- 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.pd.pa.ma=[olympe.H.pa];olympe.H.P={Aa:'server.Manager',On:'server.bus.Manager',Ea:'server.Logger',Gd:'server.Source',Qg:'server.FileSource',jp:'server.ImportFileSvcHttpRequest',Jn:'server.BackupSvcHttpRequest',Wp:'server.OpenIDSvcHttpRequest',No:'server.GetContextSvcPathRequest',gp:'server.ImplicitGDSvcPathRequest',zo:'server.ExplicitGDSvcPathRequest',Vq:'server.TransactionOverHttpPathRequest',cr:'server.UserTokenRequest',ar:'server.UserTagRequest',Zq:'server.UserRolesRequest',wq:'server.RoleMembersRequest',zh:'server.IOUrlsProvider',
826
- Fo:'server.fileSvcUrl',aq:'communication.peerFileSvcUrl'};olympe.H.qd={ji:'server.connectors.Auth',TA:'server.connectors.Signaling'};
827
- olympe.H.Config={hd:'server.host',sd:'server.port',ld:'server.ssl',An:'server.autoConnect',em:'server.reconnectionDelay',fq:'server.pingInterval',rm:'server.messageTimeout',uq:'server.retryHttpOnOverload',Wn:'server.clientVersion',Cq:'server.serverVersion',Nu:'server.wakeUpService',Nn:'bus.host',Pn:'bus.path',Qn:'bus.port',Sn:'bus.vhost',Rn:'bus.ssl',lg:'bus.keepalive',Gu:'bus.reschedulePings',xs:'bus.clientId',vs:'bus.clean',As:'bus.connectTimeout',Sq:'bus.tokenTimeout',zu:'bus.queueQoSZero',Mn:'bus.allowGuest'};
828
- olympe.H.pb={Ad:'server.basePath',hr:'server.wsPath',Do:'server.filePath',ip:'server.importFilePath',In:'server.backupSvcPath',Vp:'server.openIDSvcPath',Mo:'server.GetContextSvcPath',hp:'server.ImplicitGraphdefSvcPath',Ao:'server.ExplicitGraphdefSvcPath',Uq:'server.TransactionOverHttpPath',br:'server.userTokenSvcPath',$q:'server.userTagPath',Yq:'server.userRolesPath',vq:'server.roleMembersPath',Vl:'communication.peerFileSvcPath'};
829
- olympe.U.config(function(a){var b='object'===typeof window&&window.location&&window.location.hostname||'localhost';const c='localhost'===b;D(a,olympe.H.Config.hd,b);D(a,olympe.H.Config.sd,c?8080:443);D(a,olympe.H.Config.ld,'localhost'!==b);D(a,olympe.H.pb.Ad,'OlympeServer');D(a,olympe.H.pb.hr,'websocket');D(a,olympe.H.pb.Do,'rest/filesvc');D(a,olympe.H.pb.ip,'rest/importsvc');D(a,olympe.H.pb.In,'rest/backupsvc');D(a,olympe.H.pb.Vp,'rest/openid');D(a,olympe.H.pb.Mo,'rest/initialData');D(a,olympe.H.pb.hp,
830
- 'rest/querysvc/graphDefImplicit');D(a,olympe.H.pb.Ao,'rest/querysvc/graphDefExplicit');D(a,olympe.H.pb.Uq,'rest/transaction');D(a,olympe.H.pb.br,'rest/token');D(a,olympe.H.pb.$q,'rest/authorization/getUserTag');D(a,olympe.H.pb.Yq,'rest/authorization/getUserRoles');D(a,olympe.H.pb.vq,'rest/authorization/roleMembers');D(a,olympe.H.Config.An,!0);D(a,olympe.H.Config.em,5E3);D(a,olympe.H.Config.fq,5E3);D(a,olympe.H.Config.rm,15E3);D(a,olympe.H.Config.uq,5E3);D(a,olympe.H.Config.Cq,'6.5.0');D(a,olympe.H.Config.Nn,
831
- '');D(a,olympe.H.Config.Pn,c?'':'/mqtt');D(a,olympe.H.Config.Qn,c?15675:443);D(a,olympe.H.Config.Rn,null);D(a,olympe.H.Config.Sn,c?'/':'');D(a,olympe.H.Config.lg,30);D(a,olympe.H.Config.Sq,3E5);D(a,olympe.H.Config.Mn,!1);D(a,olympe.H.pb.Vl,'nodes/files');b=a.getParameter(olympe.Fg.Config.Jo);if(void 0!==b)ua(a,b);else throw Error('Framework version could not be found! Is field "olympe-framework" present in version.json?');C(a,olympe.H.P.Ea,[olympe.ra.P.Aa],d=>d.Oc('communication'));C(a,'server.WebSocketRequest',
832
- [new olympe.U.fa(olympe.H.Config.hd),new olympe.U.fa(olympe.H.Config.sd),new olympe.U.fa(olympe.H.Config.ld),new olympe.U.fa(olympe.H.pb.Ad),new olympe.U.fa(olympe.H.pb.hr)],(d,e,f,g,h)=>new olympe.net.Ri(d,e,(g+'/'+h).replace(/\/+/g,'/').replace(/\/$/,''),f));C(a,'server.wakeUpRequest',[new olympe.U.fa(olympe.H.Config.hd),new olympe.U.fa(olympe.H.Config.sd),new olympe.U.fa(olympe.H.Config.ld),new olympe.U.fa(olympe.H.Config.Nu)],(d,e,f,g)=>{if(null===g||void 0===g)return null;g=g.replace(/\/+/g,
833
- '/').replace(/\/$/,'');return new olympe.net.Ri(d,e,g,f)});b=(d,e,f,g,h)=>(new olympe.net.Sj(d,e,`${g}${h?'/'+h:''}`.replace(/\/+/g,'/').replace(/\/$/,''),f)).C();C(a,olympe.H.P.jp,[new olympe.U.fa(olympe.H.Config.hd),new olympe.U.fa(olympe.H.Config.sd),new olympe.U.fa(olympe.H.Config.ld),new olympe.U.fa(olympe.H.pb.Ad),new olympe.U.fa(olympe.H.pb.ip)],b);C(a,olympe.H.P.Jn,[new olympe.U.fa(olympe.H.Config.hd),new olympe.U.fa(olympe.H.Config.sd),new olympe.U.fa(olympe.H.Config.ld),new olympe.U.fa(olympe.H.pb.Ad),
834
- new olympe.U.fa(olympe.H.pb.In)],b);C(a,olympe.H.P.Wp,[new olympe.U.fa(olympe.H.Config.hd),new olympe.U.fa(olympe.H.Config.sd),new olympe.U.fa(olympe.H.Config.ld),new olympe.U.fa(olympe.H.pb.Ad),new olympe.U.fa(olympe.H.pb.Vp)],b);C(a,olympe.H.P.No,[new olympe.U.fa(olympe.H.Config.hd),new olympe.U.fa(olympe.H.Config.sd),new olympe.U.fa(olympe.H.Config.ld),new olympe.U.fa(olympe.H.pb.Ad),new olympe.U.fa(olympe.H.pb.Mo)],b);C(a,olympe.H.P.gp,[new olympe.U.fa(olympe.H.Config.hd),new olympe.U.fa(olympe.H.Config.sd),
835
- new olympe.U.fa(olympe.H.Config.ld),new olympe.U.fa(olympe.H.pb.Ad),new olympe.U.fa(olympe.H.pb.hp)],b);C(a,olympe.H.P.zo,[new olympe.U.fa(olympe.H.Config.hd),new olympe.U.fa(olympe.H.Config.sd),new olympe.U.fa(olympe.H.Config.ld),new olympe.U.fa(olympe.H.pb.Ad),new olympe.U.fa(olympe.H.pb.Ao)],b);C(a,olympe.H.P.Vq,[new olympe.U.fa(olympe.H.Config.hd),new olympe.U.fa(olympe.H.Config.sd),new olympe.U.fa(olympe.H.Config.ld),new olympe.U.fa(olympe.H.pb.Ad),new olympe.U.fa(olympe.H.pb.Uq)],b);C(a,olympe.H.P.cr,
836
- [new olympe.U.fa(olympe.H.Config.hd),new olympe.U.fa(olympe.H.Config.sd),new olympe.U.fa(olympe.H.Config.ld),new olympe.U.fa(olympe.H.pb.Ad),new olympe.U.fa(olympe.H.pb.br)],b);C(a,olympe.H.P.ar,[new olympe.U.fa(olympe.H.Config.hd),new olympe.U.fa(olympe.H.Config.sd),new olympe.U.fa(olympe.H.Config.ld),new olympe.U.fa(olympe.H.pb.Ad),new olympe.U.fa(olympe.H.pb.$q)],b);C(a,olympe.H.P.Zq,[new olympe.U.fa(olympe.H.Config.hd),new olympe.U.fa(olympe.H.Config.sd),new olympe.U.fa(olympe.H.Config.ld),new olympe.U.fa(olympe.H.pb.Ad),
837
- new olympe.U.fa(olympe.H.pb.Yq)],b);C(a,olympe.H.P.wq,[new olympe.U.fa(olympe.H.Config.hd),new olympe.U.fa(olympe.H.Config.sd),new olympe.U.fa(olympe.H.Config.ld),new olympe.U.fa(olympe.H.pb.Ad),new olympe.U.fa(olympe.H.pb.vq)],b);C(a,olympe.H.P.Fo,[new olympe.U.fa(olympe.H.Config.hd),new olympe.U.fa(olympe.H.Config.sd),new olympe.U.fa(olympe.H.Config.ld),new olympe.U.fa(olympe.H.pb.Ad),new olympe.U.fa(olympe.H.pb.Do)],b);C(a,olympe.H.P.aq,[new olympe.U.fa(olympe.net.Config.xl),new olympe.U.fa(olympe.net.Config.yl),
838
- new olympe.U.fa(olympe.net.Config.bp),new olympe.U.fa(olympe.H.pb.Vl)],b);C(a,'server.ManagerConfig',[new olympe.U.fa(olympe.H.Config.An),new olympe.U.fa(olympe.H.Config.em),new olympe.U.fa(olympe.H.Config.fq),new olympe.U.fa(olympe.H.Config.rm),new olympe.U.fa(olympe.H.Config.Wn),new olympe.U.fa(olympe.H.Config.Cq),new olympe.U.fa(olympe.dc.Config.Zg),new olympe.U.fa(olympe.H.Config.uq)],(...d)=>{const e='autoConnect reconnectionDelay pingInterval messageTimeout clientVersion serverVersion getContextMode retryHttpOverload'.split(' '),
839
- f=new Map;d.forEach((g,h)=>f.set(e[h],g));return f});C(a,'server.bus.ManagerConfig',[new olympe.U.fa(olympe.H.Config.hd),new olympe.U.fa(olympe.H.Config.Nn),new olympe.U.fa(olympe.H.Config.Pn),new olympe.U.fa(olympe.H.Config.Qn),new olympe.U.fa(olympe.H.Config.Sn),new olympe.U.fa(olympe.H.Config.Rn),new olympe.U.fa(olympe.H.Config.ld),new olympe.U.fa(olympe.H.Config.Mn),new olympe.U.fa(olympe.H.Config.lg),new olympe.U.fa(olympe.H.Config.Gu),new olympe.U.fa(olympe.H.Config.xs),new olympe.U.fa(olympe.H.Config.vs),
840
- new olympe.U.fa(olympe.H.Config.em),new olympe.U.fa(olympe.H.Config.As),new olympe.U.fa(olympe.H.Config.zu),new olympe.U.fa(olympe.H.Config.rm),new olympe.U.fa(olympe.H.Config.Sq)],(d,e,f,g,h,k,l,n,...p)=>{e=`${(null!=k?k:l)?'wss://':'ws://'}${e||d}:${g}${f}/ws`;const q='keepalive reschedulePings clientId clean reconnectPeriod connectTimeout queueQoSZero messageTimeout tokenTimeout'.split(' ');p=p.reduce((r,t,u)=>{r[q[u]]=t;return r},{});p.vhost=`${h||d.split('.')[0]}`;d=new Map;d.set('url',e);d.set('connectionOptions',
841
- p);d.set('allowGuest',n);return d});A(a,olympe.H.P.Aa,olympe.H.pd.pa,olympe.H.P.Ea,olympe.net.P.Aa,'server.WebSocketRequest','server.wakeUpRequest','server.ManagerConfig');A(a,olympe.H.qd.ji,olympe.H.qa.Wa,olympe.H.P.Ea,olympe.H.P.Aa,olympe.H.P.cr,olympe.H.P.ar,olympe.H.P.Zq,olympe.H.P.wq,olympe.H.P.Wp,olympe.auth.P.hk,olympe.hc.P.Xj);A(a,olympe.H.P.On,olympe.H.wa.pa,olympe.H.P.Ea,olympe.net.P.Aa,olympe.auth.P.Aa,'server.bus.ManagerConfig');sa(a,olympe.auth.qd.Aa,olympe.H.qd.ji);sa(a,olympe.auth.qd.Ap,
842
- olympe.H.qd.ji);sa(a,olympe.auth.qd.Fe,olympe.H.qd.ji);sa(a,olympe.auth.qd.Ne,olympe.H.qd.ji);A(a,olympe.H.P.Qg,olympe.H.Nj,olympe.H.P.Ea,olympe.net.P.Aa,olympe.auth.P.Aa,olympe.H.P.Fo,olympe.H.P.aq);sa(a,olympe.ab.P.Qg,olympe.H.P.Qg);C(a,olympe.H.P.Gd,[olympe.ra.P.Aa,olympe.H.P.Aa,olympe.auth.P.Aa,olympe.ab.P.Qg,olympe.H.P.No,olympe.H.P.gp,olympe.H.P.zo,olympe.H.P.Vq],(d,e,f,g,h,k,l,n)=>new olympe.H.ah(d.Oc('server.source'),e,f,g,[h,k,l,n]));A(a,olympe.H.P.zh,olympe.H.Tj,olympe.H.P.jp,olympe.H.P.Jn);
843
- sa(a,olympe.dc.ea.P.zh,olympe.H.P.zh);sa(a,olympe.ab.P.im,olympe.H.P.Gd)},'olympe.communication');olympe.U.run([olympe.H.P.On],a=>{olympe.H.wa.Jc=()=>a});olympe.sc={};olympe.sc.P={Ea:'sc.Logger',gm:'sc.RootContext'};olympe.sc.Config={ef:'sc.app',eg:'sc.debug',lo:'sc.debugger',Ks:'sc.disableTheme',PRODUCTION:'sc.production',ju:'sc.onstartTimeout',tq:'sc.remoteActionTimeout',Tp:'sc.offlineStart',bu:'google.apikey'};
844
- olympe.U.config(a=>{D(a,olympe.sc.Config.ef,'');D(a,olympe.sc.Config.Tp,!1);D(a,olympe.sc.Config.eg,!1);D(a,olympe.sc.Config.Ks,!1);D(a,olympe.sc.Config.PRODUCTION,!1);D(a,olympe.sc.Config.ju,2E4);D(a,olympe.sc.Config.bu,'AIzaSyD0rTnF3Tq-ZjgdaqyvC8Jg-RSgpZM2jBU');D(a,olympe.sc.Config.tq,1E4);C(a,olympe.sc.P.Ea,[olympe.ra.P.Aa],b=>b.Oc('sc'));C(a,olympe.sc.P.gm,[new olympe.U.fa(olympe.sc.Config.PRODUCTION)],b=>{const c=new olympe.sc.Sd('root','root',null);olympe.sc.mn=c;c.set(olympe.sc.Qa.C.PRODUCTION,
845
- b);return new olympe.sc.Qa(c)})},'olympe.sc');olympe.U.run([olympe.sc.P.gm],a=>{olympe.dj().ctx=a});olympe.sc.Zm=()=>null!==olympe.dc.Ja().fc(void 0,olympe.sc.Runnable.F.Ec());olympe.sc.NC=(a,b,c,d)=>{c=a.create(olympe.sc.mc).setProperty(olympe.sc.mc.C,c||null).setProperty(olympe.sc.mc.L,d||null);a.Ta(olympe.sc.mc.F,c,b);a.Ta(olympe.dc.CloudObject.containsRel,b,c);return c.T()};olympe.sc.fh=a=>{a=olympe.dc.X.Tb.fh(a);return a instanceof olympe.sc.De?a.C():a};olympe.sc.bD=a=>{a=Ec(a);return a instanceof olympe.sc.De?a.C():a};
846
- olympe.sc.ZC=function(a){const b=olympe.dm.Pb.C.Ec(),c=olympe.dc.CloudObject.containsRel.Ec();var d=olympe.dc.za(a);if(void 0===d)return[];a=olympe.dc.Ja();var e=a.model(d);const f=[],g=[];let h=[];if(a.Tf(e,olympe.dm.Pb))h.push(d);else{for(e=[];null===a.fc(d,b);){e.push(d);const k=a.fc(d,c);if(null===k)return olympe.ra.Ya('sc').warn(`Object ${d} has no container`),[];k===a.fc(d,olympe.dc.CloudObject.instancesRel)?(f.push(d),d=a.fc(k,c)):d=k;if(e.includes(d))throw Error(`Instance ${d} (${a.name(d)}) is part of a cyclic contain pattern`);
847
- }g.push(d);h.push(a.fc(g[0],b))}h=h.concat(a.Pf(h[0],olympe.dm.Pb.Ka));h=h.concat(a.Pf(h[h.length-1],olympe.dm.Vc.da.Ec()));h=h.concat(a.Pf(h[h.length-1],olympe.dm.Vc.$.Ec()));return[...f,...g,...h].reverse()};olympe.sc.$C=a=>{a=a&&a.valueOf()||'';return a.startsWith('image/')?olympe.sc.Uj:a.startsWith('video/')?olympe.sc.qm:a.startsWith('font/')||a.startsWith('application/font-woff')?olympe.sc.rd:olympe.dm.File};olympe.sc.zb={};function Si(a,b){var c=olympe.sc.Qa;a=a.C;b=olympe.dc.za(b);var d;let e=null==(d=a.F)?void 0:d.get(b);if(!e){e=a.Yh(void 0,b);for(d=e.getParent();d&&d.Ka&&!d.id.startsWith('_');)d=d.getParent();d&&Ti(d,b,e)}return new c(e)}function Ui(a){let b;return null!=(b=a.$a(olympe.sc.Qa.C.PRODUCTION))?b:!1}
848
- olympe.sc.Qa=class{constructor(a=olympe.sc.mn){this.C=a;this.N=olympe.ra.Ya('sc');this.F=null;this.onDestroy(()=>{null!==this.get(olympe.sc.Qa.C.TRANSACTION)&&this.N.warn(`The context ${this.C.Z()} is being destroyed but still has unreleased transactions. You probably forgot to end a transaction.`)})}Z(){return this.C.Z()}getParent(){if(null===this.F){const a=this.C.getParent();this.F=null===a?null:new olympe.sc.Qa(a)}return this.F}kw(a){const b=olympe.dc.Ja();let c=this.getParent();const d=e=>{if(e.He()){const f=
849
- b.model(e.He());if(f&&b.cb(f,olympe.sc.lb.Ka)||a.nj&&!b.Rf(e.He(),a.nj))return!1}return!0};for(;c&&!d(c);)c=c.getParent();return c}He(){return this.C.He()}Ua(){return this.C.C}set(a,b){this.C.set(a,b);return this}wn(a){return this.set(a,Date.now())}remove(a){this.set(a,null)}Ib(a,b,c=!1){const d=olympe.dc.za(a),e=olympe.D.Qc(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.C.Z():void 0));return e.Ib()}get(a,b=!1){a=this.$a(a,
850
- b);return void 0!==a?a:null}has(a,b=!1){return this.C.has(a,b)}observe(a,b=!0,c=!1){return new rxjs.Observable(d=>{const e=this.get(a);b||null!==e||d.next(e);const f=this.on(a,d.next.bind(d),c?void 0:this.C.Z(),!1);this.onDestroy(()=>{f();d.complete()});return f})}repeat(a,b){const c=Vi(this.C,a);a=b.subscribe(d=>{null!==d?this.set(c,d):this.remove(c)});this.Xf(a.unsubscribe.bind(a));return this}qy(a){a=a instanceof olympe.sc.Runnable?a:this.get(a);if(!a)return null;const b=this.Yh(`Runner ${olympe.D.$a(a.na(),
851
- '')}`);a.run(b);return b}Ry(a,b=!0,c=!1){return rxjs.firstValueFrom(this.observe(a,b,c))}zy(a){this.set(olympe.sc.Qa.C.dg,a);return this}$a(a,b=!0){return this.C.$a(a,b)}on(a,b,c,d=!0){return this.C.on(a,b,c,d)}Yh(a){return new olympe.sc.Qa(this.C.Yh(a))}Tk(a,b){return this.C.Tk(a,c=>{b(new olympe.sc.Qa(c))})}Pw(a){a=Wi(this.C,a);return a===this.C?this:a&&new olympe.sc.Qa(a)}destroy(){this.C.destroy()}Xf(a,b){return this.C.Xf(a,b)}Sk(a){this.C.Sk(a)}onDestroy(a){return this.C.onDestroy(a)}Xe(a){this.C.Xe(a)}clear(){this.C.clear()}G(){return this.C.G()}cb(a){a=
852
- Xi(this.C,a);return null!==a?new olympe.sc.ui.kz(a,this):null}yw(a){a=Xi(this.C,a);return null!==a?new olympe.sc.ui.jz(a,this):null}Yx(...a){return rxjs.combineLatest(a.map(b=>{b=Xi(this.C,b);return null!==b?this.observe(b):rxjs.of(null)}))}mb(a){return(null==a?void 0:a.constructor)!==this.constructor?!1:this.C===a.C}};olympe.sc.Qa.prototype.observeMany=olympe.sc.Qa.prototype.Yx;olympe.sc.Qa.prototype.getEvent=olympe.sc.Qa.prototype.yw;olympe.sc.Qa.prototype.getProperty=olympe.sc.Qa.prototype.cb;
853
- olympe.sc.Qa.prototype.clear=olympe.sc.Qa.prototype.clear;olympe.sc.Qa.prototype.offDestroy=olympe.sc.Qa.prototype.Xe;olympe.sc.Qa.prototype.onDestroy=olympe.sc.Qa.prototype.onDestroy;olympe.sc.Qa.prototype.offClear=olympe.sc.Qa.prototype.Sk;olympe.sc.Qa.prototype.onClear=olympe.sc.Qa.prototype.Xf;olympe.sc.Qa.prototype.destroy=olympe.sc.Qa.prototype.destroy;olympe.sc.Qa.prototype.getOtherContext=olympe.sc.Qa.prototype.Pw;olympe.sc.Qa.prototype.onContext=olympe.sc.Qa.prototype.Tk;
854
- olympe.sc.Qa.prototype.createChild=olympe.sc.Qa.prototype.Yh;olympe.sc.Qa.prototype.setParentElement=olympe.sc.Qa.prototype.zy;olympe.sc.Qa.prototype.waitFor=olympe.sc.Qa.prototype.Ry;olympe.sc.Qa.prototype.runner=olympe.sc.Qa.prototype.qy;olympe.sc.Qa.prototype.repeat=olympe.sc.Qa.prototype.repeat;olympe.sc.Qa.prototype.observe=olympe.sc.Qa.prototype.observe;olympe.sc.Qa.prototype.has=olympe.sc.Qa.prototype.has;olympe.sc.Qa.prototype.get=olympe.sc.Qa.prototype.get;olympe.sc.Qa.prototype.remove=olympe.sc.Qa.prototype.remove;
855
- olympe.sc.Qa.prototype.trigger=olympe.sc.Qa.prototype.wn;olympe.sc.Qa.prototype.set=olympe.sc.Qa.prototype.set;olympe.sc.Qa.prototype.getClosest=olympe.sc.Qa.prototype.kw;olympe.sc.Qa.prototype.getParent=olympe.sc.Qa.prototype.getParent;olympe.sc.Qa.C={PRODUCTION:'__production',EDITION:'__editionMode',TRANSACTION:'__transaction',dg:'__htmlContainer',sz:'__dockableElement'};olympe.sc.er=class extends olympe.sc.Qa{Xf(a,b){const c=b||olympe.X.ec();return super.Xf(()=>{this.Sk(c);a()},c)}observe(a,b=!0,c=!1){return new rxjs.Observable(d=>{const e=this.get(a);b||null!==e||d.next(e);const f=this.on(a,d.next.bind(d),c?void 0:this.Z(),!1);this.Xf(()=>{f();d.complete()});return f})}};function Vi(a,b){b=olympe.dc.za(b);let c,d;return(null==(c=a.ja)?void 0:c.get('I#'+b))||(null==(d=a.ja)?void 0:d.get('IO#'+b))||b}function Wi(a,b){if(b===a.id||a.W.has(b)||!b)return a;for(a=a.ta;a;){if(b===a.Z()||a.W.has(b))return a;const c=Yi(a.F,b);if(c)return c;a=a.getParent()}return null}function Zi(a,b,c){a.L||(a.L=new Map);const d=a.L.get(b);d?d[0]+=1:(a.L.set(b,[1,c]),Wc(olympe.dc.xd(),c))}
825
+ 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.pd.pa.ma=[olympe.H.pa];olympe.H.P={Aa:'server.Manager',Nn:'server.bus.Manager',Ea:'server.Logger',Gd:'server.Source',Qg:'server.FileSource',ip:'server.ImportFileSvcHttpRequest',In:'server.BackupSvcHttpRequest',Vp:'server.OpenIDSvcHttpRequest',Mo:'server.GetContextSvcPathRequest',fp:'server.ImplicitGDSvcPathRequest',yo:'server.ExplicitGDSvcPathRequest',Uq:'server.TransactionOverHttpPathRequest',br:'server.UserTokenRequest',$q:'server.UserTagRequest',Yq:'server.UserRolesRequest',vq:'server.RoleMembersRequest',zh:'server.IOUrlsProvider',
826
+ Eo:'server.fileSvcUrl',$p:'communication.peerFileSvcUrl'};olympe.H.qd={ji:'server.connectors.Auth',SA:'server.connectors.Signaling'};
827
+ olympe.H.Config={hd:'server.host',sd:'server.port',ld:'server.ssl',zn:'server.autoConnect',cm:'server.reconnectionDelay',eq:'server.pingInterval',qm:'server.messageTimeout',tq:'server.retryHttpOnOverload',Vn:'server.clientVersion',Bq:'server.serverVersion',Mu:'server.wakeUpService',Mn:'bus.host',On:'bus.path',Pn:'bus.port',Rn:'bus.vhost',Qn:'bus.ssl',lg:'bus.keepalive',Fu:'bus.reschedulePings',ws:'bus.clientId',us:'bus.clean',zs:'bus.connectTimeout',Rq:'bus.tokenTimeout',yu:'bus.queueQoSZero',Ln:'bus.allowGuest'};
828
+ olympe.H.pb={Ad:'server.basePath',gr:'server.wsPath',Co:'server.filePath',hp:'server.importFilePath',Hn:'server.backupSvcPath',Up:'server.openIDSvcPath',Lo:'server.GetContextSvcPath',gp:'server.ImplicitGraphdefSvcPath',zo:'server.ExplicitGraphdefSvcPath',Tq:'server.TransactionOverHttpPath',ar:'server.userTokenSvcPath',Zq:'server.userTagPath',Xq:'server.userRolesPath',uq:'server.roleMembersPath',Ul:'communication.peerFileSvcPath'};
829
+ olympe.U.config(function(a){var b='object'===typeof window&&window.location&&window.location.hostname||'localhost';const c='localhost'===b;D(a,olympe.H.Config.hd,b);D(a,olympe.H.Config.sd,c?8080:443);D(a,olympe.H.Config.ld,'localhost'!==b);D(a,olympe.H.pb.Ad,'OlympeServer');D(a,olympe.H.pb.gr,'websocket');D(a,olympe.H.pb.Co,'rest/filesvc');D(a,olympe.H.pb.hp,'rest/importsvc');D(a,olympe.H.pb.Hn,'rest/backupsvc');D(a,olympe.H.pb.Up,'rest/openid');D(a,olympe.H.pb.Lo,'rest/initialData');D(a,olympe.H.pb.gp,
830
+ 'rest/querysvc/graphDefImplicit');D(a,olympe.H.pb.zo,'rest/querysvc/graphDefExplicit');D(a,olympe.H.pb.Tq,'rest/transaction');D(a,olympe.H.pb.ar,'rest/token');D(a,olympe.H.pb.Zq,'rest/authorization/getUserTag');D(a,olympe.H.pb.Xq,'rest/authorization/getUserRoles');D(a,olympe.H.pb.uq,'rest/authorization/roleMembers');D(a,olympe.H.Config.zn,!0);D(a,olympe.H.Config.cm,5E3);D(a,olympe.H.Config.eq,5E3);D(a,olympe.H.Config.qm,15E3);D(a,olympe.H.Config.tq,5E3);D(a,olympe.H.Config.Bq,'6.5.0');D(a,olympe.H.Config.Mn,
831
+ '');D(a,olympe.H.Config.On,c?'':'/mqtt');D(a,olympe.H.Config.Pn,c?15675:443);D(a,olympe.H.Config.Qn,null);D(a,olympe.H.Config.Rn,c?'/':'');D(a,olympe.H.Config.lg,30);D(a,olympe.H.Config.Rq,3E5);D(a,olympe.H.Config.Ln,!1);D(a,olympe.H.pb.Ul,'nodes/files');b=a.getParameter(olympe.Fg.Config.Io);if(void 0!==b)ua(a,b);else throw Error('Framework version could not be found! Is field "olympe-framework" present in version.json?');C(a,olympe.H.P.Ea,[olympe.ra.P.Aa],d=>d.Oc('communication'));C(a,'server.WebSocketRequest',
832
+ [new olympe.U.fa(olympe.H.Config.hd),new olympe.U.fa(olympe.H.Config.sd),new olympe.U.fa(olympe.H.Config.ld),new olympe.U.fa(olympe.H.pb.Ad),new olympe.U.fa(olympe.H.pb.gr)],(d,e,f,g,h)=>new olympe.net.Ri(d,e,(g+'/'+h).replace(/\/+/g,'/').replace(/\/$/,''),f));C(a,'server.wakeUpRequest',[new olympe.U.fa(olympe.H.Config.hd),new olympe.U.fa(olympe.H.Config.sd),new olympe.U.fa(olympe.H.Config.ld),new olympe.U.fa(olympe.H.Config.Mu)],(d,e,f,g)=>{if(null===g||void 0===g)return null;g=g.replace(/\/+/g,
833
+ '/').replace(/\/$/,'');return new olympe.net.Ri(d,e,g,f)});b=(d,e,f,g,h)=>(new olympe.net.Rj(d,e,`${g}${h?'/'+h:''}`.replace(/\/+/g,'/').replace(/\/$/,''),f)).C();C(a,olympe.H.P.ip,[new olympe.U.fa(olympe.H.Config.hd),new olympe.U.fa(olympe.H.Config.sd),new olympe.U.fa(olympe.H.Config.ld),new olympe.U.fa(olympe.H.pb.Ad),new olympe.U.fa(olympe.H.pb.hp)],b);C(a,olympe.H.P.In,[new olympe.U.fa(olympe.H.Config.hd),new olympe.U.fa(olympe.H.Config.sd),new olympe.U.fa(olympe.H.Config.ld),new olympe.U.fa(olympe.H.pb.Ad),
834
+ new olympe.U.fa(olympe.H.pb.Hn)],b);C(a,olympe.H.P.Vp,[new olympe.U.fa(olympe.H.Config.hd),new olympe.U.fa(olympe.H.Config.sd),new olympe.U.fa(olympe.H.Config.ld),new olympe.U.fa(olympe.H.pb.Ad),new olympe.U.fa(olympe.H.pb.Up)],b);C(a,olympe.H.P.Mo,[new olympe.U.fa(olympe.H.Config.hd),new olympe.U.fa(olympe.H.Config.sd),new olympe.U.fa(olympe.H.Config.ld),new olympe.U.fa(olympe.H.pb.Ad),new olympe.U.fa(olympe.H.pb.Lo)],b);C(a,olympe.H.P.fp,[new olympe.U.fa(olympe.H.Config.hd),new olympe.U.fa(olympe.H.Config.sd),
835
+ new olympe.U.fa(olympe.H.Config.ld),new olympe.U.fa(olympe.H.pb.Ad),new olympe.U.fa(olympe.H.pb.gp)],b);C(a,olympe.H.P.yo,[new olympe.U.fa(olympe.H.Config.hd),new olympe.U.fa(olympe.H.Config.sd),new olympe.U.fa(olympe.H.Config.ld),new olympe.U.fa(olympe.H.pb.Ad),new olympe.U.fa(olympe.H.pb.zo)],b);C(a,olympe.H.P.Uq,[new olympe.U.fa(olympe.H.Config.hd),new olympe.U.fa(olympe.H.Config.sd),new olympe.U.fa(olympe.H.Config.ld),new olympe.U.fa(olympe.H.pb.Ad),new olympe.U.fa(olympe.H.pb.Tq)],b);C(a,olympe.H.P.br,
836
+ [new olympe.U.fa(olympe.H.Config.hd),new olympe.U.fa(olympe.H.Config.sd),new olympe.U.fa(olympe.H.Config.ld),new olympe.U.fa(olympe.H.pb.Ad),new olympe.U.fa(olympe.H.pb.ar)],b);C(a,olympe.H.P.$q,[new olympe.U.fa(olympe.H.Config.hd),new olympe.U.fa(olympe.H.Config.sd),new olympe.U.fa(olympe.H.Config.ld),new olympe.U.fa(olympe.H.pb.Ad),new olympe.U.fa(olympe.H.pb.Zq)],b);C(a,olympe.H.P.Yq,[new olympe.U.fa(olympe.H.Config.hd),new olympe.U.fa(olympe.H.Config.sd),new olympe.U.fa(olympe.H.Config.ld),new olympe.U.fa(olympe.H.pb.Ad),
837
+ new olympe.U.fa(olympe.H.pb.Xq)],b);C(a,olympe.H.P.vq,[new olympe.U.fa(olympe.H.Config.hd),new olympe.U.fa(olympe.H.Config.sd),new olympe.U.fa(olympe.H.Config.ld),new olympe.U.fa(olympe.H.pb.Ad),new olympe.U.fa(olympe.H.pb.uq)],b);C(a,olympe.H.P.Eo,[new olympe.U.fa(olympe.H.Config.hd),new olympe.U.fa(olympe.H.Config.sd),new olympe.U.fa(olympe.H.Config.ld),new olympe.U.fa(olympe.H.pb.Ad),new olympe.U.fa(olympe.H.pb.Co)],b);C(a,olympe.H.P.$p,[new olympe.U.fa(olympe.net.Config.wl),new olympe.U.fa(olympe.net.Config.xl),
838
+ new olympe.U.fa(olympe.net.Config.ap),new olympe.U.fa(olympe.H.pb.Ul)],b);C(a,'server.ManagerConfig',[new olympe.U.fa(olympe.H.Config.zn),new olympe.U.fa(olympe.H.Config.cm),new olympe.U.fa(olympe.H.Config.eq),new olympe.U.fa(olympe.H.Config.qm),new olympe.U.fa(olympe.H.Config.Vn),new olympe.U.fa(olympe.H.Config.Bq),new olympe.U.fa(olympe.dc.Config.Zg),new olympe.U.fa(olympe.H.Config.tq)],(...d)=>{const e='autoConnect reconnectionDelay pingInterval messageTimeout clientVersion serverVersion getContextMode retryHttpOverload'.split(' '),
839
+ f=new Map;d.forEach((g,h)=>f.set(e[h],g));return f});C(a,'server.bus.ManagerConfig',[new olympe.U.fa(olympe.H.Config.hd),new olympe.U.fa(olympe.H.Config.Mn),new olympe.U.fa(olympe.H.Config.On),new olympe.U.fa(olympe.H.Config.Pn),new olympe.U.fa(olympe.H.Config.Rn),new olympe.U.fa(olympe.H.Config.Qn),new olympe.U.fa(olympe.H.Config.ld),new olympe.U.fa(olympe.H.Config.Ln),new olympe.U.fa(olympe.H.Config.lg),new olympe.U.fa(olympe.H.Config.Fu),new olympe.U.fa(olympe.H.Config.ws),new olympe.U.fa(olympe.H.Config.us),
840
+ new olympe.U.fa(olympe.H.Config.cm),new olympe.U.fa(olympe.H.Config.zs),new olympe.U.fa(olympe.H.Config.yu),new olympe.U.fa(olympe.H.Config.qm),new olympe.U.fa(olympe.H.Config.Rq)],(d,e,f,g,h,k,l,n,...p)=>{e=`${(null!=k?k:l)?'wss://':'ws://'}${e||d}:${g}${f}/ws`;const q='keepalive reschedulePings clientId clean reconnectPeriod connectTimeout queueQoSZero messageTimeout tokenTimeout'.split(' ');p=p.reduce((r,t,u)=>{r[q[u]]=t;return r},{});p.vhost=`${h||d.split('.')[0]}`;d=new Map;d.set('url',e);d.set('connectionOptions',
841
+ p);d.set('allowGuest',n);return d});A(a,olympe.H.P.Aa,olympe.H.pd.pa,olympe.H.P.Ea,olympe.net.P.Aa,'server.WebSocketRequest','server.wakeUpRequest','server.ManagerConfig');A(a,olympe.H.qd.ji,olympe.H.qa.Wa,olympe.H.P.Ea,olympe.H.P.Aa,olympe.H.P.br,olympe.H.P.$q,olympe.H.P.Yq,olympe.H.P.vq,olympe.H.P.Vp,olympe.auth.P.gk,olympe.hc.P.Wj);A(a,olympe.H.P.Nn,olympe.H.wa.pa,olympe.H.P.Ea,olympe.net.P.Aa,olympe.auth.P.Aa,'server.bus.ManagerConfig');sa(a,olympe.auth.qd.Aa,olympe.H.qd.ji);sa(a,olympe.auth.qd.zp,
842
+ olympe.H.qd.ji);sa(a,olympe.auth.qd.Fe,olympe.H.qd.ji);sa(a,olympe.auth.qd.Ne,olympe.H.qd.ji);A(a,olympe.H.P.Qg,olympe.H.Mj,olympe.H.P.Ea,olympe.net.P.Aa,olympe.auth.P.Aa,olympe.H.P.Eo,olympe.H.P.$p);sa(a,olympe.ab.P.Qg,olympe.H.P.Qg);C(a,olympe.H.P.Gd,[olympe.ra.P.Aa,olympe.H.P.Aa,olympe.auth.P.Aa,olympe.ab.P.Qg,olympe.H.P.Mo,olympe.H.P.fp,olympe.H.P.yo,olympe.H.P.Uq],(d,e,f,g,h,k,l,n)=>new olympe.H.ah(d.Oc('server.source'),e,f,g,[h,k,l,n]));A(a,olympe.H.P.zh,olympe.H.Sj,olympe.H.P.ip,olympe.H.P.In);
843
+ sa(a,olympe.dc.ea.P.zh,olympe.H.P.zh);sa(a,olympe.ab.P.hm,olympe.H.P.Gd)},'olympe.communication');olympe.U.run([olympe.H.P.Nn],a=>{olympe.H.wa.Jc=()=>a});olympe.sc={};olympe.sc.P={Ea:'sc.Logger',fm:'sc.RootContext'};olympe.sc.Config={ef:'sc.app',eg:'sc.debug',ko:'sc.debugger',Js:'sc.disableTheme',PRODUCTION:'sc.production',iu:'sc.onstartTimeout',sq:'sc.remoteActionTimeout',Sp:'sc.offlineStart',au:'google.apikey'};
844
+ olympe.U.config(a=>{D(a,olympe.sc.Config.ef,'');D(a,olympe.sc.Config.Sp,!1);D(a,olympe.sc.Config.eg,!1);D(a,olympe.sc.Config.Js,!1);D(a,olympe.sc.Config.PRODUCTION,!1);D(a,olympe.sc.Config.iu,2E4);D(a,olympe.sc.Config.au,'AIzaSyD0rTnF3Tq-ZjgdaqyvC8Jg-RSgpZM2jBU');D(a,olympe.sc.Config.sq,1E4);C(a,olympe.sc.P.Ea,[olympe.ra.P.Aa],b=>b.Oc('sc'));C(a,olympe.sc.P.fm,[new olympe.U.fa(olympe.sc.Config.PRODUCTION)],b=>{const c=new olympe.sc.Sd('root','root',null);olympe.sc.ln=c;c.set(olympe.sc.Qa.C.PRODUCTION,
845
+ b);return new olympe.sc.Qa(c)})},'olympe.sc');olympe.U.run([olympe.sc.P.fm],a=>{olympe.dj().ctx=a});olympe.sc.Ym=()=>null!==olympe.dc.Ja().fc(void 0,olympe.sc.Runnable.F.Ec());olympe.sc.MC=(a,b,c,d)=>{c=a.create(olympe.sc.mc).setProperty(olympe.sc.mc.C,c||null).setProperty(olympe.sc.mc.L,d||null);a.Ua(olympe.sc.mc.F,c,b);a.Ua(olympe.dc.CloudObject.containsRel,b,c);return c.T()};olympe.sc.fh=a=>{a=olympe.dc.X.Tb.fh(a);return a instanceof olympe.sc.De?a.C():a};olympe.sc.aD=a=>{a=Ec(a);return a instanceof olympe.sc.De?a.C():a};
846
+ olympe.sc.YC=function(a){const b=olympe.dm.Pb.C.Ec(),c=olympe.dc.CloudObject.containsRel.Ec();var d=olympe.dc.za(a);if(void 0===d)return[];a=olympe.dc.Ja();var e=a.model(d);const f=[],g=[];let h=[];if(a.Tf(e,olympe.dm.Pb))h.push(d);else{for(e=[];null===a.fc(d,b);){e.push(d);const k=a.fc(d,c);if(null===k)return olympe.ra.Ya('sc').warn(`Object ${d} has no container`),[];k===a.fc(d,olympe.dc.CloudObject.instancesRel)?(f.push(d),d=a.fc(k,c)):d=k;if(e.includes(d))throw Error(`Instance ${d} (${a.name(d)}) is part of a cyclic contain pattern`);
847
+ }g.push(d);h.push(a.fc(g[0],b))}h=h.concat(a.Pf(h[0],olympe.dm.Pb.Ka));h=h.concat(a.Pf(h[h.length-1],olympe.dm.Vc.da.Ec()));h=h.concat(a.Pf(h[h.length-1],olympe.dm.Vc.$.Ec()));return[...f,...g,...h].reverse()};olympe.sc.ZC=a=>{a=a&&a.valueOf()||'';return a.startsWith('image/')?olympe.sc.Tj:a.startsWith('video/')?olympe.sc.pm:a.startsWith('font/')||a.startsWith('application/font-woff')?olympe.sc.rd:olympe.dm.File};olympe.sc.zb={};function Si(a,b){var c=olympe.sc.Qa;a=a.C;b=olympe.dc.za(b);var d;let e=null==(d=a.F)?void 0:d.get(b);if(!e){e=a.Yh(void 0,b);for(d=e.getParent();d&&d.Ka&&!d.id.startsWith('_');)d=d.getParent();d&&Ti(d,b,e)}return new c(e)}function Ui(a){let b;return null!=(b=a.$a(olympe.sc.Qa.C.PRODUCTION))?b:!1}
848
+ olympe.sc.Qa=class{constructor(a=olympe.sc.ln){this.C=a;this.N=olympe.ra.Ya('sc');this.F=null;this.onDestroy(()=>{null!==this.get(olympe.sc.Qa.C.TRANSACTION)&&this.N.warn(`The context ${this.C.Z()} is being destroyed but still has unreleased transactions. You probably forgot to end a transaction.`)})}Z(){return this.C.Z()}getParent(){if(null===this.F){const a=this.C.getParent();this.F=null===a?null:new olympe.sc.Qa(a)}return this.F}jw(a){const b=olympe.dc.Ja();let c=this.getParent();const d=e=>{if(e.He()){const f=
849
+ b.model(e.He());if(f&&b.cb(f,olympe.sc.lb.Ka)||a.modelTag&&!b.Rf(e.He(),a.modelTag))return!1}return!0};for(;c&&!d(c);)c=c.getParent();return c}He(){return this.C.He()}Sa(){return this.C.C}set(a,b){this.C.set(a,b);return this}vn(a){return this.set(a,Date.now())}remove(a){this.set(a,null)}Ib(a,b,c=!1){const d=olympe.dc.za(a),e=olympe.D.Qc(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.C.Z():void 0));return e.Ib()}get(a,b=!1){a=
850
+ this.$a(a,b);return void 0!==a?a:null}has(a,b=!1){return this.C.has(a,b)}observe(a,b=!0,c=!1){return new rxjs.Observable(d=>{const e=this.get(a);b||null!==e||d.next(e);const f=this.on(a,d.next.bind(d),c?void 0:this.C.Z(),!1);this.onDestroy(()=>{f();d.complete()});return f})}repeat(a,b){const c=Vi(this.C,a);a=b.subscribe(d=>{null!==d?this.set(c,d):this.remove(c)});this.Xf(a.unsubscribe.bind(a));return this}py(a){a=a instanceof olympe.sc.Runnable?a:this.get(a);if(!a)return null;const b=this.Yh(`Runner ${olympe.D.$a(a.na(),
851
+ '')}`);a.run(b);return b}Qy(a,b=!0,c=!1){return rxjs.firstValueFrom(this.observe(a,b,c))}yy(a){this.set(olympe.sc.Qa.C.dg,a);return this}$a(a,b=!0){return this.C.$a(a,b)}on(a,b,c,d=!0){return this.C.on(a,b,c,d)}Yh(a){return new olympe.sc.Qa(this.C.Yh(a))}Sk(a,b){return this.C.Sk(a,c=>{b(new olympe.sc.Qa(c))})}Ow(a){a=Wi(this.C,a);return a===this.C?this:a&&new olympe.sc.Qa(a)}destroy(){this.C.destroy()}Xf(a,b){return this.C.Xf(a,b)}Rk(a){this.C.Rk(a)}onDestroy(a){return this.C.onDestroy(a)}Xe(a){this.C.Xe(a)}clear(){this.C.clear()}G(){return this.C.G()}cb(a){a=
852
+ Xi(this.C,a);return null!==a?new olympe.sc.ui.jz(a,this):null}xw(a){a=Xi(this.C,a);return null!==a?new olympe.sc.ui.iz(a,this):null}Xx(...a){return rxjs.combineLatest(a.map(b=>{b=Xi(this.C,b);return null!==b?this.observe(b):rxjs.of(null)}))}mb(a){return(null==a?void 0:a.constructor)!==this.constructor?!1:this.C===a.C}};olympe.sc.Qa.prototype.observeMany=olympe.sc.Qa.prototype.Xx;olympe.sc.Qa.prototype.getEvent=olympe.sc.Qa.prototype.xw;olympe.sc.Qa.prototype.getProperty=olympe.sc.Qa.prototype.cb;
853
+ olympe.sc.Qa.prototype.clear=olympe.sc.Qa.prototype.clear;olympe.sc.Qa.prototype.offDestroy=olympe.sc.Qa.prototype.Xe;olympe.sc.Qa.prototype.onDestroy=olympe.sc.Qa.prototype.onDestroy;olympe.sc.Qa.prototype.offClear=olympe.sc.Qa.prototype.Rk;olympe.sc.Qa.prototype.onClear=olympe.sc.Qa.prototype.Xf;olympe.sc.Qa.prototype.destroy=olympe.sc.Qa.prototype.destroy;olympe.sc.Qa.prototype.getOtherContext=olympe.sc.Qa.prototype.Ow;olympe.sc.Qa.prototype.onContext=olympe.sc.Qa.prototype.Sk;
854
+ olympe.sc.Qa.prototype.createChild=olympe.sc.Qa.prototype.Yh;olympe.sc.Qa.prototype.setParentElement=olympe.sc.Qa.prototype.yy;olympe.sc.Qa.prototype.waitFor=olympe.sc.Qa.prototype.Qy;olympe.sc.Qa.prototype.runner=olympe.sc.Qa.prototype.py;olympe.sc.Qa.prototype.repeat=olympe.sc.Qa.prototype.repeat;olympe.sc.Qa.prototype.observe=olympe.sc.Qa.prototype.observe;olympe.sc.Qa.prototype.has=olympe.sc.Qa.prototype.has;olympe.sc.Qa.prototype.get=olympe.sc.Qa.prototype.get;olympe.sc.Qa.prototype.remove=olympe.sc.Qa.prototype.remove;
855
+ olympe.sc.Qa.prototype.trigger=olympe.sc.Qa.prototype.vn;olympe.sc.Qa.prototype.set=olympe.sc.Qa.prototype.set;olympe.sc.Qa.prototype.getClosest=olympe.sc.Qa.prototype.jw;olympe.sc.Qa.prototype.getParent=olympe.sc.Qa.prototype.getParent;olympe.sc.Qa.C={PRODUCTION:'__production',EDITION:'__editionMode',TRANSACTION:'__transaction',dg:'__htmlContainer',rz:'__dockableElement'};olympe.sc.dr=class extends olympe.sc.Qa{Xf(a,b){const c=b||olympe.X.ec();return super.Xf(()=>{this.Rk(c);a()},c)}observe(a,b=!0,c=!1){return new rxjs.Observable(d=>{const e=this.get(a);b||null!==e||d.next(e);const f=this.on(a,d.next.bind(d),c?void 0:this.Z(),!1);this.Xf(()=>{f();d.complete()});return f})}};function Vi(a,b){b=olympe.dc.za(b);let c,d;return(null==(c=a.ja)?void 0:c.get('I#'+b))||(null==(d=a.ja)?void 0:d.get('IO#'+b))||b}function Wi(a,b){if(b===a.id||a.W.has(b)||!b)return a;for(a=a.ta;a;){if(b===a.Z()||a.W.has(b))return a;const c=Yi(a.F,b);if(c)return c;a=a.getParent()}return null}function Zi(a,b,c){a.L||(a.L=new Map);const d=a.L.get(b);d?d[0]+=1:(a.L.set(b,[1,c]),Wc(olympe.dc.xd(),c))}
856
856
  function $i(a,b){if(a.L&&a.L.has(b)){var c=a.L.get(b);--c[0];0===c[0]&&(a.L.delete(b),0===a.L.size&&(a.L=null),Wc(olympe.dc.xd(),null,c[1]))}}function Xi(a,b){let c;return(null==(c=a.ja)?void 0:c.get('IO#'+b))||null}function aj(a){a.C.R(()=>{bj(a,c=>c.destroy())});a.C.onDestroy(()=>{let c;null==(c=a.L)||c.forEach(([e],f)=>{for(let g=0;g<e;g++)$i(a,f)});let d;null==(d=a.ta)||cj(d,a);a.W.clear();a.ta=null});let b;null==(b=a.ta)||dj(b,a)}
857
- function Yi(a,b){if(null===a)return null;if(a.has(b))return a.get(b);for(const c of a.values())if(c.Ka&&!c.id.startsWith('_')&&(a=Yi(c.F,b)))return a;return null}function ej(a,b){a.Ua=olympe.dc.za(b);a.Ka=b.Md().Zm();b.G().forEach(c=>{a.id===c||a.W.has(c)||(a.W.add(c),Ti(a,c,a))});a.ja=b.$()}function fj(a){a.Va=!0;let b;null==(b=a.F)||b.forEach(c=>{fj(c)})}function gj(a){a.Va=!1;let b;null==(b=a.F)||b.forEach(c=>{gj(c)})}
858
- function hj(a,...b){var c=olympe.sc.zb.Pe.C.jm;if(null!==a.zb)for(const {Vk:d,depth:e}of a.zb.values())d.process(a,c,e,...b)}function ij(a,b,c,d){const e='$'+b;a.da.add(b);c.map(f=>'@'+f+'.'+b).forEach(f=>{let g,h;null==(g=a.R)||null==(h=g.get(f))||h.forEach(k=>{k(d)})});bj(a,f=>{!f.Va&&f.da.has(b)||f.data.has(e)||ij(f,b,c,d)});a.da.delete(b)}
857
+ function Yi(a,b){if(null===a)return null;if(a.has(b))return a.get(b);for(const c of a.values())if(c.Ka&&!c.id.startsWith('_')&&(a=Yi(c.F,b)))return a;return null}function ej(a,b){a.Sa=olympe.dc.za(b);a.Ka=b.Md().Ym();b.G().forEach(c=>{a.id===c||a.W.has(c)||(a.W.add(c),Ti(a,c,a))});a.ja=b.$()}function fj(a){a.Va=!0;let b;null==(b=a.F)||b.forEach(c=>{fj(c)})}function gj(a){a.Va=!1;let b;null==(b=a.F)||b.forEach(c=>{gj(c)})}
858
+ function hj(a,...b){var c=olympe.sc.zb.Pe.C.im;if(null!==a.zb)for(const {Uk:d,depth:e}of a.zb.values())d.process(a,c,e,...b)}function ij(a,b,c,d){const e='$'+b;a.da.add(b);c.map(f=>'@'+f+'.'+b).forEach(f=>{let g,h;null==(g=a.R)||null==(h=g.get(f))||h.forEach(k=>{k(d)})});bj(a,f=>{!f.Va&&f.da.has(b)||f.data.has(e)||ij(f,b,c,d)});a.da.delete(b)}
859
859
  function jj(a,b,c){a.R||(a.R=new Map);let d=a.R.get(b);void 0===d&&(d=new Map,a.R.set(b,d));olympe.sc.Sd.C+=1;const e=olympe.sc.Sd.C;d.set(e,c);return()=>{const f=a.R.get(b);f&&(f.delete(e),0===f.size&&a.R.delete(b))}}function Ti(a,b,c){a.da.add(b);let d;const e=null==(d=a.R)?void 0:d.get('&'+b);if(e)for(const f of e.values())f(c);bj(a,f=>{f.da.has(b)||Ti(f,b,c)});a.da.delete(b)}function bj(a,b){let c;null==(c=a.F)||c.forEach(b)}function kj(a,b){a.data.forEach((c,d)=>b(c,d.slice(1)))}
860
- function lj(a,b){if(null!==a.zb&&a.zb.has(b)){var {Vk:c,depth:d}=a.zb.get(b);bj(a,e=>{lj(e,b)});0===d&&c.F();a.zb.delete(b);0===a.zb.size&&(a.zb=null)}}function mj(a,b,c=0){null===a.zb&&(a.zb=new Map);a.zb.has(b.Z())||(a.zb.set(b.Z(),{Vk:b,depth:c}),bj(a,d=>{(-1===b.G||c<b.G)&&mj(d,b,c+1)}),a.onDestroy(()=>{lj(a,b.Z())}));b.Z()}function nj(a){var b=olympe.sc.zb.Pe.F.sq;const c=[];if(null!==a.zb)for(const {Vk:d}of a.zb.values())d.L()===b&&(c.push(d.Z()),d.F(),lj(a,d.Z()))}
860
+ function lj(a,b){if(null!==a.zb&&a.zb.has(b)){var {Uk:c,depth:d}=a.zb.get(b);bj(a,e=>{lj(e,b)});0===d&&c.F();a.zb.delete(b);0===a.zb.size&&(a.zb=null)}}function mj(a,b,c=0){null===a.zb&&(a.zb=new Map);a.zb.has(b.Z())||(a.zb.set(b.Z(),{Uk:b,depth:c}),bj(a,d=>{(-1===b.G||c<b.G)&&mj(d,b,c+1)}),a.onDestroy(()=>{lj(a,b.Z())}));b.Z()}function nj(a){var b=olympe.sc.zb.Pe.F.rq;const c=[];if(null!==a.zb)for(const {Uk:d}of a.zb.values())d.L()===b&&(c.push(d.Z()),d.F(),lj(a,d.Z()))}
861
861
  function dj(a,b){null===a.F&&(a.F=new Map);a.F.set(b.id,b)}function cj(a,b){let c;null==(c=a.F)||c.delete(b.Z());let d;0===(null==(d=a.F)?void 0:d.size)&&(a.F=null)}
862
- olympe.sc.Sd=class{constructor(a,b='no name',c=olympe.sc.mn){this.id=a;this.wd=b;this.W=new Set;this.ta=c;this.C=new olympe.D.Zb('SC Context');this.data=new Map;this.Ua=this.$=this.L=this.F=this.R=null;this.Ka=!1;this.da=new Set;this.Va=!1;this.ja=null;this.N=olympe.ra.Ya('sc');this.zb=null;aj(this)}Z(){return this.id}getParent(){return this.ta}He(){return this.Ua}set(a,b){if(!this.C.$()&&!this.C.G()){var c=olympe.dc.za(a),d,e;a=(null==(d=this.ja)?void 0:d.get('O#'+c))||(null==(e=this.ja)?void 0:
862
+ olympe.sc.Sd=class{constructor(a,b='no name',c=olympe.sc.ln){this.id=a;this.wd=b;this.W=new Set;this.ta=c;this.C=new olympe.D.Zb('SC Context');this.data=new Map;this.Sa=this.$=this.L=this.F=this.R=null;this.Ka=!1;this.da=new Set;this.Va=!1;this.ja=null;this.N=olympe.ra.Ya('sc');this.zb=null;aj(this)}Z(){return this.id}getParent(){return this.ta}He(){return this.Sa}set(a,b){if(!this.C.$()&&!this.C.G()){var c=olympe.dc.za(a),d,e;a=(null==(d=this.ja)?void 0:d.get('O#'+c))||(null==(e=this.ja)?void 0:
863
863
  e.get('IO#'+c))||c;d='$'+a;(e=this.data.get(d))&&e.valueOf&&(e=e.valueOf());void 0===b||null===b?void 0!==e&&(this.data.delete(d),null!==this.zb&&0<this.zb.size&&hj(this,a,null),ij(this,a,['*',this.id,...this.W],null)):((c=void 0===e)||(c=!('function'===typeof b.mb?b.mb(e):b.valueOf()===e.valueOf())),c&&(this.data.set(d,b),null!==this.zb&&0<this.zb.size&&hj(this,a,b),ij(this,a,['*',this.id,...this.W],b)))}}on(a,b,c,d=!0){if(this.C.G()||this.C.$())return()=>{};const e=Vi(this,a),f=c?olympe.dc.za(c):
864
- '*';a=jj(this,'@'+f+'.'+e,b);c=c?(c=Wi(this,f))?c.$a(e,!1):void 0:this.$a(e);void 0!==c&&b(c);if(d)olympe.D.La().onDestroy(a);return a}has(a,b=!1){a='$'+Vi(this,a);let c=this.data.has(a),d=this.getParent();if(b)for(;!c&&d;)c=d.data.has(a),d=d.getParent();return c}Yh(a,b){const c=null!=b?b:'_'+olympe.X.ec(),d=this.C.run(()=>new olympe.sc.Sd(c,a,this));null!==this.zb&&0<this.zb.size&&this.zb.forEach(({Vk:e,depth:f})=>{(-1===e.G||f<e.G)&&mj(d,e,f+1)});return d}Tk(a,b){const c=Wi(this,a);if(c)return b(c),
865
- ()=>{};const d=jj(this,'&'+a,e=>{d&&d();b(e)});return d}$a(a,b=!0){a='$'+Vi(this,a);let c=this.data.get(a),d=this.getParent();if(b)for(;void 0===c&&null!==d;)c=d.data.get(a),d=d.getParent();return c}destroy(){this.C.$()||this.C.G()||this.C.destroy()}Xf(a,b){if(this.C.G())a();else return++olympe.sc.Sd.C,b=b||String(olympe.sc.Sd.C),null===this.$&&(this.$=new Map),this.$.set(b,a),b;return b||'noId'}Sk(a){null!==this.$&&this.$.delete(a)}onDestroy(a){return this.G()?(a(),'noId'):this.C.onDestroy(a)}Xe(a){this.G()||
866
- this.C.Xe(a)}clear(){if(!this.C.$()&&!this.C.G()){let a;null==(a=this.$)||a.forEach(b=>b());this.C.Ka()}}G(){return this.C.G()}};olympe.sc.Sd.prototype.getParent=olympe.sc.Sd.prototype.getParent;olympe.sc.Sd.C=0;olympe.sc.Sd.F={nt:'I#',pu:'O#',kA:'IO#'};function oj(a,b,c){return(c=c.He())?`${a}.${c}.${b}`:`${a}.${b}`}olympe.sc.zb.Pe=class{constructor(a=-1){this.id=olympe.X.ih();this.active=!0;this.G=a}F(){this.active=!1}Z(){return this.id}L(){}process(){}};olympe.sc.zb.Pe.C={jm:'SET'};olympe.sc.zb.Pe.F={sq:'REMOTE',St:'LOCAL'};olympe.sc.Vd=class a{constructor(){this.F=this.L=this.R=null;this.W=new Map;this.G=new Map;this.C=new olympe.X.nm(1E4);Ha(this.C,b=>{nj(b)})}$(b,c,d){const e=b.body(),f=e.c,g=this.W.get(f);switch(e.t){case olympe.sc.Vd.C.qu:c=this.G.get(e.f);b.te(c).catch(l=>{d.error('Unable to reply with paths: ',l)});break;case olympe.sc.Vd.C.ru:const h=f+c,k=(l,n,p=0)=>{kj(l,(q,r)=>{let t;q instanceof olympe.dc.CloudObject?t=a.G(q):t=q;let u;q=null!=(u=l.He())?u:'';0<q.length&&(q+='.');n.push([`${p}.${q}${r}`,
867
- t])})};b.hn(h).then(()=>{const l=[];k(g,l,0);bj(g,p=>{k(p,l,1)});olympe.H.wa.fb.tb.publish(h,{t:olympe.sc.Vd.C.mt,v:l,ts:0}).catch(p=>{d.error('Error publishing on service : ',p)});const n=new olympe.sc.zb.Ju(h);mj(g,n);this.C.has(g)?Ga(this.C,g):this.C.add(g)}).catch(l=>{d.error('Error notifying on a contextId : ',l)});break;case olympe.sc.Vd.C.su:void 0!==g&&this.C.has(g)&&Ga(this.C,g);break;case olympe.sc.Vd.C.ql:void 0!==g&&(this.C.delete(g),nj(g))}}ja(b,c,d){this.R=new olympe.H.wa.fb.tb('discovery_debug_id',
868
- c);this.R.listen().subscribe(e=>{var f=e.body();if(f.t===olympe.sc.Vd.C.Ls){e=f.i;f=f.f;if(!this.G.has(f)){const g=this.da(f,c,b);if(0!==g.length)this.G.set(f,g);else return}null===this.F&&(this.F=olympe.X.ih(),this.L=new olympe.H.wa.fb.tb(this.F,Si(c,this.F)),this.L.listen().subscribe(g=>{this.$(g,b,d)}),olympe.H.wa.fb.tb.publish(e,{t:olympe.sc.Vd.C.es,n:olympe.U.getParameter(olympe.sc.Config.lo)||'no name',a:b,s:this.F}).catch(g=>{d.error('Error publishing on draw service : '+g)}))}})}da(b,c,d){const e=
869
- [],f=olympe.dc.Ja(),g=(h,k)=>{bj(h,l=>{if(null!==l.He()){const n=olympe.dc.CloudObject.get(l.He()).Cr(olympe.sc.Runnable.L).Ic();if(null!==n){const p=k+'/'+f.name(n);n.T()===b&&(e.push([p,l.Z()]),this.W.set(l.Z(),l));g(l,p)}}})};g(c.C,f.name(d));return e}static F(b,c,d){let e=d;d instanceof olympe.dc.CloudObject&&(e=a.G(d));olympe.H.wa.fb.tb.publish(b,{t:olympe.sc.Vd.C.Ph,k:c,v:e,ts:Date.now()}).catch(f=>{olympe.ra.Ya('Debugger').error('Error publishing on service : ',f)})}static G(b){if(null===b||
870
- void 0===b)return'<null>';const c=olympe.dc.Ja();if(b instanceof olympe.dc.CloudObject){var d=b.Nb();if(!c.Rf(d,olympe.sc.ff))return b.toString();let f=`${b.Mf().name()} (${b.T()})`;var e=olympe.dc.CloudObject.get(d);d=olympe.dc.gb.from(e).Pm(olympe.dc.CloudObject.extendRel,!0).Bf().rb(olympe.dc.CloudObject.propertyRel).Bf().Ic();e=olympe.dc.gb.from(e).Pm(olympe.dc.CloudObject.extendRel,!0).Bf().rb(olympe.dc.CloudObject.G).Bf().Ic();d=d.filter(([g])=>g instanceof olympe.sc.ff);0!==d.length&&(f+='<br> ',
871
- f+='Properties:<br>',d.forEach(([,g])=>{f+=' ';f+=' - '+c.name(g)+' : '+c.cb(b.T(),g)+'<br>'}));d=e.filter(([g])=>g instanceof olympe.sc.ff);0!==d.length&&(f+=' ',f+='Relations:<br>',d.forEach(([,g])=>{f+=' ';f+=' - '+c.name(g)+'<br>'}));return f}return b.toString()}};olympe.sc.Vd.L='discovery_debug_id';olympe.sc.Vd.C={Ls:0,es:1,qu:2,ru:3,mt:4,Ph:5,su:6,ql:7};olympe.sc.zb.pA=class extends olympe.sc.zb.Pe{constructor(a=-1){super(a);this.C=new Map}L(){return olympe.sc.zb.Pe.F.St}process(a,b,c,...d){if(this.active)switch(b){case olympe.sc.zb.Pe.C.jm:a=oj(c,Vi(a,d[0]),a);d=d[1];let e;null==(e=this.C.get(a))||e(d)}}on(a,b){this.C.set(a,b)}};olympe.sc.zb.Ju=class extends olympe.sc.zb.Pe{constructor(a){super(1);this.R=a;this.C=new Map;this.db=olympe.dc.Ja()}L(){return olympe.sc.zb.Pe.F.sq}F(){super.F();for(const a of this.C.values())a();this.C.clear()}process(a,b,c,...d){if(this.active)switch(b){case olympe.sc.zb.Pe.C.jm:if(void 0!==d[0]&&null!==d[0]){const e=oj(c,Vi(a,d[0]),a),f=d[1];let g;null==(g=this.C.get(e))||g();this.C.delete(e);if(f instanceof olympe.dc.CloudObject&&f.Mf()instanceof olympe.sc.ff){const h=Gd(this.db,f,()=>{olympe.sc.Vd.F(this.R,
864
+ '*';a=jj(this,'@'+f+'.'+e,b);c=c?(c=Wi(this,f))?c.$a(e,!1):void 0:this.$a(e);void 0!==c&&b(c);if(d)olympe.D.La().onDestroy(a);return a}has(a,b=!1){a='$'+Vi(this,a);let c=this.data.has(a),d=this.getParent();if(b)for(;!c&&d;)c=d.data.has(a),d=d.getParent();return c}Yh(a,b){const c=null!=b?b:'_'+olympe.X.ec(),d=this.C.run(()=>new olympe.sc.Sd(c,a,this));null!==this.zb&&0<this.zb.size&&this.zb.forEach(({Uk:e,depth:f})=>{(-1===e.G||f<e.G)&&mj(d,e,f+1)});return d}Sk(a,b){const c=Wi(this,a);if(c)return b(c),
865
+ ()=>{};const d=jj(this,'&'+a,e=>{d&&d();b(e)});return d}$a(a,b=!0){a='$'+Vi(this,a);let c=this.data.get(a),d=this.getParent();if(b)for(;void 0===c&&null!==d;)c=d.data.get(a),d=d.getParent();return c}destroy(){this.C.$()||this.C.G()||this.C.destroy()}Xf(a,b){if(this.C.G())a();else return++olympe.sc.Sd.C,b=b||String(olympe.sc.Sd.C),null===this.$&&(this.$=new Map),this.$.set(b,a),b;return b||'noId'}Rk(a){null!==this.$&&this.$.delete(a)}onDestroy(a){return this.G()?(a(),'noId'):this.C.onDestroy(a)}Xe(a){this.G()||
866
+ this.C.Xe(a)}clear(){if(!this.C.$()&&!this.C.G()){let a;null==(a=this.$)||a.forEach(b=>b());this.C.Ka()}}G(){return this.C.G()}};olympe.sc.Sd.prototype.getParent=olympe.sc.Sd.prototype.getParent;olympe.sc.Sd.C=0;olympe.sc.Sd.F={mt:'I#',ou:'O#',jA:'IO#'};function oj(a,b,c){return(c=c.He())?`${a}.${c}.${b}`:`${a}.${b}`}olympe.sc.zb.Pe=class{constructor(a=-1){this.id=olympe.X.ih();this.active=!0;this.G=a}F(){this.active=!1}Z(){return this.id}L(){}process(){}};olympe.sc.zb.Pe.C={im:'SET'};olympe.sc.zb.Pe.F={rq:'REMOTE',Rt:'LOCAL'};olympe.sc.Vd=class a{constructor(){this.F=this.L=this.R=null;this.W=new Map;this.G=new Map;this.C=new olympe.X.mm(1E4);Ha(this.C,b=>{nj(b)})}$(b,c,d){const e=b.body(),f=e.c,g=this.W.get(f);switch(e.t){case olympe.sc.Vd.C.pu:c=this.G.get(e.f);b.te(c).catch(l=>{d.error('Unable to reply with paths: ',l)});break;case olympe.sc.Vd.C.qu:const h=f+c,k=(l,n,p=0)=>{kj(l,(q,r)=>{let t;q instanceof olympe.dc.CloudObject?t=a.G(q):t=q;let u;q=null!=(u=l.He())?u:'';0<q.length&&(q+='.');n.push([`${p}.${q}${r}`,
867
+ t])})};b.gn(h).then(()=>{const l=[];k(g,l,0);bj(g,p=>{k(p,l,1)});olympe.H.wa.fb.tb.publish(h,{t:olympe.sc.Vd.C.lt,v:l,ts:0}).catch(p=>{d.error('Error publishing on service : ',p)});const n=new olympe.sc.zb.Iu(h);mj(g,n);this.C.has(g)?Ga(this.C,g):this.C.add(g)}).catch(l=>{d.error('Error notifying on a contextId : ',l)});break;case olympe.sc.Vd.C.ru:void 0!==g&&this.C.has(g)&&Ga(this.C,g);break;case olympe.sc.Vd.C.pl:void 0!==g&&(this.C.delete(g),nj(g))}}ja(b,c,d){this.R=new olympe.H.wa.fb.tb('discovery_debug_id',
868
+ c);this.R.listen().subscribe(e=>{var f=e.body();if(f.t===olympe.sc.Vd.C.Ks){e=f.i;f=f.f;if(!this.G.has(f)){const g=this.da(f,c,b);if(0!==g.length)this.G.set(f,g);else return}null===this.F&&(this.F=olympe.X.ih(),this.L=new olympe.H.wa.fb.tb(this.F,Si(c,this.F)),this.L.listen().subscribe(g=>{this.$(g,b,d)}),olympe.H.wa.fb.tb.publish(e,{t:olympe.sc.Vd.C.ds,n:olympe.U.getParameter(olympe.sc.Config.ko)||'no name',a:b,s:this.F}).catch(g=>{d.error('Error publishing on draw service : '+g)}))}})}da(b,c,d){const e=
869
+ [],f=olympe.dc.Ja(),g=(h,k)=>{bj(h,l=>{if(null!==l.He()){const n=olympe.dc.CloudObject.get(l.He()).Br(olympe.sc.Runnable.L).Ic();if(null!==n){const p=k+'/'+f.name(n);n.T()===b&&(e.push([p,l.Z()]),this.W.set(l.Z(),l));g(l,p)}}})};g(c.C,f.name(d));return e}static F(b,c,d){let e=d;d instanceof olympe.dc.CloudObject&&(e=a.G(d));olympe.H.wa.fb.tb.publish(b,{t:olympe.sc.Vd.C.Ph,k:c,v:e,ts:Date.now()}).catch(f=>{olympe.ra.Ya('Debugger').error('Error publishing on service : ',f)})}static G(b){if(null===b||
870
+ void 0===b)return'<null>';const c=olympe.dc.Ja();if(b instanceof olympe.dc.CloudObject){var d=b.Nb();if(!c.Rf(d,olympe.sc.ff))return b.toString();let f=`${b.Mf().name()} (${b.T()})`;var e=olympe.dc.CloudObject.get(d);d=olympe.dc.gb.from(e).Om(olympe.dc.CloudObject.extendRel,!0).Bf().rb(olympe.dc.CloudObject.propertyRel).Bf().Ic();e=olympe.dc.gb.from(e).Om(olympe.dc.CloudObject.extendRel,!0).Bf().rb(olympe.dc.CloudObject.G).Bf().Ic();d=d.filter(([g])=>g instanceof olympe.sc.ff);0!==d.length&&(f+='<br> ',
871
+ f+='Properties:<br>',d.forEach(([,g])=>{f+=' ';f+=' - '+c.name(g)+' : '+c.cb(b.T(),g)+'<br>'}));d=e.filter(([g])=>g instanceof olympe.sc.ff);0!==d.length&&(f+=' ',f+='Relations:<br>',d.forEach(([,g])=>{f+=' ';f+=' - '+c.name(g)+'<br>'}));return f}return b.toString()}};olympe.sc.Vd.L='discovery_debug_id';olympe.sc.Vd.C={Ks:0,ds:1,pu:2,qu:3,lt:4,Ph:5,ru:6,pl:7};olympe.sc.zb.oA=class extends olympe.sc.zb.Pe{constructor(a=-1){super(a);this.C=new Map}L(){return olympe.sc.zb.Pe.F.Rt}process(a,b,c,...d){if(this.active)switch(b){case olympe.sc.zb.Pe.C.im:a=oj(c,Vi(a,d[0]),a);d=d[1];let e;null==(e=this.C.get(a))||e(d)}}on(a,b){this.C.set(a,b)}};olympe.sc.zb.Iu=class extends olympe.sc.zb.Pe{constructor(a){super(1);this.R=a;this.C=new Map;this.db=olympe.dc.Ja()}L(){return olympe.sc.zb.Pe.F.rq}F(){super.F();for(const a of this.C.values())a();this.C.clear()}process(a,b,c,...d){if(this.active)switch(b){case olympe.sc.zb.Pe.C.im:if(void 0!==d[0]&&null!==d[0]){const e=oj(c,Vi(a,d[0]),a),f=d[1];let g;null==(g=this.C.get(e))||g();this.C.delete(e);if(f instanceof olympe.dc.CloudObject&&f.Mf()instanceof olympe.sc.ff){const h=Gd(this.db,f,()=>{olympe.sc.Vd.F(this.R,
872
872
  e,f)});this.C.set(e,()=>{Hd(this.db,f,h)})}olympe.sc.Vd.F(this.R,e,f)}}}};olympe.sc.Metadata=class extends olympe.dc.CloudObject{};olympe.sc.Metadata.O=olympe.dc.ya.C('0161ae936c62f9fcd131',olympe.sc.Metadata);olympe.sc.mc=class extends olympe.dc.CloudObject{F(){return this.Eb(olympe.sc.mc.L)}C(){return this.Eb(olympe.sc.mc.C)}};olympe.sc.mc.O=olympe.dc.ya.C('01703376c4a81c0e9d90',olympe.sc.mc);olympe.sc.mc.L=olympe.sc.mc.O.xa('01703376c4a81c0e9d91');olympe.sc.mc.C=olympe.sc.mc.O.xa('01703376c4a81c0e9d92');olympe.sc.mc.F=olympe.sc.mc.O.Ga('01703376c4a81c0e9d93');P(olympe.dc.CloudObject.O,olympe.sc.mc.F);olympe.sc.mc.prototype.F.K=olympe.D.J.F;olympe.sc.mc.prototype.C.K=olympe.D.J.F;olympe.sc.X={};function pj(a,b){const c=Math.random().toString(36).substr(2)+Math.random().toString(36).substr(2);a.C.set(c,b);return c}
873
- olympe.sc.X.$s=class{constructor(a,b,c){const d=olympe.net.eb.Yd.GET,e=olympe.net.eb.Yd.Ac,f=olympe.net.eb.Yd.fk,g=olympe.net.eb.Yd.Rl,h=olympe.net.eb.Headers.Ej,k=olympe.net.eb.Headers.ni;this.N=a;this.G=b.$([d,e,f,g],[h,k]);this.L=c;this.C=new olympe.X.mm(3E4);this.F=new olympe.D.Zb('FileService context')}start(a){var b=olympe.net.eb.Yd.GET;const c=olympe.net.eb.Yd.Ac,d=olympe.net.eb.Yd.fk,e=olympe.net.eb.Yd.Rl,f=olympe.net.eb.cd.Gh,g=olympe.net.eb.cd.Ys,h=olympe.net.eb.cd.Bq,k=olympe.net.eb.Headers.ni,
874
- l=olympe.net.eb.Headers.ks,n=`fileServer_${a}`;a=`/${this.L}/${a}/:${'fileTag'}`.replace(/\/+/g,'/').replace(/\/$/,'');this.N.debug(`Started file service with path : ${a}`);b=this.G.L(n,a,[b,c,d,e],(p,q)=>{if(p.method===e)return Promise.resolve(new olympe.net.Sg('',f,'',{[l]:'*'}));const r=p.ej()[k],t=this.C.get(r);if(!t)return Promise.resolve(new olympe.net.Sg('Invalid token',g,'Access denied'));this.C.delete(r);return t(p.ej(),q.get('fileTag'),p.body).catch(u=>Promise.resolve(new olympe.net.Sg(`Internal server error: ${u}`,
875
- h,'Internal server error')))});this.F.onDestroy(()=>{this.G.W(n).catch(p=>this.N.error(`An error occurred while stopping the file service: ${p}`))});return b}stop(){this.F.destroy()}};olympe.sc.Je={};olympe.sc.Je.sg={gz:null,Lu:'screenflow',ev:'ui-design',Dq:'software-intelligence',Hj:'data-management'};olympe.sc.oe=class extends olympe.dm.BrickMetadata{C(){return olympe.sc.Je.sg.Dq}F(){return this.ub(olympe.sc.oe.C,olympe.sc.logic.Ki)}G(){return this.ub(olympe.sc.oe.F,olympe.sc.logic.Kh)}};olympe.sc.oe.O=olympe.dc.ya.C('011100000000000adef0',olympe.sc.oe);olympe.sc.oe.C=olympe.sc.oe.O.Ga('016ac4f59a2917fdef01');olympe.sc.oe.F=olympe.sc.oe.O.Ga('016ac4f59a2917fdef02');olympe.sc.oe.prototype.F.K=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.sc.oe.prototype.G.K=new olympe.D.J(()=>olympe.dc.Da,[]);function qj(a,b){[].forEach(c=>c.call(a,b,(d,e)=>{null===e?b.remove(d):b.set(d,e)}))}function rj(a,b){const c=[];for(const d of b)b=a.db.cb(d,olympe.sc.logic.Gc.C,!0),c[b]=d;return c}
876
- olympe.sc.lb=class extends olympe.dm.BrickMetadata{Gt(a,b,c,d,e=!0){e||olympe.ra.Ya('sc').error('parameter own= false ignored, investigate');return olympe.D.bf(L(this.Of(a,olympe.dc.X.Tb.fh,c)),d)}$w(){return this.ub(olympe.sc.lb.$,olympe.sc.Runnable)}nw(){return this.ub(olympe.sc.lb.da,olympe.sc.Runnable)}bn(){return this.db.cb(this,olympe.sc.lb.Ka)}Zm(){return null!==this.db.fc(this.tag,olympe.sc.Runnable.F.Ec())}Hl(){return this.ub(olympe.sc.lb.F,olympe.sc.logic.Cb)}Wj(){return this.ub(olympe.sc.lb.L,
873
+ olympe.sc.X.Zs=class{constructor(a,b,c){const d=olympe.net.eb.Yd.GET,e=olympe.net.eb.Yd.Ac,f=olympe.net.eb.Yd.ek,g=olympe.net.eb.Yd.Ql,h=olympe.net.eb.Headers.Dj,k=olympe.net.eb.Headers.ni;this.N=a;this.G=b.$([d,e,f,g],[h,k]);this.L=c;this.C=new olympe.X.lm(3E4);this.F=new olympe.D.Zb('FileService context')}start(a){var b=olympe.net.eb.Yd.GET;const c=olympe.net.eb.Yd.Ac,d=olympe.net.eb.Yd.ek,e=olympe.net.eb.Yd.Ql,f=olympe.net.eb.cd.Gh,g=olympe.net.eb.cd.Xs,h=olympe.net.eb.cd.Aq,k=olympe.net.eb.Headers.ni,
874
+ l=olympe.net.eb.Headers.js,n=`fileServer_${a}`;a=`/${this.L}/${a}/:${'fileTag'}`.replace(/\/+/g,'/').replace(/\/$/,'');this.N.debug(`Started file service with path : ${a}`);b=this.G.L(n,a,[b,c,d,e],(p,q)=>{if(p.method===e)return Promise.resolve(new olympe.net.Sg('',f,'',{[l]:'*'}));const r=p.ej()[k],t=this.C.get(r);if(!t)return Promise.resolve(new olympe.net.Sg('Invalid token',g,'Access denied'));this.C.delete(r);return t(p.ej(),q.get('fileTag'),p.body).catch(u=>Promise.resolve(new olympe.net.Sg(`Internal server error: ${u}`,
875
+ h,'Internal server error')))});this.F.onDestroy(()=>{this.G.W(n).catch(p=>this.N.error(`An error occurred while stopping the file service: ${p}`))});return b}stop(){this.F.destroy()}};olympe.sc.Je={};olympe.sc.Je.sg={fz:null,Ku:'screenflow',dv:'ui-design',Cq:'software-intelligence',Gj:'data-management'};olympe.sc.oe=class extends olympe.dm.BrickMetadata{C(){return olympe.sc.Je.sg.Cq}F(){return this.ub(olympe.sc.oe.C,olympe.sc.logic.Ki)}G(){return this.ub(olympe.sc.oe.F,olympe.sc.logic.Kh)}};olympe.sc.oe.O=olympe.dc.ya.C('011100000000000adef0',olympe.sc.oe);olympe.sc.oe.C=olympe.sc.oe.O.Ga('016ac4f59a2917fdef01');olympe.sc.oe.F=olympe.sc.oe.O.Ga('016ac4f59a2917fdef02');olympe.sc.oe.prototype.F.K=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.sc.oe.prototype.G.K=new olympe.D.J(()=>olympe.dc.Da,[]);function qj(a,b){[].forEach(c=>c.call(a,b,(d,e)=>{null===e?b.remove(d):b.set(d,e)}))}function rj(a,b){const c=[];for(const d of b)b=a.db.cb(d,olympe.sc.logic.Gc.C,!0),c[b]=d;return c}
876
+ olympe.sc.lb=class extends olympe.dm.BrickMetadata{Ft(a,b,c,d,e=!0){e||olympe.ra.Ya('sc').error('parameter own= false ignored, investigate');return olympe.D.bf(L(this.Of(a,olympe.dc.X.Tb.fh,c)),d)}Zw(){return this.ub(olympe.sc.lb.$,olympe.sc.Runnable)}mw(){return this.ub(olympe.sc.lb.da,olympe.sc.Runnable)}an(){return this.db.cb(this,olympe.sc.lb.Ka)}Ym(){return null!==this.db.fc(this.tag,olympe.sc.Runnable.F.Ec())}Gl(){return this.ub(olympe.sc.lb.F,olympe.sc.logic.Cb)}Vj(){return this.ub(olympe.sc.lb.L,
877
877
  olympe.sc.logic.Rb)}};olympe.sc.lb.O=olympe.dc.ya.C('0112000000000000def0',olympe.sc.lb);olympe.sc.lb.Ka=olympe.sc.lb.O.xa('01692aa71f3108454479');olympe.sc.lb.Vb=olympe.sc.lb.O.xa('0166446c1f128ebc903a');olympe.sc.lb.$=olympe.sc.lb.O.Ga('01692a4af82e8984742c');olympe.sc.lb.da=olympe.sc.lb.O.Ga('01692a4af82e8984742d');olympe.sc.lb.ta=olympe.sc.lb.O.Ga('01692a4af82e8984742e');olympe.sc.lb.F=olympe.sc.lb.O.Ga('01621fb84e320000f00a');olympe.sc.lb.L=olympe.sc.lb.O.Ga('01621fb84e320000f00b');
878
- olympe.sc.lb.od=olympe.sc.lb.O.Ga('0171838bcfed0000e00e');olympe.sc.lb.Xc=olympe.sc.lb.O.Ga('0171838bcfed0000a00a');m=olympe.sc.lb.prototype;m.Gt.K=olympe.D.J.C;m.$w.K=new olympe.D.J(()=>olympe.dc.Da,[]);m.nw.K=new olympe.D.J(()=>olympe.dc.Da,[]);m.bn.K=olympe.D.J.C;m.Zm.K=olympe.D.J.C;m.Hl.K=new olympe.D.J(()=>olympe.dc.Da,[]);m.Wj.K=new olympe.D.J(()=>olympe.dc.Da,[]);function sj(a){const b=olympe.dc.CloudObject.yr(new Map,a);olympe.D.La().onDestroy(()=>{const c=new olympe.dc.Transaction;c.delete(b);c.jb()});return b}function tj(a,b){ej(b.C,a);qj(a.Md(),b);const c=a.R(),d=uj(b,c),e=[];c.forEach((f,g)=>{f===a.ta?e[0]=g:f===a.ja&&(e[1]=g)});void 0!==e[0]&&void 0!==e[1]&&(vj(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])})}
879
- function wj(a,b){var c=a.Nb();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=>{if(!b.G()&&(b.clear(),null!==h)){h=Array.isArray(h)?h:[h];const k=new olympe.sc.er(b.C);b.C.C.run(a.update.bind(a,k,h,g));return!0}return!1})).subscribe(rxjs.Subscriber.create(h=>h?a.N.debug(e):a.N.debug(f),a.Va.bind(a,b),()=>a.N.debug(`Brick ${d} completed`)));b.onDestroy(c.unsubscribe.bind(c))}
878
+ olympe.sc.lb.od=olympe.sc.lb.O.Ga('0171838bcfed0000e00e');olympe.sc.lb.Xc=olympe.sc.lb.O.Ga('0171838bcfed0000a00a');m=olympe.sc.lb.prototype;m.Ft.K=olympe.D.J.C;m.Zw.K=new olympe.D.J(()=>olympe.dc.Da,[]);m.mw.K=new olympe.D.J(()=>olympe.dc.Da,[]);m.an.K=olympe.D.J.C;m.Ym.K=olympe.D.J.C;m.Gl.K=new olympe.D.J(()=>olympe.dc.Da,[]);m.Vj.K=new olympe.D.J(()=>olympe.dc.Da,[]);function sj(a){const b=olympe.dc.CloudObject.xr(new Map,a);olympe.D.La().onDestroy(()=>{const c=new olympe.dc.Transaction;c.delete(b);c.jb()});return b}function tj(a,b){ej(b.C,a);qj(a.Md(),b);const c=a.R(),d=uj(b,c),e=[];c.forEach((f,g)=>{f===a.ta?e[0]=g:f===a.ja&&(e[1]=g)});void 0!==e[0]&&void 0!==e[1]&&(vj(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])})}
879
+ function wj(a,b){var c=a.Nb();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=>{if(!b.G()&&(b.clear(),null!==h)){h=Array.isArray(h)?h:[h];const k=new olympe.sc.dr(b.C);b.C.C.run(a.update.bind(a,k,h,g));return!0}return!1})).subscribe(rxjs.Subscriber.create(h=>h?a.N.debug(e):a.N.debug(f),a.Va.bind(a,b),()=>a.N.debug(`Brick ${d} completed`)));b.onDestroy(c.unsubscribe.bind(c))}
880
880
  function xj(a,b,c,d){const e=d.C.C,f=V(a.db,b,c,e.F((g,h)=>{const k=Si(d,h);g?olympe.dc.CloudObject.get(h).run(k):k.destroy()}));e.R(a.db.C.bind(a.db,b,c,f,!0))}function uj(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)}})}
881
881
  function vj(a,b,c){const d=olympe.D.La(),e=Gd(a.db,a.tag,d.F((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.fh(g)))}));d.onDestroy(()=>{Hd(a.db,a.tag,e)})}
882
- olympe.sc.Runnable=class extends olympe.dm.BrickMetadata{constructor(a,b,c){super(a,b);this.N=c}run(a){const b=()=>{tj(this,a);this.init(a);if(this.Md().bn())wj(this,a);else{const d=new olympe.sc.er(a.C);a.C.C.run(this.update.bind(this,d,[],[]))}a.wn(olympe.sc.lb.Vb);a.Xf(this.clear.bind(this,a));a.onDestroy(this.destroy.bind(this,a))},c=a.getParent();c?c.C.C.run(b):b()}Md(){return this.Mf()}init(a){this.onInit(a)}update(a,b,c){const d=this.Md();if(d.bn())this.onUpdate(a,b,c);else this.N.debug(`Softcoded runnable ${this.db.name(this)} with tag ${this.tag} running in context ${a.Z()}`),
882
+ olympe.sc.Runnable=class extends olympe.dm.BrickMetadata{constructor(a,b,c){super(a,b);this.N=c}run(a){const b=()=>{tj(this,a);this.init(a);if(this.Md().an())wj(this,a);else{const d=new olympe.sc.dr(a.C);a.C.C.run(this.update.bind(this,d,[],[]))}a.vn(olympe.sc.lb.Vb);a.Xf(this.clear.bind(this,a));a.onDestroy(this.destroy.bind(this,a))},c=a.getParent();c?c.C.C.run(b):b()}Md(){return this.Mf()}init(a){this.onInit(a)}update(a,b,c){const d=this.Md();if(d.an())this.onUpdate(a,b,c);else this.N.debug(`Softcoded runnable ${this.db.name(this)} with tag ${this.tag} running in context ${a.Z()}`),
883
883
  xj(this,d,olympe.sc.lb.$,a),this.Ka()&&xj(this,d,olympe.sc.lb.ta,a)}clear(){}destroy(a){this.onDestroy(a)}setupExecution(){return rxjs.of([])}F(){return[]}onInit(){}onUpdate(){this.N.error(`Brick ${this.db.name(this.Nb())} (${this.Nb()}) is flagged as hardcoded, but method update() has not been overridden.`)}onDestroy(){}getInputs(){var a=this.Md();return rj(a,a.db.ub(a.tag,olympe.sc.lb.F))}getOutputs(){var a=this.Md();return rj(a,a.db.ub(a.tag,olympe.sc.lb.L))}G(){return[]}$(){return new Map}Ka(){return!1}L(a,
884
- b,c,d){a=b.Ib(a,c,!0);void 0!==d&&olympe.D.bf(a,d);return a}Ab(a,b,c,d,e){olympe.D.ln([d],f=>{b.set(a,olympe.D.Rr(f)?f.valueOf():f)});return this.L(a,b,c,e)}R(){return[this.ta,this.ja]}ta(a,b){vj(this,b,null)}ja(a,b){vj(this,null,b)}Vb(a,b){const c=this.db,d=olympe.sc.logic.wb.L.Ec(),e=olympe.sc.logic.wb.F,f=olympe.sc.logic.wb.C;this.Dr(d,g=>{var h=g.T();if(h=c.fc(h,e)||c.fc(h,f))g=yj(g,a,b.bind(null,h)),olympe.D.La().onDestroy(g)})}Va(a,b){const c=this.Nb();let d=this.db.name(c);try{const e=[a.He()];
885
- let f=a.getParent();for(;null!==f&&f.C!==olympe.sc.mn;)e.unshift(f.He()),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}`)}};olympe.sc.Runnable.O=Qc(olympe.dc.ya.C('01130000000000ca1100',olympe.sc.Runnable));olympe.sc.Runnable.L=olympe.sc.Runnable.O.Ga('01692a4af82e8984742b');
884
+ b,c,d){a=b.Ib(a,c,!0);void 0!==d&&olympe.D.bf(a,d);return a}Ab(a,b,c,d,e){olympe.D.kn([d],f=>{b.set(a,olympe.D.Qr(f)?f.valueOf():f)});return this.L(a,b,c,e)}R(){return[this.ta,this.ja]}ta(a,b){vj(this,b,null)}ja(a,b){vj(this,null,b)}Vb(a,b){const c=this.db,d=olympe.sc.logic.wb.L.Ec(),e=olympe.sc.logic.wb.F,f=olympe.sc.logic.wb.C;this.Cr(d,g=>{var h=g.T();if(h=c.fc(h,e)||c.fc(h,f))g=yj(g,a,b.bind(null,h)),olympe.D.La().onDestroy(g)})}Va(a,b){const c=this.Nb();let d=this.db.name(c);try{const e=[a.He()];
885
+ let f=a.getParent();for(;null!==f&&f.C!==olympe.sc.ln;)e.unshift(f.He()),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}`)}};olympe.sc.Runnable.O=Qc(olympe.dc.ya.C('01130000000000ca1100',olympe.sc.Runnable));olympe.sc.Runnable.L=olympe.sc.Runnable.O.Ga('01692a4af82e8984742b');
886
886
  olympe.sc.Runnable.F=olympe.sc.Runnable.O.Ga('01756a18d4921c103111');olympe.sc.Runnable.R=P(olympe.sc.Runnable.O,olympe.sc.lb.$);olympe.sc.Runnable.W=P(olympe.sc.Runnable.O,olympe.sc.lb.da);olympe.sc.Runnable.$=P(olympe.sc.Runnable.O,olympe.sc.lb.ta);P(olympe.sc.lb.O,olympe.sc.Runnable.L);P(olympe.sc.lb.O,olympe.sc.Runnable.F);olympe.sc.Runnable.prototype.Md.K=new olympe.D.J(()=>olympe.sc.lb,[]);olympe.sc.Runnable.prototype.L.K=new olympe.D.J(()=>Object,[]);olympe.sc.Runnable.prototype.Ab.K=olympe.D.J.C;function zj(a){if(a){if('string'===typeof a)return a;if(a instanceof olympe.sc.De)return(a=a.F())?a.valueOf():null;if('function'===typeof a.T)return a.T()}return null}olympe.sc.De=class extends olympe.dc.CloudObject{F(){return this.db.ub(this,olympe.sc.De.C)[0]}C(){return olympe.dc.CloudObject.get(zj(this))}toString(){const a=zj(this);let b;a&&(b=this.db.name(a));return b||super.toString()}};olympe.sc.De.O=olympe.dc.ya.C('0163c9ae01f2d6e9ca49',olympe.sc.De);olympe.sc.De.C=olympe.sc.De.O.Ga('0169b5a8a33144fb0b49');
887
- P(olympe.dc.CloudObject.O,olympe.sc.De.C);olympe.sc.De.prototype.F.K=new olympe.D.J(()=>String,[]);olympe.sc.De.prototype.C.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.sc.so=class extends olympe.dm.Pb{C(){return olympe.sc.Je.sg.Hj}};olympe.sc.so.O=olympe.dc.ya.C('0163a68ce44f3d1fa84c',olympe.sc.so);olympe.sc.ff=class extends olympe.dm.BrickMetadata{};olympe.sc.ff.O=olympe.dc.ya.C('016324fde11a836f76c2',olympe.sc.ff);let Aj=null;
887
+ P(olympe.dc.CloudObject.O,olympe.sc.De.C);olympe.sc.De.prototype.F.K=new olympe.D.J(()=>String,[]);olympe.sc.De.prototype.C.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.sc.ro=class extends olympe.dm.Pb{C(){return olympe.sc.Je.sg.Gj}};olympe.sc.ro.O=olympe.dc.ya.C('0163a68ce44f3d1fa84c',olympe.sc.ro);olympe.sc.ff=class extends olympe.dm.BrickMetadata{};olympe.sc.ff.O=olympe.dc.ya.C('016324fde11a836f76c2',olympe.sc.ff);let Aj=null;
888
888
  function Bj(a,b){Aj=a;(new olympe.dc.kf(a,olympe.dc.Cd.Ji)).rb(olympe.sc.Ma.Le.C).rb(olympe.sc.gd.F.Ec()).jb((c,d)=>{if(c)olympe.ra.Ya('sc').error('Error while loading business container:',c.message),b(olympe.sc.gd.C.ac);else{c=null;for(const [e,f]of d.xc.ed())e===olympe.sc.gd.F.T()&&(c=f);null!==c?jf(df(new olympe.dc.kf(c),olympe.dc.Qb.tf),(e,f)=>{const g=olympe.dc.jc.Tc,h=olympe.dc.jc.vi,k=f.T();f=f.Ra();return olympe.dc.Ja().Rf(e,olympe.sc.ff)&&f===olympe.dc.Ca.ORIGIN&&(k===g||k===h)}).jb(()=>
889
- b(olympe.sc.gd.C.yp)):(olympe.ra.Ya('sc').error('No container found for the application',a),b(olympe.sc.gd.C.Pl))}})}olympe.sc.gd=class extends olympe.dc.CloudObject{};olympe.sc.gd.C={yp:0,Pl:1,ac:2};olympe.sc.gd.O=olympe.dc.ya.C('017b3aa8fae1e3d044dc',olympe.sc.gd);olympe.sc.gd.F=olympe.sc.gd.O.Ga('017b3aa8fd1659291b92');olympe.sc.gd.L=olympe.sc.gd.O.Ga('017b3aa8fe7ec3fd52f2');olympe.sc.Map=class extends olympe.dc.CloudObject{};olympe.sc.Map.O=olympe.dc.ya.C('018119241abce0e5696e',olympe.sc.Map);olympe.sc.Vg=class extends olympe.sc.Map{};olympe.sc.Vg.O=olympe.dc.ya.C('01631aacd8276ea98490',olympe.sc.Vg);olympe.sc.Uj=class extends olympe.dm.File{L(){const a=olympe.D.Qc(olympe.D.Za);this.Gk(b=>{a.update(olympe.D.yb(b))});return a.Ib()}};olympe.sc.Uj.O=Lc('01644b6297305d62fca2',olympe.sc.Uj);olympe.sc.Uj.prototype.L.K=olympe.D.J.F;olympe.sc.rd=class extends olympe.dm.File{L(){return this.Eb(olympe.sc.rd.fontFamilyProp)}R(){return this.Eb(olympe.sc.rd.F)}W(){return this.Ie(olympe.sc.rd.L)}};olympe.sc.rd.O=Lc('01647e113043c637b541',olympe.sc.rd);olympe.sc.rd.fontFamilyProp=olympe.sc.rd.O.xa('01647e35ecd24ef0b88d');olympe.sc.rd.F=olympe.sc.rd.O.xa('01647e677f5d1cfbdf42');olympe.sc.rd.L=olympe.sc.rd.O.xa('01647e6780999bf8bd25');olympe.sc.rd.prototype.L.K=olympe.D.J.F;olympe.sc.rd.prototype.R.K=olympe.D.J.F;
890
- olympe.sc.rd.prototype.W.K=olympe.D.J.G;olympe.sc.qm=class extends olympe.dm.File{};olympe.sc.qm.O=Lc('0164643c432146a71d5c',olympe.sc.qm);olympe.sc.gr=class extends olympe.dc.CloudObject{};olympe.sc.gr.O=olympe.dc.ya.C('016421bb3797e22d1c4e',olympe.sc.gr);olympe.sc.logic={};olympe.sc.logic.Xo=(a,b)=>a===b?0:a>b?1:-1;
891
- olympe.sc.logic.oA=(a,b,c,d,e,f,g)=>{const h=b.T();b=olympe.D.$a(b.C().T());let k,l;if(b===olympe.dc.za(olympe.dm.String))k=c.valueOf().toLowerCase(),l=p=>p.Eb(h).toLowerCase();else if(b===olympe.dc.za(olympe.dm.Number))k=c.valueOf(),l=p=>p.Ie(h);else if(b===olympe.dc.za(olympe.dm.DateTime))k=c.getTime(),l=p=>olympe.D.Fa([p.gj(h)],q=>q.getTime(),Number,'FilterList Date&DateTime TransformFlows');else{c=olympe.dc.Ja().name(b);g.warn(`Properties of type ${c} are not supported. List will not be filtered.`);e(a);
892
- return}let n;if('<'===f)n=(p,q)=>olympe.sc.logic.Xo(q,p);else if('>'===f)n=(p,q)=>olympe.sc.logic.Xo(p,q);else{g.error(`Unknown inequality ${f}. Please use '<' or '>'`);return}e(a.vg().filter(p=>olympe.D.Fa([l(p)],q=>{q=n(q.valueOf(),k);return olympe.D.wc(d.valueOf()?1===q:0<=q)},olympe.D.sa,'FilterList ListDefBuilder Filter TransformFlows')).pf())};
893
- olympe.sc.logic.KC=(a,b)=>{if(a instanceof olympe.D.ga)return a;if(a instanceof olympe.D.Za)return a.bs();if(a instanceof olympe.D.sa)return a.Ir();if('string'===typeof a||'number'===typeof a)return olympe.D.Ba(Number(a));b.error(`Could not parse provided value ${a} into a number`);return olympe.D.ga.Lp};olympe.sc.logic.ua={};olympe.sc.logic.ua.Ko=class{constructor(a,b,c){this.O=olympe.dc.ya.C(a,b,...c)}T(){return this.O.T()}};olympe.sc.logic.ua.Ko.ma=[olympe.dc.Ae];const Cj=Object.create(null),Dj=new Map;function Ej(a){if(void 0===Cj[a])throw Error(`Tag: ${a} - does not correspond to a registered function`);return Nc(a)}function Fj(a,b,c=olympe.sc.logic.Function){if(Dj.has(a))throw c=Ej(a),Error(`Tag: ${a} - overwriting existing function definition "${c.name}" with "${b.name}"`);const d=olympe.dc.ya.C(a,b,...[]);Dj.set(a,{O:d,WC:b,JC:c});return d}
894
- olympe.sc.logic.ya=class{constructor(){}static C(a,b,...c){if(Cj[a])throw c=Ej(a),Error(`Tag: ${a} - overwriting already defined function "${c.name}" with "${b.name}"`);b=new olympe.sc.logic.ua.Ko(a,b,[olympe.sc.P.Ea].concat(c));return Cj[a]=b}};olympe.sc.logic.oz=class{};olympe.sc.logic.Fj=class extends olympe.dc.CloudObject{};olympe.sc.logic.Fj.O=olympe.dc.ya.C('01621fb84e320000cf00',olympe.sc.logic.Fj);olympe.sc.logic.Error=class{constructor(a,b){this.code=a;this.Tr=b}static create(a,b){return new olympe.sc.logic.Error(b,a)}Kw(){return this.Tr}lw(){return this.code}};z('olympe.sc.logic.Error',olympe.sc.logic.Error);olympe.sc.logic.Error.prototype.getCode=olympe.sc.logic.Error.prototype.lw;olympe.sc.logic.Error.prototype.getMessage=olympe.sc.logic.Error.prototype.Kw;olympe.sc.logic.Error.create=olympe.sc.logic.Error.create;
895
- olympe.sc.logic.Kj=class extends olympe.sc.logic.Fj{static create(a,b){return new olympe.sc.logic.Error(b,a)}};olympe.sc.logic.Kj.O=olympe.dc.ya.C('016eeb5ede9f3094d8f0',olympe.sc.logic.Kj);olympe.sc.logic.me=class extends olympe.dc.CloudObject{C(){return this.oc(olympe.sc.logic.me.C,olympe.dc.CloudObject)}};olympe.sc.logic.me.O=olympe.dc.ya.C('016ac4f59ee8ea2081ba',olympe.sc.logic.me);olympe.sc.logic.me.L=olympe.sc.logic.me.O.xa('017bc044aeacce7ffc8f');olympe.sc.logic.me.C=olympe.sc.logic.me.O.Ga('016ac4f5a0091c4790e2');P(olympe.dc.CloudObject.O,olympe.sc.logic.me.C);olympe.sc.logic.me.prototype.C.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.sc.logic.Ki=class extends olympe.sc.logic.me{};olympe.sc.logic.Ki.O=olympe.dc.ya.C('016ac4f59c592b862457',olympe.sc.logic.Ki);olympe.sc.logic.Ki.F=olympe.sc.oe.C.Ec();olympe.sc.logic.Kh=class extends olympe.sc.logic.me{};olympe.sc.logic.Kh.O=olympe.dc.ya.C('016ac4f59dd99f5df3e1',olympe.sc.logic.Kh);olympe.sc.logic.Kh.F=P(olympe.sc.logic.Kh.O,olympe.sc.oe.F);olympe.sc.logic.ye=class extends olympe.sc.lb{C(){return olympe.sc.Je.sg.Dq}da(){return this.Sm().vg().Rf([olympe.sc.logic.Function]).and().not().Rf([olympe.sc.logic.Rd,olympe.sc.logic.Wd]).pf()}Dw(){return this.Hl().vg().hj([olympe.dc.CloudObject.modelRel,olympe.sc.logic.Ki.F]).pf()}Ew(){return this.Wj().vg().hj([olympe.dc.CloudObject.modelRel,olympe.sc.logic.Kh.F]).pf()}ce(a){const b=this.db.Om(this,[olympe.sc.lb.F],c=>this.db.model(c)===olympe.dc.za(a));return b?olympe.dc.CloudObject.get(b):null}Jf(a){const b=
896
- this.db.Om(this,[olympe.sc.lb.L],c=>this.db.model(c)===olympe.dc.za(a));return b?olympe.dc.CloudObject.get(b):null}kx(){return this.Hl().vg().hj([olympe.dc.CloudObject.modelRel],olympe.sc.logic.Cb).pf()}lx(){return this.Wj().vg().hj([olympe.dc.CloudObject.modelRel],olympe.sc.logic.Rb).pf()}};Fj('01621fb84e320000f000',olympe.sc.logic.ye,olympe.sc.logic.Function);m=olympe.sc.logic.ye.prototype;m.Dw.K=new olympe.D.J(()=>olympe.dc.Da,[]);m.Ew.K=new olympe.D.J(()=>olympe.dc.Da,[]);
897
- m.ce.K=new olympe.D.J(()=>olympe.sc.logic.Cb,[]);m.Jf.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);m.kx.K=new olympe.D.J(()=>olympe.dc.Da,[]);m.lx.K=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.sc.logic.bg=class extends olympe.sc.logic.ye{F(){return this.ce('016ac63229782039429f')}G(){return this.Jf('016ac6322acf67eebfe7')}L(){return this.Wj().vg().rb(olympe.sc.logic.Gc.typeRel).Kk(olympe.sc.logic.Kj).pf().nf().$m(olympe.D.ga.ZERO)}};olympe.sc.logic.bg.C='016ac63229782039429f';olympe.sc.logic.bg.ja='016ac6322acf67eebfe7';olympe.sc.logic.bg.O=Fj('01621fb84e320000a000',olympe.sc.logic.bg,olympe.sc.logic.Action);
898
- olympe.sc.logic.bg.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.Cb,[]);olympe.sc.logic.bg.prototype.G.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);olympe.sc.logic.bg.prototype.L.K=olympe.D.J.R;olympe.sc.logic.co=class extends olympe.sc.logic.ye{};olympe.sc.logic.co.O=Fj('01621fb84e320000f011',olympe.sc.logic.co);olympe.sc.logic.bo=class extends olympe.sc.logic.bg{};olympe.sc.logic.bo.O=Fj('01621fb84e320000f012',olympe.sc.logic.bo);olympe.sc.logic.Function=class extends olympe.sc.Runnable{R(){return[this.Vb]}$(){const a=olympe.sc.Sd.F.nt,b=olympe.sc.Sd.F.pu,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.Nk(b,olympe.sc.logic.Gc.typeRel,olympe.sc.logic.Fj)?a.wn.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=>
889
+ b(olympe.sc.gd.C.xp)):(olympe.ra.Ya('sc').error('No container found for the application',a),b(olympe.sc.gd.C.Ol))}})}olympe.sc.gd=class extends olympe.dc.CloudObject{};olympe.sc.gd.C={xp:0,Ol:1,ac:2};olympe.sc.gd.O=olympe.dc.ya.C('017b3aa8fae1e3d044dc',olympe.sc.gd);olympe.sc.gd.F=olympe.sc.gd.O.Ga('017b3aa8fd1659291b92');olympe.sc.gd.L=olympe.sc.gd.O.Ga('017b3aa8fe7ec3fd52f2');olympe.sc.Map=class extends olympe.dc.CloudObject{};olympe.sc.Map.O=olympe.dc.ya.C('018119241abce0e5696e',olympe.sc.Map);olympe.sc.Vg=class extends olympe.sc.Map{};olympe.sc.Vg.O=olympe.dc.ya.C('01631aacd8276ea98490',olympe.sc.Vg);olympe.sc.Tj=class extends olympe.dm.File{L(){const a=olympe.D.Qc(olympe.D.Za);this.Fk(b=>{a.update(olympe.D.yb(b))});return a.Ib()}};olympe.sc.Tj.O=Lc('01644b6297305d62fca2',olympe.sc.Tj);olympe.sc.Tj.prototype.L.K=olympe.D.J.F;olympe.sc.rd=class extends olympe.dm.File{L(){return this.Eb(olympe.sc.rd.fontFamilyProp)}R(){return this.Eb(olympe.sc.rd.F)}W(){return this.Ie(olympe.sc.rd.L)}};olympe.sc.rd.O=Lc('01647e113043c637b541',olympe.sc.rd);olympe.sc.rd.fontFamilyProp=olympe.sc.rd.O.xa('01647e35ecd24ef0b88d');olympe.sc.rd.F=olympe.sc.rd.O.xa('01647e677f5d1cfbdf42');olympe.sc.rd.L=olympe.sc.rd.O.xa('01647e6780999bf8bd25');olympe.sc.rd.prototype.L.K=olympe.D.J.F;olympe.sc.rd.prototype.R.K=olympe.D.J.F;
890
+ olympe.sc.rd.prototype.W.K=olympe.D.J.G;olympe.sc.pm=class extends olympe.dm.File{};olympe.sc.pm.O=Lc('0164643c432146a71d5c',olympe.sc.pm);olympe.sc.fr=class extends olympe.dc.CloudObject{};olympe.sc.fr.O=olympe.dc.ya.C('016421bb3797e22d1c4e',olympe.sc.fr);olympe.sc.logic={};olympe.sc.logic.Wo=(a,b)=>a===b?0:a>b?1:-1;
891
+ olympe.sc.logic.nA=(a,b,c,d,e,f,g)=>{const h=b.T();b=olympe.D.$a(b.C().T());let k,l;if(b===olympe.dc.za(olympe.dm.String))k=c.valueOf().toLowerCase(),l=p=>p.Eb(h).toLowerCase();else if(b===olympe.dc.za(olympe.dm.Number))k=c.valueOf(),l=p=>p.Ie(h);else if(b===olympe.dc.za(olympe.dm.DateTime))k=c.getTime(),l=p=>olympe.D.Fa([p.gj(h)],q=>q.getTime(),Number,'FilterList Date&DateTime TransformFlows');else{c=olympe.dc.Ja().name(b);g.warn(`Properties of type ${c} are not supported. List will not be filtered.`);e(a);
892
+ return}let n;if('<'===f)n=(p,q)=>olympe.sc.logic.Wo(q,p);else if('>'===f)n=(p,q)=>olympe.sc.logic.Wo(p,q);else{g.error(`Unknown inequality ${f}. Please use '<' or '>'`);return}e(a.vg().filter(p=>olympe.D.Fa([l(p)],q=>{q=n(q.valueOf(),k);return olympe.D.wc(d.valueOf()?1===q:0<=q)},olympe.D.sa,'FilterList ListDefBuilder Filter TransformFlows')).pf())};
893
+ olympe.sc.logic.JC=(a,b)=>{if(a instanceof olympe.D.ga)return a;if(a instanceof olympe.D.Za)return a.$r();if(a instanceof olympe.D.sa)return a.Hr();if('string'===typeof a||'number'===typeof a)return olympe.D.Ba(Number(a));b.error(`Could not parse provided value ${a} into a number`);return olympe.D.ga.Kp};olympe.sc.logic.ua={};olympe.sc.logic.ua.Jo=class{constructor(a,b,c){this.O=olympe.dc.ya.C(a,b,...c)}T(){return this.O.T()}};olympe.sc.logic.ua.Jo.ma=[olympe.dc.Ae];const Cj=Object.create(null),Dj=new Map;function Ej(a){if(void 0===Cj[a])throw Error(`Tag: ${a} - does not correspond to a registered function`);return Nc(a)}function Fj(a,b,c=olympe.sc.logic.Function){if(Dj.has(a))throw c=Ej(a),Error(`Tag: ${a} - overwriting existing function definition "${c.name}" with "${b.name}"`);const d=olympe.dc.ya.C(a,b,...[]);Dj.set(a,{O:d,VC:b,IC:c});return d}
894
+ olympe.sc.logic.ya=class{constructor(){}static C(a,b,...c){if(Cj[a])throw c=Ej(a),Error(`Tag: ${a} - overwriting already defined function "${c.name}" with "${b.name}"`);b=new olympe.sc.logic.ua.Jo(a,b,[olympe.sc.P.Ea].concat(c));return Cj[a]=b}};olympe.sc.logic.nz=class{};olympe.sc.logic.Ej=class extends olympe.dc.CloudObject{};olympe.sc.logic.Ej.O=olympe.dc.ya.C('01621fb84e320000cf00',olympe.sc.logic.Ej);olympe.sc.logic.Error=class{constructor(a,b){this.code=a;this.Sr=b}static create(a,b){return new olympe.sc.logic.Error(b,a)}Jw(){return this.Sr}kw(){return this.code}};z('olympe.sc.logic.Error',olympe.sc.logic.Error);olympe.sc.logic.Error.prototype.getCode=olympe.sc.logic.Error.prototype.kw;olympe.sc.logic.Error.prototype.getMessage=olympe.sc.logic.Error.prototype.Jw;olympe.sc.logic.Error.create=olympe.sc.logic.Error.create;
895
+ olympe.sc.logic.Jj=class extends olympe.sc.logic.Ej{static create(a,b){return new olympe.sc.logic.Error(b,a)}};olympe.sc.logic.Jj.O=olympe.dc.ya.C('016eeb5ede9f3094d8f0',olympe.sc.logic.Jj);olympe.sc.logic.me=class extends olympe.dc.CloudObject{C(){return this.oc(olympe.sc.logic.me.C,olympe.dc.CloudObject)}};olympe.sc.logic.me.O=olympe.dc.ya.C('016ac4f59ee8ea2081ba',olympe.sc.logic.me);olympe.sc.logic.me.L=olympe.sc.logic.me.O.xa('017bc044aeacce7ffc8f');olympe.sc.logic.me.C=olympe.sc.logic.me.O.Ga('016ac4f5a0091c4790e2');P(olympe.dc.CloudObject.O,olympe.sc.logic.me.C);olympe.sc.logic.me.prototype.C.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.sc.logic.Ki=class extends olympe.sc.logic.me{};olympe.sc.logic.Ki.O=olympe.dc.ya.C('016ac4f59c592b862457',olympe.sc.logic.Ki);olympe.sc.logic.Ki.F=olympe.sc.oe.C.Ec();olympe.sc.logic.Kh=class extends olympe.sc.logic.me{};olympe.sc.logic.Kh.O=olympe.dc.ya.C('016ac4f59dd99f5df3e1',olympe.sc.logic.Kh);olympe.sc.logic.Kh.F=P(olympe.sc.logic.Kh.O,olympe.sc.oe.F);olympe.sc.logic.ye=class extends olympe.sc.lb{C(){return olympe.sc.Je.sg.Cq}da(){return this.Rm().vg().Rf([olympe.sc.logic.Function]).and().not().Rf([olympe.sc.logic.Rd,olympe.sc.logic.Wd]).pf()}Cw(){return this.Gl().vg().hj([olympe.dc.CloudObject.modelRel,olympe.sc.logic.Ki.F]).pf()}Dw(){return this.Vj().vg().hj([olympe.dc.CloudObject.modelRel,olympe.sc.logic.Kh.F]).pf()}ce(a){const b=this.db.Nm(this,[olympe.sc.lb.F],c=>this.db.model(c)===olympe.dc.za(a));return b?olympe.dc.CloudObject.get(b):null}Jf(a){const b=
896
+ this.db.Nm(this,[olympe.sc.lb.L],c=>this.db.model(c)===olympe.dc.za(a));return b?olympe.dc.CloudObject.get(b):null}jx(){return this.Gl().vg().hj([olympe.dc.CloudObject.modelRel],olympe.sc.logic.Cb).pf()}kx(){return this.Vj().vg().hj([olympe.dc.CloudObject.modelRel],olympe.sc.logic.Rb).pf()}};Fj('01621fb84e320000f000',olympe.sc.logic.ye,olympe.sc.logic.Function);m=olympe.sc.logic.ye.prototype;m.Cw.K=new olympe.D.J(()=>olympe.dc.Da,[]);m.Dw.K=new olympe.D.J(()=>olympe.dc.Da,[]);
897
+ m.ce.K=new olympe.D.J(()=>olympe.sc.logic.Cb,[]);m.Jf.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);m.jx.K=new olympe.D.J(()=>olympe.dc.Da,[]);m.kx.K=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.sc.logic.bg=class extends olympe.sc.logic.ye{F(){return this.ce('016ac63229782039429f')}G(){return this.Jf('016ac6322acf67eebfe7')}L(){return this.Vj().vg().rb(olympe.sc.logic.Gc.typeRel).Jk(olympe.sc.logic.Jj).pf().nf().Zm(olympe.D.ga.ZERO)}};olympe.sc.logic.bg.C='016ac63229782039429f';olympe.sc.logic.bg.ja='016ac6322acf67eebfe7';olympe.sc.logic.bg.O=Fj('01621fb84e320000a000',olympe.sc.logic.bg,olympe.sc.logic.Action);
898
+ olympe.sc.logic.bg.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.Cb,[]);olympe.sc.logic.bg.prototype.G.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);olympe.sc.logic.bg.prototype.L.K=olympe.D.J.R;olympe.sc.logic.bo=class extends olympe.sc.logic.ye{};olympe.sc.logic.bo.O=Fj('01621fb84e320000f011',olympe.sc.logic.bo);olympe.sc.logic.ao=class extends olympe.sc.logic.bg{};olympe.sc.logic.ao.O=Fj('01621fb84e320000f012',olympe.sc.logic.ao);olympe.sc.logic.Function=class extends olympe.sc.Runnable{R(){return[this.Vb]}$(){const a=olympe.sc.Sd.F.mt,b=olympe.sc.Sd.F.ou,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.Mk(b,olympe.sc.logic.Gc.typeRel,olympe.sc.logic.Ej)?a.vn.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=>
899
899
  c.includes(null)?null:c)):rxjs.of([])}};olympe.sc.logic.Function.O=olympe.dc.ya.C('0168c6f020f2a96f0000',olympe.sc.logic.Function,olympe.sc.P.Ea);olympe.sc.logic.Gc=class extends olympe.dc.CloudObject{C(){return this.oc(olympe.sc.logic.Gc.typeRel,olympe.dc.CloudObject)}F(){return this.Ie(olympe.sc.logic.Gc.C)}};olympe.sc.logic.Gc.O=olympe.dc.ya.C('0168a431d25001540000',olympe.sc.logic.Gc);olympe.sc.logic.Gc.C=olympe.sc.logic.Gc.O.xa('01740c5d4ae4b520dd01');olympe.sc.logic.Gc.typeRel=olympe.sc.logic.Gc.O.Ga('0168a431d3b9b7438424');P(olympe.dc.CloudObject.O,olympe.sc.logic.Gc.typeRel);
900
900
  olympe.sc.logic.Gc.prototype.C.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.sc.logic.Gc.prototype.F.K=olympe.D.J.G;olympe.sc.logic.Cb=class extends olympe.sc.logic.Gc{};olympe.sc.logic.Cb.O=olympe.dc.ya.C('0168a431d25001540001',olympe.sc.logic.Cb);olympe.sc.logic.Cb.ja=olympe.sc.logic.Gc.O.xa('01740c5d4ae4b520dd02');olympe.sc.logic.Cb.da=P(olympe.sc.logic.Cb.O,olympe.sc.lb.F);olympe.sc.logic.Cb.F=olympe.sc.logic.Cb.O.Ga('0168a431d91f2578000b',olympe.dc.Ca.ORIGIN);olympe.sc.logic.Cb.L=olympe.sc.logic.Cb.O.Ga('01621fb84e32000000a1',olympe.dc.Ca.ORIGIN);
901
- olympe.sc.logic.Cb.$=olympe.sc.logic.Cb.O.Ga('01621fb84e32000000d1',olympe.dc.Ca.ORIGIN);olympe.sc.logic.Rb=class extends olympe.sc.logic.Gc{};olympe.sc.logic.Rb.O=olympe.dc.ya.C('0168a431d25001540002',olympe.sc.logic.Rb);olympe.sc.logic.Rb.da=P(olympe.sc.logic.Rb.O,olympe.sc.lb.L);olympe.sc.logic.Rb.F=olympe.sc.logic.Rb.O.Ga('0168a431d91f25780003',olympe.dc.Ca.ORIGIN);olympe.sc.logic.Rb.$=olympe.sc.logic.Rb.O.Ga('01621fb84e32000000a2',olympe.dc.Ca.ORIGIN);olympe.sc.logic.Rb.L=olympe.sc.logic.Rb.O.Ga('01621fb84e32000000d2',olympe.dc.Ca.ORIGIN);olympe.sc.logic.Action=class extends olympe.sc.logic.Function{setupExecution(a){const b=this.Md().F().T();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.ya.C('0168c6f020f2a96a0000',olympe.sc.logic.Action,olympe.sc.P.Ea);olympe.sc.logic.Rd=class extends olympe.sc.logic.Function{run(a){tj(this,a);const b=a.getParent(),c=this.db.fc(this,olympe.sc.logic.Rd.C),d=this.db.fc(this,olympe.sc.logic.Rd.G);a.on(c,e=>b.set(d,e),this.tag)}W(){return this.oc(olympe.sc.logic.Rd.C,olympe.sc.logic.Cb)}Ua(){return this.oc(olympe.sc.logic.Rd.G,olympe.sc.logic.Rb)}};olympe.sc.logic.Rd.O=olympe.dc.ya.C('01621fb84e32000000a0',olympe.sc.logic.Rd,olympe.sc.P.Ea);olympe.sc.logic.Rd.C=P(olympe.sc.logic.Rd.O,olympe.sc.logic.Cb.L);
902
- olympe.sc.logic.Rd.G=P(olympe.sc.logic.Rd.O,olympe.sc.logic.Rb.$);olympe.sc.logic.Rd.prototype.W.K=new olympe.D.J(()=>olympe.sc.logic.Cb,[]);olympe.sc.logic.Rd.prototype.Ua.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);olympe.sc.logic.Wd=class extends olympe.sc.logic.Function{run(a){const b=a.getParent(),c=this.db.fc(this,olympe.sc.logic.Wd.G),d=this.db.fc(this,olympe.sc.logic.Wd.C);b.on(c,e=>a.set(d,e),b.Z())}Ua(){return this.oc(olympe.sc.logic.Wd.G,olympe.sc.logic.Cb)}W(){return this.oc(olympe.sc.logic.Wd.C,olympe.sc.logic.Rb)}};olympe.sc.logic.Wd.O=olympe.dc.ya.C('01621fb84e32000000d0',olympe.sc.logic.Wd,olympe.sc.P.Ea);olympe.sc.logic.Wd.G=P(olympe.sc.logic.Wd.O,olympe.sc.logic.Cb.$);
903
- olympe.sc.logic.Wd.C=P(olympe.sc.logic.Wd.O,olympe.sc.logic.Rb.L);olympe.sc.logic.Wd.prototype.Ua.K=new olympe.D.J(()=>olympe.sc.logic.Cb,[]);olympe.sc.logic.Wd.prototype.W.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);function yj(a,b,c){const d=a.db.fc(a,olympe.sc.logic.wb.ja)||a.db.fc(a,olympe.sc.logic.wb.$),e=a.db.fc(a,olympe.sc.logic.wb.da),f=a.db.Tf((()=>{let k=null,l=a.db.fc(a,olympe.sc.logic.wb.F);l?k=a.db.fc(l,olympe.dm.Property.typeRel):(l=a.db.fc(a,olympe.sc.logic.wb.C))&&(k=a.db.fc(l,olympe.sc.logic.Gc.typeRel));return k||olympe.dc.CloudObject.O.T()})(),olympe.dm.rf)?new olympe.D.Zb('Pipe Context'):null,g=a.F.bind(a,b,c,f);if(null!==d&&null!==e){let k;const l=b.Tk(e,n=>{k&&k();k=n.on(d,g,e)});return()=>
901
+ olympe.sc.logic.Cb.$=olympe.sc.logic.Cb.O.Ga('01621fb84e32000000d1',olympe.dc.Ca.ORIGIN);olympe.sc.logic.Rb=class extends olympe.sc.logic.Gc{};olympe.sc.logic.Rb.O=olympe.dc.ya.C('0168a431d25001540002',olympe.sc.logic.Rb);olympe.sc.logic.Rb.da=P(olympe.sc.logic.Rb.O,olympe.sc.lb.L);olympe.sc.logic.Rb.F=olympe.sc.logic.Rb.O.Ga('0168a431d91f25780003',olympe.dc.Ca.ORIGIN);olympe.sc.logic.Rb.$=olympe.sc.logic.Rb.O.Ga('01621fb84e32000000a2',olympe.dc.Ca.ORIGIN);olympe.sc.logic.Rb.L=olympe.sc.logic.Rb.O.Ga('01621fb84e32000000d2',olympe.dc.Ca.ORIGIN);olympe.sc.logic.Action=class extends olympe.sc.logic.Function{setupExecution(a){const b=this.Md().F().T();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.ya.C('0168c6f020f2a96a0000',olympe.sc.logic.Action,olympe.sc.P.Ea);olympe.sc.logic.Rd=class extends olympe.sc.logic.Function{run(a){tj(this,a);const b=a.getParent(),c=this.db.fc(this,olympe.sc.logic.Rd.C),d=this.db.fc(this,olympe.sc.logic.Rd.G);a.on(c,e=>b.set(d,e),this.tag)}W(){return this.oc(olympe.sc.logic.Rd.C,olympe.sc.logic.Cb)}Sa(){return this.oc(olympe.sc.logic.Rd.G,olympe.sc.logic.Rb)}};olympe.sc.logic.Rd.O=olympe.dc.ya.C('01621fb84e32000000a0',olympe.sc.logic.Rd,olympe.sc.P.Ea);olympe.sc.logic.Rd.C=P(olympe.sc.logic.Rd.O,olympe.sc.logic.Cb.L);
902
+ olympe.sc.logic.Rd.G=P(olympe.sc.logic.Rd.O,olympe.sc.logic.Rb.$);olympe.sc.logic.Rd.prototype.W.K=new olympe.D.J(()=>olympe.sc.logic.Cb,[]);olympe.sc.logic.Rd.prototype.Sa.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);olympe.sc.logic.Wd=class extends olympe.sc.logic.Function{run(a){const b=a.getParent(),c=this.db.fc(this,olympe.sc.logic.Wd.G),d=this.db.fc(this,olympe.sc.logic.Wd.C);b.on(c,e=>a.set(d,e),b.Z())}Sa(){return this.oc(olympe.sc.logic.Wd.G,olympe.sc.logic.Cb)}W(){return this.oc(olympe.sc.logic.Wd.C,olympe.sc.logic.Rb)}};olympe.sc.logic.Wd.O=olympe.dc.ya.C('01621fb84e32000000d0',olympe.sc.logic.Wd,olympe.sc.P.Ea);olympe.sc.logic.Wd.G=P(olympe.sc.logic.Wd.O,olympe.sc.logic.Cb.$);
903
+ olympe.sc.logic.Wd.C=P(olympe.sc.logic.Wd.O,olympe.sc.logic.Rb.L);olympe.sc.logic.Wd.prototype.Sa.K=new olympe.D.J(()=>olympe.sc.logic.Cb,[]);olympe.sc.logic.Wd.prototype.W.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);function yj(a,b,c){const d=a.db.fc(a,olympe.sc.logic.wb.ja)||a.db.fc(a,olympe.sc.logic.wb.$),e=a.db.fc(a,olympe.sc.logic.wb.da),f=a.db.Tf((()=>{let k=null,l=a.db.fc(a,olympe.sc.logic.wb.F);l?k=a.db.fc(l,olympe.dm.Property.typeRel):(l=a.db.fc(a,olympe.sc.logic.wb.C))&&(k=a.db.fc(l,olympe.sc.logic.Gc.typeRel));return k||olympe.dc.CloudObject.O.T()})(),olympe.dm.rf)?new olympe.D.Zb('Pipe Context'):null,g=a.F.bind(a,b,c,f);if(null!==d&&null!==e){let k;const l=b.Sk(e,n=>{k&&k();k=n.on(d,g,e)});return()=>
904
904
  {g(null);l();k&&k()}}const h=Fd(a.db,a,olympe.sc.logic.wb.valueProp,g);return()=>{g(null);a.db.F(a,olympe.sc.logic.wb.valueProp,h)}}function Gj(a,b,c,d){const e=b.getParent();Zi(e.C,c,d);b.set(a.C,()=>{$i(e.C,c)})}
905
905
  olympe.sc.logic.wb=class extends olympe.dc.CloudObject{constructor(a,b,c){super(a,b);this.N=c;this.C=`detachObject${this.tag}`}F(a,b,c,d){null!==c&&c.Ka();const e=a.get(this.C);e&&(e(),a.remove(this.C));const f=olympe.sc.fh(d);if(f instanceof olympe.dc.CloudObject){if(d=f.T(),Gj(this,a,d,[d]),null!==c&&'function'===typeof f.getValue){c.run(()=>{olympe.D.yc([f.getValue()],g=>{b(g.valueOf())})});return}}else f instanceof olympe.dc.Xa&&Gj(this,a,`qr-${f.hash}`,Ie(f));b(f)}getValue(a){return this.Of(olympe.sc.logic.wb.valueProp,
906
- a||olympe.dc.X.Tb.fh,Object)}Ht(){const a=this.transform(olympe.sc.logic.wb.C,olympe.sc.logic.Gc.typeRel);a.Ed(olympe.dc.CloudObject);return a.Pc()}ix(){return this.oc(olympe.sc.logic.wb.da,olympe.dc.CloudObject)}gx(){return this.oc(olympe.sc.logic.wb.ja,olympe.sc.logic.Rb)}hx(){return this.oc(olympe.sc.logic.wb.$,olympe.dm.Property)}vw(){return this.oc(olympe.sc.logic.wb.L,olympe.dc.CloudObject)}tw(){return this.oc(olympe.sc.logic.wb.C,olympe.sc.logic.Cb)}uw(){return this.oc(olympe.sc.logic.wb.F,
906
+ a||olympe.dc.X.Tb.fh,Object)}Gt(){const a=this.transform(olympe.sc.logic.wb.C,olympe.sc.logic.Gc.typeRel);a.Ed(olympe.dc.CloudObject);return a.Pc()}hx(){return this.oc(olympe.sc.logic.wb.da,olympe.dc.CloudObject)}ex(){return this.oc(olympe.sc.logic.wb.ja,olympe.sc.logic.Rb)}gx(){return this.oc(olympe.sc.logic.wb.$,olympe.dm.Property)}uw(){return this.oc(olympe.sc.logic.wb.L,olympe.dc.CloudObject)}sw(){return this.oc(olympe.sc.logic.wb.C,olympe.sc.logic.Cb)}tw(){return this.oc(olympe.sc.logic.wb.F,
907
907
  olympe.dm.Property)}};olympe.sc.logic.wb.O=olympe.dc.ya.C('0168a431d91f25780000',olympe.sc.logic.wb,olympe.sc.P.Ea);olympe.sc.logic.wb.valueProp=olympe.sc.logic.wb.O.xa('0168a431d91f25780001');olympe.sc.logic.wb.da=olympe.sc.logic.wb.O.Ga('0168a431d91f25780002');olympe.sc.logic.wb.ja=P(olympe.sc.logic.wb.O,olympe.sc.logic.Rb.F);olympe.sc.logic.wb.$=olympe.sc.logic.wb.O.Ga('0168a431d91f25780004');olympe.sc.logic.wb.L=olympe.sc.logic.wb.O.Ga('0168a431d91f2578000a');
908
- olympe.sc.logic.wb.C=P(olympe.sc.logic.wb.O,olympe.sc.logic.Cb.F);olympe.sc.logic.wb.F=olympe.sc.logic.wb.O.Ga('0168a431d91f2578000c');P(olympe.dc.CloudObject.O,olympe.sc.logic.wb.da);P(olympe.dm.Property.O,olympe.sc.logic.wb.$);P(olympe.dc.CloudObject.O,olympe.sc.logic.wb.L);P(olympe.dm.Property.O,olympe.sc.logic.wb.F);m=olympe.sc.logic.wb.prototype;m.Ht.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.ix.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);
909
- m.gx.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);m.hx.K=new olympe.D.J(()=>olympe.dm.Property,[]);m.vw.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.tw.K=new olympe.D.J(()=>olympe.sc.logic.Cb,[]);m.uw.K=new olympe.D.J(()=>olympe.dm.Property,[]);olympe.sc.logic.Ud=class extends olympe.sc.logic.Function{};olympe.sc.logic.Ud.O=olympe.dc.ya.C('017dc8c114aa61a0e27f',olympe.sc.logic.Ud);olympe.sc.logic.Ud.C=olympe.sc.logic.Ud.O.Ga('017dc8d6d8ef9135f08a');olympe.sc.logic.Ud.G=olympe.sc.logic.Ud.O.Ga('017dc8d6d8ef9135f08b');P(olympe.dm.Mb.O,olympe.sc.logic.Ud.G);function Hj(a,b){const c=a.Md(),d=c.Il().T(),e=c.Jl().T(),f=c.Kl().T();b.on(d,g=>{g&&(g=new Map(a.getInputs().map(h=>[h,b.get(h)])),g=olympe.sc.logic.mk.la(g),olympe.H.wa.fb.tb.get(a.Nb(),g).then(h=>{h=Ij(h,a.W.bind(a,b));for(const [k,l]of h)k!==e&&k!==f&&b.set(k,l);b.set(e,h.get(e));b.set(f,h.get(f))}).catch(h=>{b.set(f,olympe.sc.logic.Kj.create(h.toString(),1))}))},b.Z())}
910
- function Jj(a,b,c,d,e,f){const g=n=>{if(null!==n){e.cancel();k&&k();l&&l();try{const p=new Map(a.getOutputs().map(r=>[r,b.get(r)])),q=olympe.sc.logic.mk.la(p);f.te(q).finally(()=>b.destroy())}catch(p){n=Error(`Error while serializing the response from remote action ${a.Nb()}: ${p.message}`),f.xg(n).finally(()=>b.destroy())}}},h=b.Z(),k=b.on(c,g,h),l=b.on(d,g,h)}
911
- olympe.sc.logic.Lh=class extends olympe.sc.logic.Function{constructor(a,b,c,d,e){super(a,b,c);this.Ua=d;this.timeout=e}run(a){let b;null!=(b=a.$a(olympe.sc.Qa.C.EDITION))&&b||(this.db.cb(this,olympe.sc.logic.Lh.C)?this.bc(a):(tj(this,a),Hj(this,a)))}bc(a){const b=this.Nb(),c=this.Md(),d=c.tp().T(),e=c.Il().T(),f=c.Jl().T(),g=c.Kl().T();(new olympe.H.wa.fb.tb(b,a)).listen().subscribe(rxjs.Subscriber.create(h=>{const k=a.Yh('remote call'),l=Ij(h.body(),this.W.bind(this,k)),n=Jb(()=>{h.xg(Error(`Timeout reached on remote action ${this.db.name(this)} (${this.tag})`));
912
- k.destroy()},this.timeout);Jj(this,k,f,g,n,h);super.run(k);for(const [p,q]of l)p!==e&&k.set(p,q);h.wj().then(p=>{var q=k.get(d);null!==q&&olympe.dc.za(q)!==p&&(q=this.Nb(),this.N.warn(`Remote action ${this.db.name(q)} ${q}: try to run it with an input user that is not the real authenticated user.`));k.set(d,p);k.set(e,l.get(e))})},h=>{const k=this.Nb();this.N.error(`Error while listening on remote action ${this.db.name(k)} (${k}): ${h.message}`)}))}W(a,b){const c=Array.from(b.de()).map(d=>d.tag());
913
- Rc(this.Ua,a.C.C,b,[],c)}};olympe.sc.logic.Lh.O=olympe.dc.ya.C('017a7b0c5dcbd8964c5d',olympe.sc.logic.Lh,olympe.sc.P.Ea,olympe.dc.db.P.Aa,new olympe.U.fa(olympe.sc.Config.tq));olympe.sc.logic.Lh.C=olympe.sc.logic.Lh.O.xa('017a7b0c62a02a89444f');function Ij(a,b){var c=(new olympe.dc.X.Ii(olympe.dc.Ha.Mc)).C(a.p||[]);b&&b(c);c=new Map;for(const [d,e]of Object.entries(a.v||{}))c.set(d,Kj(olympe.sc.logic.mk,e,b));return c}function Lj(a){a.xc=new olympe.dc.db.uc;a.values=Object.create(null)}
908
+ olympe.sc.logic.wb.C=P(olympe.sc.logic.wb.O,olympe.sc.logic.Cb.F);olympe.sc.logic.wb.F=olympe.sc.logic.wb.O.Ga('0168a431d91f2578000c');P(olympe.dc.CloudObject.O,olympe.sc.logic.wb.da);P(olympe.dm.Property.O,olympe.sc.logic.wb.$);P(olympe.dc.CloudObject.O,olympe.sc.logic.wb.L);P(olympe.dm.Property.O,olympe.sc.logic.wb.F);m=olympe.sc.logic.wb.prototype;m.Gt.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.hx.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);
909
+ m.ex.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);m.gx.K=new olympe.D.J(()=>olympe.dm.Property,[]);m.uw.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.sw.K=new olympe.D.J(()=>olympe.sc.logic.Cb,[]);m.tw.K=new olympe.D.J(()=>olympe.dm.Property,[]);olympe.sc.logic.Ud=class extends olympe.sc.logic.Function{};olympe.sc.logic.Ud.O=olympe.dc.ya.C('017dc8c114aa61a0e27f',olympe.sc.logic.Ud);olympe.sc.logic.Ud.C=olympe.sc.logic.Ud.O.Ga('017dc8d6d8ef9135f08a');olympe.sc.logic.Ud.G=olympe.sc.logic.Ud.O.Ga('017dc8d6d8ef9135f08b');P(olympe.dm.Mb.O,olympe.sc.logic.Ud.G);function Hj(a,b){const c=a.Md(),d=c.Hl().T(),e=c.Il().T(),f=c.Jl().T();b.on(d,g=>{g&&(g=new Map(a.getInputs().map(h=>[h,b.get(h)])),g=olympe.sc.logic.lk.la(g),olympe.H.wa.fb.tb.get(a.Nb(),g).then(h=>{h=Ij(h,a.W.bind(a,b));for(const [k,l]of h)k!==e&&k!==f&&b.set(k,l);b.set(e,h.get(e));b.set(f,h.get(f))}).catch(h=>{b.set(f,olympe.sc.logic.Jj.create(h.toString(),1))}))},b.Z())}
910
+ function Jj(a,b,c,d,e,f){const g=n=>{if(null!==n){e.cancel();k&&k();l&&l();try{const p=new Map(a.getOutputs().map(r=>[r,b.get(r)])),q=olympe.sc.logic.lk.la(p);f.te(q).finally(()=>b.destroy())}catch(p){n=Error(`Error while serializing the response from remote action ${a.Nb()}: ${p.message}`),f.xg(n).finally(()=>b.destroy())}}},h=b.Z(),k=b.on(c,g,h),l=b.on(d,g,h)}
911
+ olympe.sc.logic.Lh=class extends olympe.sc.logic.Function{constructor(a,b,c,d,e){super(a,b,c);this.Sa=d;this.timeout=e}run(a){let b;null!=(b=a.$a(olympe.sc.Qa.C.EDITION))&&b||(this.db.cb(this,olympe.sc.logic.Lh.C)?this.bc(a):(tj(this,a),Hj(this,a)))}bc(a){const b=this.Nb(),c=this.Md(),d=c.sp().T(),e=c.Hl().T(),f=c.Il().T(),g=c.Jl().T();(new olympe.H.wa.fb.tb(b,a)).listen().subscribe(rxjs.Subscriber.create(h=>{const k=a.Yh('remote call'),l=Ij(h.body(),this.W.bind(this,k)),n=Jb(()=>{h.xg(Error(`Timeout reached on remote action ${this.db.name(this)} (${this.tag})`));
912
+ k.destroy()},this.timeout);Jj(this,k,f,g,n,h);super.run(k);for(const [p,q]of l)p!==e&&k.set(p,q);h.vj().then(p=>{var q=k.get(d);null!==q&&olympe.dc.za(q)!==p&&(q=this.Nb(),this.N.warn(`Remote action ${this.db.name(q)} ${q}: try to run it with an input user that is not the real authenticated user.`));k.set(d,p);k.set(e,l.get(e))})},h=>{const k=this.Nb();this.N.error(`Error while listening on remote action ${this.db.name(k)} (${k}): ${h.message}`)}))}W(a,b){const c=Array.from(b.de()).map(d=>d.tag());
913
+ Rc(this.Sa,a.C.C,b,[],c)}};olympe.sc.logic.Lh.O=olympe.dc.ya.C('017a7b0c5dcbd8964c5d',olympe.sc.logic.Lh,olympe.sc.P.Ea,olympe.dc.db.P.Aa,new olympe.U.fa(olympe.sc.Config.sq));olympe.sc.logic.Lh.C=olympe.sc.logic.Lh.O.xa('017a7b0c62a02a89444f');function Ij(a,b){var c=(new olympe.dc.X.Ii(olympe.dc.Ha.Mc)).C(a.p||[]);b&&b(c);c=new Map;for(const [d,e]of Object.entries(a.v||{}))c.set(d,Kj(olympe.sc.logic.lk,e,b));return c}function Lj(a){a.xc=new olympe.dc.db.uc;a.values=Object.create(null)}
914
914
  function Kj(a,b,c){if(null===b||void 0===b)return null;switch(b.t){case 1:return new Date(b.d);case 2:return olympe.D.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.CloudObject.get(b.v);case 5:return Ce(b.v);case 6:return Le(b.v,c);case 7:return new Map(Object.entries(b.m).map(([d,e])=>[d,Kj(a,e,c)]));default:return Array.isArray(b)?b.map(d=>Kj(a,d,c)):'object'===typeof b?Object.entries(b).reduce((d,[e,f])=>{d[e]=Kj(a,f,c);return d},{}):b}}
915
- function Mj(a,b){var c=a.db;a=a.xc;if(c.Db(b)){a.F(b,c.dd(b,!0),0);a.Ta(olympe.dc.jc.Tc,b,c.model(b),0);for(const [d,e,f]of Jd(c,b))(c=a.Lf(f))&&c.re()&&(e===olympe.dc.Ca.DESTINATION?a.Ta(d,b,f,0):a.Ta(d,f,b,0))}else olympe.ra.Ya('Remote Action').error(`Try to serialize an instance ${b} that does not exist in the local datacloud.`)}
916
- olympe.sc.logic.mk=class{constructor(){this.db=olympe.dc.Ja();Lj(this)}static la(a){const b=new olympe.sc.logic.mk;a.forEach((c,d)=>{null!==c&&void 0!==c&&(b.values[d]=b.C(c))});return b.flush()}flush(){const a=Object.create(null),b=new olympe.dc.transaction.td;this.xc.Nc(b);a.p=ie(b);a.v=this.values;Lj(this);return a}C(a){switch(!0){case a instanceof olympe.D.ib:return{t:1,d:a.valueOf().toISOString()};case a instanceof Date:return{t:1,d:a.toISOString()};case a instanceof olympe.D.Color:return{t:2,
917
- r:a.Qf().valueOf(),g:a.Kf().valueOf(),b:a.Ff().valueOf(),a:a.Ef().valueOf()};case a instanceof olympe.sc.logic.Error:return{t:3,c:a.code,m:a.Tr};case a&&'function'===typeof a.T:return a=a.T(),Mj(this,a),{t:4,v:a};case a instanceof olympe.dc.gb:return{t:5,v:a.la()};case a instanceof olympe.dc.Xa:return{t:6,v:a.la()};case Array.isArray(a):return a.map(this.C.bind(this));case a instanceof Map:const b=Object.create(null);for(const [c,d]of a)'string'===typeof c&&(b[c]=this.C(d));return{t:7,m:b};case null===
918
- a:case void 0===a:return null;case 'object'===typeof a:return Object.entries(a).reduce((c,[d,e])=>{c[d]=this.C(e);return c},{});default:return a}}};olympe.sc.logic.controllers={};olympe.sc.logic.controllers.Cl=class{constructor(a){this.db=olympe.dc.Ja();this.typeRel=a}};olympe.sc.logic.controllers.Cl.C={pz:-1,jA:1};olympe.sc.logic.controllers.OA=class extends olympe.sc.logic.controllers.Cl{constructor(){super(olympe.sc.logic.me.C)}};olympe.sc.logic.controllers.QA=class extends olympe.sc.logic.controllers.Cl{constructor(){super(olympe.sc.logic.Gc.typeRel)}};olympe.sc.logic.Ek={};olympe.sc.logic.Ek.Wu=class extends olympe.sc.logic.Function{update(a,[b,c],[d]){const e=olympe.dc.za(b);e?kf(df(new olympe.dc.kf(e),olympe.dc.Qb.tf),c).jb(()=>{d(olympe.dc.CloudObject.get(e))}):this.N.warn('Cannot subscribe to an instance with no tag: '+e)}};olympe.sc.logic.ya.C('0174bf4b7e006e4b788a',olympe.sc.logic.Ek.Wu);olympe.sc.logic.actions={};olympe.sc.logic.Ek.Yt=class extends olympe.sc.logic.Function{run(a){tj(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.Z())):f<e?(b(g.Te(f)),f++,c((new Date).getTime())):(gj(h.C),d((new Date).getTime()))};this.getInputs().forEach((l,n)=>a.on(l,p=>{if(p)switch(n){case 0:g=p;break;case 1:e=g.zg();f=0;fj(h.C);k();break;case 2:k();break;default:this.N.error('Unhandled input')}},this.tag))}};
919
- olympe.sc.logic.ya.C('0171889b060b6cd54300',olympe.sc.logic.Ek.Yt);olympe.sc.logic.$b={};olympe.sc.logic.$b.jo=class extends olympe.sc.logic.ye{F(){return this.ce('017dc92292107fb98b21')}};Fj('017dc8d6c8fd8c8bd2f0',olympe.sc.logic.$b.jo);olympe.sc.logic.$b.jo.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.Cb,[]);olympe.sc.logic.$b.El=class extends olympe.sc.logic.ye{F(){return this.ce('016ac63808535703691c')}};olympe.sc.logic.$b.El.O=Fj('0169b6876a03f139d50a',olympe.sc.logic.$b.El);olympe.sc.logic.$b.El.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.Cb,[]);olympe.sc.logic.$b.Sl=class extends olympe.sc.logic.ye{F(){return this.ce('016ac63809a9a8e6db96')}G(){return this.Jf('016ac6380ab003363b3e')}};Fj('01646ad602f933b8caaf',olympe.sc.logic.$b.Sl);olympe.sc.logic.$b.Sl.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.Cb,[]);olympe.sc.logic.$b.Sl.prototype.G.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);olympe.sc.logic.$b.dk=class extends olympe.sc.logic.ye{F(){return this.ce('016ac6380bd98f1d91a0')}L(){return this.Jf('016ac63c589ae38ca3ae')}G(){return this.Jf('016ac63c5a377fceabaa')}};Fj('0168ec42fc01747a98b6',olympe.sc.logic.$b.dk);olympe.sc.logic.$b.dk.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.Cb,[]);olympe.sc.logic.$b.dk.prototype.L.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);olympe.sc.logic.$b.dk.prototype.G.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);olympe.sc.logic.$b.Yg=class extends olympe.sc.logic.ye{Il(){return this.ce('017a7b07b09e3b22c8b4')}tp(){return this.ce('017a7b07ba05807a74b0')}Jl(){return this.Jf('017a7b0818c12388d731')}Kl(){return this.Jf('017a7b085146d5e69aec')}It(){return olympe.D.sa.F}};olympe.sc.logic.$b.Yg.ja='017a7b07b09e3b22c8b4';olympe.sc.logic.$b.Yg.zc='017a7b07ba05807a74b0';olympe.sc.logic.$b.Yg.bc='017a7b0818c12388d731';olympe.sc.logic.$b.Yg.C='017a7b085146d5e69aec';
920
- olympe.sc.logic.$b.Yg.O=Fj('017a7b07a948e30508fa',olympe.sc.logic.$b.Yg,olympe.sc.logic.Lh);m=olympe.sc.logic.$b.Yg.prototype;m.Il.K=new olympe.D.J(()=>olympe.sc.logic.Cb,[]);m.tp.K=new olympe.D.J(()=>olympe.sc.logic.Cb,[]);m.Jl.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);m.Kl.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);m.It.K=olympe.D.J.R;olympe.sc.logic.$b.Nq=class extends olympe.sc.logic.ye{F(){return this.ce('016ac63c5b3ed0562740')}};Fj('016a9766c230916ea5ec',olympe.sc.logic.$b.Nq);olympe.sc.logic.$b.Nq.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.Cb,[]);olympe.sc.query={};olympe.sc.query.Hn=class extends olympe.sc.Vg{};olympe.sc.query.Hn.O=olympe.dc.ya.C('01631aacd8276ea98491',olympe.sc.query.Hn);olympe.sc.query.Zp=class extends olympe.dm.Enum{};olympe.sc.query.Zp.O=olympe.dc.ya.C('01631aacd8276ea98495',olympe.sc.query.Zp);olympe.sc.query.jq=class extends olympe.dm.Enum{};olympe.sc.query.jq.O=olympe.dc.ya.C('01631aacd8276ea98494',olympe.sc.query.jq);olympe.sc.query.lq=class extends olympe.sc.Vg{};olympe.sc.query.lq.O=olympe.dc.ya.C('01631aacd8276ea98492',olympe.sc.query.lq);olympe.sc.query.mq=class extends olympe.dc.CloudObject{};olympe.sc.query.mq.O=olympe.dc.ya.C('01631aacd8276ea98493',olympe.sc.query.mq);olympe.sc.fo=class extends olympe.dc.CloudObject{};olympe.sc.fo.O=olympe.dc.ya.C('018312ceeb3e93618a85',olympe.sc.fo);olympe.sc.workflow={};olympe.sc.workflow.ObjectState=class extends olympe.dc.CloudObject{};olympe.sc.workflow.ObjectState.O=olympe.dc.ya.C('017ffdd8f0b1e31fe138',olympe.sc.workflow.ObjectState);olympe.sc.workflow.ObjectState.workflowProp=olympe.sc.workflow.ObjectState.O.xa('017ffdd8f0b1e31fe13e');olympe.sc.workflow.ObjectState.stateProp=olympe.sc.workflow.ObjectState.O.xa('017ffdd8f0b1e31fe139');olympe.sc.workflow.ObjectState.assigneeProp=olympe.sc.workflow.ObjectState.O.xa('017ffdd8f0b1e31fe13a');
921
- olympe.sc.workflow.ObjectState.dateTimeProp=olympe.sc.workflow.ObjectState.O.xa('017ffdd8f0b1e31fe13b');olympe.sc.workflow.ObjectState.serializedObjectProp=olympe.sc.workflow.ObjectState.O.xa('017ffdd8f0b1e31fe13d');olympe.sc.workflow.ObjectState.objectRel=olympe.sc.workflow.ObjectState.O.Ga('017ffdd8f0b1e31fe13c');olympe.sc.workflow.ObjectState.currentObjectRel=olympe.sc.workflow.ObjectState.O.Ga('017ffdd8f0b1e31fe13f');olympe.sc.workflow.sf=class extends olympe.sc.logic.ye{Jt(){return this.ce('017ffe02381f9fac5060')}Mt(){return this.ce('017ffe02381f9fac5061')}Nt(){return this.ce('017ffe02381f9fac5062')}rw(){return this.ce('017ffe02381f9fac5065')}Kt(){return this.Jf('017ffe02381f9fac5063')}Lt(){return this.Jf('017ffe02381f9fac5064')}};olympe.sc.workflow.sf.O=Fj('017ffde21f5fe0f704ce',olympe.sc.workflow.sf);olympe.sc.workflow.sf.C='017ffe02381f9fac5060';olympe.sc.workflow.sf.Kd='017ffe02381f9fac5061';
922
- olympe.sc.workflow.sf.fe='017ffe02381f9fac5062';olympe.sc.workflow.sf.bc='017ffe02381f9fac5065';olympe.sc.workflow.sf.ja='017ffe02381f9fac5063';olympe.sc.workflow.sf.zc='017ffe02381f9fac5064';m=olympe.sc.workflow.sf.prototype;m.Jt.K=new olympe.D.J(()=>olympe.sc.logic.Cb,[]);m.Mt.K=new olympe.D.J(()=>olympe.sc.logic.Cb,[]);m.Nt.K=new olympe.D.J(()=>olympe.sc.logic.Cb,[]);m.rw.K=new olympe.D.J(()=>Map,[]);m.Kt.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);
923
- m.Lt.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);olympe.sc.workflow.Qe=class extends olympe.dm.BrickMetadata{Rc(){return this.oc(olympe.sc.workflow.Workflow.statesRel.Ec(),olympe.sc.workflow.Workflow).na().concat(['.',this.na()])}};olympe.sc.workflow.Qe.O=olympe.dc.ya.C('017ffdc2dda51d46b430',olympe.sc.workflow.Qe);olympe.sc.workflow.Transition=class extends olympe.dc.CloudObject{F(){return this.Mr()}C(){return this.oc(olympe.sc.workflow.Transition.fromStateRel,olympe.sc.workflow.Qe)}G(){return this.oc(olympe.sc.workflow.Transition.toStateRel,olympe.sc.workflow.Qe)}Rc(){const a=this.oc(olympe.sc.workflow.Transition.fromStateRel,olympe.sc.workflow.Qe);return a.oc(olympe.sc.workflow.Workflow.statesRel.Ec(),olympe.sc.workflow.Workflow).na().concat(['.',a.na(),'->',this.na()])}};
915
+ function Mj(a,b){var c=a.db;a=a.xc;if(c.Db(b)){a.F(b,c.dd(b,!0),0);a.Ua(olympe.dc.jc.Tc,b,c.model(b),0);for(const [d,e,f]of Jd(c,b))(c=a.Lf(f))&&c.re()&&(e===olympe.dc.Ca.DESTINATION?a.Ua(d,b,f,0):a.Ua(d,f,b,0))}else olympe.ra.Ya('Remote Action').error(`Try to serialize an instance ${b} that does not exist in the local datacloud.`)}
916
+ olympe.sc.logic.lk=class{constructor(){this.db=olympe.dc.Ja();Lj(this)}static la(a){const b=new olympe.sc.logic.lk;a.forEach((c,d)=>{null!==c&&void 0!==c&&(b.values[d]=b.C(c))});return b.flush()}flush(){const a=Object.create(null),b=new olympe.dc.transaction.td;this.xc.Nc(b);a.p=ie(b);a.v=this.values;Lj(this);return a}C(a){switch(!0){case a instanceof olympe.D.ib:return{t:1,d:a.valueOf().toISOString()};case a instanceof Date:return{t:1,d:a.toISOString()};case a instanceof olympe.D.Color:return{t:2,
917
+ r:a.Qf().valueOf(),g:a.Kf().valueOf(),b:a.Ff().valueOf(),a:a.Ef().valueOf()};case a instanceof olympe.sc.logic.Error:return{t:3,c:a.code,m:a.Sr};case a&&'function'===typeof a.T:return a=a.T(),Mj(this,a),{t:4,v:a};case a instanceof olympe.dc.gb:return{t:5,v:a.la()};case a instanceof olympe.dc.Xa:return{t:6,v:a.la()};case Array.isArray(a):return a.map(this.C.bind(this));case a instanceof Map:const b=Object.create(null);for(const [c,d]of a)'string'===typeof c&&(b[c]=this.C(d));return{t:7,m:b};case null===
918
+ a:case void 0===a:return null;case 'object'===typeof a:return Object.entries(a).reduce((c,[d,e])=>{c[d]=this.C(e);return c},{});default:return a}}};olympe.sc.logic.controllers={};olympe.sc.logic.controllers.Bl=class{constructor(a){this.db=olympe.dc.Ja();this.typeRel=a}};olympe.sc.logic.controllers.Bl.C={oz:-1,iA:1};olympe.sc.logic.controllers.NA=class extends olympe.sc.logic.controllers.Bl{constructor(){super(olympe.sc.logic.me.C)}};olympe.sc.logic.controllers.PA=class extends olympe.sc.logic.controllers.Bl{constructor(){super(olympe.sc.logic.Gc.typeRel)}};olympe.sc.logic.Dk={};olympe.sc.logic.Dk.Vu=class extends olympe.sc.logic.Function{update(a,[b,c],[d]){const e=olympe.dc.za(b);e?kf(df(new olympe.dc.kf(e),olympe.dc.Qb.tf),c).jb(()=>{d(olympe.dc.CloudObject.get(e))}):this.N.warn('Cannot subscribe to an instance with no tag: '+e)}};olympe.sc.logic.ya.C('0174bf4b7e006e4b788a',olympe.sc.logic.Dk.Vu);olympe.sc.logic.actions={};olympe.sc.logic.Dk.Xt=class extends olympe.sc.logic.Function{run(a){tj(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.Z())):f<e?(b(g.Te(f)),f++,c((new Date).getTime())):(gj(h.C),d((new Date).getTime()))};this.getInputs().forEach((l,n)=>a.on(l,p=>{if(p)switch(n){case 0:g=p;break;case 1:e=g.zg();f=0;fj(h.C);k();break;case 2:k();break;default:this.N.error('Unhandled input')}},this.tag))}};
919
+ olympe.sc.logic.ya.C('0171889b060b6cd54300',olympe.sc.logic.Dk.Xt);olympe.sc.logic.$b={};olympe.sc.logic.$b.io=class extends olympe.sc.logic.ye{F(){return this.ce('017dc92292107fb98b21')}};Fj('017dc8d6c8fd8c8bd2f0',olympe.sc.logic.$b.io);olympe.sc.logic.$b.io.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.Cb,[]);olympe.sc.logic.$b.Dl=class extends olympe.sc.logic.ye{F(){return this.ce('016ac63808535703691c')}};olympe.sc.logic.$b.Dl.O=Fj('0169b6876a03f139d50a',olympe.sc.logic.$b.Dl);olympe.sc.logic.$b.Dl.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.Cb,[]);olympe.sc.logic.$b.Rl=class extends olympe.sc.logic.ye{F(){return this.ce('016ac63809a9a8e6db96')}G(){return this.Jf('016ac6380ab003363b3e')}};Fj('01646ad602f933b8caaf',olympe.sc.logic.$b.Rl);olympe.sc.logic.$b.Rl.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.Cb,[]);olympe.sc.logic.$b.Rl.prototype.G.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);olympe.sc.logic.$b.ck=class extends olympe.sc.logic.ye{F(){return this.ce('016ac6380bd98f1d91a0')}L(){return this.Jf('016ac63c589ae38ca3ae')}G(){return this.Jf('016ac63c5a377fceabaa')}};Fj('0168ec42fc01747a98b6',olympe.sc.logic.$b.ck);olympe.sc.logic.$b.ck.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.Cb,[]);olympe.sc.logic.$b.ck.prototype.L.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);olympe.sc.logic.$b.ck.prototype.G.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);olympe.sc.logic.$b.Yg=class extends olympe.sc.logic.ye{Hl(){return this.ce('017a7b07b09e3b22c8b4')}sp(){return this.ce('017a7b07ba05807a74b0')}Il(){return this.Jf('017a7b0818c12388d731')}Jl(){return this.Jf('017a7b085146d5e69aec')}Ht(){return olympe.D.sa.F}};olympe.sc.logic.$b.Yg.ja='017a7b07b09e3b22c8b4';olympe.sc.logic.$b.Yg.zc='017a7b07ba05807a74b0';olympe.sc.logic.$b.Yg.bc='017a7b0818c12388d731';olympe.sc.logic.$b.Yg.C='017a7b085146d5e69aec';
920
+ olympe.sc.logic.$b.Yg.O=Fj('017a7b07a948e30508fa',olympe.sc.logic.$b.Yg,olympe.sc.logic.Lh);m=olympe.sc.logic.$b.Yg.prototype;m.Hl.K=new olympe.D.J(()=>olympe.sc.logic.Cb,[]);m.sp.K=new olympe.D.J(()=>olympe.sc.logic.Cb,[]);m.Il.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);m.Jl.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);m.Ht.K=olympe.D.J.R;olympe.sc.logic.$b.Mq=class extends olympe.sc.logic.ye{F(){return this.ce('016ac63c5b3ed0562740')}};Fj('016a9766c230916ea5ec',olympe.sc.logic.$b.Mq);olympe.sc.logic.$b.Mq.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.Cb,[]);olympe.sc.query={};olympe.sc.query.Gn=class extends olympe.sc.Vg{};olympe.sc.query.Gn.O=olympe.dc.ya.C('01631aacd8276ea98491',olympe.sc.query.Gn);olympe.sc.query.Yp=class extends olympe.dm.Enum{};olympe.sc.query.Yp.O=olympe.dc.ya.C('01631aacd8276ea98495',olympe.sc.query.Yp);olympe.sc.query.iq=class extends olympe.dm.Enum{};olympe.sc.query.iq.O=olympe.dc.ya.C('01631aacd8276ea98494',olympe.sc.query.iq);olympe.sc.query.kq=class extends olympe.sc.Vg{};olympe.sc.query.kq.O=olympe.dc.ya.C('01631aacd8276ea98492',olympe.sc.query.kq);olympe.sc.query.lq=class extends olympe.dc.CloudObject{};olympe.sc.query.lq.O=olympe.dc.ya.C('01631aacd8276ea98493',olympe.sc.query.lq);olympe.sc.eo=class extends olympe.dc.CloudObject{};olympe.sc.eo.O=olympe.dc.ya.C('018312ceeb3e93618a85',olympe.sc.eo);olympe.sc.workflow={};olympe.sc.workflow.ObjectState=class extends olympe.dc.CloudObject{};olympe.sc.workflow.ObjectState.O=olympe.dc.ya.C('017ffdd8f0b1e31fe138',olympe.sc.workflow.ObjectState);olympe.sc.workflow.ObjectState.workflowProp=olympe.sc.workflow.ObjectState.O.xa('017ffdd8f0b1e31fe13e');olympe.sc.workflow.ObjectState.stateProp=olympe.sc.workflow.ObjectState.O.xa('017ffdd8f0b1e31fe139');olympe.sc.workflow.ObjectState.assigneeProp=olympe.sc.workflow.ObjectState.O.xa('017ffdd8f0b1e31fe13a');
921
+ olympe.sc.workflow.ObjectState.dateTimeProp=olympe.sc.workflow.ObjectState.O.xa('017ffdd8f0b1e31fe13b');olympe.sc.workflow.ObjectState.serializedObjectProp=olympe.sc.workflow.ObjectState.O.xa('017ffdd8f0b1e31fe13d');olympe.sc.workflow.ObjectState.objectRel=olympe.sc.workflow.ObjectState.O.Ga('017ffdd8f0b1e31fe13c');olympe.sc.workflow.ObjectState.currentObjectRel=olympe.sc.workflow.ObjectState.O.Ga('017ffdd8f0b1e31fe13f');olympe.sc.workflow.sf=class extends olympe.sc.logic.ye{It(){return this.ce('017ffe02381f9fac5060')}Lt(){return this.ce('017ffe02381f9fac5061')}Mt(){return this.ce('017ffe02381f9fac5062')}qw(){return this.ce('017ffe02381f9fac5065')}Jt(){return this.Jf('017ffe02381f9fac5063')}Kt(){return this.Jf('017ffe02381f9fac5064')}};olympe.sc.workflow.sf.O=Fj('017ffde21f5fe0f704ce',olympe.sc.workflow.sf);olympe.sc.workflow.sf.C='017ffe02381f9fac5060';olympe.sc.workflow.sf.Kd='017ffe02381f9fac5061';
922
+ olympe.sc.workflow.sf.fe='017ffe02381f9fac5062';olympe.sc.workflow.sf.bc='017ffe02381f9fac5065';olympe.sc.workflow.sf.ja='017ffe02381f9fac5063';olympe.sc.workflow.sf.zc='017ffe02381f9fac5064';m=olympe.sc.workflow.sf.prototype;m.It.K=new olympe.D.J(()=>olympe.sc.logic.Cb,[]);m.Lt.K=new olympe.D.J(()=>olympe.sc.logic.Cb,[]);m.Mt.K=new olympe.D.J(()=>olympe.sc.logic.Cb,[]);m.qw.K=new olympe.D.J(()=>Map,[]);m.Jt.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);
923
+ m.Kt.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);olympe.sc.workflow.Qe=class extends olympe.dm.BrickMetadata{Rc(){return this.oc(olympe.sc.workflow.Workflow.statesRel.Ec(),olympe.sc.workflow.Workflow).na().concat(['.',this.na()])}};olympe.sc.workflow.Qe.O=olympe.dc.ya.C('017ffdc2dda51d46b430',olympe.sc.workflow.Qe);olympe.sc.workflow.Transition=class extends olympe.dc.CloudObject{F(){return this.Lr()}C(){return this.oc(olympe.sc.workflow.Transition.fromStateRel,olympe.sc.workflow.Qe)}G(){return this.oc(olympe.sc.workflow.Transition.toStateRel,olympe.sc.workflow.Qe)}Rc(){const a=this.oc(olympe.sc.workflow.Transition.fromStateRel,olympe.sc.workflow.Qe);return a.oc(olympe.sc.workflow.Workflow.statesRel.Ec(),olympe.sc.workflow.Workflow).na().concat(['.',a.na(),'->',this.na()])}};
924
924
  olympe.sc.workflow.Transition.O=olympe.dc.ya.C('017ffdc633219f16beea',olympe.sc.workflow.Transition);olympe.sc.workflow.Transition.processRefProp=olympe.sc.workflow.Transition.O.xa('017ffdc633219f16beec');olympe.sc.workflow.Transition.fromStateRel=olympe.sc.workflow.Transition.O.Ga('017ffdc2dda51d46b431');olympe.sc.workflow.Transition.toStateRel=olympe.sc.workflow.Transition.O.Ga('017ffdc633219f16beeb');olympe.sc.workflow.Transition.prototype.F.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);
925
- olympe.sc.workflow.Transition.prototype.C.K=new olympe.D.J(()=>olympe.sc.workflow.Qe,[]);olympe.sc.workflow.Transition.prototype.G.K=new olympe.D.J(()=>olympe.sc.workflow.Qe,[]);olympe.sc.workflow.Workflow=class extends olympe.dm.BrickMetadata{C(){return olympe.sc.Je.sg.Hj}L(){return this.Bg(olympe.sc.workflow.Workflow.serializationEnabledProp)}F(){return this.oc(olympe.sc.workflow.Workflow.dataTypeRel,olympe.sc.ff)}G(){return this.oc(olympe.sc.workflow.Workflow.initialStateRel,olympe.sc.workflow.Qe)}};olympe.sc.workflow.Workflow.O=olympe.dc.ya.C('017ffdc010e5bcc9c971',olympe.sc.workflow.Workflow);olympe.sc.workflow.Workflow.serializationEnabledProp=olympe.sc.workflow.Workflow.O.xa('017ffdc010e5bcc9c972');
925
+ olympe.sc.workflow.Transition.prototype.C.K=new olympe.D.J(()=>olympe.sc.workflow.Qe,[]);olympe.sc.workflow.Transition.prototype.G.K=new olympe.D.J(()=>olympe.sc.workflow.Qe,[]);olympe.sc.workflow.Workflow=class extends olympe.dm.BrickMetadata{C(){return olympe.sc.Je.sg.Gj}L(){return this.Bg(olympe.sc.workflow.Workflow.serializationEnabledProp)}F(){return this.oc(olympe.sc.workflow.Workflow.dataTypeRel,olympe.sc.ff)}G(){return this.oc(olympe.sc.workflow.Workflow.initialStateRel,olympe.sc.workflow.Qe)}};olympe.sc.workflow.Workflow.O=olympe.dc.ya.C('017ffdc010e5bcc9c971',olympe.sc.workflow.Workflow);olympe.sc.workflow.Workflow.serializationEnabledProp=olympe.sc.workflow.Workflow.O.xa('017ffdc010e5bcc9c972');
926
926
  olympe.sc.workflow.Workflow.dataTypeRel=olympe.sc.workflow.Workflow.O.Ga('017ffdc010e5bcc9c973');olympe.sc.workflow.Workflow.statesRel=olympe.sc.workflow.Workflow.O.Ga('017ffdc010e5bcc9c974');olympe.sc.workflow.Workflow.initialStateRel=olympe.sc.workflow.Workflow.O.Ga('017ffdc010e5bcc9c975');olympe.sc.workflow.Workflow.prototype.L.K=olympe.D.J.R;olympe.sc.workflow.Workflow.prototype.F.K=new olympe.D.J(()=>olympe.sc.ff,[]);
927
- olympe.sc.workflow.Workflow.prototype.G.K=new olympe.D.J(()=>olympe.sc.workflow.Qe,[]);olympe.sc.Ma={};olympe.sc.Ma.Le=class extends olympe.sc.lb{C(){return olympe.sc.Je.sg.Lu}};olympe.sc.Ma.Le.O=Qc(olympe.dc.ya.C('01120300000000adef00',olympe.sc.Ma.Le));olympe.sc.Ma.Le.C=olympe.sc.Ma.Le.O.Ga('0171bc1f15da96dfdb89');P(olympe.dm.Vc.O,olympe.sc.Ma.Le.C);olympe.sc.Ma.mi=class extends olympe.sc.Runnable{G(){return[this.Nb()]}W(){return olympe.dc.kd.from(this.Nb()).rb(olympe.sc.Ma.Le.C).Ic()}};olympe.sc.Ma.mi.O=Qc(olympe.dc.ya.C('0113030000000aca1100',olympe.sc.Ma.mi));olympe.sc.Ma.mi.prototype.W.K=new olympe.D.J(()=>olympe.dm.Mb,[]);olympe.sc.Ma.vb=class extends olympe.dc.CloudObject{Pt(){return this.Bg(olympe.sc.Ma.vb.F)}Ox(){return this.Bg(olympe.sc.Ma.vb.qb)}Od(){return this.Ie(olympe.sc.Ma.vb.C)}xw(){return this.Eb(olympe.sc.Ma.vb.da)}Ww(){return this.Eb(olympe.sc.Ma.vb.Ua)}Vw(){return this.Eb(olympe.sc.Ma.vb.Ka)}Qm(){this.Eb(olympe.sc.Ma.vb.Va)}Jw(){return this.Eb(olympe.sc.Ma.vb.ja)}iw(){return this.Eb(olympe.sc.Ma.vb.L)}Uw(){return this.Eb(olympe.sc.Ma.vb.ta)}Ot(){return this.Eb(olympe.sc.Ma.vb.$)}};
928
- olympe.sc.Ma.vb.O=olympe.dc.ya.C('011203300000000adef5',olympe.sc.Ma.vb);olympe.sc.Ma.vb.F=olympe.sc.Ma.vb.O.xa('011203300000000adef6');olympe.sc.Ma.vb.qb=olympe.sc.Ma.vb.O.xa('011203300000000adef7');olympe.sc.Ma.vb.C=olympe.sc.Ma.vb.O.xa('011203300000000adef8');olympe.sc.Ma.vb.da=olympe.sc.Ma.vb.O.xa('011203300000000adef9');olympe.sc.Ma.vb.Ua=olympe.sc.Ma.vb.O.xa('011203300000000adefa');olympe.sc.Ma.vb.Ka=olympe.sc.Ma.vb.O.xa('011203300000000adefb');olympe.sc.Ma.vb.L=olympe.sc.Ma.vb.O.xa('011203300000000adefc');
929
- olympe.sc.Ma.vb.Va=olympe.sc.Ma.vb.O.xa('011203300000000adefd');olympe.sc.Ma.vb.ja=olympe.sc.Ma.vb.O.xa('011203300000000adefe');olympe.sc.Ma.vb.ta=olympe.sc.Ma.vb.O.xa('011203300000000adeff');olympe.sc.Ma.vb.$=olympe.sc.Ma.vb.O.xa('011203300000000adee0');olympe.sc.Ma.vb.Ab={INIT:0,ez:1,Ni:2,km:3,nk:4,lB:5,ac:9};m=olympe.sc.Ma.vb.prototype;m.Pt.K=olympe.D.J.R;m.Ox.K=olympe.D.J.R;m.Od.K=olympe.D.J.G;m.xw.K=olympe.D.J.F;m.Ww.K=olympe.D.J.F;m.Vw.K=olympe.D.J.F;m.Qm.K=olympe.D.J.F;m.Jw.K=olympe.D.J.F;
930
- m.iw.K=olympe.D.J.F;m.Uw.K=olympe.D.J.F;m.Ot.K=olympe.D.J.F;olympe.sc.Ma.cp=class extends olympe.sc.Ma.mi{Ka(){return!0}};olympe.sc.Ma.cp.O=olympe.dc.ya.C('0113032000000aca1102',olympe.sc.Ma.cp,olympe.sc.P.Ea);olympe.sc.Ma.$g=class extends olympe.sc.Ma.Le{F(){return(new olympe.dc.Zj(this.T(),olympe.sc.Ma.vb)).rb(olympe.sc.Ma.$g.ja).pf().Pc()}};olympe.sc.Ma.$g.O=olympe.dc.ya.C('011203300000000adef3',olympe.sc.Ma.$g);olympe.sc.Ma.$g.ja=olympe.sc.Ma.$g.O.Ga('011203300000000adef4');P(olympe.sc.Ma.vb.O,olympe.sc.Ma.$g.ja);olympe.sc.Ma.$g.prototype.F.K=new olympe.D.J(()=>olympe.sc.Ma.vb,[]);olympe.sc.bh=class extends olympe.dc.CloudObject{static get(){return olympe.dc.CloudObject.get('011203300000000adf0f')}};olympe.sc.bh.O=olympe.dc.ya.C('011203300000000adf00',olympe.sc.bh);olympe.sc.bh.F=olympe.sc.bh.O.xa('011203300000000adf01');olympe.sc.bh.C=olympe.sc.bh.O.xa('011203300000000adf02');olympe.sc.bh.L='011203300000000adf0f';olympe.sc.nz=class{};olympe.sc.ve=class extends olympe.sc.Runnable{Ua(){return this.ub(olympe.sc.ve.G,olympe.sc.Runnable)}W(){return this.ub(olympe.sc.ve.C,olympe.dm.Property)}};olympe.sc.ve.O=Qc(olympe.dc.ya.C('016c2d996d9ca27fa9d8',olympe.sc.ve));olympe.sc.ve.G=olympe.sc.ve.O.Ga('016c3cb7742ec9309e0b');olympe.sc.ve.C=olympe.sc.ve.O.Ga('016c42d3454636f90533');olympe.sc.ve.prototype.Ua.K=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.sc.ve.prototype.W.K=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.sc.Bo=class extends olympe.dm.Pb{C(){return olympe.sc.Je.sg.Hj}};olympe.sc.Bo.O=olympe.dc.ya.C('017a7a9ff057958e5678',olympe.sc.Bo);olympe.sc.Jp=class extends olympe.dm.Pb{C(){return olympe.sc.Je.sg.ev}};olympe.sc.Jp.O=olympe.dc.ya.C('01644b6d4543b344b857',olympe.sc.Jp);olympe.sc.Kp=class extends olympe.dc.CloudObject{};olympe.sc.Kp.O=olympe.dc.ya.C('0162f672366be5ca7a86',olympe.sc.Kp);olympe.sc.Oq=class extends olympe.sc.ve{};olympe.sc.Oq.O=olympe.dc.ya.C('016d3f37610ae4fc3962',olympe.sc.Oq);olympe.sc.Nh=class extends olympe.dm.BrickMetadata{C(){return olympe.sc.Je.sg.Hj}};olympe.sc.Nh.O=olympe.dc.ya.C('01645fe6873aeea59e64',olympe.sc.Nh);olympe.sc.Nh.C=olympe.sc.Nh.O.Ga('017ed8ac775f48d4d589');olympe.sc.Nh.F=olympe.sc.Nh.O.Ga('017ed8ac775f48d4d590');olympe.sc.Text=class extends olympe.dm.String{};olympe.sc.Text.O=olympe.dc.ya.C('016cfca73e63f9ab5ba4',olympe.sc.Text);olympe.sc.Transaction=class{constructor(a=!0){this.C=(new olympe.dc.Transaction).persist(a);this.F=new Map;this.source=olympe.dc.Ha.ic}static from(a){const b=olympe.sc.Qa.C.TRANSACTION;return a.has(b,!0)?a.get(b,!0):new olympe.sc.Transaction}static process(a,b){return a.has(olympe.sc.Qa.C.TRANSACTION,!0)?Promise.resolve(!1):b.jb().then(()=>!0)}Z(){return this.C.Z()}create(a,b=new Map,c=this.source,d){d=this.C.create(a,d).ii(c);this.F.set(d.T(),olympe.dc.za(a));for(const [e,f]of b)d.setProperty(e,
931
- f);c===olympe.dc.Ha.Mc&&(b=olympe.dc.Ja(),b=null!==Aj?b.fj(Aj,[olympe.sc.Ma.Le.C,olympe.sc.gd.F.Ec()])[0]||null:null,null!==b?this.Ta(olympe.sc.gd.L,b,d):olympe.ra.Ya('sc').warn('No business container for new instance of',olympe.dc.za(a)));return d.T()}update(a,b,c){this.C.update(a,b,c);return this}Lx(a,b){a=this.C.update(a);for(const [c,d]of b)a.setProperty(c,d);return this}delete(a){this.C.delete(a);return this}Ta(a,b,c){this.C.Ta(a,b,c);return this}cc(a,b,c){this.C.cc(a,b,c);return this}Im(a,b){this.C.Im(a,
932
- b);return this}persist(a=!0){this.C.persist(a);return this}qj(a,b=!0){this.C.qj(a,b);return this}ii(a){this.source=a;return this}model(a){return this.F.get(olympe.dc.za(a))||olympe.dc.Ja().model(a)}fn(a){ke(this.C,a.C);return this}Bm(a){this.C.Bm(a);return this}jb(){return new Promise((a,b)=>{this.C.jb((c,d)=>{c?a():b(d)})})}Lm(){return new Promise((a,b)=>{this.C.Lm((c,d)=>{c?a():b(d)})})}};olympe.sc.Transaction.prototype.executeAsLarge=olympe.sc.Transaction.prototype.Lm;
933
- olympe.sc.Transaction.prototype.execute=olympe.sc.Transaction.prototype.jb;olympe.sc.Transaction.prototype.afterExecution=olympe.sc.Transaction.prototype.Bm;olympe.sc.Transaction.prototype.merge=olympe.sc.Transaction.prototype.fn;olympe.sc.Transaction.prototype.model=olympe.sc.Transaction.prototype.model;olympe.sc.Transaction.prototype.setSource=olympe.sc.Transaction.prototype.ii;olympe.sc.Transaction.prototype.persistInstance=olympe.sc.Transaction.prototype.qj;
934
- olympe.sc.Transaction.prototype.persist=olympe.sc.Transaction.prototype.persist;olympe.sc.Transaction.prototype.deleteAllRelations=olympe.sc.Transaction.prototype.Im;olympe.sc.Transaction.prototype.deleteRelation=olympe.sc.Transaction.prototype.cc;olympe.sc.Transaction.prototype.createRelation=olympe.sc.Transaction.prototype.Ta;olympe.sc.Transaction.prototype['delete']=olympe.sc.Transaction.prototype.delete;olympe.sc.Transaction.prototype.multiUpdate=olympe.sc.Transaction.prototype.Lx;
935
- olympe.sc.Transaction.prototype.update=olympe.sc.Transaction.prototype.update;olympe.sc.Transaction.prototype.create=olympe.sc.Transaction.prototype.create;olympe.sc.Transaction.prototype.getId=olympe.sc.Transaction.prototype.Z;olympe.sc.Transaction.process=olympe.sc.Transaction.process;olympe.sc.Transaction.from=olympe.sc.Transaction.from;olympe.sc.Je.BrickMetadata=olympe.dm.BrickMetadata;olympe.sc.Je.we=olympe.dm.we;olympe.ka.node.qa={};const Nj={client:'client',hostname:'host',port:'port',user:'user',password:'password',Na:'database',schema:'schema',ly:'pollingFrequency',Fv:'burstTransactionInterval',Ix:'minConnections',Hx:'maxConnections',Iv:'connectionsTimeout'},Oj=olympe.dc.ha.ia.am,Pj=olympe.dc.ha.ia.cm,Qj=olympe.dc.ha.ia.QUERY_RESULT,Rj=olympe.dc.ha.ia.bm,Sj=olympe.dc.ha.ia.lg,Tj=olympe.dc.ha.ia.Qh,Uj=olympe.dc.ha.ia.vh,Vj=olympe.dc.ha.ia.ti,Wj=olympe.dc.ha.ia.uh,Xj=olympe.dc.ha.ia.dh,Yj=olympe.dc.ha.ia.Cj,Zj=olympe.dc.ha.ia.yu;
936
- function ak(a,b,c,d,e){const f=new olympe.H.wa.fb.tb(a.tag,b),g=new olympe.sc.X.$s(a.N,a.zc,a.Ua);g.start(a.tag).catch(h=>a.N.error(`Error occurred while starting the file service of SQLConnector ${e}: ${h}`));f.listen().subscribe(h=>{var k=h.body();a.N.debug(`Serving a new message : ${k.t}`);switch(k.t){case Oj:var l=c.queryBuilder().withSchema(d);k=Ce(k.q);a.W(b,l,k,(t,u)=>{(u?h.xg(Error(u)):h.te({t:Qj,r:t})).then()});break;case Pj:k=Ce(k.q);bk(a,b,()=>c.queryBuilder().withSchema(d),k,h);break;
937
- case Zj:ck(b,k.i,h.source());h.Bk().then();break;case Xj:k=(new olympe.dc.X.Ii(a.Nb())).C(k.p);dk(a,b,c,d,k,t=>(t?h.xg(Error(t)):h.Bk()).then());break;case Wj:l=k.i;k=(new olympe.dc.X.Ii(a.Nb())).C(k.p);ek(a,b,l,k,c,d);break;case Sj:const n=b.get('_subscription_cache');k=k.s.reduce((t,u)=>{n.has(u)?fk(n.get(u),h.source()):t.push(u);return t},[]);(0<k.length?h.xg(Error(`These subscriptions was not kept alive: ${k}`)):h.Bk()).then();break;case Tj:const p=k.f;a.N.debug(`Uploading a file: ${p}`);k=pj(g,
938
- (t,u,v)=>{a.N.debug(`Received a file service upload request for file : ${u}`);return p!==u?Promise.reject('The file sent is not the same as the one initially requested'):v instanceof Uint8Array||'string'===typeof v?gk(a,b,c,d,p,v).then(()=>new olympe.net.Sg('',olympe.net.eb.cd.jl)):Promise.reject(`Try to upload content for file ${p} but body is not a Uint8Array or a string`)});h.te(k).then();break;case Uj:const q=k.f;a.N.debug(`Serving a file: ${q}`);k=pj(g,(t,u)=>{a.N.debug(`File service received a download request for file : ${u}`);
927
+ olympe.sc.workflow.Workflow.prototype.G.K=new olympe.D.J(()=>olympe.sc.workflow.Qe,[]);olympe.sc.Ma={};olympe.sc.Ma.Le=class extends olympe.sc.lb{C(){return olympe.sc.Je.sg.Ku}};olympe.sc.Ma.Le.O=Qc(olympe.dc.ya.C('01120300000000adef00',olympe.sc.Ma.Le));olympe.sc.Ma.Le.C=olympe.sc.Ma.Le.O.Ga('0171bc1f15da96dfdb89');P(olympe.dm.Vc.O,olympe.sc.Ma.Le.C);olympe.sc.Ma.mi=class extends olympe.sc.Runnable{G(){return[this.Nb()]}W(){return olympe.dc.kd.from(this.Nb()).rb(olympe.sc.Ma.Le.C).Ic()}};olympe.sc.Ma.mi.O=Qc(olympe.dc.ya.C('0113030000000aca1100',olympe.sc.Ma.mi));olympe.sc.Ma.mi.prototype.W.K=new olympe.D.J(()=>olympe.dm.Mb,[]);olympe.sc.Ma.vb=class extends olympe.dc.CloudObject{Ot(){return this.Bg(olympe.sc.Ma.vb.F)}Nx(){return this.Bg(olympe.sc.Ma.vb.qb)}Od(){return this.Ie(olympe.sc.Ma.vb.C)}ww(){return this.Eb(olympe.sc.Ma.vb.da)}Vw(){return this.Eb(olympe.sc.Ma.vb.Sa)}Uw(){return this.Eb(olympe.sc.Ma.vb.Ka)}Pm(){this.Eb(olympe.sc.Ma.vb.Va)}Iw(){return this.Eb(olympe.sc.Ma.vb.ja)}hw(){return this.Eb(olympe.sc.Ma.vb.L)}Tw(){return this.Eb(olympe.sc.Ma.vb.ta)}Nt(){return this.Eb(olympe.sc.Ma.vb.$)}};
928
+ olympe.sc.Ma.vb.O=olympe.dc.ya.C('011203300000000adef5',olympe.sc.Ma.vb);olympe.sc.Ma.vb.F=olympe.sc.Ma.vb.O.xa('011203300000000adef6');olympe.sc.Ma.vb.qb=olympe.sc.Ma.vb.O.xa('011203300000000adef7');olympe.sc.Ma.vb.C=olympe.sc.Ma.vb.O.xa('011203300000000adef8');olympe.sc.Ma.vb.da=olympe.sc.Ma.vb.O.xa('011203300000000adef9');olympe.sc.Ma.vb.Sa=olympe.sc.Ma.vb.O.xa('011203300000000adefa');olympe.sc.Ma.vb.Ka=olympe.sc.Ma.vb.O.xa('011203300000000adefb');olympe.sc.Ma.vb.L=olympe.sc.Ma.vb.O.xa('011203300000000adefc');
929
+ olympe.sc.Ma.vb.Va=olympe.sc.Ma.vb.O.xa('011203300000000adefd');olympe.sc.Ma.vb.ja=olympe.sc.Ma.vb.O.xa('011203300000000adefe');olympe.sc.Ma.vb.ta=olympe.sc.Ma.vb.O.xa('011203300000000adeff');olympe.sc.Ma.vb.$=olympe.sc.Ma.vb.O.xa('011203300000000adee0');olympe.sc.Ma.vb.Ab={INIT:0,dz:1,Ni:2,jm:3,mk:4,kB:5,ac:9};m=olympe.sc.Ma.vb.prototype;m.Ot.K=olympe.D.J.R;m.Nx.K=olympe.D.J.R;m.Od.K=olympe.D.J.G;m.ww.K=olympe.D.J.F;m.Vw.K=olympe.D.J.F;m.Uw.K=olympe.D.J.F;m.Pm.K=olympe.D.J.F;m.Iw.K=olympe.D.J.F;
930
+ m.hw.K=olympe.D.J.F;m.Tw.K=olympe.D.J.F;m.Nt.K=olympe.D.J.F;olympe.sc.Ma.bp=class extends olympe.sc.Ma.mi{Ka(){return!0}};olympe.sc.Ma.bp.O=olympe.dc.ya.C('0113032000000aca1102',olympe.sc.Ma.bp,olympe.sc.P.Ea);olympe.sc.Ma.$g=class extends olympe.sc.Ma.Le{F(){return(new olympe.dc.Yj(this.T(),olympe.sc.Ma.vb)).rb(olympe.sc.Ma.$g.ja).pf().Pc()}};olympe.sc.Ma.$g.O=olympe.dc.ya.C('011203300000000adef3',olympe.sc.Ma.$g);olympe.sc.Ma.$g.ja=olympe.sc.Ma.$g.O.Ga('011203300000000adef4');P(olympe.sc.Ma.vb.O,olympe.sc.Ma.$g.ja);olympe.sc.Ma.$g.prototype.F.K=new olympe.D.J(()=>olympe.sc.Ma.vb,[]);olympe.sc.bh=class extends olympe.dc.CloudObject{static get(){return olympe.dc.CloudObject.get('011203300000000adf0f')}};olympe.sc.bh.O=olympe.dc.ya.C('011203300000000adf00',olympe.sc.bh);olympe.sc.bh.F=olympe.sc.bh.O.xa('011203300000000adf01');olympe.sc.bh.C=olympe.sc.bh.O.xa('011203300000000adf02');olympe.sc.bh.L='011203300000000adf0f';olympe.sc.mz=class{};olympe.sc.ve=class extends olympe.sc.Runnable{Sa(){return this.ub(olympe.sc.ve.G,olympe.sc.Runnable)}W(){return this.ub(olympe.sc.ve.C,olympe.dm.Property)}};olympe.sc.ve.O=Qc(olympe.dc.ya.C('016c2d996d9ca27fa9d8',olympe.sc.ve));olympe.sc.ve.G=olympe.sc.ve.O.Ga('016c3cb7742ec9309e0b');olympe.sc.ve.C=olympe.sc.ve.O.Ga('016c42d3454636f90533');olympe.sc.ve.prototype.Sa.K=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.sc.ve.prototype.W.K=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.sc.Ao=class extends olympe.dm.Pb{C(){return olympe.sc.Je.sg.Gj}};olympe.sc.Ao.O=olympe.dc.ya.C('017a7a9ff057958e5678',olympe.sc.Ao);olympe.sc.Ip=class extends olympe.dm.Pb{C(){return olympe.sc.Je.sg.dv}};olympe.sc.Ip.O=olympe.dc.ya.C('01644b6d4543b344b857',olympe.sc.Ip);olympe.sc.Jp=class extends olympe.dc.CloudObject{};olympe.sc.Jp.O=olympe.dc.ya.C('0162f672366be5ca7a86',olympe.sc.Jp);olympe.sc.Nq=class extends olympe.sc.ve{};olympe.sc.Nq.O=olympe.dc.ya.C('016d3f37610ae4fc3962',olympe.sc.Nq);olympe.sc.Nh=class extends olympe.dm.BrickMetadata{C(){return olympe.sc.Je.sg.Gj}};olympe.sc.Nh.O=olympe.dc.ya.C('01645fe6873aeea59e64',olympe.sc.Nh);olympe.sc.Nh.C=olympe.sc.Nh.O.Ga('017ed8ac775f48d4d589');olympe.sc.Nh.F=olympe.sc.Nh.O.Ga('017ed8ac775f48d4d590');olympe.sc.Text=class extends olympe.dm.String{};olympe.sc.Text.O=olympe.dc.ya.C('016cfca73e63f9ab5ba4',olympe.sc.Text);olympe.sc.Transaction=class{constructor(a=!0){this.C=(new olympe.dc.Transaction).persist(a);this.F=new Map;this.source=olympe.dc.Ha.ic}static from(a){const b=olympe.sc.Qa.C.TRANSACTION;return a.has(b,!0)?a.get(b,!0):new olympe.sc.Transaction}static process(a,b){return a.has(olympe.sc.Qa.C.TRANSACTION,!0)?Promise.resolve(!1):b.jb().then(()=>!0)}Z(){return this.C.Z()}create(a,b=new Map,c=this.source,d){d=this.C.create(a,d).ii(c);this.F.set(d.T(),olympe.dc.za(a));for(const [e,f]of b)d.setProperty(e,
931
+ f);c===olympe.dc.Ha.Mc&&(b=olympe.dc.Ja(),b=null!==Aj?b.fj(Aj,[olympe.sc.Ma.Le.C,olympe.sc.gd.F.Ec()])[0]||null:null,null!==b?this.Ua(olympe.sc.gd.L,b,d):olympe.ra.Ya('sc').warn('No business container for new instance of',olympe.dc.za(a)));return d.T()}update(a,b,c){this.C.update(a,b,c);return this}Kx(a,b){a=this.C.update(a);for(const [c,d]of b)a.setProperty(c,d);return this}delete(a){this.C.delete(a);return this}Ua(a,b,c){this.C.Ua(a,b,c);return this}cc(a,b,c){this.C.cc(a,b,c);return this}Hm(a,b){this.C.Hm(a,
932
+ b);return this}persist(a=!0){this.C.persist(a);return this}pj(a,b=!0){this.C.pj(a,b);return this}ii(a){this.source=a;return this}model(a){return this.F.get(olympe.dc.za(a))||olympe.dc.Ja().model(a)}en(a){ke(this.C,a.C);return this}Am(a){this.C.Am(a);return this}jb(){return new Promise((a,b)=>{this.C.jb((c,d)=>{c?a():b(d)})})}Km(){return new Promise((a,b)=>{this.C.Km((c,d)=>{c?a():b(d)})})}};olympe.sc.Transaction.prototype.executeAsLarge=olympe.sc.Transaction.prototype.Km;
933
+ olympe.sc.Transaction.prototype.execute=olympe.sc.Transaction.prototype.jb;olympe.sc.Transaction.prototype.afterExecution=olympe.sc.Transaction.prototype.Am;olympe.sc.Transaction.prototype.merge=olympe.sc.Transaction.prototype.en;olympe.sc.Transaction.prototype.model=olympe.sc.Transaction.prototype.model;olympe.sc.Transaction.prototype.setSource=olympe.sc.Transaction.prototype.ii;olympe.sc.Transaction.prototype.persistInstance=olympe.sc.Transaction.prototype.pj;
934
+ olympe.sc.Transaction.prototype.persist=olympe.sc.Transaction.prototype.persist;olympe.sc.Transaction.prototype.deleteAllRelations=olympe.sc.Transaction.prototype.Hm;olympe.sc.Transaction.prototype.deleteRelation=olympe.sc.Transaction.prototype.cc;olympe.sc.Transaction.prototype.createRelation=olympe.sc.Transaction.prototype.Ua;olympe.sc.Transaction.prototype['delete']=olympe.sc.Transaction.prototype.delete;olympe.sc.Transaction.prototype.multiUpdate=olympe.sc.Transaction.prototype.Kx;
935
+ olympe.sc.Transaction.prototype.update=olympe.sc.Transaction.prototype.update;olympe.sc.Transaction.prototype.create=olympe.sc.Transaction.prototype.create;olympe.sc.Transaction.prototype.getId=olympe.sc.Transaction.prototype.Z;olympe.sc.Transaction.process=olympe.sc.Transaction.process;olympe.sc.Transaction.from=olympe.sc.Transaction.from;olympe.sc.Je.BrickMetadata=olympe.dm.BrickMetadata;olympe.sc.Je.we=olympe.dm.we;olympe.ka.node.qa={};const Nj={client:'client',hostname:'host',port:'port',user:'user',password:'password',Na:'database',schema:'schema',ky:'pollingFrequency',Ev:'burstTransactionInterval',Hx:'minConnections',Gx:'maxConnections',Hv:'connectionsTimeout'},Oj=olympe.dc.ha.ia.$l,Pj=olympe.dc.ha.ia.bm,Qj=olympe.dc.ha.ia.QUERY_RESULT,Rj=olympe.dc.ha.ia.am,Sj=olympe.dc.ha.ia.lg,Tj=olympe.dc.ha.ia.Qh,Uj=olympe.dc.ha.ia.vh,Vj=olympe.dc.ha.ia.ti,Wj=olympe.dc.ha.ia.uh,Xj=olympe.dc.ha.ia.dh,Yj=olympe.dc.ha.ia.Bj,Zj=olympe.dc.ha.ia.xu;
936
+ function ak(a,b,c,d,e){const f=new olympe.H.wa.fb.tb(a.tag,b),g=new olympe.sc.X.Zs(a.N,a.zc,a.Sa);g.start(a.tag).catch(h=>a.N.error(`Error occurred while starting the file service of SQLConnector ${e}: ${h}`));f.listen().subscribe(h=>{var k=h.body();a.N.debug(`Serving a new message : ${k.t}`);switch(k.t){case Oj:var l=c.queryBuilder().withSchema(d);k=Ce(k.q);a.W(b,l,k,(t,u)=>{(u?h.xg(Error(u)):h.te({t:Qj,r:t})).then()});break;case Pj:k=Ce(k.q);bk(a,b,()=>c.queryBuilder().withSchema(d),k,h);break;
937
+ case Zj:ck(b,k.i,h.source());h.Ak().then();break;case Xj:k=(new olympe.dc.X.Ii(a.Nb())).C(k.p);dk(a,b,c,d,k,t=>(t?h.xg(Error(t)):h.Ak()).then());break;case Wj:l=k.i;k=(new olympe.dc.X.Ii(a.Nb())).C(k.p);ek(a,b,l,k,c,d);break;case Sj:const n=b.get('_subscription_cache');k=k.s.reduce((t,u)=>{n.has(u)?fk(n.get(u),h.source()):t.push(u);return t},[]);(0<k.length?h.xg(Error(`These subscriptions was not kept alive: ${k}`)):h.Ak()).then();break;case Tj:const p=k.f;a.N.debug(`Uploading a file: ${p}`);k=pj(g,
938
+ (t,u,v)=>{a.N.debug(`Received a file service upload request for file : ${u}`);return p!==u?Promise.reject('The file sent is not the same as the one initially requested'):v instanceof Uint8Array||'string'===typeof v?gk(a,b,c,d,p,v).then(()=>new olympe.net.Sg('',olympe.net.eb.cd.il)):Promise.reject(`Try to upload content for file ${p} but body is not a Uint8Array or a string`)});h.te(k).then();break;case Uj:const q=k.f;a.N.debug(`Serving a file: ${q}`);k=pj(g,(t,u)=>{a.N.debug(`File service received a download request for file : ${u}`);
939
939
  return q!==u?Promise.reject('The file to download is not the same as the one initially requested'):hk(b,c.queryBuilder().withSchema(d),q).then(v=>{a.N.debug('File service download request, content is:',v);return new olympe.net.Sg(v,olympe.net.eb.cd.Gh)})});h.te(k).then();break;case Vj:const r=k.f;a.N.debug(`Deleting a file: ${r}`);k=pj(g,(t,u)=>r!==u?Promise.reject('The file to download is not the same as the one initially requested'):Promise.resolve(new olympe.net.Sg('',olympe.net.eb.cd.Gh)));h.te(k).then();
940
- break;default:h.xg(Error(`Unsupported message type: ${k.t}`)).then()}})}function bk(a,b,c,d,e){const f=d.Z(),g=`sub${f}`;e.hn(g).then(()=>{const h=b.get('_subscription_cache');let k=h.get(f);k||(k=new ik(f,d,c,b.get('_polling_frequency'),a.W.bind(a,b),a.bc.bind(a,g,f),()=>h.delete(f)),h.set(f,k));fk(k,e.source())}).catch(h=>e.xg(Error(h)).then())}
941
- function ck(a,b,c){(a=a.get('_subscription_cache').get(b))&&(a.C.delete(c)||olympe.ra.Ya('Subscription Cache').warn(`Try to unsubscribe to the subscription ${a.id} which is not registered.`))}function dk(a,b,c,d,e,f){b=b.get('_data_model_observer');a=new olympe.ka.node.qa.Ia.Gq(a.N,b);e.Nc(a);jk(a,c,d).then(()=>f(null)).catch(g=>f(g))}
942
- function ek(a,b,c,d,e,f){const g=`_burst.${c}`,h=b.get(g);null===h?(b.set(g,d),setTimeout(()=>{const k=b.get(g);b.remove(g);dk(a,b,e,f,k,l=>{l&&olympe.H.wa.fb.tb.publish(c,{t:Yj,r:l})})},b.get('_burst_interval'))):d.Nc(h)}function gk(a,b,c,d,e,f){const g=olympe.ka.node.qa.Ia.Zc.Lj,h=new olympe.dc.db.uc;h.F(e,(new Map).set(g,f),0);h.Ta(olympe.dc.jc.Tc,e,olympe.dc.za(olympe.dm.File));return new Promise((k,l)=>{dk(a,b,c,d,h,n=>n?l(n):k())})}
943
- function hk(a,b,c){return x(function*(){var d=olympe.ka.node.qa.Ia.Zc.Lj,e=olympe.ka.node.qa.Ia.Zc.Ih;const f=yield kk(a.get('_data_model_observer').C,olympe.dc.za(olympe.dm.File));if((e=(yield b.from(f).select(d).where(e,c))[0])&&e[d])return d=e[d],d.buffer.slice(d.byteOffset,d.byteOffset+d.byteLength);throw Error(`File ${c} not found in the database`);}())}
944
- olympe.ka.node.qa.Fq=class extends olympe.sc.logic.Ud{constructor(a,b,c,d){super(a,b,c);this.zc=d;this.Ua=olympe.U.getParameter(olympe.H.pb.Vl)}update(a,[b]){var c=(k,l)=>{let n,p;return null!=(p=null!=(n=olympe.U.getParameter(`${'dbconnector'}.${b}.${k}`))?n:olympe.U.getParameter(`${'dbconnector'}.${k}`))?p:l};a.set('_burst_interval',olympe.U.getParameter(`${'dbconnector'}.${b}.${Nj.Fv}`)||5E3);a.set('_polling_frequency',c(Nj.ly,6E5));const d=c(Nj.client,'pg'),e=c(Nj.hostname,''),f=c(Nj.Na),g=c(Nj.schema,
945
- b),h=knex({client:d,connection:{host:e,port:c(Nj.port),user:c(Nj.user),password:c(Nj.password),database:f},pool:{min:c(Nj.Ix,0),max:c(Nj.Hx,10)},acquireConnectionTimeout:c(Nj.Iv,6E4)});this.N.info(`SQLConnector ${b} started with host ${e}, database ${f} on schema ${g}`);this.Hc=olympe.ra.Ya('sql');a.Xf(()=>h.destroy().then());c=new olympe.ka.node.qa.Ia.Ns(h,g,this);a.set('_data_model_observer',c);a.set('_subscription_cache',new Map);ak(this,a,h,g,b)}W(a,b,c,d){a=a.get('_data_model_observer');const e=
946
- a.C,f=new olympe.ka.node.qa.Ia.vu(c,e);lk(a).then(()=>mk(f)).then(g=>{if(0===g.length)return[[],g];const h=nk(new olympe.ka.node.qa.Ia.Eq(f,b,g));this.Hc.debug(`Sending a sql query with the following text: ${h.toString()}`);return h.then(k=>[k,g])}).then(([g,h])=>ok(c.Z(),g,h,e)).then(g=>d(g,null)).catch(g=>d({},g))}bc(a,b,c){olympe.H.wa.fb.tb.publish(a,{t:Rj,i:b,r:c}).then().catch(d=>this.N.error('Error occurred while publishing query result update: '+d))}};
947
- olympe.ka.node.qa.Fq.O=olympe.dc.ya.C('017dc8db8074471acb7a',olympe.ka.node.qa.Fq,olympe.sc.P.Ea,olympe.net.P.sm);function fk(a,b){a.C.has(b)?Ga(a.C,b):a.C.add(b)}
948
- class ik{constructor(a,b,c,d,e,f,g){this.id=a;this.query=b;a=new olympe.X.nm(olympe.U.getParameter(olympe.ab.Config.Ll)+6E4);a.F=g;this.C=a;this.start(c,e,f,d)}start(a,b,c,d){let e=null,f=new Set;const g=()=>{0<this.C.values.size&&(b(a(),this.query,(h,k)=>{if(k)olympe.ra.Ya('Subscription Cache').error(`Error occurred while updating subscription cache update: ${k}`);else if(k=olympe.X.ob(JSON.stringify(h)),k!==e){e=k;k=h.k;const l=[];k.forEach((n,p)=>{f.has(n)?f.delete(n):l.push(p)});h.a=l;h.r=Array.from(f);
949
- f=new Set(k);c(h)}}),setTimeout(g,d))};setTimeout(g,d)}};olympe.ka.node.qa.Ia={};olympe.ka.node.qa.Ia.vc={EQUAL:'equal',Jq:'substring',Io:'filter',up:'<=',vp:'<',Vo:'>=',Wo:'>',ag:'and',Hh:'or',Wg:'not',rq:'regex'};olympe.ka.node.qa.Ia.Zc={Ih:'tagOlympe',ck:'tagOlympeOrig',nl:'tagOlympeDest',Lj:'fileContent'};const pk=olympe.ka.node.qa.Ia.Zc.ck,qk=olympe.ka.node.qa.Ia.Zc.nl,rk=olympe.ka.node.qa.Ia.Zc.Ih,sk=olympe.ka.node.qa.Ia.Zc.Lj;function lk(a){return new Promise(b=>{0<a.F?a.R.add(()=>b()):b()})}
950
- function tk(a){uk(a,olympe.dc.za(olympe.dm.File));const b=new Map;a.G.rb(olympe.sc.logic.Ud.C).observe(a.L).subscribe(c=>{Ge(c).forEach(d=>{const e=d.T();vk(a,()=>{var g=wk;const h=[{name:rk,Ze:rk,Mk:!1}];e===olympe.dc.za(olympe.dm.File)&&h.push({name:sk,Ze:sk,Mk:!1});return g(a,e,e,h)},`Create Table for ${e}`);const f=new olympe.D.Zb('Business model context',a.L);b.set(e,f);f.run(()=>xk(a,f,e))});He(c).forEach(d=>{b.get(d).destroy();vk(a,()=>yk(a,d),`Delete Table for ${d}`)})})}
951
- function zk(a){a.F++;1===a.F&&a.N.debug('Data model observer is busy')}function Ak(a){a.F--;if(0===a.F){a.N.debug('Data model observer is free');for(const b of a.R)b();a.R.clear()}}function uk(a,b){if(!a.db.Nk(a.G,olympe.sc.logic.Ud.C,b)){zk(a);const c=new olympe.dc.Transaction;c.Ta(olympe.sc.logic.Ud.C,a.G,b);c.jb((d,e)=>{d||a.N.error(`Error while linking the business model ${b} to the SQLConnector: ${e}`);Ak(a)},!0)}}function Bk(a){return a.client.schema.withSchema(a.schema)}
940
+ break;default:h.xg(Error(`Unsupported message type: ${k.t}`)).then()}})}function bk(a,b,c,d,e){const f=d.Z(),g=`sub${f}`;e.gn(g).then(()=>{const h=b.get('_subscription_cache');let k=h.get(f);k||(k=new ik(f,d,c,b.get('_polling_frequency'),a.W.bind(a,b),a.bc.bind(a,g,f),()=>h.delete(f)),h.set(f,k));fk(k,e.source())}).catch(h=>e.xg(Error(h)).then())}
941
+ function ck(a,b,c){(a=a.get('_subscription_cache').get(b))&&(a.C.delete(c)||olympe.ra.Ya('Subscription Cache').warn(`Try to unsubscribe to the subscription ${a.id} which is not registered.`))}function dk(a,b,c,d,e,f){b=b.get('_data_model_observer');a=new olympe.ka.node.qa.Ia.Fq(a.N,b);e.Nc(a);jk(a,c,d).then(()=>f(null)).catch(g=>f(g))}
942
+ function ek(a,b,c,d,e,f){const g=`_burst.${c}`,h=b.get(g);null===h?(b.set(g,d),setTimeout(()=>{const k=b.get(g);b.remove(g);dk(a,b,e,f,k,l=>{l&&olympe.H.wa.fb.tb.publish(c,{t:Yj,r:l})})},b.get('_burst_interval'))):d.Nc(h)}function gk(a,b,c,d,e,f){const g=olympe.ka.node.qa.Ia.Zc.Kj,h=new olympe.dc.db.uc;h.F(e,(new Map).set(g,f),0);h.Ua(olympe.dc.jc.Tc,e,olympe.dc.za(olympe.dm.File));return new Promise((k,l)=>{dk(a,b,c,d,h,n=>n?l(n):k())})}
943
+ function hk(a,b,c){return x(function*(){var d=olympe.ka.node.qa.Ia.Zc.Kj,e=olympe.ka.node.qa.Ia.Zc.Ih;const f=yield kk(a.get('_data_model_observer').C,olympe.dc.za(olympe.dm.File));if((e=(yield b.from(f).select(d).where(e,c))[0])&&e[d])return d=e[d],d.buffer.slice(d.byteOffset,d.byteOffset+d.byteLength);throw Error(`File ${c} not found in the database`);}())}
944
+ olympe.ka.node.qa.Eq=class extends olympe.sc.logic.Ud{constructor(a,b,c,d){super(a,b,c);this.zc=d;this.Sa=olympe.U.getParameter(olympe.H.pb.Ul)}update(a,[b]){var c=(k,l)=>{let n,p;return null!=(p=null!=(n=olympe.U.getParameter(`${'dbconnector'}.${b}.${k}`))?n:olympe.U.getParameter(`${'dbconnector'}.${k}`))?p:l};a.set('_burst_interval',olympe.U.getParameter(`${'dbconnector'}.${b}.${Nj.Ev}`)||5E3);a.set('_polling_frequency',c(Nj.ky,6E5));const d=c(Nj.client,'pg'),e=c(Nj.hostname,''),f=c(Nj.Na),g=c(Nj.schema,
945
+ b),h=knex({client:d,connection:{host:e,port:c(Nj.port),user:c(Nj.user),password:c(Nj.password),database:f},pool:{min:c(Nj.Hx,0),max:c(Nj.Gx,10)},acquireConnectionTimeout:c(Nj.Hv,6E4)});this.N.info(`SQLConnector ${b} started with host ${e}, database ${f} on schema ${g}`);this.Hc=olympe.ra.Ya('sql');a.Xf(()=>h.destroy().then());c=new olympe.ka.node.qa.Ia.Ms(h,g,this);a.set('_data_model_observer',c);a.set('_subscription_cache',new Map);ak(this,a,h,g,b)}W(a,b,c,d){a=a.get('_data_model_observer');const e=
946
+ a.C,f=new olympe.ka.node.qa.Ia.uu(c,e);lk(a).then(()=>mk(f)).then(g=>{if(0===g.length)return[[],g];const h=nk(new olympe.ka.node.qa.Ia.Dq(f,b,g));this.Hc.debug(`Sending a sql query with the following text: ${h.toString()}`);return h.then(k=>[k,g])}).then(([g,h])=>ok(c.Z(),g,h,e)).then(g=>d(g,null)).catch(g=>d({},g))}bc(a,b,c){olympe.H.wa.fb.tb.publish(a,{t:Rj,i:b,r:c}).then().catch(d=>this.N.error('Error occurred while publishing query result update: '+d))}};
947
+ olympe.ka.node.qa.Eq.O=olympe.dc.ya.C('017dc8db8074471acb7a',olympe.ka.node.qa.Eq,olympe.sc.P.Ea,olympe.net.P.rm);function fk(a,b){a.C.has(b)?Ga(a.C,b):a.C.add(b)}
948
+ class ik{constructor(a,b,c,d,e,f,g){this.id=a;this.query=b;a=new olympe.X.mm(olympe.U.getParameter(olympe.ab.Config.Kl)+6E4);a.F=g;this.C=a;this.start(c,e,f,d)}start(a,b,c,d){let e=null,f=new Set;const g=()=>{0<this.C.values.size&&(b(a(),this.query,(h,k)=>{if(k)olympe.ra.Ya('Subscription Cache').error(`Error occurred while updating subscription cache update: ${k}`);else if(k=olympe.X.ob(JSON.stringify(h)),k!==e){e=k;k=h.k;const l=[];k.forEach((n,p)=>{f.has(n)?f.delete(n):l.push(p)});h.a=l;h.r=Array.from(f);
949
+ f=new Set(k);c(h)}}),setTimeout(g,d))};setTimeout(g,d)}};olympe.ka.node.qa.Ia={};olympe.ka.node.qa.Ia.vc={EQUAL:'equal',Iq:'substring',Ho:'filter',tp:'<=',up:'<',Uo:'>=',Vo:'>',ag:'and',Hh:'or',Wg:'not',qq:'regex'};olympe.ka.node.qa.Ia.Zc={Ih:'tagOlympe',bk:'tagOlympeOrig',ml:'tagOlympeDest',Kj:'fileContent'};const pk=olympe.ka.node.qa.Ia.Zc.bk,qk=olympe.ka.node.qa.Ia.Zc.ml,rk=olympe.ka.node.qa.Ia.Zc.Ih,sk=olympe.ka.node.qa.Ia.Zc.Kj;function lk(a){return new Promise(b=>{0<a.F?a.R.add(()=>b()):b()})}
950
+ function tk(a){uk(a,olympe.dc.za(olympe.dm.File));const b=new Map;a.G.rb(olympe.sc.logic.Ud.C).observe(a.L).subscribe(c=>{Ge(c).forEach(d=>{const e=d.T();vk(a,()=>{var g=wk;const h=[{name:rk,Ze:rk,Lk:!1}];e===olympe.dc.za(olympe.dm.File)&&h.push({name:sk,Ze:sk,Lk:!1});return g(a,e,e,h)},`Create Table for ${e}`);const f=new olympe.D.Zb('Business model context',a.L);b.set(e,f);f.run(()=>xk(a,f,e))});He(c).forEach(d=>{b.get(d).destroy();vk(a,()=>yk(a,d),`Delete Table for ${d}`)})})}
951
+ function zk(a){a.F++;1===a.F&&a.N.debug('Data model observer is busy')}function Ak(a){a.F--;if(0===a.F){a.N.debug('Data model observer is free');for(const b of a.R)b();a.R.clear()}}function uk(a,b){if(!a.db.Mk(a.G,olympe.sc.logic.Ud.C,b)){zk(a);const c=new olympe.dc.Transaction;c.Ua(olympe.sc.logic.Ud.C,a.G,b);c.jb((d,e)=>{d||a.N.error(`Error while linking the business model ${b} to the SQLConnector: ${e}`);Ak(a)},!0)}}function Bk(a){return a.client.schema.withSchema(a.schema)}
952
952
  function vk(a,b,c){if(!a.L.$()&&!a.L.G()){a.N.debug(`Push operation:${c}`);zk(a);var d=a.W,e=()=>{d.shift();Ak(a);if(0<d.length)d[0]()},f=()=>{b().then(()=>{a.N.debug(`Operation ${c} succeed`);e()}).catch(g=>{a.N.error(`Error for operation ${c}: ${g}`);e()})};d.push(f);1===d.length&&f()}}
953
- function wk(a,b,c,d){return x(function*(){if(yield Bk(a).hasTable(b))return a.N.debug(`Table ${c} already exist`),Promise.resolve().then(()=>{var e=a.C;e.C.set(c,b);e.G.set(b,c)});a.N.debug('Create table for : '+c);return Bk(a).createTable(b,e=>{d.forEach(({name:f,Ze:g,ur:h,Zr:k,Mk:l})=>{Ck(a,e,f,g,l,k,h)})}).then(()=>{var e=a.C;e.C.set(c,b);e.G.set(b,c)})}())}
954
- function xk(a,b,c){b.onDestroy(()=>{vk(a,()=>Promise.all(Array.from(a.Oa.get(c)).map(d=>yk(a,d))).then(()=>{a.Oa.delete(c)}),`Destroy relation tables of business model ${c}: relations: ${a.Oa.get(c)}`)});a.jn(c,b);a.Oa.set(c,new Set);olympe.dc.gb.from(c).rb(olympe.dc.CloudObject.G).Bf().rb(olympe.dm.Relation.destinationModelRel).Bf().filter((new olympe.dc.ba.V.Ee(a.G)).rb(olympe.sc.logic.Ud.C.Ec())).observe(b).subscribe(d=>{0<Ge(d).length&&(a.N.debug('Handle new relations : '+Ge(d)),vk(a,()=>Promise.all(Ge(d).map(([e,
955
- f])=>{a.Oa.get(c).add(e.T());a.Oa.get(f.T()).add(e.T());e=e.T();var g=wk;f=f.T();return g(a,e,e,[{name:pk,Ze:pk,Zr:c,ur:rk,Mk:!0},{name:qk,Ze:qk,Zr:f,ur:rk,Mk:!0}])})).then(),`Add relation tables for business model ${c}: ${Ge(d)}`));0<He(d).length&&(a.N.debug('Handle relations to remove : '+He(d)),vk(a,()=>Promise.all(He(d).map(([e,f])=>{a.Oa.get(c).delete(e);a.Oa.get(f).delete(e);return yk(a,e)})).then(),`Delete relation tables for business model ${c}: ${He(d)}`))})}
953
+ function wk(a,b,c,d){return x(function*(){if(yield Bk(a).hasTable(b))return a.N.debug(`Table ${c} already exist`),Promise.resolve().then(()=>{var e=a.C;e.C.set(c,b);e.G.set(b,c)});a.N.debug('Create table for : '+c);return Bk(a).createTable(b,e=>{d.forEach(({name:f,Ze:g,tr:h,Yr:k,Lk:l})=>{Ck(a,e,f,g,l,k,h)})}).then(()=>{var e=a.C;e.C.set(c,b);e.G.set(b,c)})}())}
954
+ function xk(a,b,c){b.onDestroy(()=>{vk(a,()=>Promise.all(Array.from(a.Oa.get(c)).map(d=>yk(a,d))).then(()=>{a.Oa.delete(c)}),`Destroy relation tables of business model ${c}: relations: ${a.Oa.get(c)}`)});a.hn(c,b);a.Oa.set(c,new Set);olympe.dc.gb.from(c).rb(olympe.dc.CloudObject.G).Bf().rb(olympe.dm.Relation.destinationModelRel).Bf().filter((new olympe.dc.ba.V.Ee(a.G)).rb(olympe.sc.logic.Ud.C.Ec())).observe(b).subscribe(d=>{0<Ge(d).length&&(a.N.debug('Handle new relations : '+Ge(d)),vk(a,()=>Promise.all(Ge(d).map(([e,
955
+ f])=>{a.Oa.get(c).add(e.T());a.Oa.get(f.T()).add(e.T());e=e.T();var g=wk;f=f.T();return g(a,e,e,[{name:pk,Ze:pk,Yr:c,tr:rk,Lk:!0},{name:qk,Ze:qk,Yr:f,tr:rk,Lk:!0}])})).then(),`Add relation tables for business model ${c}: ${Ge(d)}`));0<He(d).length&&(a.N.debug('Handle relations to remove : '+He(d)),vk(a,()=>Promise.all(He(d).map(([e,f])=>{a.Oa.get(c).delete(e);a.Oa.get(f).delete(e);return yk(a,e)})).then(),`Delete relation tables for business model ${c}: ${He(d)}`))})}
956
956
  function yk(a,b){return x(function*(){try{var c=yield kk(a.C,b)}catch(d){a.N.warn(`Try to delete a table not registered: ${d}`);return}if(yield Bk(a).hasTable(c)){Bk(a).dropTable(c);c=a.C;const d=c.C.get(b);c.G.delete(d)||c.C.delete(b)}}())}
957
957
  function Dk(a,b,c,d){return x(function*(){const e=yield kk(a.C,b),f=yield Promise.all(c.map(k=>Promise.resolve(k))),g=yield Promise.all(d.map(k=>Promise.resolve(k))),h=yield a.client.queryBuilder().withSchema(a.schema).table(e).columnInfo();return Bk(a).table(e,k=>{const l=new Set(Object.keys(h));f.forEach((n,p)=>{!l.has(n)&&Ck(a,k,n,c[p])});g.forEach(n=>{l.has(n)&&k.dropColumn(n)})})}())}
958
958
  function Ck(a,b,c,d,e=!1,f='',g=''){if(c===rk)b.string(c,21).primary();else if(c===pk||c===qk){if(e)b.string(c).notNullable().references(g).inTable(`${a.schema}.${f}`).onDelete('CASCADE')}else c===sk?b.binary(c):d&&(a=a.db,d=olympe.dc.kd.from(d).rb(olympe.dm.Property.typeRel).Ic(),a.Tf(d,olympe.dm.String)?b.string(c,1E3):a.Tf(d,olympe.dm.Number)?b.double(c):a.Tf(d,olympe.dm.Boolean)?b.boolean(c):a.Tf(d,olympe.dm.DateTime)?b.string(c):a.Tf(d,olympe.dm.Color)&&b.string(c,50))}
959
- olympe.ka.node.qa.Ia.Ns=class{constructor(a,b,c){this.N=olympe.ra.Ya('sql');this.client=a;this.schema=b;this.G=c;this.C=new olympe.ka.node.qa.Ia.dv;this.L=new olympe.D.Zb(`Data Model Observer of ${c.T()}`);this.W=[];this.F=0;this.Oa=new Map;this.R=new Set;this.db=olympe.dc.Ja();tk(this)}jn(a,b){this.N.debug('Observe properties for '+a);olympe.dc.gb.from(a).rb(olympe.dc.CloudObject.propertyRel).observe(b).subscribe(c=>{this.N.debug('New properties for '+a+' '+Ge(c));vk(this,()=>Dk(this,a,Ge(c).map(d=>
960
- d.T()),He(c)),`Update columns of ${a}: added: ${Ge(c)}, removed: ${He(c)}`)})}};const Ek=olympe.ka.node.qa.Ia.vc.EQUAL,Fk=olympe.ka.node.qa.Ia.vc.ag,Gk=olympe.ka.node.qa.Ia.vc.Hh,Hk=olympe.ka.node.qa.Ia.vc.Wg,Ik=olympe.ka.node.qa.Ia.vc.Io,Jk=olympe.ka.node.qa.Ia.vc.Vo,Kk=olympe.ka.node.qa.Ia.vc.Wo,Lk=olympe.ka.node.qa.Ia.vc.up,Mk=olympe.ka.node.qa.Ia.vc.vp,Nk=olympe.ka.node.qa.Ia.vc.rq,Ok=olympe.ka.node.qa.Ia.vc.Jq,Pk=olympe.ka.node.qa.Ia.Zc.Ih;
959
+ olympe.ka.node.qa.Ia.Ms=class{constructor(a,b,c){this.N=olympe.ra.Ya('sql');this.client=a;this.schema=b;this.G=c;this.C=new olympe.ka.node.qa.Ia.bv;this.L=new olympe.D.Zb(`Data Model Observer of ${c.T()}`);this.W=[];this.F=0;this.Oa=new Map;this.R=new Set;this.db=olympe.dc.Ja();tk(this)}hn(a,b){this.N.debug('Observe properties for '+a);olympe.dc.gb.from(a).rb(olympe.dc.CloudObject.propertyRel).observe(b).subscribe(c=>{this.N.debug('New properties for '+a+' '+Ge(c));vk(this,()=>Dk(this,a,Ge(c).map(d=>
960
+ d.T()),He(c)),`Update columns of ${a}: added: ${Ge(c)}, removed: ${He(c)}`)})}};const Ek=olympe.ka.node.qa.Ia.vc.EQUAL,Fk=olympe.ka.node.qa.Ia.vc.ag,Gk=olympe.ka.node.qa.Ia.vc.Hh,Hk=olympe.ka.node.qa.Ia.vc.Wg,Ik=olympe.ka.node.qa.Ia.vc.Ho,Jk=olympe.ka.node.qa.Ia.vc.Uo,Kk=olympe.ka.node.qa.Ia.vc.Vo,Lk=olympe.ka.node.qa.Ia.vc.tp,Mk=olympe.ka.node.qa.Ia.vc.up,Nk=olympe.ka.node.qa.Ia.vc.qq,Ok=olympe.ka.node.qa.Ia.vc.Iq,Pk=olympe.ka.node.qa.Ia.Zc.Ih;
961
961
  function mk(a){return x(function*(){var b=a.query.G;let c=b;var d=[];const e=a.query.C;let f=olympe.dc.Ja().jj(b);!f&&e[0]instanceof olympe.dc.ba.Gb.hf&&(f=e[0].Nd().mb(olympe.dc.CloudObject.instancesRel));if(f){try{var g=yield kk(a.F,b)}catch(l){return[]}f=!0;e.shift()}else{try{var h=yield a.F.Nb(b,'')}catch(l){return[]}c=h;g=yield Promise.resolve([['tagOlympe',b]]);1<g.length?d.push(['',Fk,g.map(([l,n])=>[l,Ek,Qk(n)])]):d.push([g[0][0],Ek,Qk(g[0][1])]);g=yield kk(a.F,h)}h=Rk(a,g);b=Array.from(a.query.F);
962
962
  b=b.includes(0)||b.includes(1)&&f;var k=[];if(b){const l=a.query.Z(),n=Sk(a.F,l,c,Pk);k=olympe.dc.gb.from(c).rb(olympe.dc.CloudObject.propertyRel).Ic().map(q=>q.T());const p=yield Promise.all(k.map(q=>Promise.resolve(q)));k=k.map(q=>Sk(a.F,l,c,q)).map((q,r)=>[q,p[r]]);k.unshift([n,Pk])}a.G.limit=a.query.max;a.G.offset=a.query.offset;a.C.push({Jg:b,recursive:!1,filters:d,hh:'',$h:'',Xh:k,eh:h,name:g});d=0;for(const l of e)d=yield Tk(a,l,d,f);return a.C}())}
963
963
  function Rk(a,b){a.R++;return`alias-${b.charAt(0)}${a.R}`}function Tk(a,b,c,d){let e=c;switch(!0){case b instanceof olympe.dc.ba.Gb.hf:case b instanceof olympe.dc.ba.Gb.jf:e+=1;a=Uk(a,b,e,d);break;case b instanceof olympe.dc.ba.Gb.rc:a=Vk(a,b);break;case b instanceof olympe.dc.ba.Gb.Mh:a=Wk(a,b);break;default:a=Promise.reject(`Query part ${b.toString()} could not be parsed`)}return a.then(()=>e)}
964
- function Uk(a,b,c,d){const e=b.Nd().T(),f=b.Nd().Ra()===olympe.dc.Ca.ORIGIN?olympe.dm.Relation.originModelRel:olympe.dm.Relation.destinationModelRel;let g=b instanceof olympe.dc.ba.Gb.jf;const h=olympe.dm.Relation.F.Ml,k=olympe.dc.kd.from(e).rb(f).Ic();c=d?c+1:c;const l=Array.from(a.query.F).includes(c),[n,p]=['',''];return kk(a.F,k.T()).then(q=>x(function*(){const r=Rk(a,q),t=[];let u=Promise.resolve();h===olympe.dm.Relation.F.Ml&&(u=kk(a.F,e).then(v=>{const w=Rk(a,v),[y,B]=Xk(b.Nd().Ra());a.C.push({Jg:!1,
964
+ function Uk(a,b,c,d){const e=b.Nd().T(),f=b.Nd().Ra()===olympe.dc.Ca.ORIGIN?olympe.dm.Relation.originModelRel:olympe.dm.Relation.destinationModelRel;let g=b instanceof olympe.dc.ba.Gb.jf;const h=olympe.dm.Relation.F.Ll,k=olympe.dc.kd.from(e).rb(f).Ic();c=d?c+1:c;const l=Array.from(a.query.F).includes(c),[n,p]=['',''];return kk(a.F,k.T()).then(q=>x(function*(){const r=Rk(a,q),t=[];let u=Promise.resolve();h===olympe.dm.Relation.F.Ll&&(u=kk(a.F,e).then(v=>{const w=Rk(a,v),[y,B]=Xk(b.Nd().Ra());a.C.push({Jg:!1,
965
965
  eh:w,name:v,Xh:[],hh:y,$h:B,filters:[],recursive:g});g=!1}));return u.then(()=>x(function*(){let v=[];var w=Promise.resolve([]);let y=[];if(l){const B=a.query.Z(),E=Sk(a.F,B,k.T(),Pk);w=olympe.dc.gb.from(k.T()).rb(olympe.dc.CloudObject.propertyRel).Bf().Ic().map(I=>I.T());v=w.map(I=>Sk(a.F,B,k.T(),I));w=Promise.all(w.map(I=>Promise.resolve(I)));y.push([Sk(a.F,B,k.T(),Pk),Pk]);const S=yield w;y=v.map((I,aa)=>[I,S[aa]]);y.unshift([E,Pk])}a.C.push({Jg:l,eh:r,name:q,Xh:y,hh:n,$h:p,filters:t,recursive:g})}()))}()))}
966
- function Vk(a,b){return a.L(b.C).then(c=>{a.C[a.C.length-1].filters.push(c)})}function Wk(a,b){a.G.order=b.order;a.G.aliasSorting=a.C[a.C.length-1].eh;return Promise.resolve(b.cb().T()).then(c=>{a.G.columnSorting=c})}function Xk(a){const b=olympe.ka.node.qa.Ia.Zc.ck,c=olympe.ka.node.qa.Ia.Zc.nl;return a===olympe.dc.Ca.ORIGIN?[c,b]:[b,c]}
967
- olympe.ka.node.qa.Ia.vu=class{constructor(a,b){this.query=a;this.R=0;this.F=b;this.C=[];this.G={}}L(a){switch(!0){case a instanceof olympe.dc.ba.V.Fc:const c=a.C;return Promise.resolve(a.cb()).then(h=>[h,Ek,Qk(c)]);case a instanceof olympe.dc.ba.V.Sc:const d=a.substring;return Promise.resolve(a.cb()).then(h=>[h,Ok,d]);case a instanceof olympe.dc.ba.V.ud:var b=a.C.source;return/^\^?([-_%\u0153\u0152\u00e6\u00c6\u00e5\u00c5\u00f8\u00d8&/\u00df\u00a1\u00bf=\u00e0\u00c0\u00e2\u00c2\u00e4\u00c4\u00e1\u00c1\u00e9\u00c9\u00e8\u00c8\u00ea\u00ca\u00eb\u00cb\u00ec\u00cc\u00ee\u00ce\u00ef\u00cf\u00f2\u00d2\u00f4\u00d4\u00f6\u00d6\u00f9\u00d9\u00fb\u00db\u00fc\u00dc\u00e7\u00c7\u2019\u00f1\u00e3\u00f5\u00c3\u00d5\u00d1]|\w|\s|\d|\\'|\\"|\.\+\?|\.\*|\.\+|\\\/|\\\\|\\\^|\\\$|\\\.|\\\?|\\\*|\\\+|\\\(|\\\)|\\\||\\\[|\\\]|\\\{|\\\})*\$*?$/.test(b)?
966
+ function Vk(a,b){return a.L(b.C).then(c=>{a.C[a.C.length-1].filters.push(c)})}function Wk(a,b){a.G.order=b.order;a.G.aliasSorting=a.C[a.C.length-1].eh;return Promise.resolve(b.cb().T()).then(c=>{a.G.columnSorting=c})}function Xk(a){const b=olympe.ka.node.qa.Ia.Zc.bk,c=olympe.ka.node.qa.Ia.Zc.ml;return a===olympe.dc.Ca.ORIGIN?[c,b]:[b,c]}
967
+ olympe.ka.node.qa.Ia.uu=class{constructor(a,b){this.query=a;this.R=0;this.F=b;this.C=[];this.G={}}L(a){switch(!0){case a instanceof olympe.dc.ba.V.Fc:const c=a.C;return Promise.resolve(a.cb()).then(h=>[h,Ek,Qk(c)]);case a instanceof olympe.dc.ba.V.Sc:const d=a.substring;return Promise.resolve(a.cb()).then(h=>[h,Ok,d]);case a instanceof olympe.dc.ba.V.ud:var b=a.C.source;return/^\^?([-_%\u0153\u0152\u00e6\u00c6\u00e5\u00c5\u00f8\u00d8&/\u00df\u00a1\u00bf=\u00e0\u00c0\u00e2\u00c2\u00e4\u00c4\u00e1\u00c1\u00e9\u00c9\u00e8\u00c8\u00ea\u00ca\u00eb\u00cb\u00ec\u00cc\u00ee\u00ce\u00ef\u00cf\u00f2\u00d2\u00f4\u00d4\u00f6\u00d6\u00f9\u00d9\u00fb\u00db\u00fc\u00dc\u00e7\u00c7\u2019\u00f1\u00e3\u00f5\u00c3\u00d5\u00d1]|\w|\s|\d|\\'|\\"|\.\+\?|\.\*|\.\+|\\\/|\\\\|\\\^|\\\$|\\\.|\\\?|\\\*|\\\+|\\\(|\\\)|\\\||\\\[|\\\]|\\\{|\\\})*\$*?$/.test(b)?
968
968
  Promise.resolve(a.cb()).then(h=>[h,Nk,a.C]):Promise.reject(`Query not supported for regex : ${b}`);case a instanceof olympe.dc.ba.V.jd:return this.L(a.C).then(h=>['',Hk,h]);case a instanceof olympe.dc.ba.V.Ee:const e=a.destination,f=Array.from(a.recursive);if(f.reduce((h,k)=>h||k,!1))return Promise.reject('Recursive relation in RelatedTo predicate is not supported');b=a.ed().map((h,k)=>Promise.resolve(h.T()).then(l=>{const [n,p]=Xk(h.Ra());let q=[];e&&k===a.ed().length-1&&(q=[[p,Ek,Qk(e)]]);return{name:l,
969
969
  recursive:f[k],Xh:[],hh:n,$h:p,filters:q,eh:Rk(this,l),Jg:!1}}),this);let g;g=e?Promise.resolve([['tagOlympe',e]]):Promise.resolve([]);return Promise.all(b).then(h=>{var k=this.C[this.C.length-1];k={name:k.name,recursive:!1,Xh:[[Pk,Pk]],hh:'',$h:'',filters:[],eh:Rk(this,k.name),Jg:!0};h.unshift(k);return g.then(l=>['',Ik,{target:l,Oa:h}])});case a instanceof olympe.dc.ba.V.Ah:return Promise.resolve(a.cb()).then(h=>('number'===typeof a.C?Promise.resolve(a.C):Promise.resolve(a.C.T())).then(k=>{var l=
970
- a.G;return Promise.resolve([h,a.F?l?Mk:Lk:l?Kk:Jk,k])}));case a instanceof olympe.dc.ba.V.Qd:return b=Array.from(a.V).flatMap(this.L.bind(this)),Promise.all(b).then(h=>['',Fk,h]);case a instanceof olympe.dc.ba.V.Zd:return b=Array.from(a.V).flatMap(this.L.bind(this)),Promise.all(b).then(h=>['',Gk,h]);default:return Promise.reject('Failed to parse predicate')}}};function ok(a,b,c,d){const e=[],f=new olympe.dc.transaction.td;let g,h,k,l;const n=null==(g=c[0])?void 0:null==(h=g.filters)?void 0:null==(k=h[0])?void 0:null==(l=k[2])?void 0:l.v;return Yk(c,d).then(p=>{for(const r of b){const [t,u,v]=Zk(a,r,p,d,c,n);for(const [w,y,B]of v)f.Ta(w,y,B);var q=Array.from(t.keys()).map(w=>w).join('.');e.push(q);for(const [w,y]of t.entries())q=u.get(w),d.L.set(w,q),f.F(w,new Map(y),0),f.Ta(olympe.dc.CloudObject.modelRel.T(),w,q,0)}d.F.delete(a);return{k:e,p:ie(f)}})}
971
- function Yk(a,b){const c=[],d=[],e=[],f=[];for(let g=1;g<a.length-1;g+=2)(a[g-1].Jg||1===g)&&a[g+1].Jg&&(d.push(b.Mf(a[g-1].name)),e.push(b.Mf(a[g+1].name)),c.push(Promise.resolve(b.G.get(a[g].name))),f.push(a[g].hh===olympe.ka.node.qa.Ia.Zc.ck?olympe.dc.Ca.DESTINATION:olympe.dc.Ca.ORIGIN));return Promise.all([Promise.all(c),Promise.all(d),Promise.all(e)]).then(([g,h,k])=>g.map((l,n)=>[l,h[n],k[n],f[n]]))}
970
+ a.G;return Promise.resolve([h,a.F?l?Mk:Lk:l?Kk:Jk,k])}));case a instanceof olympe.dc.ba.V.Qd:return b=Array.from(a.V).flatMap(this.L.bind(this)),Promise.all(b).then(h=>['',Fk,h]);case a instanceof olympe.dc.ba.V.Zd:return b=Array.from(a.V).flatMap(this.L.bind(this)),Promise.all(b).then(h=>['',Gk,h]);default:return Promise.reject('Failed to parse predicate')}}};function ok(a,b,c,d){const e=[],f=new olympe.dc.transaction.td;let g,h,k,l;const n=null==(g=c[0])?void 0:null==(h=g.filters)?void 0:null==(k=h[0])?void 0:null==(l=k[2])?void 0:l.v;return Yk(c,d).then(p=>{for(const r of b){const [t,u,v]=Zk(a,r,p,d,c,n);for(const [w,y,B]of v)f.Ua(w,y,B);var q=Array.from(t.keys()).map(w=>w).join('.');e.push(q);for(const [w,y]of t.entries())q=u.get(w),d.L.set(w,q),f.F(w,new Map(y),0),f.Ua(olympe.dc.CloudObject.modelRel.T(),w,q,0)}d.F.delete(a);return{k:e,p:ie(f)}})}
971
+ function Yk(a,b){const c=[],d=[],e=[],f=[];for(let g=1;g<a.length-1;g+=2)(a[g-1].Jg||1===g)&&a[g+1].Jg&&(d.push(b.Mf(a[g-1].name)),e.push(b.Mf(a[g+1].name)),c.push(Promise.resolve(b.G.get(a[g].name))),f.push(a[g].hh===olympe.ka.node.qa.Ia.Zc.bk?olympe.dc.Ca.DESTINATION:olympe.dc.Ca.ORIGIN));return Promise.all([Promise.all(c),Promise.all(d),Promise.all(e)]).then(([g,h,k])=>g.map((l,n)=>[l,h[n],k[n],f[n]]))}
972
972
  function Zk(a,b,c,d,e,f){const g=olympe.ka.node.qa.Ia.Zc.Ih;let h=0;let k='',l='',n=0;const p=new Map,q=new Map,r=[];for(const [u,v]of Object.entries(b)){b=v;var t=u.split(';');if(t[1]===g){h=parseInt(t[0],10);t=$k(d,a,h);if(n<c.length){const w=c[n][3],y=c[n][0];if(k===c[n][1]&&t===c[n][2])r.push(w===olympe.dc.Ca.DESTINATION?[y,l,b]:[y,b,l]),n++;else{let B;!k&&t===(null==(B=e[2])?void 0:B.name)&&f&&(r.push(w===olympe.dc.Ca.DESTINATION?[y,f,b]:[y,b,f]),n++)}}p.set(b,[]);q.set(b,t);d.L.set(b,t);k=t;
973
- l=b}else h===parseInt(t[0],10)&&(t=t[1],p.get(l).push([t,b]))}return[p,q,r]}olympe.ka.node.qa.Ia.PA=class{};function nk(a){const b=a.C,{offset:c,limit:d,MC:e,order:f,HC:g}=a.R.G;-1<d&&b.limit(d);0<c&&b.offset(c);e&&f&&b.orderBy(`${g}.${e}`,f.toLowerCase());for(const [h,{Jg:k,eh:l,name:n,filters:p,recursive:q,Xh:r,hh:t,$h:u}]of a.W.entries())al(a,b,k,l,n,p,q,0===h,t,u,r);return b}
973
+ l=b}else h===parseInt(t[0],10)&&(t=t[1],p.get(l).push([t,b]))}return[p,q,r]}olympe.ka.node.qa.Ia.OA=class{};function nk(a){const b=a.C,{offset:c,limit:d,LC:e,order:f,GC:g}=a.R.G;-1<d&&b.limit(d);0<c&&b.offset(c);e&&f&&b.orderBy(`${g}.${e}`,f.toLowerCase());for(const [h,{Jg:k,eh:l,name:n,filters:p,recursive:q,Xh:r,hh:t,$h:u}]of a.W.entries())al(a,b,k,l,n,p,q,0===h,t,u,r);return b}
974
974
  function al(a,b,c,d,e,f,g,h,k,l,n){if(c){if(!n||1>n.length)throw Error('Trying to return an element without providing mappings in SQLBuilder:BuildNodes');c=n.map(([p,q])=>b.client.raw('??.?? as ??',[d,q,p])).join(',');b.select(b.client.raw(c))}0<f.length&&bl(a,b,d,f,olympe.ka.node.qa.Ia.nd.NONE);h?(b.from(`${e} as ${d}`),a.G=d,a.F=l):(g&&(f=`cte${a.L++}`,cl(a,b,f,d,e)),b.join(`${e} as ${d}`,p=>{var q=a.G,r=a.F;p.on(''===r?`${q}.tagOlympe`:`${q}.${r}`,''===k?`${d}.tagOlympe`:`${d}.${k}`);a.G=d;a.F=
975
975
  l}))}
976
- function bl(a,b,c,d,e){const f=olympe.ka.node.qa.Ia.vc.EQUAL,g=olympe.ka.node.qa.Ia.vc.ag,h=olympe.ka.node.qa.Ia.vc.Hh,k=olympe.ka.node.qa.Ia.vc.Wg,l=olympe.ka.node.qa.Ia.vc.Io,n=olympe.ka.node.qa.Ia.vc.Vo,p=olympe.ka.node.qa.Ia.vc.Wo,q=olympe.ka.node.qa.Ia.vc.up,r=olympe.ka.node.qa.Ia.vc.vp,t=olympe.ka.node.qa.Ia.vc.rq,u=olympe.ka.node.qa.Ia.vc.Jq;if(1<d.length)dl(b,olympe.ka.node.qa.Ia.nd.ag,el(a,d,olympe.ka.node.qa.Ia.nd.ag,c));else{var [v,w,y]=d[0];d=`${c}.${v}`;switch(w){case f:fl(b,e,d,'=',
977
- y.v,!1);break;case u:a=gl('.*',b.client.dialect);fl(b,e,d,'LIKE',`${a}${y}${a}`,!1);break;case l:const B=y.relations,E=`cte${a.L++}`,S=new olympe.ka.node.qa.Ia.Eq(a.R,a.C,B),I=olympe.ka.node.qa.Ia.Zc.Ih;a.C.with(E,aa=>{for(const [tl,{Jg:ul,eh:vl,name:wl,filters:xl,recursive:yl,Xh:zl,hh:Al,$h:Bl}]of B.entries())al(S,aa,ul,vl,wl,xl,yl,0===tl,Al,Bl,zl);return aa});a.C.whereIn(b.client.raw('??.??',[c,I]),function(aa){aa.select(b.client.raw('??.??',[E,I])).from(E)});break;case q:fl(b,e,d,'<=',y,'string'===
976
+ function bl(a,b,c,d,e){const f=olympe.ka.node.qa.Ia.vc.EQUAL,g=olympe.ka.node.qa.Ia.vc.ag,h=olympe.ka.node.qa.Ia.vc.Hh,k=olympe.ka.node.qa.Ia.vc.Wg,l=olympe.ka.node.qa.Ia.vc.Ho,n=olympe.ka.node.qa.Ia.vc.Uo,p=olympe.ka.node.qa.Ia.vc.Vo,q=olympe.ka.node.qa.Ia.vc.tp,r=olympe.ka.node.qa.Ia.vc.up,t=olympe.ka.node.qa.Ia.vc.qq,u=olympe.ka.node.qa.Ia.vc.Iq;if(1<d.length)dl(b,olympe.ka.node.qa.Ia.nd.ag,el(a,d,olympe.ka.node.qa.Ia.nd.ag,c));else{var [v,w,y]=d[0];d=`${c}.${v}`;switch(w){case f:fl(b,e,d,'=',
977
+ y.v,!1);break;case u:a=gl('.*',b.client.dialect);fl(b,e,d,'LIKE',`${a}${y}${a}`,!1);break;case l:const B=y.relations,E=`cte${a.L++}`,S=new olympe.ka.node.qa.Ia.Dq(a.R,a.C,B),I=olympe.ka.node.qa.Ia.Zc.Ih;a.C.with(E,aa=>{for(const [tl,{Jg:ul,eh:vl,name:wl,filters:xl,recursive:yl,Xh:zl,hh:Al,$h:Bl}]of B.entries())al(S,aa,ul,vl,wl,xl,yl,0===tl,Al,Bl,zl);return aa});a.C.whereIn(b.client.raw('??.??',[c,I]),function(aa){aa.select(b.client.raw('??.??',[E,I])).from(E)});break;case q:fl(b,e,d,'<=',y,'string'===
978
978
  typeof y);break;case r:fl(b,e,d,'<',y,'string'===typeof y);break;case n:fl(b,e,d,'>=',y,'string'===typeof y);break;case p:fl(b,e,d,'>',y,'string'===typeof y);break;case g:dl(b,e,el(a,y,olympe.ka.node.qa.Ia.nd.ag,c));break;case h:dl(b,e,el(a,y,olympe.ka.node.qa.Ia.nd.Hh,c));break;case k:dl(b,olympe.ka.node.qa.Ia.nd.Wg,el(a,[y],olympe.ka.node.qa.Ia.nd.Wg,c));break;case t:e=hl(y,b.client.dialect),b.whereRaw('?? LIKE ?',[d,e])}}}
979
- function cl(a,b,c,d,e){var f=['tagOlympe'];const g=il(f,d),h=il(f,c),k=g.map((l,n)=>[l,h[n]]);b.withRecursive(c,g,l=>{l.select(g).from({[d]:e}).uD(n=>n.select(g).from({[d]:e}).join(c,()=>{a.on(Object.fromEntries(k))}))})}function il(a,b){return a.map(c=>`${b}.${c}`)}
979
+ function cl(a,b,c,d,e){var f=['tagOlympe'];const g=il(f,d),h=il(f,c),k=g.map((l,n)=>[l,h[n]]);b.withRecursive(c,g,l=>{l.select(g).from({[d]:e}).tD(n=>n.select(g).from({[d]:e}).join(c,()=>{a.on(Object.fromEntries(k))}))})}function il(a,b){return a.map(c=>`${b}.${c}`)}
980
980
  function dl(a,b,c){switch(b){case olympe.ka.node.qa.Ia.nd.NONE:a.where(c);break;case olympe.ka.node.qa.Ia.nd.ag:a.andWhere(c);break;case olympe.ka.node.qa.Ia.nd.Hh:a.orWhere(c);break;case olympe.ka.node.qa.Ia.nd.Wg:a.whereNot(c);break;default:olympe.ra.Ya('storage').error(`Where operand ${b} not recognized`)}}function el(a,b,c,d){return e=>{for(let f=0;f<b.length;++f)bl(a,e,d,[b[f]],0===f?olympe.ka.node.qa.Ia.nd.NONE:c)}}
981
981
  function fl(a,b,c,d,e,f){e=f?a.client.raw(e):e;switch(b){case olympe.ka.node.qa.Ia.nd.NONE:a.where(c,d,e);break;case olympe.ka.node.qa.Ia.nd.ag:a.andWhere(c,d,e);break;case olympe.ka.node.qa.Ia.nd.Hh:a.orWhere(c,d,e);break;case olympe.ka.node.qa.Ia.nd.Wg:a.whereNot(c,d,e);break;default:olympe.ra.Ya('storage').error(`Where operand ${b} not recognized`)}}function gl(a,b){const c={'.+?':'_','.*':'%','.+':'_%'},d={'.+?':'?','.*':'*','.+':'?*'};return'mssql'===b?d[a]:c[a]}
982
982
  function hl(a,b){let c='',d='',e='';const f=/^([-\u0153\u0152\u00e6\u00c6\u00e5\u00c5\u00f8\u00d8&/\u00df\u00a1\u00bf=\u00e0\u00c0\u00e2\u00c2\u00e4\u00c4\u00e1\u00c1\u00e9\u00c9\u00e8\u00c8\u00ea\u00ca\u00eb\u00cb\u00ec\u00cc\u00ee\u00ce\u00ef\u00cf\u00f2\u00d2\u00f4\u00d4\u00f6\u00d6\u00f9\u00d9\u00fb\u00db\u00fc\u00dc\u00e7\u00c7\u2019\u00f1\u00e3\u00f5\u00c3\u00d5\u00d1]|\w|\s|\d|\\\\)/,g=/^[%_'"]/,h=/^(\\\^|\\\/|\\\$|\\\.|\\\?|\\\*|\\\+|\\\(|\\\)|\\\[|\\\]|\\\{|\\\}])/,k=/^(\.\+\?|\.\*|\.\+)/;
983
983
  a=a.source;a.startsWith('^')?a=a.substring(1,a.length):c='%';for(a.endsWith('$')?a=a.substring(0,a.length-1):e='%';''!==a;){{var l=a;var n=b,p=k,q=h,r=f;const v=g.exec(l);if(v)l=[`\\${v[0]}`,v[0].length];else if(p=p.exec(l))l=[gl(p[0],n),p[0].length];else if(q=q.exec(l))l=q[0],l='mssql'!==n||'['!==l[1]&&']'!==l[1]?[l.substring(1,l.length),l.length]:[l,q[0].length];else if(n=r.exec(l))l=[n[0],n[0].length];else throw Error(`Could find a match for character ${l.charAt(0)}`);}const [t,u]=l;d+=t;a=a.substring(u,
984
- a.length)}return c+d+e}olympe.ka.node.qa.Ia.Eq=class{constructor(a,b,c){this.R=a;this.C=b;this.G=this.F='';this.L=0;this.W=c}};olympe.ka.node.qa.Ia.nd={ag:'&',Hh:'|',Wg:'!',NONE:''};const jl=olympe.ka.node.qa.Ia.Zc.ck,kl=olympe.ka.node.qa.Ia.Zc.nl,ll=olympe.ka.node.qa.Ia.Zc.Ih,ml=olympe.ka.node.qa.Ia.Zc.Lj,nl=olympe.dc.Yb.VERSION,ol=olympe.dc.Yb.Gd;function jk(a,b,c){return x(function*(){yield lk(a.L);return b.transaction(d=>x(function*(){for(const e of a.va)yield e(d.withSchema(c));a.N.debug('Transaction just before commit: ',d.toString());return d}())).finally(()=>{a.va.length=0;a.G.clear();a.N.debug('Transaction completed')})}())}
985
- olympe.ka.node.qa.Ia.Gq=class{constructor(a,b){this.N=a;this.L=b;this.C=b.C;this.G=new Map;this.va=[]}rh(a,b,c=!0){a=c?{[ll]:a}:{};for(const [d,e]of b)b=Qk(e),a[d]=b.v;return a}F(a,b){b.delete(ol);b.delete(nl);this.G.set(a,b||new Map)}qc(a,b){this.va.push(c=>{const d=this;return x(function*(){b.delete(nl);var e=yield d.C.Nb(a,'');e=yield kk(d.C,e);yield c.table(e).where(ll,a).update(d.rh(a,b,!1))}())})}Dc(a){this.va.push(b=>{const c=this;return x(function*(){var d=yield c.C.Nb(a,'');d=yield kk(c.C,
986
- d);var e=olympe.dc.gb.from(d).rb(olympe.dc.CloudObject.G).Ic();for(var f of e.keys())e=yield Promise.resolve(f),yield b.table(e).where(jl,a).del();f=olympe.dc.gb.from(d).rb(olympe.dc.CloudObject.R).Ic();for(const g of f.keys())f=yield Promise.resolve(g),yield b.table(f).where(kl,a).del();yield b.table(d).where(ll,a).del()}())})}Ta(a,b,c){a===olympe.dc.jc.Tc?(uk(this.L,c),this.va.push(d=>{const e=this;return x(function*(){const f=e.G.get(b),g=yield kk(e.C,c);c!==olympe.dc.za(olympe.dm.File)||f.has(ml)?
987
- (e.C.L.set(b,c),yield d.table(g).insert(e.rh(b,f,!0))):yield d.table(g).where(ll,b).update(e.rh(b,f,!1))}())})):this.va.push(d=>x(function*(){const e=yield Promise.resolve(a);yield d.table(e).insert({[jl]:b,[kl]:c})}()))}cc(a,b,c){this.va.push(d=>x(function*(){const e=yield Promise.resolve(a);yield d.table(e).where({[jl]:b,[kl]:c}).del()}()))}};olympe.ka.node.qa.Ia.Gq.ma=[olympe.dc.Writable];function kk(a,b){return(a=a.C.get(b))?Promise.resolve(a):Promise.reject(`No table were found for model ${a}`)}function Sk(a,b,c,d){let e=a.F.get(b);e||(e=new Map,a.F.set(b,e));a=e.get(c);a||(a=e.size+1,e.set(c,a));return`${a};${d}`}function $k(a,b,c){a=a.F.get(b)||new Map;return(a=Array.from(a).find(([,d])=>d===c))&&a[0]||null}
988
- olympe.ka.node.qa.Ia.dv=class{constructor(){this.L=new Map;this.F=new Map;this.C=new Map;this.G=new Map}static T(a,b,c){return c?b[0][1]:''}Mf(a){return Promise.resolve(a)}cb(a){return Promise.resolve(a)}Nb(a){return(a=this.L.get(a))?Promise.resolve(a):Promise.reject('GET MODEL TAG OF INSTANCE NOT IMPLEMENTED')}};function Qk(a){let b=1,c=a;switch(!0){case a instanceof Date:b=2;c=a.toJSON();break;case a instanceof olympe.D.Color:b=3,c=`${a.Qf().valueOf()}.${a.Kf().valueOf()}.${a.Ff().valueOf()}.${a.Ef().valueOf()}`}return{t:b,v:c}}olympe.ka.node.qa.Ia.EC=class{};olympe.ka.node.host={};olympe.ka.node.host.Fd=function(a,b){this.N=b};olympe.ka.node.host.Fd.prototype.constructor=olympe.ka.node.host.Fd;olympe.ka.node.host.Fd.prototype.destroy=function(){};olympe.ka.node.host.Fd.prototype.destroy=olympe.ka.node.host.Fd.prototype.destroy;olympe.ka.node.host.Fd.prototype.Ya=function(){return this.N};olympe.ka.node.host.Fd.ma=[olympe.host.ba.Fd];olympe.ka.node.host.Rp=class{constructor(a){this.N=a}kj(){return!1}Pk(){this.N.error('No history manager implemented in Node')}C(){this.Pk();return Ib()}F(){this.Pk()}};olympe.ka.node.host.Rp.ma=[olympe.host.Ci];olympe.ka.node.host.bd=class{constructor(){this.C={};this.L={}}destroy(){}R(a){clearTimeout(this.C[a]);delete this.C[a]}$(a,b,c){this.C[b]=setTimeout(c,a)}G(a){clearTimeout(this.C[a]);delete this.C[a]}W(a,b,c){this.L[b]=setInterval(c,a)}F(a){clearInterval(this.L[a]);delete this.L[a]}};olympe.host.Qp.register(olympe.host.ba.Pp.dr,olympe.ka.node.host.bd);olympe.ka.node.host.bd.ma=[olympe.host.ba.bd];olympe.ka.node.host.rk=class{constructor(a){this.N=a}};olympe.ka.node.host.rk.ma=[olympe.host.rk];olympe.U.config(function(a){ra(a,olympe.host.P.wl,olympe.ka.node.host.Rp,olympe.host.P.Ea);ra(a,olympe.host.P.Mq,olympe.ka.node.host.rk,olympe.host.P.Ea)},'olympe.native.node.host');olympe.net.pd={};olympe.net.pd.Al=class{constructor(a){this.N=a;this.C=new Map}G(){}F(){}};olympe.net.pd.WebSocket=class{constructor(a,b){this.N=b;this.id=a;this.C=null;this.buffer=[];this.R=this.G=this.L=this.W=null}Z(){return this.id}open(a){const b=`#${this.id}`,c=this.ta(a);c.binaryType='arraybuffer';c.onopen=()=>{this.N.info('Websocket OPENED');this.W?(this.N.debug('Notifying upper layer for WebSocket',b),this.W()):this.N.warn('Nothing to notify for WebSocket',b);this.N.debug(b,`Send all buffered messages (n=${this.buffer.length}).`);this.buffer.forEach(c.send.bind(c));this.buffer.length=
984
+ a.length)}return c+d+e}olympe.ka.node.qa.Ia.Dq=class{constructor(a,b,c){this.R=a;this.C=b;this.G=this.F='';this.L=0;this.W=c}};olympe.ka.node.qa.Ia.nd={ag:'&',Hh:'|',Wg:'!',NONE:''};const jl=olympe.ka.node.qa.Ia.Zc.bk,kl=olympe.ka.node.qa.Ia.Zc.ml,ll=olympe.ka.node.qa.Ia.Zc.Ih,ml=olympe.ka.node.qa.Ia.Zc.Kj,nl=olympe.dc.Yb.VERSION,ol=olympe.dc.Yb.Gd;function jk(a,b,c){return x(function*(){yield lk(a.L);return b.transaction(d=>x(function*(){for(const e of a.va)yield e(d.withSchema(c));a.N.debug('Transaction just before commit: ',d.toString());return d}())).finally(()=>{a.va.length=0;a.G.clear();a.N.debug('Transaction completed')})}())}
985
+ olympe.ka.node.qa.Ia.Fq=class{constructor(a,b){this.N=a;this.L=b;this.C=b.C;this.G=new Map;this.va=[]}rh(a,b,c=!0){a=c?{[ll]:a}:{};for(const [d,e]of b)b=Qk(e),a[d]=b.v;return a}F(a,b){b.delete(ol);b.delete(nl);this.G.set(a,b||new Map)}qc(a,b){this.va.push(c=>{const d=this;return x(function*(){b.delete(nl);var e=yield d.C.Nb(a,'');e=yield kk(d.C,e);yield c.table(e).where(ll,a).update(d.rh(a,b,!1))}())})}Dc(a){this.va.push(b=>{const c=this;return x(function*(){var d=yield c.C.Nb(a,'');d=yield kk(c.C,
986
+ d);var e=olympe.dc.gb.from(d).rb(olympe.dc.CloudObject.G).Ic();for(var f of e.keys())e=yield Promise.resolve(f),yield b.table(e).where(jl,a).del();f=olympe.dc.gb.from(d).rb(olympe.dc.CloudObject.R).Ic();for(const g of f.keys())f=yield Promise.resolve(g),yield b.table(f).where(kl,a).del();yield b.table(d).where(ll,a).del()}())})}Ua(a,b,c){a===olympe.dc.jc.Tc?(uk(this.L,c),this.va.push(d=>{const e=this;return x(function*(){const f=e.G.get(b),g=yield kk(e.C,c);c!==olympe.dc.za(olympe.dm.File)||f.has(ml)?
987
+ (e.C.L.set(b,c),yield d.table(g).insert(e.rh(b,f,!0))):yield d.table(g).where(ll,b).update(e.rh(b,f,!1))}())})):this.va.push(d=>x(function*(){const e=yield Promise.resolve(a);yield d.table(e).insert({[jl]:b,[kl]:c})}()))}cc(a,b,c){this.va.push(d=>x(function*(){const e=yield Promise.resolve(a);yield d.table(e).where({[jl]:b,[kl]:c}).del()}()))}};olympe.ka.node.qa.Ia.Fq.ma=[olympe.dc.Writable];function kk(a,b){return(a=a.C.get(b))?Promise.resolve(a):Promise.reject(`No table were found for model ${a}`)}function Sk(a,b,c,d){let e=a.F.get(b);e||(e=new Map,a.F.set(b,e));a=e.get(c);a||(a=e.size+1,e.set(c,a));return`${a};${d}`}function $k(a,b,c){a=a.F.get(b)||new Map;return(a=Array.from(a).find(([,d])=>d===c))&&a[0]||null}
988
+ olympe.ka.node.qa.Ia.bv=class{constructor(){this.L=new Map;this.F=new Map;this.C=new Map;this.G=new Map}static T(a,b,c){return c?b[0][1]:''}Mf(a){return Promise.resolve(a)}cb(a){return Promise.resolve(a)}Nb(a){return(a=this.L.get(a))?Promise.resolve(a):Promise.reject('GET MODEL TAG OF INSTANCE NOT IMPLEMENTED')}};function Qk(a){let b=1,c=a;switch(!0){case a instanceof Date:b=2;c=a.toJSON();break;case a instanceof olympe.D.Color:b=3,c=`${a.Qf().valueOf()}.${a.Kf().valueOf()}.${a.Ff().valueOf()}.${a.Ef().valueOf()}`}return{t:b,v:c}}olympe.ka.node.qa.Ia.DC=class{};olympe.ka.node.host={};olympe.ka.node.host.Fd=function(a,b){this.N=b};olympe.ka.node.host.Fd.prototype.constructor=olympe.ka.node.host.Fd;olympe.ka.node.host.Fd.prototype.destroy=function(){};olympe.ka.node.host.Fd.prototype.destroy=olympe.ka.node.host.Fd.prototype.destroy;olympe.ka.node.host.Fd.prototype.Ya=function(){return this.N};olympe.ka.node.host.Fd.ma=[olympe.host.ba.Fd];olympe.ka.node.host.Qp=class{constructor(a){this.N=a}kj(){return!1}Ok(){this.N.error('No history manager implemented in Node')}C(){this.Ok();return Ib()}F(){this.Ok()}};olympe.ka.node.host.Qp.ma=[olympe.host.Ci];olympe.ka.node.host.bd=class{constructor(){this.C={};this.L={}}destroy(){}R(a){clearTimeout(this.C[a]);delete this.C[a]}$(a,b,c){this.C[b]=setTimeout(c,a)}G(a){clearTimeout(this.C[a]);delete this.C[a]}W(a,b,c){this.L[b]=setInterval(c,a)}F(a){clearInterval(this.L[a]);delete this.L[a]}};olympe.host.Pp.register(olympe.host.ba.Op.cr,olympe.ka.node.host.bd);olympe.ka.node.host.bd.ma=[olympe.host.ba.bd];olympe.ka.node.host.qk=class{constructor(a){this.N=a}};olympe.ka.node.host.qk.ma=[olympe.host.qk];olympe.U.config(function(a){ra(a,olympe.host.P.vl,olympe.ka.node.host.Qp,olympe.host.P.Ea);ra(a,olympe.host.P.Lq,olympe.ka.node.host.qk,olympe.host.P.Ea)},'olympe.native.node.host');olympe.net.pd={};olympe.net.pd.zl=class{constructor(a){this.N=a;this.C=new Map}G(){}F(){}};olympe.net.pd.WebSocket=class{constructor(a,b){this.N=b;this.id=a;this.C=null;this.buffer=[];this.R=this.G=this.L=this.W=null}Z(){return this.id}open(a){const b=`#${this.id}`,c=this.ta(a);c.binaryType='arraybuffer';c.onopen=()=>{this.N.info('Websocket OPENED');this.W?(this.N.debug('Notifying upper layer for WebSocket',b),this.W()):this.N.warn('Nothing to notify for WebSocket',b);this.N.debug(b,`Send all buffered messages (n=${this.buffer.length}).`);this.buffer.forEach(c.send.bind(c));this.buffer.length=
989
989
  0};c.onmessage=d=>{d='string'===typeof d.data?String(d.data):Ea(d.data);this.N.debug(b,'<',d);this.G&&this.G(d)};c.onclose=()=>{this.N.debug(`WebSocket ${b} CLOSED`);this.L&&this.L()};c.onerror=()=>{this.N.debug(`WebSocket ${b} ERROR`);this.R&&this.R()};this.C=c}send(a){const b=`#${this.id}`;if(null!==this.C){const c=this.C.constructor;switch(this.C.readyState){case c.OPEN:this.N.debug(b,'>',a);this.C.send(a);break;case c.CONNECTING:this.N.debug(b,'- Connecting: BUFFER','>',a);this.buffer.push(a);
990
990
  break;default:return this.N.debug(b,'- Closed','>',a),!1}}else this.N.debug(b,'- Not opened yet: BUFFER','>',a),this.buffer.push(a);return!0}close(){if(null!==this.C){const a=this.C.constructor,b=this.C.readyState;if(b===a.OPEN||b===a.CONNECTING){this.N.debug(`Force closing native websocket ${`#${this.id}`}`);this.C.close(1E3);return}}this.N.debug('Try to force close native websocket, but not open nor connecting')}ja(a){this.W=a||null}da(a){this.G=a||null}F(a){this.R=a||null}$(a){this.L=a||null}ta(){}};
991
- olympe.net.pd.WebSocket.ma=[olympe.net.WebSocket];olympe.ka.node.net={};olympe.ka.node.net.gu=class extends olympe.net.pa{constructor(a,b){super(a,b);this.$=new olympe.ka.node.net.Al(a)}W(){return'NodeJS'}G(a){var b=this.L++;a=a.C();this.N.debug('CREATE Websocket #'+b+' to '+a);b=new olympe.ka.node.net.hu(b,this.N);b.open(a);return b}C(a,b){this.N.debug('SEND HTTP '+a.method+' to '+a.C());const c=this.L++;b=Sb(this,c,b);this.$.G(c,{u:a.C(),s:Ob(a),h:Mb(a),p:a.port,z:Nb(a),q:Rb(a),m:a.method,v:a.ej(),k:a.key,c:a.cert,a:a.ca,j:a.rejectUnauthorized,b:a.body,r:a.F},b)}R(){this.N.warn('DOWNLOAD FILE not available with node native implementation. URL:')}F(){return this.$}};const pl=require('fs'),ql=require('http'),rl=require('https');
992
- olympe.ka.node.net.Al=class extends olympe.net.pd.Al{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,l=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,u=b.u,v=b.r;b={host:p,port:q,path:t?r+'?'+t:r,method:f};g&&(b.headers=g);g=(w,y,B)=>new Promise((E,S)=>{pl.readFile(w,(I,aa)=>{I?S(I):(B[y]=aa,E(B))})});p=w=>{const y=E=>{E.setEncoding(v===olympe.net.eb.ResponseType.sk?'utf-8':'binary');let S='';E.on('data',I=>{S+=I});E.on('end',()=>{if(v!==olympe.net.eb.ResponseType.sk){var I=
993
- (new Uint8Array(Buffer.from(S,'binary'))).buffer;I=v===olympe.net.eb.ResponseType.dl?new Blob([I]):I}else I=S;c(this.F(E.statusCode,E.statusMessage,I,E.headers))})},B=d?new rl.request(w,y):new ql.request(w,y);this.C.set(a,()=>{B.destroy()});B.on('error',E=>{c(this.F(0,'Conection refused','Error connecting to '+u+' with method '+f+', code = '+E.code+', message = '+E.message,''))});!e||'POST'!==f&&'PUT'!==f?B.end():(e instanceof Blob?e.arrayBuffer():Promise.resolve(e)).then(E=>{B.write(E instanceof
994
- ArrayBuffer?Buffer.from(E):E);B.end()})};d&&(h||k||l)?h&&k&&l?(b.rejectUnauthorized=n,g(h,'key',b).then(g.bind(null,k,'cert')).then(g.bind(null,l,'ca')).then(p).catch(w=>{this.N.log('Error loading self signed files:',w)})):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.net.Sg(c,a,b,d)}};olympe.ka.node.net.hu=class extends olympe.net.pd.WebSocket{ta(a){return new (require('ws'))(a)}};olympe.ka.node.net.Config={dC:'native.html.net.useWorkers'};olympe.U.config(function(a){ra(a,olympe.net.P.Aa,olympe.ka.node.net.gu,olympe.net.P.Ea,olympe.host.P.Aa)},'olympe.native.node.net');olympe.ka.node.net.http={};const sl=require('fastify'),Cl=require('fastify-cors'),Dl={Ni:0,km:1,nk:2};
995
- function El(a,b){a.F.route({bodyLimit:1048576*a.da,url:b.path,method:b.methods,handler:(c,d)=>{a.N.debug('< HTTP:',c);var e=c.body,f='';e instanceof Buffer?(f=new Uint8Array(e.length),e.copy(f)):'string'===typeof e&&(f=e);const [g,h]=c.hostname.split(':');e=new olympe.net.Sj(g,parseInt(h,10),c.url,'https'===c.protocol,c.method,f);for(const [k,l]of Object.entries(c.headers))e.headers[k]=l;b.sx(e,new Map(Object.entries(c.params))).then(k=>{const l=k.getData();a.N.debug('> HTTP: reply with body:',l instanceof
996
- ArrayBuffer?'binary':l);d.code(k.Od()).headers(k.ej()).send(l instanceof ArrayBuffer?Buffer.from(l):l)}).catch(k=>{a.N.debug('> HTTP: reply with internal server error:',k);d.code(olympe.net.eb.cd.Bq).header(olympe.net.eb.Headers.Ej,'text/plain').send({error:`Internal server error: ${k}`})})}})}
997
- olympe.ka.node.net.http.xk=class extends olympe.net.xk{constructor(a,b,c,d){super(a);this.da=d;this.F=this.createServer();this.host=b;this.port=c;this.G=new Map;this.R=null;this.C=Dl.Ni;this.Ke=new Set}$(a,b){this.R={origin:'*',methods:a,allowedHeaders:b};return this}L(a,b,c,d){this.G.set(a,{path:b,methods:c,sx:d});switch(this.C){case Dl.Ni:return this.start();case Dl.nk:return this.stop(),this.start();case Dl.km:return(new Promise((e,f)=>{this.Ke.add(g=>g?f(g):e())})).then(()=>{this.stop();return this.start()});
998
- default:return Promise.reject('Webservice in unknown state')}}W(a){this.G.delete(a);this.stop();return 0===this.G.size?Promise.resolve():this.start()}stop(){this.C===Dl.nk&&(this.F.close(),this.C=Dl.Ni,this.F=this.createServer())}start(){return this.C===Dl.Ni?new Promise((a,b)=>{this.F.register(Cl,this.R);for(const c of this.G.values())El(this,c);this.C=Dl.km;this.F.listen(this.port,'0.0.0.0',(c,d)=>{this.C=Dl.nk;this.Ke.forEach(e=>e(c));this.Ke.clear();c?(this.stop(),b(c)):(this.N.debug('Web server listening on '+
999
- d),a())})}):Promise.reject('Try to start a webservice already started')}createServer(){const a=sl({logger:!0});a.addContentTypeParser('*',{parseAs:'buffer'},(b,c,d)=>{d(null,c)});return a}};olympe.U.config(function(a){A(a,olympe.net.P.sm,olympe.ka.node.net.http.xk,olympe.net.P.Ea,new olympe.U.fa(olympe.net.Config.xl),new olympe.U.fa(olympe.net.Config.yl),new olympe.U.fa(olympe.net.Config.ap))},'olympe.native.node.net.http');olympe.ka.node.X={};const Fl=new Map;olympe.ka.node.X.gl=class extends olympe.X.gl{R(a){return(new Uint8Array(Buffer.from(a,'base64'))).buffer}C(a){return Buffer.from(a).toString('base64')}G(a,b){a.arrayBuffer().then(olympe.D.La().F(b))}L(a){var b=()=>Math.random().toString(16).slice(-4);b=`blob://${`${b()}${b()}-${b()}-${b()}-${b()}-${b()}${b()}${b()}`}`;Fl.set(b,a);return b}F(a,b,c){Fl.has(a)?b(Fl.get(a)):c&&c('No object has been found for that url. Maybe the URL has already been revoked')}W(a){Fl.delete(a)}};olympe.U.config(function(a){ra(a,olympe.X.P.th,olympe.ka.node.X.gl)},'olympe.native.node.utils');olympe.ka.node.auth={};olympe.ka.node.auth.Sp=class{redirect(){console.warn('Redirection n/a in Node.JS')}F(){console.warn('Redirection n/a in Node.JS')}C(){console.warn('Redirection n/a in Node.JS');return''}};olympe.ka.node.auth.Sp.ma=[olympe.auth.lk];olympe.U.config(a=>{A(a,olympe.auth.P.hk,olympe.ka.node.auth.Sp)},'olympe.native.node.auth');olympe.ka.node.hc={};olympe.ka.node.hc.Hp=class{constructor(a){this.F={};this.N=a}C(a){void 0===this.F[a]&&(this.F[a]=new olympe.ka.node.hc.Ip(a,this.N));return this.F[a].open()}};olympe.ka.node.hc.Hp.ma=[olympe.hc.Qt];olympe.ka.node.hc.Ip=class{constructor(a,b){this.name=a;this.N=b;this.C=!1;this.db=null}open(){if(this.C)return this;const a=require('lowdb');this.C=!0;const b=require('lowdb/adapters/Memory');this.db=a(new b);return this}close(){}get(a,b){this.C||this.open();b(this.db.get(a).value(),a)}set(a,b,c){this.C||this.open();this.db.set(a,b).write();c&&c(!0)}forEach(a,b){this.C||this.open();const c=this.db.getState();for(const [d,e]of Object.entries(c))a(e,d);b()}remove(a,b){this.C||this.open();this.db.unset(a).write();
1000
- b&&b(!0)}clear(){this.C||this.open();this.db.setState({})}};olympe.ka.node.hc.Ip.ma=[olympe.hc.Rt];olympe.U.config(function(a){A(a,olympe.hc.P.Xj,olympe.ka.node.hc.Hp,olympe.hc.P.Ea)},'olympe.native.node.localstorage');olympe.ka.node.storage={};olympe.ka.node.storage.Storage=class{constructor(a){this.N=a}F(a){a&&a('Not Implemented.')}R(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.')}C(a){a&&a('Not Implemented.')}open(a){a(null)}close(a){a(null)}};olympe.ka.node.storage.Storage.ma=[olympe.hc.Storage];olympe.U.config(function(a){ra(a,olympe.hc.P.Oi,olympe.ka.node.storage.Storage,olympe.host.P.Ea)},'olympe.native.html.storage');olympe.Fg={};olympe.Fg.Config={VERSION:'version.version',qs:'version.branch',cg:'version.commit',Yu:'version.tag',Jo:'version.olympe-framework',rs:'version.build'};olympe.U.config(function(a){D(a,olympe.Fg.Config.VERSION,'');D(a,olympe.Fg.Config.qs,'');D(a,olympe.Fg.Config.cg,'');D(a,olympe.Fg.Config.Yu,'');D(a,olympe.Fg.Config.Jo,'');D(a,olympe.Fg.Config.rs,'')},'olympe.main');const Gl=require('fs');let wa,va;function Hl(a,b){Gl.readFile(a,(c,d)=>{c?b(Object.create(null)):(d=JSON.parse(d),b(d))})}
991
+ olympe.net.pd.WebSocket.ma=[olympe.net.WebSocket];olympe.ka.node.net={};olympe.ka.node.net.fu=class extends olympe.net.pa{constructor(a,b){super(a,b);this.$=new olympe.ka.node.net.zl(a)}W(){return'NodeJS'}G(a){var b=this.L++;a=a.C();this.N.debug('CREATE Websocket #'+b+' to '+a);b=new olympe.ka.node.net.gu(b,this.N);b.open(a);return b}C(a,b){this.N.debug('SEND HTTP '+a.method+' to '+a.C());const c=this.L++;b=Sb(this,c,b);this.$.G(c,{u:a.C(),s:Ob(a),h:Mb(a),p:a.port,z:Nb(a),q:Rb(a),m:a.method,v:a.ej(),k:a.key,c:a.cert,a:a.ca,j:a.rejectUnauthorized,b:a.body,r:a.F},b)}R(){this.N.warn('DOWNLOAD FILE not available with node native implementation. URL:')}F(){return this.$}};const pl=require('fs'),ql=require('http'),rl=require('https');
992
+ olympe.ka.node.net.zl=class extends olympe.net.pd.zl{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,l=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,u=b.u,v=b.r;b={host:p,port:q,path:t?r+'?'+t:r,method:f};g&&(b.headers=g);g=(w,y,B)=>new Promise((E,S)=>{pl.readFile(w,(I,aa)=>{I?S(I):(B[y]=aa,E(B))})});p=w=>{const y=E=>{E.setEncoding(v===olympe.net.eb.ResponseType.rk?'utf-8':'binary');let S='';E.on('data',I=>{S+=I});E.on('end',()=>{if(v!==olympe.net.eb.ResponseType.rk){var I=
993
+ (new Uint8Array(Buffer.from(S,'binary'))).buffer;I=v===olympe.net.eb.ResponseType.cl?new Blob([I]):I}else I=S;c(this.F(E.statusCode,E.statusMessage,I,E.headers))})},B=d?new rl.request(w,y):new ql.request(w,y);this.C.set(a,()=>{B.destroy()});B.on('error',E=>{c(this.F(0,'Conection refused','Error connecting to '+u+' with method '+f+', code = '+E.code+', message = '+E.message,''))});!e||'POST'!==f&&'PUT'!==f?B.end():(e instanceof Blob?e.arrayBuffer():Promise.resolve(e)).then(E=>{B.write(E instanceof
994
+ ArrayBuffer?Buffer.from(E):E);B.end()})};d&&(h||k||l)?h&&k&&l?(b.rejectUnauthorized=n,g(h,'key',b).then(g.bind(null,k,'cert')).then(g.bind(null,l,'ca')).then(p).catch(w=>{this.N.log('Error loading self signed files:',w)})):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.net.Sg(c,a,b,d)}};olympe.ka.node.net.gu=class extends olympe.net.pd.WebSocket{ta(a){return new (require('ws'))(a)}};olympe.ka.node.net.Config={cC:'native.html.net.useWorkers'};olympe.U.config(function(a){ra(a,olympe.net.P.Aa,olympe.ka.node.net.fu,olympe.net.P.Ea,olympe.host.P.Aa)},'olympe.native.node.net');olympe.ka.node.net.http={};const sl=require('fastify'),Cl=require('fastify-cors'),Dl={Ni:0,jm:1,mk:2};
995
+ function El(a,b){a.F.route({bodyLimit:1048576*a.da,url:b.path,method:b.methods,handler:(c,d)=>{a.N.debug('< HTTP:',c);var e=c.body,f='';e instanceof Buffer?(f=new Uint8Array(e.length),e.copy(f)):'string'===typeof e&&(f=e);const [g,h]=c.hostname.split(':');e=new olympe.net.Rj(g,parseInt(h,10),c.url,'https'===c.protocol,c.method,f);for(const [k,l]of Object.entries(c.headers))e.headers[k]=l;b.qx(e,new Map(Object.entries(c.params))).then(k=>{const l=k.getData();a.N.debug('> HTTP: reply with body:',l instanceof
996
+ ArrayBuffer?'binary':l);d.code(k.Od()).headers(k.ej()).send(l instanceof ArrayBuffer?Buffer.from(l):l)}).catch(k=>{a.N.debug('> HTTP: reply with internal server error:',k);d.code(olympe.net.eb.cd.Aq).header(olympe.net.eb.Headers.Dj,'text/plain').send({error:`Internal server error: ${k}`})})}})}
997
+ olympe.ka.node.net.http.wk=class extends olympe.net.wk{constructor(a,b,c,d){super(a);this.da=d;this.F=this.createServer();this.host=b;this.port=c;this.G=new Map;this.R=null;this.C=Dl.Ni;this.Ke=new Set}$(a,b){this.R={origin:'*',methods:a,allowedHeaders:b};return this}L(a,b,c,d){this.G.set(a,{path:b,methods:c,qx:d});switch(this.C){case Dl.Ni:return this.start();case Dl.mk:return this.stop(),this.start();case Dl.jm:return(new Promise((e,f)=>{this.Ke.add(g=>g?f(g):e())})).then(()=>{this.stop();return this.start()});
998
+ default:return Promise.reject('Webservice in unknown state')}}W(a){this.G.delete(a);this.stop();return 0===this.G.size?Promise.resolve():this.start()}stop(){this.C===Dl.mk&&(this.F.close(),this.C=Dl.Ni,this.F=this.createServer())}start(){return this.C===Dl.Ni?new Promise((a,b)=>{this.F.register(Cl,this.R);for(const c of this.G.values())El(this,c);this.C=Dl.jm;this.F.listen(this.port,'0.0.0.0',(c,d)=>{this.C=Dl.mk;this.Ke.forEach(e=>e(c));this.Ke.clear();c?(this.stop(),b(c)):(this.N.debug('Web server listening on '+
999
+ d),a())})}):Promise.reject('Try to start a webservice already started')}createServer(){const a=sl({logger:!0});a.addContentTypeParser('*',{parseAs:'buffer'},(b,c,d)=>{d(null,c)});return a}};olympe.U.config(function(a){A(a,olympe.net.P.rm,olympe.ka.node.net.http.wk,olympe.net.P.Ea,new olympe.U.fa(olympe.net.Config.wl),new olympe.U.fa(olympe.net.Config.xl),new olympe.U.fa(olympe.net.Config.$o))},'olympe.native.node.net.http');olympe.ka.node.X={};const Fl=new Map;olympe.ka.node.X.fl=class extends olympe.X.fl{R(a){return(new Uint8Array(Buffer.from(a,'base64'))).buffer}C(a){return Buffer.from(a).toString('base64')}G(a,b){a.arrayBuffer().then(olympe.D.La().F(b))}L(a){var b=()=>Math.random().toString(16).slice(-4);b=`blob://${`${b()}${b()}-${b()}-${b()}-${b()}-${b()}${b()}${b()}`}`;Fl.set(b,a);return b}F(a,b,c){Fl.has(a)?b(Fl.get(a)):c&&c('No object has been found for that url. Maybe the URL has already been revoked')}W(a){Fl.delete(a)}};olympe.U.config(function(a){ra(a,olympe.X.P.th,olympe.ka.node.X.fl)},'olympe.native.node.utils');olympe.ka.node.auth={};olympe.ka.node.auth.Rp=class{redirect(){console.warn('Redirection n/a in Node.JS')}F(){console.warn('Redirection n/a in Node.JS')}C(){console.warn('Redirection n/a in Node.JS');return''}};olympe.ka.node.auth.Rp.ma=[olympe.auth.kk];olympe.U.config(a=>{A(a,olympe.auth.P.gk,olympe.ka.node.auth.Rp)},'olympe.native.node.auth');olympe.ka.node.hc={};olympe.ka.node.hc.Gp=class{constructor(a){this.F={};this.N=a}C(a){void 0===this.F[a]&&(this.F[a]=new olympe.ka.node.hc.Hp(a,this.N));return this.F[a].open()}};olympe.ka.node.hc.Gp.ma=[olympe.hc.Pt];olympe.ka.node.hc.Hp=class{constructor(a,b){this.name=a;this.N=b;this.C=!1;this.db=null}open(){if(this.C)return this;const a=require('lowdb');this.C=!0;const b=require('lowdb/adapters/Memory');this.db=a(new b);return this}close(){}get(a,b){this.C||this.open();b(this.db.get(a).value(),a)}set(a,b,c){this.C||this.open();this.db.set(a,b).write();c&&c(!0)}forEach(a,b){this.C||this.open();const c=this.db.getState();for(const [d,e]of Object.entries(c))a(e,d);b()}remove(a,b){this.C||this.open();this.db.unset(a).write();
1000
+ b&&b(!0)}clear(){this.C||this.open();this.db.setState({})}};olympe.ka.node.hc.Hp.ma=[olympe.hc.Qt];olympe.U.config(function(a){A(a,olympe.hc.P.Wj,olympe.ka.node.hc.Gp,olympe.hc.P.Ea)},'olympe.native.node.localstorage');olympe.ka.node.storage={};olympe.ka.node.storage.Storage=class{constructor(a){this.N=a}F(a){a&&a('Not Implemented.')}R(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.')}C(a){a&&a('Not Implemented.')}open(a){a(null)}close(a){a(null)}};olympe.ka.node.storage.Storage.ma=[olympe.hc.Storage];olympe.U.config(function(a){ra(a,olympe.hc.P.Oi,olympe.ka.node.storage.Storage,olympe.host.P.Ea)},'olympe.native.html.storage');olympe.Fg={};olympe.Fg.Config={VERSION:'version.version',ps:'version.branch',cg:'version.commit',Xu:'version.tag',Io:'version.olympe-framework',qs:'version.build'};olympe.U.config(function(a){D(a,olympe.Fg.Config.VERSION,'');D(a,olympe.Fg.Config.ps,'');D(a,olympe.Fg.Config.cg,'');D(a,olympe.Fg.Config.Xu,'');D(a,olympe.Fg.Config.Io,'');D(a,olympe.Fg.Config.qs,'')},'olympe.main');const Gl=require('fs');let wa,va;function Hl(a,b){Gl.readFile(a,(c,d)=>{c?b(Object.create(null)):(d=JSON.parse(d),b(d))})}
1001
1001
  function Il(){if(void 0!==wa&&void 0!==va){0===Object.keys(va).length&&console.warn('No configuration found. Check presence of oConfig.json');0===Object.keys(wa).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:f.startsWith('"')&&f.endsWith('"')?f=f.substring(1,f.length-1):d.test(f)?f='true'===
1002
- f.toLowerCase():e.test(f)&&(f=parseFloat(f));a[g[1]]=f}a=new olympe.U.Ds(a);d=a.Ya();d.debug('Registering configurations...');d.C++;for(let f=0,g=ka.length;f<g;f++)b=a,c=ka[f],qa(b.N,'Registering configure callback '+(c.C?'for module '+c.C:'')),b.F.push(c.F);oa(d);d.debug('done registering');a=a.compile();c=a.Ya();c.debug('Running run callbacks of container...');for(let f=0,g=la.length;f<g;f++)c.C++,d=la[f],b=a,e=na(b,d.bj()),b.N.debug('Calling run callback '+(d.C?'for module '+d.C:'')),d.F.apply(null,
1003
- e),oa(c);c.debug('done calling run callbacks. DI process completed!')}}olympe.X.Qm('oConfig.json',Hl,function(a){va=a;Il()});Hl('version.json',function(a){wa=a;Il()});olympe.tc={};olympe.tc.ms=class{run(){}};olympe.tc.pa=class{constructor(a,b){this.C=a;this.N=b;this.F=null;this.G='';this.N.info('HC Manager will execute application registered as:',this.C)}rj(a,b,c=''){b||(b='default');b===this.C?(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.C)}run(){null!==this.F?(this.N.info('Running application:',this.G),
1004
- this.F.run()):this.N.error('No app registered under name: '+this.C)}};olympe.tc.rj=function(a,b,c){const d=a.Ya();c?d.debug('Pre-registering application '+b+' under name '+c+' (use '+olympe.tc.Config.ef+'='+c+' to start it)'):d.debug('Pre-registering application '+b+' as default one');a.Md(olympe.tc.P.Aa).config([b],function(e,f){f.rj(e,c,b)},'olympe.hc.registerApp')};olympe.tc.P={Aa:'hc.Manager',Ea:'hc.Logger'};olympe.tc.Config={ef:'hc.app',ul:'hc.globalToken'};olympe.U.config(function(a){D(a,olympe.tc.Config.ef,'default');D(a,olympe.tc.Config.ul,!1);C(a,olympe.tc.P.Ea,[olympe.ra.P.Aa],b=>b.Oc('hc'));C(a,olympe.auth.P.yj,[new olympe.U.fa(olympe.tc.Config.ef),new olympe.U.fa(olympe.tc.Config.ul)],(b,c)=>new olympe.auth.bl(c?'':b));A(a,olympe.tc.P.Aa,olympe.tc.pa,new olympe.U.fa(olympe.tc.Config.ef),olympe.tc.P.Ea)},'olympe.hc');
1002
+ f.toLowerCase():e.test(f)&&(f=parseFloat(f));a[g[1]]=f}a=new olympe.U.Cs(a);d=a.Ya();d.debug('Registering configurations...');d.C++;for(let f=0,g=ka.length;f<g;f++)b=a,c=ka[f],qa(b.N,'Registering configure callback '+(c.C?'for module '+c.C:'')),b.F.push(c.F);oa(d);d.debug('done registering');a=a.compile();c=a.Ya();c.debug('Running run callbacks of container...');for(let f=0,g=la.length;f<g;f++)c.C++,d=la[f],b=a,e=na(b,d.bj()),b.N.debug('Calling run callback '+(d.C?'for module '+d.C:'')),d.F.apply(null,
1003
+ e),oa(c);c.debug('done calling run callbacks. DI process completed!')}}olympe.X.Pm('oConfig.json',Hl,function(a){va=a;Il()});Hl('version.json',function(a){wa=a;Il()});olympe.tc={};olympe.tc.ls=class{run(){}};olympe.tc.pa=class{constructor(a,b){this.C=a;this.N=b;this.F=null;this.G='';this.N.info('HC Manager will execute application registered as:',this.C)}qj(a,b,c=''){b||(b='default');b===this.C?(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.C)}run(){null!==this.F?(this.N.info('Running application:',this.G),
1004
+ this.F.run()):this.N.error('No app registered under name: '+this.C)}};olympe.tc.qj=function(a,b,c){const d=a.Ya();c?d.debug('Pre-registering application '+b+' under name '+c+' (use '+olympe.tc.Config.ef+'='+c+' to start it)'):d.debug('Pre-registering application '+b+' as default one');a.Md(olympe.tc.P.Aa).config([b],function(e,f){f.qj(e,c,b)},'olympe.hc.registerApp')};olympe.tc.P={Aa:'hc.Manager',Ea:'hc.Logger'};olympe.tc.Config={ef:'hc.app',tl:'hc.globalToken'};olympe.U.config(function(a){D(a,olympe.tc.Config.ef,'default');D(a,olympe.tc.Config.tl,!1);C(a,olympe.tc.P.Ea,[olympe.ra.P.Aa],b=>b.Oc('hc'));C(a,olympe.auth.P.xj,[new olympe.U.fa(olympe.tc.Config.ef),new olympe.U.fa(olympe.tc.Config.tl)],(b,c)=>new olympe.auth.al(c?'':b));A(a,olympe.tc.P.Aa,olympe.tc.pa,new olympe.U.fa(olympe.tc.Config.ef),olympe.tc.P.Ea)},'olympe.hc');
1005
1005
  olympe.U.run([olympe.tc.P.Aa],a=>a.run(),'olympe.hc');olympe.sc.Zf={};function Jl(a){a.N.info('Starting application '+a.C);let b=!1;const c=olympe.dc.Ja();if(0<a.C.length){const d=Ac(c,a.C,a.F.C.C.F((e,f)=>{e?(e=sj(f),e instanceof olympe.sc.Ma.mi?(a.N.debug('application retrieved: running'),b=!0,f=Si(a.F,e),e.run(f),'string'===typeof a.W&&(new olympe.sc.Vd).ja(e.T(),f,a.N)):a.N.error('application retrieved: not an Application with a run() method')):Kl(a)}));olympe.D.La().onDestroy(()=>{Bc(c,a.C,d)});Jb(()=>{b||a.N.warn(`requested application ${a.C} may not be available (it may not exist or the logged user may not have the correct permissions)`)},
1006
1006
  1E4)}}
1007
- function Ll(a,b){if(a.L)a.N.debug('Sending getContext request'),Zf(a.R,d=>{d?a.N.error('failed to synchronise (authenticated) with server: '+d.message):(a.N.debug('synchronisation request successful'),Aj=a.C,b())});else{var c=olympe.dc.Cd.SUBSCRIBE;const d=olympe.dc.Cd.Ji,e=Ui(a.F)?d:c;a.N.debug((Ui(a.F)?'PULLING':'SUBSCRIBING')+' application '+a.C);const f=olympe.D.La();c=new olympe.async.pk(f);c.add((g,h)=>{df(new olympe.dc.kf(a.C,e),olympe.dc.Qb.tf).jb(k=>{var l=olympe.dc.Ha;var n=(n=olympe.dc.kd.from(a.C).rb(olympe.sc.Ma.Le.C).rb(olympe.sc.logic.Ud.G.Ec()).Ic())&&n.T()||
1008
- olympe.dc.Ha.Mc;l.ic=n;k?h(k.message):g()})});c.add(g=>{olympe.D.yc([a.G.Dg()],h=>{(new olympe.dc.Da(h)).Ke(f.F(g))})});c.add((g,h)=>{const k=olympe.sc.gd.C.yp,l=olympe.sc.gd.C.Pl;Bj(a.C,n=>{switch(n){case k:case l:g();break;default:h('Error while loading the business container')}})});ac(c,(g,h)=>{if(h)throw Error(h);b()});c.start()}}function Kl(a){a.N.debug('Stop the application');a.F.C.C.Ka()}
1009
- olympe.sc.Zf.hm=class{constructor(a,b,c,d,e,f,g,h){this.G=a;this.R=b;this.N=c;this.F=d;this.C=e;this.L=f;this.$=null!=g?g:!1;this.W=null!=h?h:null}run(){const a=olympe.auth.pa.C.Mg,b=olympe.auth.pa.C.hg,c=olympe.auth.pa.C.yh,d=olympe.auth.pa.C.ki,e=olympe.auth.pa.C.Th,f=olympe.auth.pa.C.sh;this.N.debug('runtime starting for app #'+this.C);let g=!1;const h=()=>{g||(Jl(this),g=!0)};olympe.D.yc([this.G.getState()],k=>{switch(k){case e:case f:break;case a:case c:this.N.debug('Server session opened, calling once connected callback');
1010
- Ll(this,h);break;case b:this.N.debug('Disconnected, working offline.');this.$&&!g&&Ll(this,h);break;case d:this.N.debug('waiting for authentication');break;default:this.N.debug('No server session available, waiting for connection'),g=!1,Kl(this)}},'Runtime initial auth state listener')}};olympe.sc.Zf.hm.C='app_instance';olympe.sc.Zf.hm.ma=[olympe.tc.ms];olympe.sc.Zf.Aj={tf:'sc.runtime.Main'};
1011
- olympe.U.config(function(a){C(a,olympe.auth.P.yj,[new olympe.U.fa(olympe.tc.Config.ef),new olympe.U.fa(olympe.sc.Config.ef),new olympe.U.fa(olympe.tc.Config.ul)],(b,c,d)=>new olympe.auth.bl(d?'':b+(c?'-'+c:'')));A(a,olympe.sc.Zf.Aj.tf,olympe.sc.Zf.hm,olympe.auth.P.Aa,olympe.dc.query.P.Aa,olympe.sc.P.Ea,olympe.sc.P.gm,new olympe.U.fa(olympe.sc.Config.ef),new olympe.U.fa(olympe.dc.Config.Zg),new olympe.U.fa(olympe.sc.Config.Tp),new olympe.U.fa(olympe.sc.Config.lo));olympe.tc.rj(a,olympe.sc.Zf.Aj.tf,
1012
- 'sc.runtime');olympe.tc.rj(a,olympe.sc.Zf.Aj.tf,'sc.headless');olympe.tc.rj(a,olympe.sc.Zf.Aj.tf)},'olympe.sc.runtime');olympe.public={};function Ml(a,b){const c=new olympe.auth.Request;for(const [d,e]of a)c.set(d,e);return new Promise(d=>{kc(olympe.public.Wa.get(),c,b,()=>{d()})})}
1013
- olympe.public.Wa=class{static gw(a,b){return olympe.auth.Jb.Fe.aj(a,b)}static getState(){return pc(olympe.public.Wa.get())}static qw(){return olympe.D.$a(olympe.public.Wa.get().Dg())}static by(a){const b=new olympe.D.Zb('Observe user tag','function'===typeof a.Ua?a.C.C:a);return new rxjs.Observable(c=>{b.run(()=>olympe.D.yc([olympe.public.Wa.get().Dg()],d=>{c.next(d);olympe.D.La().onDestroy(()=>c.complete())}));return()=>b.destroy()})}static Yc(){return olympe.D.$a(sc(olympe.public.Wa.get()))}static Fw(){return olympe.D.$a(olympe.public.Wa.get().bi())||
1014
- void 0}static fi(){olympe.public.Wa.get().fi()}static mh(a){return new Promise((b,c)=>{olympe.public.Wa.get().mh(a,d=>d?c(d):b())})}static Ex(a,b){return Ml((new Map).set('username',a).set('password',b),'srp')}static Dx(){return Ml(new Map,'saml')}static Fx(a,b){return Ml((new Map).set('username',a).set('nonce',b),'localToken')}static Cx(){return Ml(new Map,'openID')}static dn(){return new Promise(a=>{rc(olympe.public.Wa.get(),()=>{olympe.public.Wa.get().W.delete('logoutCallback');a()},'logoutCallback');
1015
- olympe.public.Wa.get().dn()})}static get(){return olympe.auth.Jc()}};olympe.public.Wa.logout=olympe.public.Wa.dn;olympe.public.Wa.loginOpenID=olympe.public.Wa.Cx;olympe.public.Wa.loginToken=olympe.public.Wa.Fx;olympe.public.Wa.loginSAML=olympe.public.Wa.Dx;olympe.public.Wa.loginSRP=olympe.public.Wa.Ex;olympe.public.Wa.getUserFromToken=olympe.public.Wa.mh;olympe.public.Wa.sendKeepAlive=olympe.public.Wa.fi;olympe.public.Wa.getIDPToken=olympe.public.Wa.Fw;olympe.public.Wa.getToken=olympe.public.Wa.Yc;
1016
- olympe.public.Wa.observeUser=olympe.public.Wa.by;olympe.public.Wa.getCurrentUser=olympe.public.Wa.qw;olympe.public.Wa.getState=olympe.public.Wa.getState;olympe.public.Wa.generateSRPData=olympe.public.Wa.gw;olympe.public.bb=class{static create(a){return new class extends olympe.dc.V.Ng{C(b,c){b=a(olympe.dc.CloudObject.get(c));if('boolean'===typeof b)return b;const d=olympe.D.Qc(olympe.D.sa),e=b.subscribe(f=>d.update(olympe.D.wc(f)));olympe.D.La().R(()=>e.unsubscribe());return d.Ib()}}}};
1017
- olympe.public.Me=class{static create(a){return new class extends olympe.dc.Bb.Ng{L(b,c){return olympe.dc.CloudObject.get(c)}G(b,c){b=a(b,c);if('number'===typeof b)return b;const d=olympe.D.Qc(olympe.D.ga),e=b.subscribe(f=>d.update(olympe.D.Ba(f)));olympe.D.La().R(()=>e.unsubscribe());return d.Ib()}}}};'object'===typeof exports&&(exports={CloudObject:olympe.dc.CloudObject,Relation:olympe.dc.ua.Relation,Direction:olympe.dc.Ca,generateTag:olympe.X.ih,tagToString:olympe.dc.za,register:olympe.dc.register,defineProperty:olympe.dc.defineProperty,defineRelation:olympe.dc.gh,defineInverseRelation:olympe.dc.Pv,BrickContext:olympe.sc.Qa,Brick:olympe.sc.logic.Function,ActionBrick:olympe.sc.logic.Action,GlobalProperties:olympe.sc.Qa.C,registerBrick:olympe.sc.logic.ya.C,FunctionBrick:olympe.sc.logic.Function,
1007
+ function Ll(a,b){if(a.L)a.N.debug('Sending getContext request'),Zf(a.R,d=>{d?a.N.error('failed to synchronise (authenticated) with server: '+d.message):(a.N.debug('synchronisation request successful'),Aj=a.C,b())});else{var c=olympe.dc.Cd.SUBSCRIBE;const d=olympe.dc.Cd.Ji,e=Ui(a.F)?d:c;a.N.debug((Ui(a.F)?'PULLING':'SUBSCRIBING')+' application '+a.C);const f=olympe.D.La();c=new olympe.async.nk(f);c.add((g,h)=>{df(new olympe.dc.kf(a.C,e),olympe.dc.Qb.tf).jb(k=>{var l=olympe.dc.Ha;var n=(n=olympe.dc.kd.from(a.C).rb(olympe.sc.Ma.Le.C).rb(olympe.sc.logic.Ud.G.Ec()).Ic())&&n.T()||
1008
+ olympe.dc.Ha.Mc;l.ic=n;k?h(k.message):g()})});c.add(g=>{olympe.D.yc([a.G.Dg()],h=>{(new olympe.dc.Da(h)).Ke(f.F(g))})});c.add((g,h)=>{const k=olympe.sc.gd.C.xp,l=olympe.sc.gd.C.Ol;Bj(a.C,n=>{switch(n){case k:case l:g();break;default:h('Error while loading the business container')}})});ac(c,(g,h)=>{if(h)throw Error(h);b()});c.start()}}function Kl(a){a.N.debug('Stop the application');a.F.C.C.Ka()}
1009
+ olympe.sc.Zf.gm=class{constructor(a,b,c,d,e,f,g,h){this.G=a;this.R=b;this.N=c;this.F=d;this.C=e;this.L=f;this.$=null!=g?g:!1;this.W=null!=h?h:null}run(){const a=olympe.auth.pa.C.Mg,b=olympe.auth.pa.C.hg,c=olympe.auth.pa.C.yh,d=olympe.auth.pa.C.ki,e=olympe.auth.pa.C.Th,f=olympe.auth.pa.C.sh;this.N.debug('runtime starting for app #'+this.C);let g=!1;const h=()=>{g||(Jl(this),g=!0)};olympe.D.yc([this.G.getState()],k=>{switch(k){case e:case f:break;case a:case c:this.N.debug('Server session opened, calling once connected callback');
1010
+ Ll(this,h);break;case b:this.N.debug('Disconnected, working offline.');this.$&&!g&&Ll(this,h);break;case d:this.N.debug('waiting for authentication');break;default:this.N.debug('No server session available, waiting for connection'),g=!1,Kl(this)}},'Runtime initial auth state listener')}};olympe.sc.Zf.gm.C='app_instance';olympe.sc.Zf.gm.ma=[olympe.tc.ls];olympe.sc.Zf.zj={tf:'sc.runtime.Main'};
1011
+ olympe.U.config(function(a){C(a,olympe.auth.P.xj,[new olympe.U.fa(olympe.tc.Config.ef),new olympe.U.fa(olympe.sc.Config.ef),new olympe.U.fa(olympe.tc.Config.tl)],(b,c,d)=>new olympe.auth.al(d?'':b+(c?'-'+c:'')));A(a,olympe.sc.Zf.zj.tf,olympe.sc.Zf.gm,olympe.auth.P.Aa,olympe.dc.query.P.Aa,olympe.sc.P.Ea,olympe.sc.P.fm,new olympe.U.fa(olympe.sc.Config.ef),new olympe.U.fa(olympe.dc.Config.Zg),new olympe.U.fa(olympe.sc.Config.Sp),new olympe.U.fa(olympe.sc.Config.ko));olympe.tc.qj(a,olympe.sc.Zf.zj.tf,
1012
+ 'sc.runtime');olympe.tc.qj(a,olympe.sc.Zf.zj.tf,'sc.headless');olympe.tc.qj(a,olympe.sc.Zf.zj.tf)},'olympe.sc.runtime');olympe.public={};function Ml(a,b){const c=new olympe.auth.Request;for(const [d,e]of a)c.set(d,e);return new Promise(d=>{kc(olympe.public.Wa.get(),c,b,()=>{d()})})}
1013
+ olympe.public.Wa=class{static fw(a,b){return olympe.auth.Jb.Fe.aj(a,b)}static getState(){return pc(olympe.public.Wa.get())}static pw(){return olympe.D.$a(olympe.public.Wa.get().Dg())}static ay(a){const b=new olympe.D.Zb('Observe user tag','function'===typeof a.Sa?a.C.C:a);return new rxjs.Observable(c=>{b.run(()=>olympe.D.yc([olympe.public.Wa.get().Dg()],d=>{c.next(d);olympe.D.La().onDestroy(()=>c.complete())}));return()=>b.destroy()})}static Yc(){return olympe.D.$a(sc(olympe.public.Wa.get()))}static Ew(){return olympe.D.$a(olympe.public.Wa.get().bi())||
1014
+ void 0}static fi(){olympe.public.Wa.get().fi()}static mh(a){return new Promise((b,c)=>{olympe.public.Wa.get().mh(a,d=>d?c(d):b())})}static Dx(a,b){return Ml((new Map).set('username',a).set('password',b),'srp')}static Cx(){return Ml(new Map,'saml')}static Ex(a,b){return Ml((new Map).set('username',a).set('nonce',b),'localToken')}static Bx(){return Ml(new Map,'openID')}static cn(){return new Promise(a=>{rc(olympe.public.Wa.get(),()=>{olympe.public.Wa.get().W.delete('logoutCallback');a()},'logoutCallback');
1015
+ olympe.public.Wa.get().cn()})}static get(){return olympe.auth.Jc()}};olympe.public.Wa.logout=olympe.public.Wa.cn;olympe.public.Wa.loginOpenID=olympe.public.Wa.Bx;olympe.public.Wa.loginToken=olympe.public.Wa.Ex;olympe.public.Wa.loginSAML=olympe.public.Wa.Cx;olympe.public.Wa.loginSRP=olympe.public.Wa.Dx;olympe.public.Wa.getUserFromToken=olympe.public.Wa.mh;olympe.public.Wa.sendKeepAlive=olympe.public.Wa.fi;olympe.public.Wa.getIDPToken=olympe.public.Wa.Ew;olympe.public.Wa.getToken=olympe.public.Wa.Yc;
1016
+ olympe.public.Wa.observeUser=olympe.public.Wa.ay;olympe.public.Wa.getCurrentUser=olympe.public.Wa.pw;olympe.public.Wa.getState=olympe.public.Wa.getState;olympe.public.Wa.generateSRPData=olympe.public.Wa.fw;olympe.public.bb=class{static create(a){return new class extends olympe.dc.V.Ng{C(b,c){b=a(olympe.dc.CloudObject.get(c));if('boolean'===typeof b)return b;const d=olympe.D.Qc(olympe.D.sa),e=b.subscribe(f=>d.update(olympe.D.wc(f)));olympe.D.La().R(()=>e.unsubscribe());return d.Ib()}}}};
1017
+ olympe.public.Me=class{static create(a){return new class extends olympe.dc.Bb.Ng{L(b,c){return olympe.dc.CloudObject.get(c)}G(b,c){b=a(b,c);if('number'===typeof b)return b;const d=olympe.D.Qc(olympe.D.ga),e=b.subscribe(f=>d.update(olympe.D.Ba(f)));olympe.D.La().R(()=>e.unsubscribe());return d.Ib()}}}};'object'===typeof exports&&(exports={CloudObject:olympe.dc.CloudObject,Relation:olympe.dc.ua.Relation,Direction:olympe.dc.Ca,generateTag:olympe.X.ih,tagToString:olympe.dc.za,register:olympe.dc.register,defineProperty:olympe.dc.defineProperty,defineRelation:olympe.dc.gh,defineInverseRelation:olympe.dc.Ov,BrickContext:olympe.sc.Qa,Brick:olympe.sc.logic.Function,ActionBrick:olympe.sc.logic.Action,GlobalProperties:olympe.sc.Qa.C,registerBrick:olympe.sc.logic.ya.C,FunctionBrick:olympe.sc.logic.Function,
1018
1018
  Context:olympe.sc.Qa,Entry:olympe.dc.ua.Entry,PropertyModel:olympe.dm.Property,RelationModel:olympe.dm.Relation,StringModel:olympe.dm.String,NumberModel:olympe.dm.Number,BooleanModel:olympe.dm.Boolean,DatetimeModel:olympe.dm.DateTime,ColorModel:olympe.dm.Color,File:olympe.dm.File,User:olympe.dm.User,Enum:olympe.dm.ig,EnumValue:olympe.dm.Enum,Workflow:olympe.sc.workflow.Workflow,WorkflowState:olympe.sc.workflow.Qe,WorkflowTransition:olympe.sc.workflow.Transition,WorkflowObjectState:olympe.sc.workflow.ObjectState,
1019
- Transaction:olympe.sc.Transaction,BurstTransaction:olympe.dc.oi,QueryResult:olympe.dc.Xa,Query:olympe.dc.gb,QuerySingle:olympe.dc.kd,Predicate:olympe.dc.ba.bb,RelatedTo:olympe.dc.ba.V.Ee,Order:olympe.dc.ba.ek,Config:class{static getParameter(a){return olympe.U.getParameter(a)}},Color:olympe.D.Color,ErrorFlow:olympe.sc.logic.Error,ServiceRequest:olympe.H.wa.fb.ha,Service:olympe.H.wa.fb.tb,Auth:olympe.public.Wa,AuthState:{INIT:olympe.auth.pa.C.INIT,DISCONNECTED:olympe.auth.pa.C.hg,GUEST:olympe.auth.pa.C.yh,
1019
+ Transaction:olympe.sc.Transaction,BurstTransaction:olympe.dc.oi,QueryResult:olympe.dc.Xa,Query:olympe.dc.gb,QuerySingle:olympe.dc.kd,Predicate:olympe.dc.ba.bb,RelatedTo:olympe.dc.ba.V.Ee,Order:olympe.dc.ba.dk,Config:class{static getParameter(a){return olympe.U.getParameter(a)}},Color:olympe.D.Color,ErrorFlow:olympe.sc.logic.Error,ServiceRequest:olympe.H.wa.fb.ha,Service:olympe.H.wa.fb.tb,Auth:olympe.public.Wa,AuthState:{INIT:olympe.auth.pa.C.INIT,DISCONNECTED:olympe.auth.pa.C.hg,GUEST:olympe.auth.pa.C.yh,
1020
1020
  AUTHENTICATING:olympe.auth.pa.C.ki,ERROR:olympe.auth.pa.C.ac,AUTHENTICATED:olympe.auth.pa.C.Mg},Sync:olympe.dc.CloudObject,BusinessObject:olympe.dc.CloudObject,StringPrimitive:olympe.dm.String,NumberPrimitive:olympe.dm.Number,BooleanPrimitive:olympe.dm.Boolean,DatetimePrimitive:olympe.dm.DateTime,ColorPrimitive:olympe.dm.Color,PropertyPrimitive:olympe.dm.Property,RelationPrimitive:olympe.dm.Relation,DBView:class extends olympe.dc.hb{static get(){return olympe.dc.Ja()}},ListDef:olympe.dc.Da,instanceToTag:olympe.dc.za,
1021
1021
  registerSync:olympe.dc.ya.C,getUniqueTag:olympe.X.ih,onDestroy:a=>olympe.D.La().onDestroy(a),offDestroy:a=>olympe.D.La().Xe(a),FollowRules:olympe.dc.Qb,transformers:{Related:olympe.dc.Y.Sb,RecursiveRelated:olympe.dc.Y.Bc,Distinct:olympe.dc.Y.xe,Filter:olympe.dc.Y.rc,Limit:olympe.dc.Y.Xd,Sort:olympe.dc.Y.Hd,Union:olympe.dc.Y.wf},ListDefPredicate:olympe.public.bb,predicates:{And:olympe.dc.V.Qd,Or:olympe.dc.V.Zd,Not:olympe.dc.V.jd,Equals:olympe.dc.V.Fc,Contains:olympe.dc.V.Sc,Greater:olympe.dc.V.ze,
1022
1022
  Smaller:olympe.dc.V.Ge,HasRelated:olympe.dc.V.lf,InstanceOf:olympe.dc.V.mf,Regex:olympe.dc.V.ud},Comparator:olympe.public.Me,comparators:{Number:olympe.dc.Bb.Number,String:olympe.dc.Bb.String,DateTime:olympe.dc.Bb.DateTime},valuedefs:{BooleanProperty:olympe.dc.oa.ue,StringProperty:olympe.dc.oa.pe,NumberProperty:olympe.dc.oa.le,DateTimeProperty:olympe.dc.oa.je,Constant:olympe.dc.oa.Bd,Tag:olympe.dc.oa.uf}});