@genesislcap/design-system-configurator 14.307.0 → 14.307.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (21) hide show
  1. package/dist/{282.282.9b02a72ef92de6aec0e4.js → 282.282.7a8df98ce148dfe6ecef.js} +1 -1
  2. package/dist/{347.347.84cc0bc9bc293b292985.js → 347.347.01a1b5f8156e9be583c5.js} +1 -1
  3. package/dist/{445.445.6484c9e7c4a4196d9cb7.js → 445.445.02a8ee1bd81ded374fda.js} +4 -3
  4. package/dist/445.fab068cc85b71309f300284dbcdf1335.js.map +1 -0
  5. package/dist/{453.453.743942e2e7186b3863e9.js → 453.453.003d32714a2db6ed6a18.js} +4 -4
  6. package/dist/{548.548.b18391a6ae831285691b.js → 548.548.0b9e74f28410fa024132.js} +2 -2
  7. package/dist/{548.359daaa1466f083a64ece6a044366799.js.map → 548.dc728d3d25f6e99d556fd82ce7e8a2b9.js.map} +1 -1
  8. package/dist/{600.600.925481d58940cdcc0981.js → 600.600.28265f1e8ab8ca5dc717.js} +2 -2
  9. package/dist/{637.637.6aeedc44e0006c8e0b3c.js → 637.637.c44afba7b6673b086ca6.js} +155 -155
  10. package/dist/637.abfbf50c75e05e33e21bf27148022f9d.js.map +1 -0
  11. package/dist/{653.653.8fb0f1447632d7a79b0a.js → 653.653.e110f640434dad0a045b.js} +1 -1
  12. package/dist/{665.665.74e38fa993e0e2de1d6b.js → 665.665.d55c683492bf182e623d.js} +1 -1
  13. package/dist/{designSystemConfigurator.5bed628423eed3907e9c6c743c807120.js.map → designSystemConfigurator.79f8fd5b616d0338514240c8e0b40ce0.js.map} +1 -1
  14. package/dist/index.html +1 -1
  15. package/dist/{main.b953f8f1b2ba26afe22d66c23ef5df99.js.map → main.0491ade27d28b44e8e244af9ab88665d.js.map} +1 -1
  16. package/dist/main.70d19b00a017c2de7151.js +2 -0
  17. package/dist/remoteEntry.js +2 -2
  18. package/package.json +13 -13
  19. package/dist/445.17ba2e4456a0a3ca26429dc0698faf69.js.map +0 -1
  20. package/dist/637.08a9c5006ebf0fa21a62d3739f3b4152.js.map +0 -1
  21. package/dist/main.ea5aa80f5e647a71051f.js +0 -2
@@ -1,2 +1,2 @@
1
- "use strict";(self.webpackChunk_genesislcap_design_system_configurator=self.webpackChunk_genesislcap_design_system_configurator||[]).push([[282,823,204,61],{21530:(e,t,n)=>{n.d(t,{O:()=>o});var r=n(28745);const o=(e,t)=>{var n;let o=document.getElementById(t);if(o)return void r.v.debug(`\n An element with the id of '${t}' already exists and likely has the css rules applied.\n `);const i=null!==(n=document.head)&&void 0!==n?n:document.getElementsByTagName("head")[0];o=document.createElement("style"),o.id=t,i.appendChild(o);if((e.match(/}/g)||[]).length>1)return o.textContent=e,()=>{o&&i.removeChild(o)};{const t=o.sheet.insertRule(e);return()=>{o&&(o.sheet.deleteRule(t),i.removeChild(o))}}}},28745:(e,t,n)=>{n.d(t,{v:()=>o});var r=n(22661);const o=(0,r.createLogger)("foundation-utils")},55823:(e,t,n)=>{n.d(t,{AQ:()=>d,C6:()=>o,Cg:()=>c,Cl:()=>i,GG:()=>w,Ju:()=>s,N3:()=>h,Qj:()=>u,Tt:()=>a,YH:()=>f,fX:()=>p,gn:()=>v,sH:()=>l,xN:()=>b,zs:()=>y});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function c(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function u(e,t){return function(n,r){t(n,r,e)}}function l(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function c(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}u((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=c(0),a.throw=c(1),a.return=c(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(u){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}}Object.create;function s(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function p(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function h(e){return this instanceof h?(this.v=e,this):new h(e)}function d(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",(function(e){return function(t){return Promise.resolve(t).then(e,l)}})),r[Symbol.asyncIterator]=function(){return this},r;function a(e,t){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||c(e,t)}))},t&&(r[e]=t(r[e])))}function c(e,t){try{(n=o[e](t)).value instanceof h?Promise.resolve(n.value.v).then(u,l):f(i[0][2],n)}catch(e){f(i[0][3],e)}var n}function u(e){c("next",e)}function l(e){c("throw",e)}function f(e,t){e(t),i.shift(),i.length&&c(i[0][0],i[0][1])}}function b(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=s(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}Object.create;function v(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function w(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n}"function"==typeof SuppressedError&&SuppressedError}}]);
1
+ "use strict";(self.webpackChunk_genesislcap_design_system_configurator=self.webpackChunk_genesislcap_design_system_configurator||[]).push([[282,823,204,61],{21530:(e,t,n)=>{n.d(t,{O:()=>o});var r=n(28745);const o=(e,t)=>{var n;let o=document.getElementById(t);if(o)return void r.v.debug(`\n An element with the id of '${t}' already exists and likely has the css rules applied.\n `);const i=null!==(n=document.head)&&void 0!==n?n:document.getElementsByTagName("head")[0];o=document.createElement("style"),o.id=t,i.appendChild(o);if((e.match(/}/g)||[]).length>1)return o.textContent=e,()=>{o&&i.removeChild(o)};{const t=o.sheet.insertRule(e);return()=>{o&&(o.sheet.deleteRule(t),i.removeChild(o))}}}},28745:(e,t,n)=>{n.d(t,{v:()=>o});var r=n(30568);const o=(0,r.createLogger)("foundation-utils")},55823:(e,t,n)=>{n.d(t,{AQ:()=>d,C6:()=>o,Cg:()=>c,Cl:()=>i,GG:()=>w,Ju:()=>s,N3:()=>h,Qj:()=>u,Tt:()=>a,YH:()=>f,fX:()=>p,gn:()=>v,sH:()=>l,xN:()=>b,zs:()=>y});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function c(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function u(e,t){return function(n,r){t(n,r,e)}}function l(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function c(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}u((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=c(0),a.throw=c(1),a.return=c(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(u){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}}Object.create;function s(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function p(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function h(e){return this instanceof h?(this.v=e,this):new h(e)}function d(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",(function(e){return function(t){return Promise.resolve(t).then(e,l)}})),r[Symbol.asyncIterator]=function(){return this},r;function a(e,t){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||c(e,t)}))},t&&(r[e]=t(r[e])))}function c(e,t){try{(n=o[e](t)).value instanceof h?Promise.resolve(n.value.v).then(u,l):f(i[0][2],n)}catch(e){f(i[0][3],e)}var n}function u(e){c("next",e)}function l(e){c("throw",e)}function f(e,t){e(t),i.shift(),i.length&&c(i[0][0],i[0][1])}}function b(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=s(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}Object.create;function v(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function w(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n}"function"==typeof SuppressedError&&SuppressedError}}]);
2
2
  //# sourceMappingURL=282.c5ceab81851695026ba9a45ae887cea5.js.map
@@ -1,2 +1,2 @@
1
- "use strict";(self.webpackChunk_genesislcap_design_system_configurator=self.webpackChunk_genesislcap_design_system_configurator||[]).push([[347],{79780:(e,t,s)=>{s.d(t,{Es:()=>n});var i=s(84674);class r extends BroadcastChannel{constructor(){super(...arguments),this.postMessage=(...e)=>{const[t,s]=e;super.postMessage({type:t,detail:s})},this.isMessageType=(e,t)=>{var s;return(null===(s=t.data)||void 0===s?void 0:s.type)===e}}}const n=e=>{class t extends r{constructor(){super(e)}}return i.DI.createInterface((e=>e.transient(t)))}},40113:(e,t,s)=>{s.d(t,{N:()=>L});var i=s(55823),r=s(92277),n=s(33681),o=s(84674),a=s(97156),c=s(26347),d=s(21281),h=s(10447),l=s(56653),u=s(98316),E=s(17465);const g=o.DI.createInterface();function S(){return(null===navigator||void 0===navigator?void 0:navigator.credentials)?"PasswordCredential"in window||(E.v.warn("PasswordCredential not available in this browser."),!1):(E.v.warn("CredentialsContainer not available in this browser."),!1)}const v=":";function R(e="",t=v,s){return e.split(t,s).map((e=>e.trim())).filter((e=>""!==e))}function m(e,t=v){const s="string"==typeof e&&e.trim();return!!s&&s.includes(t)}function p(e,t=v){return"string"==typeof e&&e.trim()?(e.match(new RegExp(t,"g"))||[]).length:0}function T(e,t=v){for(const s of e)if(m(s,t))return s;return e.find((e=>"string"==typeof e&&!!e.trim()))}function _(e,t,s){const i="string"==typeof e&&e.trim();return!i||s&&!i.includes(s)||p(i)>1?s&&t&&s!==t?`${t}:${s}`:t||s:i}function O(e="credential"){E.v.warn(`Unable to migrate legacy ${e} to latest format. Please remove from your browser.`)}const A={password:!0,mediation:"optional"},f={cookie:{path:"/",name:"credentials",expires:7300,storePasswords:!1}};let I=class{constructor(e,t=f){this.session=e,this.config=t}createBasicCredentials(e){return{type:l.h.BASIC,username:e.username,password:e.password,mfaToken:this.getMFAToken()}}createRefreshCredentials(e){var t,s,i;return{type:l.h.REFRESH,username:null!==(t=null==e?void 0:e.username)&&void 0!==t?t:this.getUsername(),refreshToken:null!==(s=null==e?void 0:e.refreshToken)&&void 0!==s?s:this.getRefreshToken(),mfaToken:null!==(i=null==e?void 0:e.mfaToken)&&void 0!==i?i:this.getMFAToken()}}createSSOCredentials(e){var t;return{type:l.h.SSO,ssoToken:null!==(t=null==e?void 0:e.ssoToken)&&void 0!==t?t:this.getSSOToken()}}validateBasicCredentials(e){return e&&!!e.username&&!!e.password}validateRefreshCredentials(e){return e&&!!e.refreshToken&&!!e.username}validateSSOCredentials(e){return e&&!!e.ssoToken}validateUserCredentialData(e,t){const s=e&&!!e.id&&!!e.name&&!e.name.includes(v)&&p(e.id)<=1;return t?s&&!!e.password:s}normaliseLegacyCredentialData(e,t){if(this.validateUserCredentialData(e,!0))return[e,!0];if(this.validateUserCredentialData(t))return[t,!1];if(e)try{const t=e,[s]=R(t.name||t.id),[i,r]=R(T([t.id,t.name]));return[{id:_(t.id||t.name,s,r),name:s,password:t.password||""},!0]}catch(e){O("PasswordCredential")}if(t)try{const e=t,[s]=R(e.name||e.username||e.organisation),[i,r]=R(T([e.organisation||e.username||e.name]));return[{id:_(e.id||e.username||e.name,s,r),name:s,password:e.password||""},!1]}catch(e){O("cookie")}return[void 0,!1]}storeCredentialsInContainer(e){return(0,i.sH)(this,void 0,void 0,(function*(){if(!S())return;const t=new PasswordCredential(e);return E.v.debug("Storing credentials in CredentialsContainer"),navigator.credentials.store(t)}))}getCredentialsFromContainer(){return(0,i.sH)(this,arguments,void 0,(function*(e=A){if(S())return E.v.debug("Getting credentials from CredentialsContainer"),yield navigator.credentials.get(e)}))}storeCredentialsInCookie(e){const{password:t}=e,s=(0,i.Tt)(e,["password"]),r=this.config.cookie.storePasswords?e:s;return E.v.debug("Storing credentials in cookie"),!!h.A.set(this.config.cookie.name,JSON.stringify(r),{expires:this.config.cookie.expires,domain:location.hostname,path:this.config.cookie.path,secure:!0})}getCredentialsFromCookie(){E.v.debug("Getting credentials from cookie");const e=h.A.get(this.config.cookie.name);return e?JSON.parse(e):void 0}storeCredentials(e){return(0,i.sH)(this,void 0,void 0,(function*(){if(S()){const t=yield this.storeCredentialsInContainer(e);return Promise.resolve(!!t)}return Promise.resolve(this.storeCredentialsInCookie(e))}))}getCredentials(e){return(0,i.sH)(this,void 0,void 0,(function*(){return S()?this.getCredentialsFromContainer(e):Promise.resolve(this.getCredentialsFromCookie())}))}getSSOToken(){return this.session.getSessionStorageItem("ssoToken")}getUsername(){return this.session.getSessionStorageItem("username")||this.session.getLocalStorageItem("username")}getRefreshToken(){return this.session.getSessionStorageItem("refreshToken")||this.session.getLocalStorageItem("refreshToken")}getMFAToken(){return this.session.getSessionStorageItem("mfaToken")}removeCookie(){h.A.remove(this.config.cookie.name,{domain:location.hostname,path:this.config.cookie.path})}removeSSOToken(){this.session.removeSessionStorageItem("ssoToken")}removeUsername(){this.session.removeSessionStorageItem("username"),this.session.removeLocalStorageItem("username")}removeRefreshToken(){this.session.removeSessionStorageItem("refreshToken"),this.session.removeLocalStorageItem("refreshToken")}removeMFAToken(){this.session.removeSessionStorageItem("mfaToken")}removeAll(){this.removeCookie(),this.removeSSOToken(),this.removeUsername(),this.removeRefreshToken(),this.removeMFAToken()}preventSilentAccess(){return S()&&navigator.credentials.preventSilentAccess()}};I=(0,i.Cg)([(0,i.Qj)(0,u.N),(0,i.Qj)(1,(0,o.optional)(g))],I);const C=o.DI.createInterface((e=>e.singleton(I))),M=e=>Array.isArray(e)?e.map((e=>null!=e?e:"")):[],b=e=>{try{if("EVENT_LOGIN_AUTH_ACK"===(null==e?void 0:e.MESSAGE_TYPE)){const{DETAILS:i}=e;return{messageType:e.MESSAGE_TYPE,sourceRef:e.SOURCE_REF,userName:e.USER_NAME,updateQueue:e.UPDATE_QUEUE,zeroMqProxyModeEnabled:e.ZERO_MQ_PROXY_MODE_ENABLED,zeroMqProxyInboundPort:e.ZERO_MQ_PROXY_INBOUND_PORT,zeroMqProxyOutboundPort:e.ZERO_MQ_PROXY_OUTBOUND_PORT,userKVs:e.USER,details:i?{system:(s=i.SYSTEM,s?{date:s.DATE}:null),heartbeatIntervalSecs:i.HEARTBEAT_INTERVAL_SECS,failedLoginAttempts:i.FAILED_LOGIN_ATTEMPTS,rejectedLoginAttempts:i.REJECTED_LOGIN_ATTEMPTS,lastLoginDatetime:i.LAST_LOGIN_DATETIME,daysToPasswordExpiry:i.DAYS_TO_PASSWORD_EXPIRY,product:(t=i.PRODUCT,t?t.map((e=>({name:e.NAME,version:e.VERSION}))):[])}:null,permission:M(e.PERMISSION),profile:M(e.PROFILE)}}throw new Error("No Entity mapping implementation for provided DTO")}catch(e){throw E.v.error(e),e}var t,s};let N=class{loggedUserResultChanged(){var e;null===(e=this.isLoggedInSubject)||void 0===e||e.next(this.isLoggedIn)}get isLoggedIn$(){return this.isLoggedInSubject.asObservable()}get isLoggedIn(){return this.currentUser.isAuthenticated}constructor(e,t,s,i,r){this.session=e,this.connect=t,this.messageBuilder=s,this.credentialManager=i,this.currentUser=r,this.isWorking=!1,this.isLoggedInSubject=new a.t(this.isLoggedIn),this.currentUser.addAuthenticationChangeListener((e=>{var t;null===(t=this.isLoggedInSubject)||void 0===t||t.next(e.detail)}))}login(e){return(0,i.sH)(this,void 0,void 0,(function*(){var t;this.isWorking=!0;try{const s=this.messageBuilder.createLoginMessage(e),i=yield this.connect.send(s);if(!i||i.ERROR||(null===(t=i.DETAILS)||void 0===t?void 0:t.ERROR))throw new l.l(s,i);this.applyAuthResults({authToken:i.SESSION_AUTH_TOKEN,refreshToken:i.REFRESH_AUTH_TOKEN,profiles:i.PROFILE,username:i.USER_NAME,permissions:i.PERMISSION,sessionId:i.SESSION_ID}),this.currentUser.set(b(i)),this.session.setAuthResult(i),E.v.debug("Login Authentication Result:",i)}catch(e){if(E.v.error("Login Authentication Error:",e),!(e instanceof l.l&&e.isIgnorableError()))throw this.removeAuthResults(),this.currentUser.unset(),e;E.v.warn("Ignoring authentication error as it is a known edge case.")}finally{this.isWorking=!1}return this.loggedUserResult}))}logout(){return(0,i.sH)(this,void 0,void 0,(function*(){var e;this.isWorking=!0;let t={success:!1};try{const s=this.messageBuilder.createLogoutMessage(this.loggedUserResult);this.session.deleteUserFromSessionStorage();const{CODE:i,DETAILS:r,ERROR:n,MESSAGE_TYPE:o,OIDC_LOGOUT_URL:a}=yield this.connect.send(s),c=null!==(e=null==r?void 0:r.ERROR)&&void 0!==e?e:n,h=o===d.Go.LOGOUT_NACK;h&&E.v.warn("Unexpected Logout NACK received during logout.",c),t={success:o===d.Go.LOGOUT_ACK||i===d.x6.SESSION_NOT_FOUND||!h,error:c},a&&window.open(a,"_self")}catch(e){const s=new l.l(e.sentMessage,e.receivedMessage);if(E.v.error("Logout Authentication Error:",s),!s.isIgnorableError())throw e;E.v.warn("Ignoring authentication error as it is a known edge case."),t.success=!0}finally{this.removeAuthResults(),this.currentUser.unset(),this.isWorking=!1}return t}))}reAuthFromSession(){return(0,i.sH)(this,void 0,void 0,(function*(){const e=yield this.ensureConnection(),t=this.credentialManager.createRefreshCredentials();if(e&&this.credentialManager.validateRefreshCredentials(t)){const e=this.messageBuilder.createRefreshTokenMessage(),t=yield this.connect.send(e);if((null==t?void 0:t.MESSAGE_TYPE)===d.Gp.EVENT_LOGIN_AUTH_ACK)return this.session.setAuthResult(t),this.currentUser.set(b(t)),this.applyAuthResults(this.getLoggedUserFromMessage(t)),!0}return this.session.deleteUserFromSessionStorage(),this.currentUser.unset(),!1}))}ensureConnection(){return(0,i.sH)(this,void 0,void 0,(function*(){if(this.connect.isConnected)return!0;const e=this.session.getSessionStorageItem("hostUrl");return!!e&&this.connect.connect(e)}))}getLoggedUserFromMessage(e){const t=e.USER_NAME,s=e.SESSION_AUTH_TOKEN,i=e.REFRESH_AUTH_TOKEN;return t&&s&&i?{username:t,authToken:s,refreshToken:i,profiles:e.PROFILE,permissions:e.PERMISSION,sessionId:e.SESSION_ID}:null}applyAuthResults(e){e?this.loggedUserResult={authToken:e.authToken,refreshToken:e.refreshToken,profiles:e.profiles,username:e.username,permissions:e.permissions,sessionId:e.sessionId}:this.removeAuthResults()}removeAuthResults(){this.loggedUserResult=null}};(0,i.Cg)([n.observable],N.prototype,"isWorking",void 0),(0,i.Cg)([n.observable],N.prototype,"loggedUserResult",void 0),N=(0,i.Cg)([(0,i.Qj)(0,u.N),(0,i.Qj)(1,c.dm),(0,i.Qj)(2,d.lT),(0,i.Qj)(3,C),(0,i.Qj)(4,r.KJ)],N);const L=o.DI.createInterface((e=>e.singleton(N)))},56653:(e,t,s)=>{var i;s.d(t,{h:()=>i,l:()=>r}),function(e){e.BASIC="BASIC",e.SSO="SSO",e.JWT="JWT",e.REFRESH="REFRESH"}(i||(i={}));class r extends Error{constructor(e,t,s="Auth Failed \n"){super(s),this.sent=e,this.received=t,Object.setPrototypeOf(this,r.prototype)}isIgnorableError(){var e,t,s,i,r,n,o,a;return!!(null===(i=null===(s=null===(t=null===(e=this.received)||void 0===e?void 0:e.DETAILS)||void 0===t?void 0:t.ERROR)||void 0===s?void 0:s.toLowerCase())||void 0===i?void 0:i.includes("request needs the user to be logged"))||!!(null===(a=null===(o=null===(n=null===(r=this.received)||void 0===r?void 0:r.DETAILS)||void 0===n?void 0:n.ERROR)||void 0===o?void 0:o.toLowerCase())||void 0===a?void 0:a.includes("is not logged in"))}getMessageError(){var e,t;return Array.isArray(null===(e=this.received)||void 0===e?void 0:e.ERROR)?null===(t=this.received)||void 0===t?void 0:t.ERROR.map((e=>this.errorDetailFormatter(e))).join("\n"):""}getDetailsError(){var e,t,s,i;return Array.isArray(null===(t=null===(e=this.received)||void 0===e?void 0:e.DETAILS)||void 0===t?void 0:t.ERROR)?null===(i=null===(s=this.received)||void 0===s?void 0:s.DETAILS)||void 0===i?void 0:i.ERROR.map((e=>this.errorDetailFormatter(e))).join("\n"):""}hasPasswordExpiredError(){return this.hasErrorCode("PASSWORD_EXPIRED")}hasMFAError(){return this.hasErrorCode("MFA_REQUIRED")||this.hasErrorCode("MFA_FAILED")}hasErrorCode(e){var t,s;return!!Array.isArray(null===(t=this.received)||void 0===t?void 0:t.ERROR)&&(null===(s=this.received)||void 0===s?void 0:s.ERROR.some((t=>t.CODE===e)))}errorDetailFormatter(e){return`\n ${e.CODE}: \n ${e.TEXT}`}}},24669:(e,t,s)=>{s.d(t,{EQ:()=>a,a4:()=>o});var i=s(17190),r=s(84674);class n{constructor(){this.streamListeners=(0,i.r)(),this.streamCompleteListeners=(0,i.r)(),this.streamErrorListeners=(0,i.r)(),this.commitListeners=(0,i.r)(),this.metadataListeners=(0,i.r)(),this.commitResponseListeners=(0,i.r)()}addStreamListener(e,t,s){var i,r,n;const o=null===(i=this.streamListeners)||void 0===i?void 0:i.subscribe(e),a=null===(r=this.streamCompleteListeners)||void 0===r?void 0:r.subscribe(t),c=null===(n=this.streamErrorListeners)||void 0===n?void 0:n.subscribe(s);return()=>{o(),a(),c()}}onStreamEvent(e,t,s,i){var r;null===(r=this.streamListeners)||void 0===r||r.publish(new CustomEvent("connect-stream-event",{detail:{functions:i,message:t,resourceName:e,stream:s}}))}onStreamErrorEvent(e,t,s){var i;null===(i=this.streamErrorListeners)||void 0===i||i.publish(new CustomEvent("connect-stream-error-event",{detail:{resourceName:e,stream:t,error:s}}))}onStreamCompleteEvent(e,t){var s;null===(s=this.streamCompleteListeners)||void 0===s||s.publish(new CustomEvent("connect-stream-complete-event",{detail:{resourceName:e,stream:t}}))}addCommitListener(e){var t;return null===(t=this.commitListeners)||void 0===t?void 0:t.subscribe(e)}onCommitEvent(e,t){var s;null===(s=this.commitListeners)||void 0===s||s.publish(new CustomEvent("connect-commit-event",{detail:{eventName:e,message:t}}))}addMetadataListener(e){var t;return null===(t=this.metadataListeners)||void 0===t?void 0:t.subscribe(e)}onMetadataEvent(e,t,s){var i;null===(i=this.metadataListeners)||void 0===i||i.publish(new CustomEvent("connect-metadata-event",{detail:{resourceName:e,message:t,error:s}}))}addCommitResponseListener(e){var t;return null===(t=this.commitResponseListeners)||void 0===t?void 0:t.subscribe(e)}onCommitResponseEvent(e,t){var s;null===(s=this.commitResponseListeners)||void 0===s||s.publish(new CustomEvent("connect-commit-response-event",{detail:{eventName:e,response:t}}))}}const o=r.DI.createInterface((e=>e.singleton(n))),a=r.DI.createInterface((e=>e.aliasTo(o)))},26347:(e,t,s)=>{s.d(t,{dm:()=>D,tn:()=>w});var i=s(55823),r=s(84686),n=s(33681),o=s(84674),a=s(77909);class c{constructor(){this.cachedMetadata=new Map,this.cachedJsonSchema=new Map}getMetadataFor(e){return this.cachedMetadata.get(e)}getJsonSchemaFor(e){return this.cachedJsonSchema.get(e)}hasMetadataFor(e){return this.cachedMetadata.has(e)}hasJsonSchemaFor(e){return this.cachedJsonSchema.has(e)}setMetadataFor(e,t){this.cachedMetadata.set(e,t)}setJsonSchemaFor(e,t){this.cachedJsonSchema.set(e,t)}}const d=o.DI.createInterface((e=>e.singleton(c)));var h=s(17465),l=s(24669),u=s(49587),E=s(49229),g=s(97156),S=s(7827),v=s(1762),R=s(84190),m=s(78213),p=s(66640),T=s(16220),_=s(98316),O=s(32748);const A={polling:Object.assign({POLLING_MAP:{EVENT_AMEND_USER:{TEMP_FREQUENCY:500,AMOUNT_OF_POLLS:5,QUERIES:["ALL_USERS"]}},POLLING_INTERVAL_MAP:{ALL_TRADES:5e3,ALL_USERS:5e3,ALL_PROCESSES_STATUS:1e4},POLLING_FREQUENCY:5e3},{})},f=o.DI.createInterface((e=>e.instance(A)));var I=s(21281);const C=(e,t)=>((null==t?void 0:t.ROW)&&e&&e.length>0?t.ROW.forEach((t=>{const s=t;if(s&&s.DETAILS){const i=s.DETAILS.ROW_REF,r=s.DETAILS.OPERATION;"INSERT"===r&&(e.find((e=>{var t;return(null===(t=e.DETAILS)||void 0===t?void 0:t.ROW_REF)===i}))||e.unshift(s)),"DELETE"===r&&(e=e.filter((e=>{var s,i;return(null===(s=t.DETAILS)||void 0===s?void 0:s.ROW_REF)!==(null===(i=e.DETAILS)||void 0===i?void 0:i.ROW_REF)}))),"MODIFY"===r&&(e=e.map((e=>{var t;return(null===(t=e.DETAILS)||void 0===t?void 0:t.ROW_REF)===i?Object.assign(Object.assign({},e),s):e})))}})):!t||e&&0!==e.length||(e=[...new Set(t.ROW)]),e);var M;let b=M=class{get isConnected(){return this._isConnected}set isConnected(e){this._isConnected=e,this.isConnectedSubject.next(this._isConnected)}constructor(e,t,s,i,r,n){var o;this.http=e,this.messageBuilder=t,this.session=s,this.metaCache=i,this.serializer=r,this.config=n,this.isWorking=!1,this._isConnected=!1,this.isConnectedSubject=new g.t(this._isConnected),this.isConnected$=null===(o=this.isConnectedSubject)||void 0===o?void 0:o.asObservable(),this.ongoingTurbo={},this.streams=new Map}checkHost(){return(0,i.sH)(this,void 0,void 0,(function*(){try{return this.getMessage({MESSAGE_TYPE:I.Go.HEARTBEAT_PING,SOURCE_REF:"host check"}).then((e=>e.MESSAGE_TYPE===I.Go.HEARTBEAT_PONG))}catch(e){return h.v.error(e),!1}}))}send(e,t){return this.http.post(M.getUrl(this.host,e),{body:M.getBody(e),headers:this.messageBuilder.createHTTPHeadersFromMessage(e)})}httpMode(){return!0}setValidSession(e){h.v.deprecated("setValidSession","Please refrain from calling this API as this state is managed internally.","15.0.0")}connect(e){return(0,i.sH)(this,void 0,void 0,(function*(){return this.host=e,this.host.endsWith("/")||(this.host=this.host.concat("/")),this.checkHost().then((e=>(this.isConnected=e,this.session.setSessionStorageItem("hostUrl",this.host),e)))}))}disconnect(){this.isConnected=!1,this.streams.clear(),this.ongoingTurbo={},this.host=void 0}snapshot(e,t){return(0,i.sH)(this,void 0,void 0,(function*(){const s=this.messageBuilder.createDataLogonMessage(e,t);return h.v.debug(`HTTP MODE - ${s.MESSAGE_TYPE} (snapshot) message created -> `,s),this.send(s).then((e=>(this.dataLogoff(s.SOURCE_REF).catch((e=>h.v.error(e))),e)))}))}stream(e,t,s,i){const r=this.messageBuilder.createDataLogonMessage(e,i);h.v.debug(`HTTP MODE - ${r.MESSAGE_TYPE} (stream) message created -> `,r);const n=r.SOURCE_REF;this.streams.set(n,{SOURCE_REF:n,POLLING_FREQUENCY:new g.t(this.config.polling.POLLING_FREQUENCY),RESOURCE_NAME:e});const o=this.streams.get(n).POLLING_FREQUENCY,a=(0,S.x)((0,v.H)(this.send(r)),o.pipe((0,R.n)((e=>(0,m.Y)(e)))).pipe((0,R.n)((()=>(0,v.H)(this.getMessage(r)))))).pipe((0,p.v)((()=>this.streams.has(n))),(0,T.j)((()=>{h.v.debug(`Terminating stream for ${e} - ${n}`),this.dataLogoff(n)})));return this.streams.get(n).STREAM=a,a}streamState(e,t=(()=>{}),s=(()=>{}),i,r=[]){return this.stream(e,t,s,i).pipe((0,a.S)(C,r))}streamWithoutAutoTeardown(e,t,s,i){return h.v.deprecated("streamWithoutAutoTeardown","Please use 'stream' api instead.","15.0.0"),this.stream(e,t,s,i)}getMessage(e){return(0,i.sH)(this,void 0,void 0,(function*(){return this.http.get(M.getUrl(this.host,e),{headers:this.messageBuilder.createHTTPHeadersFromMessage(e)})}))}getMoreRows(e){return(0,i.sH)(this,void 0,void 0,(function*(){const t=this.messageBuilder.createMoreRowsMessage(e);return h.v.debug(`HTTP MODE - ${t.MESSAGE_TYPE} message created -> `,t),this.send(t)}))}getMoreColumns(e){return(0,i.sH)(this,void 0,void 0,(function*(){const t=this.messageBuilder.createMoreColumnsMessage(e);return this.send(t)}))}dataLogoff(e){return(0,i.sH)(this,void 0,void 0,(function*(){const t=this.messageBuilder.createDataLogoffMessage(e);return this.send(t).then((t=>(this.streams.has(e)&&(h.v.debug(`Removing stream ${e}`),this.streams.delete(e)),t)))}))}getMetadata(e){return(0,i.sH)(this,arguments,void 0,(function*(e,t=!0){const s=this.messageBuilder.createMetaRequestMessage(e);return h.v.debug(`HTTP MODE - ${s.MESSAGE_TYPE} (metadata) message created -> `,s),this.send(s).then((e=>e.DETAILS))}))}getJSONSchema(e){return(0,i.sH)(this,void 0,void 0,(function*(){const t=this.messageBuilder.createMetaRequestMessage(e,I.Gp.JSON_SCHEMA_REQUEST);return h.v.debug(`HTTP MODE! - ${t.MESSAGE_TYPE} (json schema) message created -> `,t),this.send(t)}))}request(e,t){const s=this.messageBuilder.createRequestMessage(e,t);return h.v.debug(`HTTP MODE! - ${s.MESSAGE_TYPE} (request server) message created -> `,s),this.send(s)}getAvailableResources(e){return(0,i.sH)(this,void 0,void 0,(function*(){const t=this.messageBuilder.createResourcesMessage(e);return h.v.debug(`HTTP MODE! - ${t.MESSAGE_TYPE} (getResources) message created -> `,t),this.send(t)}))}commitEvent(e,t){return(0,i.sH)(this,void 0,void 0,(function*(){const s=this.messageBuilder.createCommitMessage(e,t);return h.v.debug(`HTTP MODE! - ${s.MESSAGE_TYPE} (commit) message created -> `,s),this.send(s).then((t=>(this.maybeTurbo(e,t),t)))}))}maybeTurbo(e,t){var s;if(!(null===(s=null==t?void 0:t.MESSAGE_TYPE)||void 0===s?void 0:s.endsWith("_ACK")))return;if(this.ongoingTurbo[e])return void h.v.debug(`${e} polling frequency is already accelerated.`);const i=this.config.polling.POLLING_MAP[e];if(!(null==i?void 0:i.TEMP_FREQUENCY)||!i.AMOUNT_OF_POLLS)return;const r=i.TEMP_FREQUENCY,n=r*i.AMOUNT_OF_POLLS,o=JSON.parse(JSON.stringify(this.config.polling.POLLING_INTERVAL_MAP)),a=JSON.parse(JSON.stringify(this.config.polling.POLLING_INTERVAL_MAP));for(const e of i.QUERIES)a[e]=r,o[e]||(o[e]=this.config.polling.POLLING_FREQUENCY);h.v.debug(`${e} TRIGGERED -> ENFORCING TURBO | FREQUENCY=${r}ms DURATION=${n}`),this.ongoingTurbo[e]=!0,this.updateIntervals({polling:{POLLING_INTERVAL_MAP:a}}),setTimeout((()=>{h.v.debug(`RESTORED ORIGINAL POLLING INTERVALS FOR ${e}`),this.updateIntervals({polling:{POLLING_INTERVAL_MAP:o}}),this.ongoingTurbo[e]=!1}),n)}updateIntervals(e){const{POLLING_INTERVAL_MAP:t}=e.polling;t&&(this.config.polling.POLLING_INTERVAL_MAP=t,this.handlePollingIntervalMapUpdate(t))}handlePollingIntervalMapUpdate(e){if(e)for(const t in e){if(!e.hasOwnProperty(t))continue;const s=e[t];this.config.polling.POLLING_INTERVAL_MAP[t]=s,h.v.debug(`Setting polling frequency for ${t} = ${s}`),[...this.streams.values()].filter((e=>e.RESOURCE_NAME===t)).forEach((e=>{var t;return null===(t=null==e?void 0:e.POLLING_FREQUENCY)||void 0===t?void 0:t.next(s)}))}}static getBody(e){return JSON.stringify(e)}static getUrl(e,t){const s=t.MESSAGE_TYPE;let i=t.MESSAGE_TYPE.replace(/_/g,"-").toLowerCase();return s===I.Gp.DATA_LOGON&&(i=t.DETAILS.DATASOURCE_NAME.replace(/_/g,"-").toLowerCase()),`${e}${i}`}};(0,i.Cg)([n.observable],b.prototype,"host",void 0),(0,i.Cg)([n.observable],b.prototype,"isWorking",void 0),(0,i.Cg)([n.observable],b.prototype,"_isConnected",void 0),(0,i.Cg)([n.volatile],b.prototype,"isConnected",null),b=M=(0,i.Cg)([(0,i.Qj)(0,O.l),(0,i.Qj)(1,I.lT),(0,i.Qj)(2,_.N),(0,i.Qj)(3,d),(0,i.Qj)(4,E.b_),(0,i.Qj)(5,f)],b);const N=o.DI.createInterface((e=>e.singleton(b)));var L=s(45230);let U=class{get isConnected(){return this.socket.isConnected}get isConnectedSubject(){return this.socket.isConnectedSubject}get isConnected$(){var e;return null===(e=this.socket.isConnectedSubject)||void 0===e?void 0:e.asObservable()}get host(){return this.socket.host}constructor(e,t,s,i,r){this.socket=e,this.messageBuilder=t,this.metaCache=s,this.events=i,this.config=r,this.isWorking=!1}httpMode(){return!1}setValidSession(e){h.v.deprecated("setValidSession","Please refrain from calling this API as this state is managed internally.","15.0.0")}send(e,t){return this.socket.send(e,t)}connect(){return(0,i.sH)(this,arguments,void 0,(function*(e=r.vN){return this.socket.reset(),this.socket.connect(e,this.config.connect,this.config.reconnect)}))}disconnect(){this.socket.reset()}snapshot(e,t){return(0,i.sH)(this,void 0,void 0,(function*(){const s=this.messageBuilder.createDataLogonMessage(e,t);return h.v.debug(`${s.MESSAGE_TYPE} (snapshot) message created -> `,s),this.socket.send(s)}))}stream(e,t,s,i){const r=this.messageBuilder.createDataLogonMessage(e,i);h.v.debug(`${r.MESSAGE_TYPE} (stream) message created -> `,r);const n=this.socket.sendForStream(r,t,(t=>{s(t),this.events.onStreamErrorEvent(e,n,t)}),(()=>{this.events.onStreamCompleteEvent(e,n)}));return this.events.onStreamEvent(e,r,n,{onMessage:t,onError:s}),n}streamState(e,t=(()=>{}),s=(()=>{}),i,r=[]){return this.stream(e,t,s,i).pipe((0,a.S)(C,r))}streamWithoutAutoTeardown(e,t,s,i){h.v.deprecated("streamWithoutAutoTeardown","Please use 'stream' api instead.","15.0.0");const r=this.messageBuilder.createDataLogonMessage(e,i);h.v.debug(`${r.MESSAGE_TYPE} (stream without auto-teardown) message created -> `,r);const n=this.socket.sendForStreamWithoutTeardown(r,t,(t=>{s(t),this.events.onStreamErrorEvent(e,n,t)}));return this.events.onStreamEvent(e,r,n,{onMessage:t,onError:s}),n}getMoreRows(e,t){return(0,i.sH)(this,void 0,void 0,(function*(){const s=this.messageBuilder.createMoreRowsMessage(e,t);return h.v.debug(`${s.MESSAGE_TYPE} message created -> `,s),this.socket.send(s,!1)}))}getMoreColumns(e){return(0,i.sH)(this,void 0,void 0,(function*(){const t=this.messageBuilder.createMoreColumnsMessage(e);return this.socket.send(t)}))}dataLogoff(e){return(0,i.sH)(this,void 0,void 0,(function*(){const t=this.messageBuilder.createDataLogoffMessage(e);return h.v.debug(`${t.MESSAGE_TYPE} message created -> `,t),this.socket.send(t)}))}getMetadata(e){return(0,i.sH)(this,arguments,void 0,(function*(e,t=!0){var s;if(t&&this.metaCache.hasMetadataFor(e))return h.v.debug(`Cached metadata retrieved for ${e}`),this.metaCache.getMetadataFor(e);const i=this.messageBuilder.createMetaRequestMessage(e);let r,n;h.v.debug(`${i.MESSAGE_TYPE} (metadata) message created -> `,i);try{this.isWorking=!0;const t=yield this.socket.send(i);r=null!==(s=null==t?void 0:t.DETAILS)&&void 0!==s?s:{},Object.keys(r).length&&this.metaCache.setMetadataFor(e,r)}catch(e){throw n=e,h.v.error(e),n}finally{this.events.onMetadataEvent(e,i,n),this.isWorking=!1}return r}))}getJSONSchema(e){return(0,i.sH)(this,arguments,void 0,(function*(e,t=!0){var s;if(t&&this.metaCache.hasJsonSchemaFor(e))return h.v.debug(`Cached JsonSchema retrieved for ${e}`),this.metaCache.getJsonSchemaFor(e);const i=this.messageBuilder.createMetaRequestMessage(e,I.Gp.JSON_SCHEMA_REQUEST);let r;h.v.debug(`${i.MESSAGE_TYPE} (json schema) message created -> `,i);try{this.isWorking=!0,r=null!==(s=yield this.socket.send(i))&&void 0!==s?s:{},Object.keys(r).length&&this.metaCache.setJsonSchemaFor(e,r)}catch(e){h.v.error(e)}finally{this.isWorking=!1}return r}))}request(e,t){const s=this.messageBuilder.createRequestMessage(e,t);return h.v.debug(`${s.MESSAGE_TYPE} (request server) message created -> `,s),this.socket.send(s)}getAvailableResources(e){return(0,i.sH)(this,void 0,void 0,(function*(){const t=this.messageBuilder.createResourcesMessage(e);return h.v.debug(`${t.MESSAGE_TYPE} (resources) message created -> `,t),this.socket.send(t)}))}commitEvent(e,t){return(0,i.sH)(this,void 0,void 0,(function*(){const s=this.messageBuilder.createCommitMessage(e,t);h.v.debug(`${s.MESSAGE_TYPE} (commit) message created -> `,s);const i=this.socket.send(s);return this.events.onCommitEvent(e,s),i.then((t=>(this.events.onCommitResponseEvent(e,t),t)))}))}};(0,i.Cg)([n.observable],U.prototype,"isWorking",void 0),U=(0,i.Cg)([(0,i.Qj)(0,L.yQ),(0,i.Qj)(1,I.lT),(0,i.Qj)(2,d),(0,i.Qj)(3,l.EQ),(0,i.Qj)(4,u.R)],U);const y="true"===r.PF||!1,P=o.DI.createInterface((e=>e.singleton(U))),D=o.DI.createInterface((e=>y?e.aliasTo(N):e.aliasTo(P)));function w(){return o.DI.getOrCreateDOMContainer().get(D)}},49587:(e,t,s)=>{s.d(t,{R:()=>n});var i=s(84674);const r={connect:{alwaysOn:!1,enableHeartbeat:!0,enableHeartbeatLogging:!1,heartbeatInterval:1e4,verboseHeartbeat:!1,enableMessageLogging:!1},reconnect:{reconnectAttempts:10,reconnectInterval:1e4,reconnectStreams:!0},isWebSocketExpression:new RegExp(/wss?:\/\/[-a-zA-Z0-9@:%._\+~#=]{1,256}\b([-a-zA-Z0-9()@:%_\+.~#?&\/=]*)\b\/*$/,"i")},n=i.DI.createInterface((e=>e.instance(r)))},32748:(e,t,s)=>{s.d(t,{l:()=>a});var i=s(55823),r=s(49229),n=s(84674);let o=class{constructor(e){this.serializer=e}get(e,t){return(0,i.sH)(this,void 0,void 0,(function*(){const s=yield fetch(e,Object.assign(Object.assign({credentials:"include",headers:{"Content-type":"application/json; charset=UTF-8"}},t),{method:"GET"}));return(t.serializer||this.serializer).deserialize(s)}))}post(e,t){return(0,i.sH)(this,void 0,void 0,(function*(){const s=yield fetch(e,Object.assign(Object.assign({credentials:"include",headers:{"Content-type":"application/json; charset=UTF-8"}},t),{method:"POST"}));return(t.serializer||this.serializer).deserialize(s)}))}};o=(0,i.Cg)([(0,i.Qj)(0,r.b_)],o);const a=n.DI.createInterface((e=>e.singleton(o)))},21281:(e,t,s)=>{s.d(t,{Go:()=>i,Gp:()=>r,lT:()=>E,x6:()=>n,z2:()=>l});var i,r,n,o=s(55823),a=s(32808),c=s(84674),d=s(56653),h=s(98316);!function(e){e.LOGON_ACK="LOGON_ACK",e.LOGON_NACK="LOGON_NACK",e.LOGOFF_ACK="LOGOFF_ACK",e.LOGOFF_NACK="LOGOFF_NACK",e.HEARTBEAT_PING="HEARTBEAT_PING",e.HEARTBEAT_PONG="HEARTBEAT_PONG",e.MORE_ROWS="MORE_ROWS",e.MORE_COLUMNS="MORE_COLUMNS",e.MORE_COLUMNS_ACK="MORE_COLUMNS_ACK",e.MSG_ACK="MSG_ACK",e.MSG_NACK="MSG_NACK",e.LOGOUT_ACK="LOGOUT_ACK",e.LOGOUT_NACK="LOGOUT_NACK",e.QUERY_UPDATE="QUERY_UPDATE"}(i||(i={})),function(e){e.EVENT_LOGIN_AUTH="EVENT_LOGIN_AUTH",e.EVENT_LOGIN_AUTH_ACK="EVENT_LOGIN_AUTH_ACK",e.EVENT_LOGIN_AUTH_NACK="EVENT_LOGIN_AUTH_NACK",e.EVENT_LOGOUT="EVENT_LOGOUT",e.DATA_LOGON="DATA_LOGON",e.DATA_LOGOFF="DATA_LOGOFF",e.META_REQUEST="META_REQUEST",e.JSON_SCHEMA_REQUEST="JSON_SCHEMA_REQUEST",e.RESOURCES_REQUEST="RESOURCES_REQUEST",e.RESOURCES_REQUEST_ACK="RESOURCES_REQUEST_ACK",e.RESOURCES_REQUEST_NACK="RESOURCES_REQUEST_NACK",e.EVENT_CHANGE_USER_PASSWORD="EVENT_CHANGE_USER_PASSWORD",e.EVENT_SELF_SERVICE_PASSWORD_RESET="EVENT_SELF_SERVICE_PASSWORD_RESET",e.EVENT_PASSWORD_RESET_ACTION="EVENT_PASSWORD_RESET_ACTION"}(r||(r={})),function(e){e.SESSION_NOT_FOUND="SESSION_NOT_FOUND",e.UNKNOWN_MESSAGE_TYPE="UNKNOWN_MESSAGE_TYPE"}(n||(n={}));const l=(e,t)=>!!Array.isArray(null==e?void 0:e.ERROR)&&(null==e?void 0:e.ERROR.some((e=>{var s,i;return(null===(s=e.CODE)||void 0===s?void 0:s.includes(`${t}`))||(null===(i=e.STATUS_CODE)||void 0===i?void 0:i.includes(`${t}`))})));let u=class{constructor(e,t){this.session=e,this.uuid=t}createLoginMessage(e){let t;switch(e.type){case d.h.BASIC:t={USER_NAME:e.username,PASSWORD:e.password,MFA_CODE:e.mfaToken};break;case d.h.REFRESH:t={USER_NAME:e.username,REFRESH_AUTH_TOKEN:e.refreshToken,MFA_CODE:e.mfaToken};break;case d.h.SSO:t={SSO_TOKEN:e.ssoToken};break;case d.h.JWT:t={JWT:e.jwt,DOMAIN:e.domain}}return{DETAILS:t,SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:r.EVENT_LOGIN_AUTH}}createLogoutMessage(e){var t,s;return{SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:r.EVENT_LOGOUT,SESSION_AUTH_TOKEN:null!==(t=e.authToken)&&void 0!==t?t:this.session.getSessionStorageItem("authToken"),SESSION_ID:null!==(s=e.sessionId)&&void 0!==s?s:this.session.getSessionStorageItem("sessionId")}}createDataLogonMessage(e,t){return{SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:r.DATA_LOGON,DETAILS:Object.assign({DATASOURCE_NAME:e},t),SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken")}}createDataLogoffMessage(e){return{SOURCE_REF:e,MESSAGE_TYPE:r.DATA_LOGOFF,SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken")}}createRequestMessage(e,t){return Object.assign({SOURCE_REF:this.uuid.createId(),SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken"),MESSAGE_TYPE:e.startsWith("REQ_")?e:`REQ_${e}`},t)}createResourcesMessage(e){return Object.assign({SOURCE_REF:this.uuid.createId(),SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken"),MESSAGE_TYPE:r.RESOURCES_REQUEST},e)}createMetaRequestMessage(e,t=r.META_REQUEST){return{SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:t,DETAILS:{FEATURE:e},SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken")}}createCommitMessage(e,t){return Object.assign({SOURCE_REF:this.uuid.createId(),SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken"),MESSAGE_TYPE:e},t)}createRefreshTokenMessage(){return{SOURCE_REF:this.uuid.createId(),SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken"),MESSAGE_TYPE:r.EVENT_LOGIN_AUTH,DETAILS:{REFRESH_AUTH_TOKEN:this.session.getSessionStorageItem("refreshToken"),MFA_CODE:this.session.getSessionStorageItem("mfaToken")}}}createChangePasswordMessage(e,t,s){return{USER_NAME:e,SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:r.EVENT_CHANGE_USER_PASSWORD,DETAILS:{OLD_PASSWORD:t,NEW_PASSWORD:s}}}createForgotPasswordMessage(e,t,s=e){return{USER_NAME:s,SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:r.EVENT_SELF_SERVICE_PASSWORD_RESET,DETAILS:{USER_NAME:e,RETURN_URL:t}}}createForgotPasswordTokenMessage(e,t,s,i=e){return{USER_NAME:i,SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:r.EVENT_PASSWORD_RESET_ACTION,DETAILS:{USER_NAME:e,RESET_TOKEN:t,NEW_PASSWORD:s}}}createMoreRowsMessage(e,t){return{SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:i.MORE_ROWS,DETAILS:{SOURCE_REF:e,VIEW_NUMBER:t},SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken")}}createMoreColumnsMessage(e){return Object.assign(Object.assign({},this.createMoreRowsMessage(e)),{MESSAGE_TYPE:i.MORE_COLUMNS})}createHTTPHeadersFromMessage(e,t="application/json; charset=UTF-8"){const s={"Content-type":t};return e.SOURCE_REF&&(s["source-ref"]=e.SOURCE_REF,s.SOURCE_REF=e.SOURCE_REF),e.SESSION_AUTH_TOKEN&&(s["SESSION-AUTH-TOKEN"]=e.SESSION_AUTH_TOKEN),e.MESSAGE_TYPE===r.EVENT_LOGOUT&&(s["SESSION-ID"]=e.SESSION_ID),s}createHeartbeatPingMessage(e=!1){return{MESSAGE_TYPE:i.HEARTBEAT_PING,SOURCE_REF:this.uuid.createId(),VERBOSE:e,DETAILS:{},SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken")}}};u=(0,o.Cg)([(0,o.Qj)(0,h.N),(0,o.Qj)(1,a.k)],u);const E=c.DI.createInterface((e=>e.singleton(u)))},45230:(e,t,s)=>{s.d(t,{yQ:()=>G,Ol:()=>k});var i=s(55823),r=s(92277),n=s(84686),o=s(49229),a=s(32808),c=s(33681),d=s(84674),h=s(50049),l=s(37970),u=s(75841),E=s(26274),g=s(53193),S=s(84190),v=s(82834),R=s(66640),m=s(53940),p=s(48653),T=s(98316),_=s(17465),O=s(49587),A=s(32748),f=s(21281);const I=1e4,C=6e4;var M;!function(e){e.Linear="linear",e.Exponential="exponential"}(M||(M={}));const b=(e,t)=>{const{reconnectInterval:s=I}=e,i=s>C?C:s,r=Math.round(Math.log2(C/i));return i*Math.pow(2,t%r)},N=e=>{const{reconnectInterval:t=I}=e;return t>C?C:t};var L,U=s(5709);class y{constructor(e){this.interval=e}get workerScript(){return`\n const startTime = Date.now();\n setInterval(function() {\n self.postMessage(Date.now() - startTime);\n }, ${this.interval});\n `}start(e){this.stop(),this.runWorker(e)}stop(){this.worker&&(this.worker.terminate(),delete this.worker)}runWorker(e){this.worker||(this.worker=new Worker(URL.createObjectURL(new Blob([this.workerScript],{type:"text/javascript"}))),this.worker.onmessage=t=>e(t.data))}}class P extends h.B{constructor(){super()}}l.c;class D{constructor(e,t,s,i){this._message=e,this._onMessage=t,this._onError=s,this._isSubscription=i}get sentMessage(){return this._message}get onReceivedMessage(){return this._onMessage}get onReceivedError(){return this._onError}get isSubscription(){return this._isSubscription}}let w=L=class{get isConfigured(){return this.status.isConfigured}get isConnecting(){return this.status.isConnecting}get isConnected(){return this.status.isConnected}get isConnectedSubject(){return this.status.isConnectedSubject}get isDisconnected(){return this.status.isDisconnected}get isDisconnectedByServer(){return this.status.isDisconnectedByServer}get isReconnecting(){return this.status.isReconnecting}get hasValidSession(){return _.v.deprecated("get hasValidSession","Use `User.isAuthenticated` from `@genesislcap/foundation-user` instead.","15.0.0"),this.user.isAuthenticated}set hasValidSession(e){_.v.deprecated("set hasValidSession","Please refrain from calling this API as this state is managed internally.","15.0.0")}get host(){var e;return null!==(e=this.url)&&void 0!==e?e:n.vN}constructor(e,t,s,i,r,n,o){this.messageBuilder=e,this.session=t,this.serializer=s,this.uuid=i,this.status=r,this.user=n,this.config=o,this.defaultInterval=1e4,this.secondsMultiplier=1e3,this.heartbeatIsEnabled=!0,this.heartbeatInterval=this.defaultInterval,this.socketMessages=()=>this.wsMessages}get heartbeatLoggingIsEnabled(){var e,t;return null!==(t=null===(e=this.connectOptions)||void 0===e?void 0:e.enableHeartbeatLogging)&&void 0!==t&&t}get messageLoggingIsEnabled(){var e,t;return null!==(t=null===(e=this.connectOptions)||void 0===e?void 0:e.enableMessageLogging)&&void 0!==t&&t}connect(e=n.vN,t,s){var r;return this.url=e,this.connectOptions=null!=t?t:this.config.connect,this.reconnectOptions=null!=s?s:this.config.reconnect,(null===(r=this.config.isWebSocketExpression)||void 0===r?void 0:r.test(this.host))?new Promise((e=>{var t,s,r,n;_.v.info(`${this.isReconnecting?"Reconnecting":"Connecting"} to ${this.url}`),this.status.isConnecting=!this.isReconnecting;(!this.isReconnecting||!(null===(t=this.reconnectOptions)||void 0===t?void 0:t.reconnectStreams))&&this.cleanMessages(),null===(s=this.socketSubscription)||void 0===s||s.unsubscribe(),this.websocket=new p.Q({url:this.url,openObserver:{next:()=>{this.session.setSessionStorageItem("hostUrl",this.url),this.status.isConnected=!0,this.prepareHeartbeat(),_.v.info("WebSocket connection is now open"),e(this.isConnected)}},closeObserver:{next:t=>{this.status.onClose(t),this.isDisconnectedByServer&&_.v.info(`WebSocket connection was closed due an error - Code: ${t.code} ${t.reason?" | Reason: "+t.reason:""}`),e(this.isConnected)}},serializer:e=>this.serializer.serialize(e),deserializer:e=>this.serializer.deserialize(e)});this.socketSubscription=this.websocket.subscribe(null!==(n=null===(r=this.connectOptions)||void 0===r?void 0:r.connectObserver)&&void 0!==n?n:{next:e=>(0,i.sH)(this,void 0,void 0,(function*(){var t;const s=`Response Message received for SourceRef: ${e.SOURCE_REF} | MessageType: ${e.MESSAGE_TYPE}`;this.logMessageTypeFlow(e.MESSAGE_TYPE,_.v.info,s);const{SOURCE_REF:i,MESSAGE_TYPE:r}=e,n=this.getMessageHandler(i,r);if(!n)return void(e.MESSAGE_TYPE===f.Go.MSG_NACK&&e.ERROR&&e.ERROR.forEach((t=>{_.v.error(`MessageType: ${e.MESSAGE_TYPE} | Error Details:`,t)})));let o=!1;switch(e.MESSAGE_TYPE){case f.Gp.EVENT_LOGIN_AUTH_ACK:{const s=e.DETAILS;s.HEARTBEAT_INTERVAL_SECS&&void 0===(null===(t=this.connectOptions)||void 0===t?void 0:t.heartbeatInterval)&&(this.heartbeatInterval=s.HEARTBEAT_INTERVAL_SECS*this.secondsMultiplier,this.prepareHeartbeat());break}case f.Go.LOGOUT_ACK:return n.onReceivedMessage.call(this,e),void this.cleanMessages();case f.Go.LOGON_ACK:return;case f.Go.LOGOFF_ACK:break;case f.Go.QUERY_UPDATE:n.isSubscription||this.sendDataLogoff(i);break;case f.Go.MSG_NACK:case f.Go.LOGON_NACK:o=!0}o?n.onReceivedError.call(this,{receivedMessage:e,sentMessage:n.sentMessage}):n.onReceivedMessage.call(this,e),this.wsMessages.next(e),n.isSubscription||this.removeMessageHandler(i)})),error:e=>{_.v.debug("Error found: ",e),this.reconnect()},complete:()=>{var e;this.isDisconnectedByServer&&(null===(e=this.connectOptions)||void 0===e?void 0:e.alwaysOn)?this.reconnect():_.v.info("Connection is now closed")}}),this.status.isConfigured=!0})):(_.v.error(`Specified host (${this.host}) is not valid WebSocket url. Connection will not proceed.`),void _.v.warn("Make sure the host url starts with wss:// or ws://"))}handleExpiredSession(){return(0,i.sH)(this,void 0,void 0,(function*(){if(this.session.getSessionStorageItem("refreshToken")){const e=this.messageBuilder.createRefreshTokenMessage(),t=yield this.send(e);this.session.setAuthResult(t),this.updateSessionAndSubscriptions(t)}else yield this.handleCookieBasedReauth()}))}handleCookieBasedReauth(){return(0,i.sH)(this,void 0,void 0,(function*(){const e=parseInt(localStorage.getItem(L.REAUTH_ACTION_LOCK_KEY)||"0");if(Date.now()-e>3e4&&localStorage.removeItem(L.REAUTH_ACTION_LOCK_KEY),localStorage.getItem(L.REAUTH_ACTION_LOCK_KEY))window.addEventListener("storage",this.onStorageEvent.bind(this));else{localStorage.setItem(L.REAUTH_ACTION_LOCK_KEY,Date.now().toString());const e=yield fetch(n.Be,{credentials:"include"});if("EVENT_LOGIN_DETAILS_ACK"!==(yield e.json()).MESSAGE_TYPE){(yield fetch(n.aW,{credentials:"include",headers:{"Content-type":"application/json; charset=UTF-8"},method:"POST",body:JSON.stringify({DETAILS:{},MESSAGE_TYPE:"EVENT_LOGIN_AUTH"})})).ok||window.location.reload()}localStorage.removeItem(L.REAUTH_ACTION_LOCK_KEY),yield this.connect()}}))}onStorageEvent(e){e.key===L.REAUTH_ACTION_LOCK_KEY&&null===e.newValue&&(this.connect(),window.removeEventListener("storage",this.onStorageEvent))}updateSessionAndSubscriptions(e){(null==e?void 0:e.MESSAGE_TYPE)===f.Gp.EVENT_LOGIN_AUTH_ACK&&this.wsMessageHandlers.forEach((t=>{t.isSubscription&&(t.sentMessage.SESSION_AUTH_TOKEN=e.SESSION_AUTH_TOKEN,this.websocket.next(t.sentMessage))}))}prepareHeartbeat(){var e,t,s,r;this.heartbeatTicker&&this.heartbeatTicker.stop();const n=()=>(0,i.sH)(this,void 0,void 0,(function*(){var e,t,s;if(!this.isConnected)return;const i=this.messageBuilder.createHeartbeatPingMessage(null===(e=this.connectOptions)||void 0===e?void 0:e.verboseHeartbeat);(null===(t=this.connectOptions)||void 0===t?void 0:t.heartbeatPingCallback)&&this.connectOptions.heartbeatPingCallback(i);const r=yield this.send(i);this.user.isAuthenticated&&!r.IS_AUTHENTICATED&&this.handleExpiredSession(),(null===(s=this.connectOptions)||void 0===s?void 0:s.heartbeatPongCallback)&&this.connectOptions.heartbeatPongCallback(r),this.heartbeatIsEnabled=r.MESSAGE_TYPE===f.Go.HEARTBEAT_PONG&&r.SOURCE_REF===i.SOURCE_REF}));if(null!==(t=null===(e=this.connectOptions)||void 0===e?void 0:e.enableHeartbeat)&&void 0!==t?t:this.heartbeatIsEnabled){const e=null!==(r=null===(s=this.connectOptions)||void 0===s?void 0:s.heartbeatInterval)&&void 0!==r?r:this.heartbeatInterval;this.heartbeatTicker=new y(e),this.heartbeatTicker.start((()=>{this.websocket&&this.isConnected&&(n(),this.heartbeatLoggingIsEnabled&&_.v.debug(`Sending a heartbeat ping every ${e} ms`))}))}}reconnect(){var e,t,s,i,r;const n=!(null===(e=this.connectOptions)||void 0===e?void 0:e.alwaysOn)&&!1===(null===(t=this.connectOptions)||void 0===t?void 0:t.enableHeartbeat);if(this.isReconnecting||n)return;this.status.isReconnecting=!0;const o=(null===(s=this.reconnectOptions)||void 0===s?void 0:s.reconnectStrategy)===M.Exponential?b:N,a=this.isConnectedSubject.asObservable().pipe((0,S.n)((e=>e?(0,u.of)(-1):((e,t)=>new l.c((s=>{let i,r=0;return function n(){s.next(r),clearTimeout(i),i=setTimeout(n,t(e,r)),r+=1}(),()=>{clearTimeout(i)}})))(this.reconnectOptions,o).pipe((0,v.Z)((e=>{var t,s,i;let r;return r=(null===(t=this.connectOptions)||void 0===t?void 0:t.alwaysOn)?e+1:null!==(i=null===(s=this.reconnectOptions)||void 0===s?void 0:s.reconnectAttempts)&&void 0!==i?i:10,e<r?(0,u.of)(e):(this.status.reconnectionLimitReached=!0,(0,E.$)((()=>new Error(`Max reconnect attempts ${r} reached.`))))}))))),(0,R.v)((()=>this.websocket&&!this.isConnected)));a.subscribe(null!==(r=null===(i=this.reconnectOptions)||void 0===i?void 0:i.reconnectObserver)&&void 0!==r?r:{next:e=>{_.v.debug(`Attempt no. ${e+1} to reconnect`),this.websocket.complete(),this.connect(this.url,this.connectOptions,this.reconnectOptions)},error:e=>{var t;_.v.debug(e),null===(t=this.socketSubscription)||void 0===t||t.unsubscribe(),this.status.isReconnecting=!1},complete:()=>{_.v.info(this.isConnected?"Reconnected":"Disconnected"),this.status.isReconnecting=!1,this.wsMessageHandlers.forEach((e=>{e.isSubscription&&this.websocket.next(e.sentMessage)}))}})}reset(){this.status.isConnected=!1,this.status.isConfigured=!1,this.websocket&&this.websocket.complete(),this.websocket=null,this.cleanMessages()}cleanMessages(){this.wsMessages&&this.wsMessages.complete(),this.wsMessages=new P,this.wsMessageHandlers=new Map}send(e,t=!0){if(!this.isConnected)return Promise.reject(new Error("WebSocket connection is closed"));const s=`Sending Message for SourceRef: ${e.SOURCE_REF} | MessageType: ${e.MESSAGE_TYPE}`;return this.logMessageTypeFlow(e.MESSAGE_TYPE,_.v.info,s),new Promise(((s,i)=>{const r=e=>{s(e)},n=e=>{i(e)};t&&this.setMessageHandler(e,r,n),this.websocket.next(e)}))}sendForStream(e,t,s,i){if(!this.isConnected)return(0,E.$)((()=>new Error("WebSocket connection is closed")));const r=`Sending Message (stream) for SourceRef: ${e.SOURCE_REF} | MessageType: ${e.MESSAGE_TYPE}`;return this.logMessageTypeFlow(e.MESSAGE_TYPE,_.v.info,r),this.setMessageHandler(e,t,s,!0),c.DOM.queueUpdate((()=>this.websocket.next(e))),new l.c((t=>{const s=new h.B;return this.wsMessages.pipe((0,m.p)((t=>t.SOURCE_REF===e.SOURCE_REF)),(0,g.Q)(s)).subscribe({next:e=>{t.next(e)},error:e=>{t.error(e)},complete:()=>{t.complete()}}),()=>{s.complete(),this.sendDataLogoff(e.SOURCE_REF),this.removeMessageHandler(e.SOURCE_REF),i&&i()}}))}sendForStreamWithoutTeardown(e,t,s){if(!this.isConnected)return(0,E.$)((()=>new Error("WebSocket connection is closed")));const i=`Sending Message (stream) for SourceRef: ${e.SOURCE_REF} | MessageType: ${e.MESSAGE_TYPE}`;return this.logMessageTypeFlow(e.MESSAGE_TYPE,_.v.info,i),this.setMessageHandler(e,t,s,!0),this.websocket.next(e),this.wsMessages.pipe((0,m.p)((t=>t.SOURCE_REF===e.SOURCE_REF)))}setMessageHandler(e,t,s,i=!1){const r=`Setting Message Handler for SourceRef: ${e.SOURCE_REF} | MessageType: ${e.MESSAGE_TYPE}`;this.logMessageTypeFlow(e.MESSAGE_TYPE,_.v.debug,r),this.wsMessageHandlers.set(e.SOURCE_REF,new D(e,t,s,i))}sendDataLogoff(e){this.send(this.messageBuilder.createDataLogoffMessage(e),!1)}removeMessageHandler(e){this.wsMessageHandlers.delete(e)}getMessageHandler(e,t){const s=`Getting Message Handler for SourceRef: ${e} | MessageType: ${t}`;return this.logMessageTypeFlow(t,_.v.debug,s),this.wsMessageHandlers.get(e)}logMessageTypeFlow(e,t,s){switch(e){case f.Gp.DATA_LOGOFF:t(s);break;case f.Go.HEARTBEAT_PING:case f.Go.HEARTBEAT_PONG:this.heartbeatLoggingIsEnabled&&t(s);break;default:this.messageLoggingIsEnabled&&t(s)}}};w.REAUTH_ACTION_LOCK_KEY="reauthActionLock",(0,i.Cg)([c.observable],w.prototype,"websocket",void 0),(0,i.Cg)([c.observable],w.prototype,"wsMessages",void 0),(0,i.Cg)([c.observable],w.prototype,"wsMessageHandlers",void 0),(0,i.Cg)([A.l],w.prototype,"http",void 0),(0,i.Cg)([c.observable],w.prototype,"heartbeatIsEnabled",void 0),w=L=(0,i.Cg)([(0,i.Qj)(0,f.lT),(0,i.Qj)(1,T.N),(0,i.Qj)(2,o.b_),(0,i.Qj)(3,a.k),(0,i.Qj)(4,U.S5),(0,i.Qj)(5,r.KJ),(0,i.Qj)(6,O.R)],w);const G=d.DI.createInterface((e=>e.singleton(w)));function k(){return d.DI.getOrCreateDOMContainer().get(G)}},5709:(e,t,s)=>{s.d(t,{S5:()=>d});var i=s(55823),r=s(92277),n=s(33681),o=s(84674),a=s(97156);class c{constructor(){this.isConfigured=!1,this.isConnecting=!1,this.isConnected=!1,this.isReconnecting=!1,this.reconnectionLimitReached=!1,this.isConnectedSubject=new a.t(this.isConnected)}get hasValidSession(){return this.user.isAuthenticated}get isDisconnected(){return!this.isConnected}get isDisconnectedByServer(){return void 0!==this.closedClean&&!this.closedClean}isConnectedChanged(){var e;this.isConnected&&this.resetClosedState(),this.isConnecting=!1,this.isReconnecting=!1,null===(e=this.isConnectedSubject)||void 0===e||e.next(this.isConnected)}isReconnectingChanged(){this.isReconnecting&&(this.reconnectionLimitReached=!1)}resetClosedState(){this.closedCode=void 0,this.closedReason=void 0,this.closedClean=void 0}serialize(){return{isConfigured:this.isConfigured,isConnecting:this.isConnecting,isConnected:this.isConnected,isDisconnected:this.isDisconnected,isDisconnectedByServer:this.isDisconnectedByServer,isReconnecting:this.isReconnecting,reconnectionLimitReached:this.reconnectionLimitReached,hasValidSession:this.hasValidSession,closedCode:this.closedCode,closedReason:this.closedReason,closedClean:this.closedClean}}onClose(e){this.isConnected=!1,this.closedCode=e.code,this.closedReason=e.reason,this.closedClean=e.wasClean}}(0,i.Cg)([n.observable],c.prototype,"isConfigured",void 0),(0,i.Cg)([n.observable],c.prototype,"isConnecting",void 0),(0,i.Cg)([n.observable],c.prototype,"isConnected",void 0),(0,i.Cg)([n.observable],c.prototype,"isReconnecting",void 0),(0,i.Cg)([n.observable],c.prototype,"reconnectionLimitReached",void 0),(0,i.Cg)([n.observable],c.prototype,"closedCode",void 0),(0,i.Cg)([n.observable],c.prototype,"closedReason",void 0),(0,i.Cg)([n.observable],c.prototype,"closedClean",void 0),(0,i.Cg)([r.KJ],c.prototype,"user",void 0);const d=o.DI.createInterface((e=>e.singleton(c)))},34193:(e,t,s)=>{s.d(t,{d:()=>r});var i=s(17465);function r(e,t="ROW_REF"){const s=e=>{const s=Object.assign(Object.assign({},e),{[t]:e.DETAILS[t]});return delete s.DETAILS,s},r=[],n=[],o=[];for(const t of e.ROW)if(t.DETAILS)switch(t.DETAILS.OPERATION){case"INSERT":r.push(s(t));break;case"MODIFY":o.push(s(t));break;case"DELETE":n.push(s(t));break;default:i.v.error(`Unsupported operation type: '${t.DETAILS.OPERATION}'`)}return{inserts:r,deletes:n,updates:o,SOURCE_REF:e.SOURCE_REF}}},6884:(e,t,s)=>{s.d(t,{aB:()=>a,OD:()=>n});var i=s(84674);var r=s(34193);class n{}n.MAX_ROWS_250=250,n.MAX_VIEW_1000=1e3,n.REQ_REP_POLLING_INTERVAL_MS=1e4,n.DATASERVER_ROW_ID="ROW_REF",n.REQUEST_SERVER_ROW_ID="RECORD_ID",n.DEFAULT_PAGINATION_PAGE_SIZE=25;const o={options:{criteria:"",isSnapshot:!1,maxRows:n.MAX_ROWS_250,maxView:n.MAX_VIEW_1000,pollingInterval:n.REQ_REP_POLLING_INTERVAL_MS,movingView:!1,orderBy:"",resourceName:"",reverse:!1,pollTriggerEvents:[]},criteriaToFields:function(e){const t=e.split("&&").map((e=>e.trim())),s={};return t.forEach((e=>{if(e.startsWith("Expr"))switch(e.match(/Expr\.(\w+)\(/)[1]){case"dateIsToday":{const t=/Expr\.dateIsToday\((\w+)\)/,[,i]=e.match(t),r=new Date;s[`${i}_FROM`]=`${r.toISOString().replace(/-/g,"").split("T")[0]}-00:00`,r.setDate(r.getDate()+1),s[`${i}_TO`]=`${r.toISOString().replace(/-/g,"").split("T")[0]}-00:00`}break;case"dateTimeIsGreaterEqual":{const t=/Expr\.dateTimeIsGreaterEqual\((\w+), ?['"](.+)['"]\)/,[,i,r]=e.match(t);s[`${i}_FROM`]=r}break;case"dateTimeIsLessEqual":{const t=/Expr\.dateTimeIsLessEqual\((\w+), ?['"](.+)['"]\)/,[,i,r]=e.match(t);s[`${i}_TO`]=r}break;case"dateIsGreaterEqual":{const t=/Expr\.dateIsGreaterEqual\((\w+), ?['"](.+)['"]\)/,[,i,r]=e.match(t);s[`${i}_FROM`]=r}break;case"dateIsLessEqual":{const t=/Expr\.dateIsLessEqual\((\w+), ?['"](.+)['"]\)/,[,i,r]=e.match(t);s[`${i}_TO`]=r}break;case"containsIgnoreCase":{const t=/Expr\.containsIgnoreCase\((\w+), ?['"](.+)['"]\)/,[,i,r]=e.match(t);s[i]=`*${r}*`}}else{const t=e.substr(0,e.indexOf("=")).trim().replace(/["']/g,""),i=e.substr(e.lastIndexOf("=")+1,e.length).trim().replace(/["']/g,"");s[t]=i}})),s},dataServerResultFilter:r.d},a=i.DI.createInterface((e=>e.instance(o)))},9033:(e,t,s)=>{s.d(t,{yW:()=>M});var i=s(55823),r=s(33681),n=s(84674),o=s(50049),a=s(8790),c=s(1762),d=s(51046),h=s(66640),l=s(84190),u=s(65052),E=s(40113),g=s(26347),S=s(24669),v=s(48707),R=s(17465),m=s(79780);const p={throwWhenUnavailable:!0,throwWhenUnknown:!1},T=n.DI.createInterface((e=>e.instance(p))),_=(0,m.Es)("genesis-resources");let O=class{constructor(e,t){this.connect=e,this.config=t}isValidResource(e){return(0,i.sH)(this,void 0,void 0,(function*(){if(!(e=null==e?void 0:e.trim()))return!1;yield this.fetchResources();return!!this.resources.find((t=>t.RESOURCE_NAME===e))}))}getResourceTypeFor(e){return(0,i.sH)(this,void 0,void 0,(function*(){yield this.fetchResources();const t=this.resources.find((t=>t.RESOURCE_NAME===e));if(t)return t.RESOURCE_TYPE;const s=`${e} resource does not exist.`;if(R.v.error(s),this.config.throwWhenUnknown)throw new Error(s)}))}getAllResources(){return(0,i.sH)(this,void 0,void 0,(function*(){return this.resources||(yield this.fetchResources()),this.resources}))}destroy(){this.resources=void 0,this.resourcesPromise=void 0}fetchResources(){return(0,i.sH)(this,void 0,void 0,(function*(){var e;if(this.resources)return Promise.resolve();if(this.resourcesPromise)yield this.resourcesPromise;else{this.resourcesPromise=this.connect.getAvailableResources();const t=yield this.resourcesPromise;if(this.resources=null==t?void 0:t.RESOURCES,!(null===(e=this.resources)||void 0===e?void 0:e.length)){const e="Genesis resources unavailable.";if(R.v.error(e),this.config.throwWhenUnavailable)throw new Error(e)}this.postLoadedMessage(),this.resourcesPromise=void 0}}))}postLoadedMessage(){const e=n.DI.getOrCreateDOMContainer().get(_);e.postMessage("resources-loaded",this.resources),e.close()}};O=(0,i.Cg)([(0,i.Qj)(0,g.dm),(0,i.Qj)(1,T)],O);const A=n.DI.createInterface((e=>e.singleton(O)));var f=s(6884),I=s(39087);let C=class{get initialized(){var e;return!!(null===(e=this.status)||void 0===e?void 0:e.isInitialized)}constructor(e,t,s,i,r){this.connect=e,this.auth=t,this.resources=s,this.config=i,this.connectEvents=r,this.fetchMetadataRequired=!0,this.startStreamRequired=!0,this.originalFieldDef=[],this.fieldMetadata=[],this.requestFields=[],this.customRequestFields=[],this.availableIndexes=[],this.readOnly=!0,this._allParams=null,this.pollTrigger$=new o.B}triggerPoll(){this.pollTrigger$.next()}validResourceName(e){return R.v.deprecated("Datasource.validResourceName","Use `GenesisResources.isValidResource` instead."),!!e&&!!e.trim().length}init(e){return(0,i.sH)(this,arguments,void 0,(function*(e,t=this.fetchMetadataRequired,s=this.startStreamRequired){this.fetchMetadataRequired=t,this.options=Object.assign(Object.assign({},this.config.options),e),this.invalidateCache();const i=this.options.resourceName;if(!(this.connect.isConnected||(yield this.connect.connect())))return R.v.error(`Unable to connect to ${this.connect.host} to get ${i} datasource`),this.reportStatus(),!1;return(yield this.resources.isValidResource(i))?(this.resourceType=yield this.resources.getResourceTypeFor(i),this.resourceType?(this.fetchMetadataRequired&&(yield this.fetchAndApplyMetadata(this.options.resourceName),this._allParams=null),R.v.debug(`Initializing ${i} datasource from ${this.connect.host}`),!this.options.isSnapshot&&s&&(this.stream=yield this.createStream()),R.v.debug(`${i} datasource initialization ${this.initialized?"was successful.":"has failed."}`),this.reportStatus(),this.initialized):(R.v.error(`Unable to get the resource type for ${i} datasource from ${this.connect.host}`),this.reportStatus(),!1)):(R.v.error(`${i} datasource does not exist on ${this.connect.host}`),this.reportStatus(),!1)}))}startStream(){return(0,i.sH)(this,void 0,void 0,(function*(){this.options.isSnapshot||void 0!==this.stream||(this.stream=yield this.createStream())}))}destroy(){var e,t;R.v.debug("Datasource.destroy",null===(e=this.options)||void 0===e?void 0:e.resourceName),this.commitResponseUnsubscribe&&(this.commitResponseUnsubscribe(),this.commitResponseUnsubscribe=void 0),null===(t=this.pollTrigger$)||void 0===t||t.complete(),this.status=void 0,this.fetchMetadataRequired=void 0,this.options={},this.resourceType=void 0,this.availableIndexes=[],this.originalFieldDef=[],this.fieldMetadata=[],this.requestFields=[],this.stream=void 0}get allResourceParams(){var e;if(this._allParams)return this._allParams;let t;if(this.options.orderBy)if((null===(e=this.availableIndexes)||void 0===e?void 0:e.findIndex((e=>e.NAME===this.options.orderBy)))>-1)t=this.options.orderBy;else{const e=this.availableIndexes.map((e=>e.NAME));R.v.warn("Specified [orderBy] index is not valid and will not be used. See https://learn.genesis.global/docs/database/data-types/index-entities/ - Available indexes:",e)}return this._allParams={CRITERIA_MATCH:this.options.criteria,MAX_ROWS:this.options.maxRows,VIEW_NUMBER:this.options.viewNumber,FIELDS:this.options.fields,MAX_VIEW:this.options.maxView,MOVING_VIEW:this.options.movingView,ORDER_BY:t,REVERSE:this.options.reverse,DISABLE_POLLING:this.options.disablePolling,POLLING_INTERVAL:this.options.pollingInterval,REQUEST:this.options.request},R.v.debug("Getting configured params:",this._allParams),this._allParams}get dataserverOnlyParams(){return{CRITERIA_MATCH:this.allResourceParams.CRITERIA_MATCH,MAX_ROWS:this.allResourceParams.MAX_ROWS,VIEW_NUMBER:this.allResourceParams.VIEW_NUMBER,FIELDS:this.allResourceParams.FIELDS,MAX_VIEW:this.allResourceParams.MAX_VIEW,MOVING_VIEW:this.allResourceParams.MOVING_VIEW,ORDER_BY:this.allResourceParams.ORDER_BY,REVERSE:this.allResourceParams.REVERSE}}get requestOnlyParams(){var e;const t=this.allResourceParams,{REQUEST:s}=t,r=(0,i.Tt)(t,["REQUEST"]),n={DETAILS:{CRITERIA_MATCH:this.options.requestAutoSetup?void 0:r.CRITERIA_MATCH,MAX_ROWS:r.MAX_ROWS,VIEW_NUMBER:r.VIEW_NUMBER},REQUEST:s};return n.REQUEST||(this.options.requestAutoSetup?n.REQUEST=Object.assign(Object.assign({},Object.fromEntries(this.requestFields.map((e=>[e.NAME,"*"])))),(null===(e=null==this?void 0:this.options)||void 0===e?void 0:e.criteria)?this.config.criteriaToFields(this.options.criteria):{}):n.REQUEST={}),n}snapshot(e){return(0,i.sH)(this,void 0,void 0,(function*(){switch(R.v.debug(`Requesting snapshot for ${this.options.resourceName} (${this.resourceType}).`),this.resourceType){case I.v.DATASERVER:return this.connect.snapshot(this.options.resourceName,Object.assign(Object.assign({},this.dataserverOnlyParams),e));case I.v.REQUEST_SERVER:return this.connect.request(this.options.resourceName,Object.assign(Object.assign({},this.requestOnlyParams),e));default:throw new Error(`Snapshot not supported for selected resource type: ${this.resourceType}`)}}))}snapshotFiltered(){return(0,i.sH)(this,arguments,void 0,(function*(e="ROW_REF"){const t=yield this.snapshot();return Array.isArray(t)?t:t.REPLY?t.REPLY:t.ROW?this.config.dataServerResultFilter(t,e).inserts:void 0}))}createStream(){return(0,i.sH)(this,void 0,void 0,(function*(){if(![I.v.DATASERVER,I.v.REQUEST_SERVER].includes(this.resourceType))throw new Error(`Streaming not supported for selected resource type: ${this.resourceType}`);return this.resourceType===I.v.DATASERVER?this.createDataserverStream():(R.v.debug(`Creating fake stream by polling ${this.options.resourceName} REQUEST_SERVER`),this.createReqRepStream())}))}createDataserverStream(){return(0,i.sH)(this,void 0,void 0,(function*(){return this.connect.stream(this.options.resourceName,(e=>{}),(e=>R.v.error(e)),this.dataserverOnlyParams)}))}createReqRepStream(){this.commitResponseUnsubscribe=this.connectEvents.addCommitResponseListener((e=>{var t;const{eventName:s,response:i}=e.detail;this.options.pollTriggerEvents&&this.options.pollTriggerEvents.includes(s)&&(null===(t=i.MESSAGE_TYPE)||void 0===t?void 0:t.endsWith("_ACK"))&&(R.v.debug(`Received commit response for ${s}, triggering poll.`),this.triggerPoll())}));const e=this.allResourceParams.DISABLE_POLLING?void 0:this.allResourceParams.POLLING_INTERVAL,t=()=>(0,a.z)([this.connect.isConnected$,this.auth.isLoggedIn$]).pipe((0,h.v)((()=>this.connect.isConnected&&this.auth.isLoggedIn)),(0,l.n)((()=>(0,c.H)(this.snapshot()))));return e?this.pollTrigger$.pipe((0,u.Z)(0),(0,l.n)((()=>(0,d.O)(0,e).pipe((0,l.n)(t))))):this.pollTrigger$.pipe((0,u.Z)(0),(0,l.n)(t))}fetchAndApplyMetadata(e){return(0,i.sH)(this,void 0,void 0,(function*(){var t,s;try{R.v.debug(`Requesting metadata for ${this.options.resourceName} Datasource`);const e=yield this.connect.getMetadata(this.options.resourceName);e&&(this.availableIndexes=null!==(t=e.INDEXES)&&void 0!==t?t:[],this.originalFieldDef=(0,v.a)(e),this.fieldMetadata=(0,v.X)(this.originalFieldDef),this.requestFields=e.REQUEST_FIELD||[],this.customRequestFields=e.FIELD||[],this.fetchMetadataRequired=!1),this.status=this.normaliseStatus({isInitialized:!0,metadataRequired:!0,hasMetadata:(null===(s=this.fieldMetadata)||void 0===s?void 0:s.length)>0})}catch(t){R.v.error(`Metadata Fetch failed for ${e}:`,t),this.status=this.normaliseStatus({isInitialized:!1,metadataRequired:!0,hasMetadata:!1})}}))}reportStatus(e={}){var t;const s=null!==(t=this.config.eventEmitter)&&void 0!==t?t:document;this.status=this.normaliseStatus(e),R.v.debug(`Dispatching '${I.w}'`,this.status),null==s||s.dispatchEvent(new CustomEvent(I.w,{detail:this.status,bubbles:s!==document,composed:!0}))}normaliseStatus(e){var t,s,i,r,n;const o=null!==(t=e.isInitialized)&&void 0!==t?t:this.initialized,a=null!==(s=e.metadataRequired)&&void 0!==s?s:this.fetchMetadataRequired,c=null!==(i=e.hasMetadata)&&void 0!==i?i:(null===(r=this.fieldMetadata)||void 0===r?void 0:r.length)>0;return{name:null===(n=this.options)||void 0===n?void 0:n.resourceName,type:this.resourceType,isInitialized:o,metadataRequired:a,hasMetadata:c}}invalidateCache(){this._allParams=null}};(0,i.Cg)([r.observable],C.prototype,"status",void 0),(0,i.Cg)([r.observable],C.prototype,"fetchMetadataRequired",void 0),(0,i.Cg)([r.observable],C.prototype,"startStreamRequired",void 0),(0,i.Cg)([r.observable],C.prototype,"originalFieldDef",void 0),(0,i.Cg)([r.observable],C.prototype,"fieldMetadata",void 0),(0,i.Cg)([r.observable],C.prototype,"requestFields",void 0),(0,i.Cg)([r.observable],C.prototype,"customRequestFields",void 0),(0,i.Cg)([r.observable],C.prototype,"availableIndexes",void 0),(0,i.Cg)([r.observable],C.prototype,"readOnly",void 0),(0,i.Cg)([r.observable],C.prototype,"stream",void 0),C=(0,i.Cg)([(0,i.Qj)(0,g.dm),(0,i.Qj)(1,E.N),(0,i.Qj)(2,A),(0,i.Qj)(3,f.aB),(0,i.Qj)(4,S.a4)],C);const M=n.DI.createInterface((e=>e.transient(C)))},40370:(e,t,s)=>{s.d(t,{C:()=>a});var i=s(55823),r=s(33681),n=s(17465),o=s(39087);const a=e=>{class t extends e{constructor(){super(),this.hasOwnProperty("onDatasourceStatusChanged")||(this.onDatasourceStatusChanged=e=>{var t;this.resourceName||n.v.warn("Target classes must have a resourceName property to use the DatasourceEventHandler mixin.");const s=e.detail;if(s.name===this.resourceName){const e=null!==(t=this.datasourceStatus)&&void 0!==t?t:{isInitialized:!1,hasMetadata:!1};(e.isInitialized!==s.isInitialized||s.metadataRequired&&e.hasMetadata!==s.hasMetadata)&&(this.datasourceStatus=s)}})}datasourceStatusChanged(e,t){n.v.debug("Target classes should override the datasourceStatusChanged method of the DatasourceEventHandler mixin to respond to changes in the target datasource.")}connectedCallback(){super.connectedCallback(),document.addEventListener(o.w,this.onDatasourceStatusChanged,{passive:!0,capture:!0})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(o.w,this.onDatasourceStatusChanged,{capture:!0})}}return(0,i.Cg)([r.observable],t.prototype,"datasourceStatus",void 0),t}},39087:(e,t,s)=>{var i;s.d(t,{v:()=>i,w:()=>r}),function(e){e.DATASERVER="DATASERVER",e.EVENT_HANDLER="EVENT_HANDLER",e.REQUEST_SERVER="REQUEST_SERVER"}(i||(i={}));const r="datasource-status-changed"},96730:(e,t,s)=>{function i(e,t=";"){return e?e.split(t).map((e=>e.trim())).sort(((e,t)=>e.localeCompare(t))).join(t):e}s.d(t,{Q:()=>i})},41119:(e,t,s)=>{var i;s.d(t,{v:()=>r,w:()=>i}),function(e){e.STRING="STRING",e.NUMBER="NUMBER",e.BOOLEAN="BOOLEAN",e.ENUM="ENUM",e.DATE="DATE",e.DATETIME="DATETIME",e.CUSTOM="CUSTOM",e.NANO_TIMESTAMP="NANO_TIMESTAMP"}(i||(i={}));const r={STRING:i.STRING,ENUM:i.ENUM,BOOLEAN:i.BOOLEAN,INT:i.NUMBER,LONG:i.NUMBER,DOUBLE:i.NUMBER,BIGDECIMAL:i.NUMBER,DATE:i.DATE,DATETIME:i.DATETIME,NANO_TIMESTAMP:i.NANO_TIMESTAMP}},48707:(e,t,s)=>{s.d(t,{X:()=>o,a:()=>a});var i=s(39087),r=s(17465),n=s(41119);const o=e=>e?e.map((e=>{const t={name:e.NAME,type:n.v[e.TYPE]||n.w.STRING};if(e.TYPE===n.w.ENUM&&e.VALID_VALUES)try{t.enumOptions=Array.isArray(e.VALID_VALUES)?e.VALID_VALUES:e.VALID_VALUES.split("|")}catch(e){r.v.error(e),t.enumOptions=[]}return t})):null,a=e=>{var t;const s=null==e?void 0:e.TYPE;if(s===i.v.DATASERVER)return e.FIELD||[];if(s===i.v.REQUEST_SERVER)return e.REPLY_FIELD||(null===(t=e.REPLY)||void 0===t?void 0:t.FIELD)||[];throw new Error(`Unsupported resource type: ${s}`)}},98316:(e,t,s)=>{s.d(t,{N:()=>n});var i=s(84674);class r{constructor(){this.storageKeyPrefix="",this.returnUrl=this.getSessionStorageItem("returnUrl")||""}deleteUserFromSessionStorage(){["authToken","refreshToken","sessionId","ssoToken"].forEach((e=>this.removeSessionStorageItem(e))),this.removeLocalStorageItem("refreshToken")}setStorageKeyPrefix(e){this.storageKeyPrefix=`${e.replace(/\s/g,"")}/`}setAuthResult(e){var t;this.setSessionStorageItem("authToken",e.SESSION_AUTH_TOKEN),this.setSessionStorageItem("refreshToken",e.REFRESH_AUTH_TOKEN),this.setSessionStorageItem("username",e.USER_NAME),this.setSessionStorageItem("sessionId",e.SESSION_ID),(null===(t=e.DETAILS)||void 0===t?void 0:t.MFA_CODE)&&this.setSessionStorageItem("mfaToken",e.DETAILS.MFA_CODE)}captureReturnUrl(){const{pathname:e,search:t,hash:s}=location;if(e&&(e.includes("/login")||e.includes("/auth")))return;const i=`${"/"!==e?e:""}`;this.returnUrl=`${i}${t}${s}`,this.setSessionStorageItem("returnUrl",this.returnUrl)}setItem(e,t,s){"local"===s?localStorage.setItem(this.storageKeyPrefix+e,t):sessionStorage.setItem(this.storageKeyPrefix+e,t)}getItem(e,t){return"local"===t?localStorage.getItem(this.storageKeyPrefix+e):sessionStorage.getItem(this.storageKeyPrefix+e)}removeItem(e,t){"local"===t?localStorage.removeItem(this.storageKeyPrefix+e):sessionStorage.removeItem(this.storageKeyPrefix+e)}setLocalStorageItem(e,t){this.setItem(e,t,"local")}setSessionStorageItem(e,t){this.setItem(e,t,"session")}getLocalStorageItem(e){return this.getItem(e,"local")}getSessionStorageItem(e){return this.getItem(e,"session")}removeLocalStorageItem(e){this.removeItem(e,"local")}removeSessionStorageItem(e){this.removeItem(e,"session")}}const n=i.DI.createInterface((e=>e.singleton(r)))},17465:(e,t,s)=>{s.d(t,{v:()=>r});var i=s(22661);const r=(0,i.createLogger)("foundation-comms")},92277:(e,t,s)=>{s.d(t,{KJ:()=>E});var i=s(55823),r=s(17190),n=s(33681),o=s(84674),a=s(79780);const c=(0,s(22661).createLogger)("foundation-user"),d={trackActionExclusions:[],trackPathExclusions:[""],setUser(e,t){if(e.isAuthenticated)throw new Error("User already set. If this is intentional, please call User.unset first.");return c.debug("setUser",t),e.rawProperties=structuredClone(t),e.userKVs=t.userKVs,e.details=t.details,e.permission=t.permission,e.profile=t.profile,e.sourceRef=t.sourceRef,e.userName=t.userName,e.isAuthenticated=!0,e},unsetUser:e=>(c.debug("unsetUser"),e.rawProperties=void 0,e.userKVs=void 0,e.details=void 0,e.permission=void 0,e.profile=void 0,e.sourceRef=void 0,e.userName=void 0,e.isAuthenticated=!1,e)},h=o.DI.createInterface((e=>e.instance(d))),l=(0,a.Es)("genesis-user");class u{constructor(){this.pathHistory=[],this.actionHistory=[],this.isAuthenticated=!1,this.authenticationChangeListeners=(0,r.r)()}set(e){return this.config.setUser(this,e)}unset(){return this.config.unsetUser(this)}get isAnonymous(){return!this.isAuthenticated}isAdmin(){return this.hasProfile("ADMIN")}isBanned(){return this.hasProfile("BANNED")}hasPermission(e){return this.hasKey(this.permission,e)}hasProfile(e){return this.hasKey(this.profile,e)}trackPath(){const{pathname:e,search:t,hash:s}=location,i=`${`${"/"!==e?e:""}`}${t}${s}`;if(!this.config.trackPathExclusions.includes(i))return this.pathHistory.push(i),i}clearPaths(){this.pathHistory=[]}lastPath(){const e=this.pathHistory.length;return e>0?this.pathHistory[e-1]:void 0}trackAction(e){this.config.trackActionExclusions.includes(e)||this.actionHistory.push(e)}clearActions(){this.actionHistory=[]}lastAction(){const e=this.actionHistory.length;return e>0?this.actionHistory[e-1]:void 0}clearTrackingHistory(){this.clearPaths(),this.clearActions()}hasKey(e,t){return!!(e&&e.length&&t)&&(Array.isArray(t)||(t=[t]),t.some((t=>e.includes(t))))}addAuthenticationChangeListener(e){var t;return null===(t=this.authenticationChangeListeners)||void 0===t?void 0:t.subscribe(e)}isAuthenticatedChanged(){var e;null===(e=this.authenticationChangeListeners)||void 0===e||e.publish(new CustomEvent("user-authentication-change",{detail:this.isAuthenticated}));const t=o.DI.getOrCreateDOMContainer().get(l);t.postMessage("user-authentication-change",this.isAuthenticated),t.close()}userNameChanged(){n.Observable.notify(this,"username")}get username(){return n.Observable.track(this,"username"),this.userName}permissionChanged(){n.Observable.notify(this,"permissions")}get permissions(){return n.Observable.track(this,"permissions"),this.permission}profileChanged(){n.Observable.notify(this,"profiles")}get profiles(){return n.Observable.track(this,"profiles"),this.profile}hasAdminProfile(){return this.isAdmin()}}(0,i.Cg)([h],u.prototype,"config",void 0),(0,i.Cg)([n.observable],u.prototype,"pathHistory",void 0),(0,i.Cg)([n.observable],u.prototype,"actionHistory",void 0),(0,i.Cg)([n.observable],u.prototype,"isAuthenticated",void 0),(0,i.Cg)([n.observable],u.prototype,"userKVs",void 0),(0,i.Cg)([n.observable],u.prototype,"details",void 0),(0,i.Cg)([n.observable],u.prototype,"permission",void 0),(0,i.Cg)([n.observable],u.prototype,"profile",void 0),(0,i.Cg)([n.observable],u.prototype,"sourceRef",void 0),(0,i.Cg)([n.observable],u.prototype,"userName",void 0),(0,i.Cg)([n.observable],u.prototype,"rawProperties",void 0);const E=o.DI.createInterface((e=>e.singleton(u)))},68424:(e,t,s)=>{s.d(t,{J:()=>n});var i=s(28745);function r(e){const t=[],s=new Set;return function e(i){const r=Array.from(i.querySelectorAll("*"));t.push(...r),r.forEach((t=>{t.shadowRoot&&!s.has(t.shadowRoot)&&(s.add(t.shadowRoot),e(t.shadowRoot))}))}(e),t}function n(e,t){let s=e;for(;s;){const e=s.tagName.toLowerCase();if(e.endsWith("-design-system-provider")){const t=e.split("-design-system-provider")[0];if(t)return i.v.debug(`Found provider by ancestor search: ${e}, prefix: ${t}`),t}s=s.parentElement?s.parentElement:s.getRootNode&&s.getRootNode()instanceof ShadowRoot?s.getRootNode().host:null}const n=document.querySelectorAll('[class*="-design-system-provider"],[id*="-design-system-provider"]'),o=Array.from(n),a=r(document).filter((e=>{var t;const s=null===(t=e.tagName)||void 0===t?void 0:t.toLowerCase();return(null==s?void 0:s.endsWith("-design-system-provider"))||!1}));if(o.push(...a),o.length>0){const e=o[0].tagName.toLowerCase(),t=e.split("-design-system-provider")[0];if(t)return i.v.debug(`Found provider by document search: ${e}, prefix: ${t}`),t}return i.v.debug(`No provider found. Falling back to ${t}.`),t}},40729:(e,t,s)=>{s.d(t,{O:()=>d});var i=s(33681);const r=new Map([["FAST-TEXT-AREA","input"],["FAST-TEXT-FIELD","input"],["FOUNDATION-TEXT-AREA","input"],["FOUNDATION-TEXT-FIELD","input"],["INPUT","input"],["ZERO-TEXT-FIELD","input"]]);function n(e){this.keyAttr||(this.target[this.targetName]=e)}function o(e,t){this.keyAttr&&(this.updateTarget=n),this.originalBind.call(this,e,t),this.target.addEventListener(this.changeEvent,this.changeHandler)}function a(){this.originalUnbind.call(this),this.target.removeEventListener(this.changeEvent,this.changeHandler)}class c extends i.HTMLBindingDirective{constructor(e,t,s,i){super(e),this.keyAttr=i,this.conversionType=t,this.eventName=s}createBehavior(e){const t=super.createBehavior(e);return t.originalBind=t.bind,t.originalUnbind=t.unbind,t.keyAttr=this.keyAttr,t.bind=o,t.unbind=a,t.changeEvent=function(e,t){var s;const i=e.tagName;return"default"===t?null!==(s=r.get(i))&&void 0!==s?s:"change":t}(e,this.eventName),t.changeHandler=()=>{const e="boolean"===this.conversionType?t.target.checked:t.target.value;if(this.keyAttr){const s=t.bindingObserver.last,i=t.target[this.keyAttr];s.propertySource[s.propertyName][i]=this.convert(e)}else{const s=t.bindingObserver.last;s.propertySource[s.propertyName]=this.convert(e)}},t}convert(e){if(null==e)return e;switch(this.conversionType){case"time":const t=new Date(e).getTime();return isNaN(t)?void 0:t;case"number":return e.length?Number(e):void 0;case"string":return String(e);case"boolean":return Boolean(e);default:return e}}}function d(e,t="string",s="default",i){return new c(e,t,s,i)}},84686:(e,t,s)=>{s.d(t,{Be:()=>S,H6:()=>O,OB:()=>r,PF:()=>n,aW:()=>E,vN:()=>a});let i="webpack";try{i="webpack"}catch(e){}let r="/";try{r="auto".replace(/\/$/,"")}catch(e){}let n,o="gwf";try{"undefined"!=typeof SOCKET_EXT&&(o=SOCKET_EXT)}catch(e){}try{n=FORCE_HTTP}catch(e){}const a=`${location.protocol.replace("http","ws")}//${location.host}${r}/${o}/`;"true"===n?location.protocol:location.protocol.replace("http","ws");let c,d,h,l,u=null;try{"undefined"!=typeof API_HOST&&(u=API_HOST)}catch(e){}try{c=""}catch(e){}try{d=DEFAULT_ORGANISATION}catch(e){}try{h=DEFAULT_PASSWORD}catch(e){}try{l=DEFAULT_USER}catch(e){}let E="gwf/event-login-auth";"undefined"!=typeof GENX_LOGIN_URL&&(E=GENX_LOGIN_URL);let g="gwf/event-login-auth";"undefined"!=typeof GENX_LOGIN_REFRESH_URL&&(g=GENX_LOGIN_REFRESH_URL);let S="gwf/event-login-details";"undefined"!=typeof GENX_LOGIN_DETAILS_URL&&(S=GENX_LOGIN_DETAILS_URL);let v="gwf/event-logout";"undefined"!=typeof GENX_LOGOUT_URL&&(v=GENX_LOGOUT_URL);let R="gwf/event-change-user-password";"undefined"!=typeof GENX_CHANGE_PASSWORD_URL&&(R=GENX_CHANGE_PASSWORD_URL);let m="gwf/event-self-service-password-reset";"undefined"!=typeof GENX_FORGOT_PASSWORD_URL&&(m=GENX_FORGOT_PASSWORD_URL);let p="gwf/event-password-reset-action";"undefined"!=typeof GENX_RESET_PASSWORD_URL&&(p=GENX_RESET_PASSWORD_URL);let T="gwf/sso/list";"undefined"!=typeof GENX_SSO_LIST_URL&&(T=GENX_SSO_LIST_URL);let _="gwf/{type}/login?idp={id}";"undefined"!=typeof GENX_SSO_LOGIN_URL&&(_=GENX_SSO_LOGIN_URL);let O="default";"undefined"!=typeof GENX_ENVIRONMENT_LEVEL&&(O=GENX_ENVIRONMENT_LEVEL)},12066:(e,t,s)=>{s.d(t,{CL:()=>r,Ey:()=>a,zT:()=>o});const i=10;function r(e){return!e||isNaN(e)?null:new Date(e).toISOString().slice(0,i)}const n=19;function o(e){return!e||isNaN(e)?null:new Date(e).toISOString().slice(0,n).replace("T"," ")}function a(e,t){return t?o(e):r(e)}},17190:(e,t,s)=>{s.d(t,{j:()=>r,r:()=>i});const i=()=>{let e=[];return{subscribe:t=>(e.push(t),()=>e=e.filter((e=>e!==t))),publish(t){e.forEach((e=>e(t)))}}},r=(e,t)=>{const s={root:document.documentElement};new IntersectionObserver((e=>{e.forEach((e=>{t(e.intersectionRatio>0)}))}),s).observe(e)}},49229:(e,t,s)=>{s.d(t,{b_:()=>h});var i=s(55823),r=s(84674),n=s(61455);const o=r.DI.createInterface();function a(e){return Number.isSafeInteger(+e)?Number(e):(0,n.Fq)(e)?BigInt.asIntN(64,e):parseFloat(e)}const c={parse:e=>(0,n.qg)(e,null,a),stringify:e=>(0,n.As)(e)};let d=class{constructor(e=c){this.config=e,this.serialize=e=>this.config.stringify(e)}deserialize(e){return e?"string"==typeof e?this.config.parse(e):e&&e.ok?e.text().then((e=>this.config.parse(e))):(e&&e.data&&(e=e.data),this.config.parse(e)):Promise.resolve({})}};d=(0,i.Cg)([(0,i.Qj)(0,(0,r.optional)(o))],d);const h=r.DI.createInterface((e=>e.singleton(d)))},32808:(e,t,s)=>{s.d(t,{k:()=>c});var i=s(55823),r=s(84674),n=s(31261),o=s(28745);class a{constructor(){}createId(e=!1){const t=(0,n.A)();return e&&o.v.debug(`UUID.createID ${t}`),t}createRemoteId(){return(0,i.sH)(this,arguments,void 0,(function*(e=!1){const t=(0,n.A)();return e&&o.v.debug(`UUID.createRemoteID ${t}`),t}))}}const c=r.DI.createInterface((e=>e.singleton(a)))}}]);
1
+ "use strict";(self.webpackChunk_genesislcap_design_system_configurator=self.webpackChunk_genesislcap_design_system_configurator||[]).push([[347],{79780:(e,t,s)=>{s.d(t,{Es:()=>n});var i=s(84674);class r extends BroadcastChannel{constructor(){super(...arguments),this.postMessage=(...e)=>{const[t,s]=e;super.postMessage({type:t,detail:s})},this.isMessageType=(e,t)=>{var s;return(null===(s=t.data)||void 0===s?void 0:s.type)===e}}}const n=e=>{class t extends r{constructor(){super(e)}}return i.DI.createInterface((e=>e.transient(t)))}},40113:(e,t,s)=>{s.d(t,{N:()=>L});var i=s(55823),r=s(92277),n=s(33681),o=s(84674),a=s(97156),c=s(26347),d=s(21281),h=s(10447),l=s(56653),u=s(98316),E=s(17465);const g=o.DI.createInterface();function S(){return(null===navigator||void 0===navigator?void 0:navigator.credentials)?"PasswordCredential"in window||(E.v.warn("PasswordCredential not available in this browser."),!1):(E.v.warn("CredentialsContainer not available in this browser."),!1)}const v=":";function R(e="",t=v,s){return e.split(t,s).map((e=>e.trim())).filter((e=>""!==e))}function m(e,t=v){const s="string"==typeof e&&e.trim();return!!s&&s.includes(t)}function p(e,t=v){return"string"==typeof e&&e.trim()?(e.match(new RegExp(t,"g"))||[]).length:0}function T(e,t=v){for(const s of e)if(m(s,t))return s;return e.find((e=>"string"==typeof e&&!!e.trim()))}function _(e,t,s){const i="string"==typeof e&&e.trim();return!i||s&&!i.includes(s)||p(i)>1?s&&t&&s!==t?`${t}:${s}`:t||s:i}function O(e="credential"){E.v.warn(`Unable to migrate legacy ${e} to latest format. Please remove from your browser.`)}const A={password:!0,mediation:"optional"},f={cookie:{path:"/",name:"credentials",expires:7300,storePasswords:!1}};let I=class{constructor(e,t=f){this.session=e,this.config=t}createBasicCredentials(e){return{type:l.h.BASIC,username:e.username,password:e.password,mfaToken:this.getMFAToken()}}createRefreshCredentials(e){var t,s,i;return{type:l.h.REFRESH,username:null!==(t=null==e?void 0:e.username)&&void 0!==t?t:this.getUsername(),refreshToken:null!==(s=null==e?void 0:e.refreshToken)&&void 0!==s?s:this.getRefreshToken(),mfaToken:null!==(i=null==e?void 0:e.mfaToken)&&void 0!==i?i:this.getMFAToken()}}createSSOCredentials(e){var t;return{type:l.h.SSO,ssoToken:null!==(t=null==e?void 0:e.ssoToken)&&void 0!==t?t:this.getSSOToken()}}validateBasicCredentials(e){return e&&!!e.username&&!!e.password}validateRefreshCredentials(e){return e&&!!e.refreshToken&&!!e.username}validateSSOCredentials(e){return e&&!!e.ssoToken}validateUserCredentialData(e,t){const s=e&&!!e.id&&!!e.name&&!e.name.includes(v)&&p(e.id)<=1;return t?s&&!!e.password:s}normaliseLegacyCredentialData(e,t){if(this.validateUserCredentialData(e,!0))return[e,!0];if(this.validateUserCredentialData(t))return[t,!1];if(e)try{const t=e,[s]=R(t.name||t.id),[i,r]=R(T([t.id,t.name]));return[{id:_(t.id||t.name,s,r),name:s,password:t.password||""},!0]}catch(e){O("PasswordCredential")}if(t)try{const e=t,[s]=R(e.name||e.username||e.organisation),[i,r]=R(T([e.organisation||e.username||e.name]));return[{id:_(e.id||e.username||e.name,s,r),name:s,password:e.password||""},!1]}catch(e){O("cookie")}return[void 0,!1]}storeCredentialsInContainer(e){return(0,i.sH)(this,void 0,void 0,(function*(){if(!S())return;const t=new PasswordCredential(e);return E.v.debug("Storing credentials in CredentialsContainer"),navigator.credentials.store(t)}))}getCredentialsFromContainer(){return(0,i.sH)(this,arguments,void 0,(function*(e=A){if(S())return E.v.debug("Getting credentials from CredentialsContainer"),yield navigator.credentials.get(e)}))}storeCredentialsInCookie(e){const{password:t}=e,s=(0,i.Tt)(e,["password"]),r=this.config.cookie.storePasswords?e:s;return E.v.debug("Storing credentials in cookie"),!!h.A.set(this.config.cookie.name,JSON.stringify(r),{expires:this.config.cookie.expires,domain:location.hostname,path:this.config.cookie.path,secure:!0})}getCredentialsFromCookie(){E.v.debug("Getting credentials from cookie");const e=h.A.get(this.config.cookie.name);return e?JSON.parse(e):void 0}storeCredentials(e){return(0,i.sH)(this,void 0,void 0,(function*(){if(S()){const t=yield this.storeCredentialsInContainer(e);return Promise.resolve(!!t)}return Promise.resolve(this.storeCredentialsInCookie(e))}))}getCredentials(e){return(0,i.sH)(this,void 0,void 0,(function*(){return S()?this.getCredentialsFromContainer(e):Promise.resolve(this.getCredentialsFromCookie())}))}getSSOToken(){return this.session.getSessionStorageItem("ssoToken")}getUsername(){return this.session.getSessionStorageItem("username")||this.session.getLocalStorageItem("username")}getRefreshToken(){return this.session.getSessionStorageItem("refreshToken")||this.session.getLocalStorageItem("refreshToken")}getMFAToken(){return this.session.getSessionStorageItem("mfaToken")}removeCookie(){h.A.remove(this.config.cookie.name,{domain:location.hostname,path:this.config.cookie.path})}removeSSOToken(){this.session.removeSessionStorageItem("ssoToken")}removeUsername(){this.session.removeSessionStorageItem("username"),this.session.removeLocalStorageItem("username")}removeRefreshToken(){this.session.removeSessionStorageItem("refreshToken"),this.session.removeLocalStorageItem("refreshToken")}removeMFAToken(){this.session.removeSessionStorageItem("mfaToken")}removeAll(){this.removeCookie(),this.removeSSOToken(),this.removeUsername(),this.removeRefreshToken(),this.removeMFAToken()}preventSilentAccess(){return S()&&navigator.credentials.preventSilentAccess()}};I=(0,i.Cg)([(0,i.Qj)(0,u.N),(0,i.Qj)(1,(0,o.optional)(g))],I);const C=o.DI.createInterface((e=>e.singleton(I))),M=e=>Array.isArray(e)?e.map((e=>null!=e?e:"")):[],b=e=>{try{if("EVENT_LOGIN_AUTH_ACK"===(null==e?void 0:e.MESSAGE_TYPE)){const{DETAILS:i}=e;return{messageType:e.MESSAGE_TYPE,sourceRef:e.SOURCE_REF,userName:e.USER_NAME,updateQueue:e.UPDATE_QUEUE,zeroMqProxyModeEnabled:e.ZERO_MQ_PROXY_MODE_ENABLED,zeroMqProxyInboundPort:e.ZERO_MQ_PROXY_INBOUND_PORT,zeroMqProxyOutboundPort:e.ZERO_MQ_PROXY_OUTBOUND_PORT,userKVs:e.USER,details:i?{system:(s=i.SYSTEM,s?{date:s.DATE}:null),heartbeatIntervalSecs:i.HEARTBEAT_INTERVAL_SECS,failedLoginAttempts:i.FAILED_LOGIN_ATTEMPTS,rejectedLoginAttempts:i.REJECTED_LOGIN_ATTEMPTS,lastLoginDatetime:i.LAST_LOGIN_DATETIME,daysToPasswordExpiry:i.DAYS_TO_PASSWORD_EXPIRY,product:(t=i.PRODUCT,t?t.map((e=>({name:e.NAME,version:e.VERSION}))):[])}:null,permission:M(e.PERMISSION),profile:M(e.PROFILE)}}throw new Error("No Entity mapping implementation for provided DTO")}catch(e){throw E.v.error(e),e}var t,s};let N=class{loggedUserResultChanged(){var e;null===(e=this.isLoggedInSubject)||void 0===e||e.next(this.isLoggedIn)}get isLoggedIn$(){return this.isLoggedInSubject.asObservable()}get isLoggedIn(){return this.currentUser.isAuthenticated}constructor(e,t,s,i,r){this.session=e,this.connect=t,this.messageBuilder=s,this.credentialManager=i,this.currentUser=r,this.isWorking=!1,this.isLoggedInSubject=new a.t(this.isLoggedIn),this.currentUser.addAuthenticationChangeListener((e=>{var t;null===(t=this.isLoggedInSubject)||void 0===t||t.next(e.detail)}))}login(e){return(0,i.sH)(this,void 0,void 0,(function*(){var t;this.isWorking=!0;try{const s=this.messageBuilder.createLoginMessage(e),i=yield this.connect.send(s);if(!i||i.ERROR||(null===(t=i.DETAILS)||void 0===t?void 0:t.ERROR))throw new l.l(s,i);this.applyAuthResults({authToken:i.SESSION_AUTH_TOKEN,refreshToken:i.REFRESH_AUTH_TOKEN,profiles:i.PROFILE,username:i.USER_NAME,permissions:i.PERMISSION,sessionId:i.SESSION_ID}),this.currentUser.set(b(i)),this.session.setAuthResult(i),E.v.debug("Login Authentication Result:",i)}catch(e){if(E.v.error("Login Authentication Error:",e),!(e instanceof l.l&&e.isIgnorableError()))throw this.removeAuthResults(),this.currentUser.unset(),e;E.v.warn("Ignoring authentication error as it is a known edge case.")}finally{this.isWorking=!1}return this.loggedUserResult}))}logout(){return(0,i.sH)(this,void 0,void 0,(function*(){var e;this.isWorking=!0;let t={success:!1};try{const s=this.messageBuilder.createLogoutMessage(this.loggedUserResult);this.session.deleteUserFromSessionStorage();const{CODE:i,DETAILS:r,ERROR:n,MESSAGE_TYPE:o,OIDC_LOGOUT_URL:a}=yield this.connect.send(s),c=null!==(e=null==r?void 0:r.ERROR)&&void 0!==e?e:n,h=o===d.Go.LOGOUT_NACK;h&&E.v.warn("Unexpected Logout NACK received during logout.",c),t={success:o===d.Go.LOGOUT_ACK||i===d.x6.SESSION_NOT_FOUND||!h,error:c},a&&window.open(a,"_self")}catch(e){const s=new l.l(e.sentMessage,e.receivedMessage);if(E.v.error("Logout Authentication Error:",s),!s.isIgnorableError())throw e;E.v.warn("Ignoring authentication error as it is a known edge case."),t.success=!0}finally{this.removeAuthResults(),this.currentUser.unset(),this.isWorking=!1}return t}))}reAuthFromSession(){return(0,i.sH)(this,void 0,void 0,(function*(){const e=yield this.ensureConnection(),t=this.credentialManager.createRefreshCredentials();if(e&&this.credentialManager.validateRefreshCredentials(t)){const e=this.messageBuilder.createRefreshTokenMessage(),t=yield this.connect.send(e);if((null==t?void 0:t.MESSAGE_TYPE)===d.Gp.EVENT_LOGIN_AUTH_ACK)return this.session.setAuthResult(t),this.currentUser.set(b(t)),this.applyAuthResults(this.getLoggedUserFromMessage(t)),!0}return this.session.deleteUserFromSessionStorage(),this.currentUser.unset(),!1}))}ensureConnection(){return(0,i.sH)(this,void 0,void 0,(function*(){if(this.connect.isConnected)return!0;const e=this.session.getSessionStorageItem("hostUrl");return!!e&&this.connect.connect(e)}))}getLoggedUserFromMessage(e){const t=e.USER_NAME,s=e.SESSION_AUTH_TOKEN,i=e.REFRESH_AUTH_TOKEN;return t&&s&&i?{username:t,authToken:s,refreshToken:i,profiles:e.PROFILE,permissions:e.PERMISSION,sessionId:e.SESSION_ID}:null}applyAuthResults(e){e?this.loggedUserResult={authToken:e.authToken,refreshToken:e.refreshToken,profiles:e.profiles,username:e.username,permissions:e.permissions,sessionId:e.sessionId}:this.removeAuthResults()}removeAuthResults(){this.loggedUserResult=null}};(0,i.Cg)([n.observable],N.prototype,"isWorking",void 0),(0,i.Cg)([n.observable],N.prototype,"loggedUserResult",void 0),N=(0,i.Cg)([(0,i.Qj)(0,u.N),(0,i.Qj)(1,c.dm),(0,i.Qj)(2,d.lT),(0,i.Qj)(3,C),(0,i.Qj)(4,r.KJ)],N);const L=o.DI.createInterface((e=>e.singleton(N)))},56653:(e,t,s)=>{var i;s.d(t,{h:()=>i,l:()=>r}),function(e){e.BASIC="BASIC",e.SSO="SSO",e.JWT="JWT",e.REFRESH="REFRESH"}(i||(i={}));class r extends Error{constructor(e,t,s="Auth Failed \n"){super(s),this.sent=e,this.received=t,Object.setPrototypeOf(this,r.prototype)}isIgnorableError(){var e,t,s,i,r,n,o,a;return!!(null===(i=null===(s=null===(t=null===(e=this.received)||void 0===e?void 0:e.DETAILS)||void 0===t?void 0:t.ERROR)||void 0===s?void 0:s.toLowerCase())||void 0===i?void 0:i.includes("request needs the user to be logged"))||!!(null===(a=null===(o=null===(n=null===(r=this.received)||void 0===r?void 0:r.DETAILS)||void 0===n?void 0:n.ERROR)||void 0===o?void 0:o.toLowerCase())||void 0===a?void 0:a.includes("is not logged in"))}getMessageError(){var e,t;return Array.isArray(null===(e=this.received)||void 0===e?void 0:e.ERROR)?null===(t=this.received)||void 0===t?void 0:t.ERROR.map((e=>this.errorDetailFormatter(e))).join("\n"):""}getDetailsError(){var e,t,s,i;return Array.isArray(null===(t=null===(e=this.received)||void 0===e?void 0:e.DETAILS)||void 0===t?void 0:t.ERROR)?null===(i=null===(s=this.received)||void 0===s?void 0:s.DETAILS)||void 0===i?void 0:i.ERROR.map((e=>this.errorDetailFormatter(e))).join("\n"):""}hasPasswordExpiredError(){return this.hasErrorCode("PASSWORD_EXPIRED")}hasMFAError(){return this.hasErrorCode("MFA_REQUIRED")||this.hasErrorCode("MFA_FAILED")}hasErrorCode(e){var t,s;return!!Array.isArray(null===(t=this.received)||void 0===t?void 0:t.ERROR)&&(null===(s=this.received)||void 0===s?void 0:s.ERROR.some((t=>t.CODE===e)))}errorDetailFormatter(e){return`\n ${e.CODE}: \n ${e.TEXT}`}}},24669:(e,t,s)=>{s.d(t,{EQ:()=>a,a4:()=>o});var i=s(17190),r=s(84674);class n{constructor(){this.streamListeners=(0,i.r)(),this.streamCompleteListeners=(0,i.r)(),this.streamErrorListeners=(0,i.r)(),this.commitListeners=(0,i.r)(),this.metadataListeners=(0,i.r)(),this.commitResponseListeners=(0,i.r)()}addStreamListener(e,t,s){var i,r,n;const o=null===(i=this.streamListeners)||void 0===i?void 0:i.subscribe(e),a=null===(r=this.streamCompleteListeners)||void 0===r?void 0:r.subscribe(t),c=null===(n=this.streamErrorListeners)||void 0===n?void 0:n.subscribe(s);return()=>{o(),a(),c()}}onStreamEvent(e,t,s,i){var r;null===(r=this.streamListeners)||void 0===r||r.publish(new CustomEvent("connect-stream-event",{detail:{functions:i,message:t,resourceName:e,stream:s}}))}onStreamErrorEvent(e,t,s){var i;null===(i=this.streamErrorListeners)||void 0===i||i.publish(new CustomEvent("connect-stream-error-event",{detail:{resourceName:e,stream:t,error:s}}))}onStreamCompleteEvent(e,t){var s;null===(s=this.streamCompleteListeners)||void 0===s||s.publish(new CustomEvent("connect-stream-complete-event",{detail:{resourceName:e,stream:t}}))}addCommitListener(e){var t;return null===(t=this.commitListeners)||void 0===t?void 0:t.subscribe(e)}onCommitEvent(e,t){var s;null===(s=this.commitListeners)||void 0===s||s.publish(new CustomEvent("connect-commit-event",{detail:{eventName:e,message:t}}))}addMetadataListener(e){var t;return null===(t=this.metadataListeners)||void 0===t?void 0:t.subscribe(e)}onMetadataEvent(e,t,s){var i;null===(i=this.metadataListeners)||void 0===i||i.publish(new CustomEvent("connect-metadata-event",{detail:{resourceName:e,message:t,error:s}}))}addCommitResponseListener(e){var t;return null===(t=this.commitResponseListeners)||void 0===t?void 0:t.subscribe(e)}onCommitResponseEvent(e,t){var s;null===(s=this.commitResponseListeners)||void 0===s||s.publish(new CustomEvent("connect-commit-response-event",{detail:{eventName:e,response:t}}))}}const o=r.DI.createInterface((e=>e.singleton(n))),a=r.DI.createInterface((e=>e.aliasTo(o)))},26347:(e,t,s)=>{s.d(t,{dm:()=>D,tn:()=>w});var i=s(55823),r=s(84686),n=s(33681),o=s(84674),a=s(77909);class c{constructor(){this.cachedMetadata=new Map,this.cachedJsonSchema=new Map}getMetadataFor(e){return this.cachedMetadata.get(e)}getJsonSchemaFor(e){return this.cachedJsonSchema.get(e)}hasMetadataFor(e){return this.cachedMetadata.has(e)}hasJsonSchemaFor(e){return this.cachedJsonSchema.has(e)}setMetadataFor(e,t){this.cachedMetadata.set(e,t)}setJsonSchemaFor(e,t){this.cachedJsonSchema.set(e,t)}}const d=o.DI.createInterface((e=>e.singleton(c)));var h=s(17465),l=s(24669),u=s(49587),E=s(49229),g=s(97156),S=s(7827),v=s(1762),R=s(84190),m=s(78213),p=s(66640),T=s(16220),_=s(98316),O=s(32748);const A={polling:Object.assign({POLLING_MAP:{EVENT_AMEND_USER:{TEMP_FREQUENCY:500,AMOUNT_OF_POLLS:5,QUERIES:["ALL_USERS"]}},POLLING_INTERVAL_MAP:{ALL_TRADES:5e3,ALL_USERS:5e3,ALL_PROCESSES_STATUS:1e4},POLLING_FREQUENCY:5e3},{})},f=o.DI.createInterface((e=>e.instance(A)));var I=s(21281);const C=(e,t)=>((null==t?void 0:t.ROW)&&e&&e.length>0?t.ROW.forEach((t=>{const s=t;if(s&&s.DETAILS){const i=s.DETAILS.ROW_REF,r=s.DETAILS.OPERATION;"INSERT"===r&&(e.find((e=>{var t;return(null===(t=e.DETAILS)||void 0===t?void 0:t.ROW_REF)===i}))||e.unshift(s)),"DELETE"===r&&(e=e.filter((e=>{var s,i;return(null===(s=t.DETAILS)||void 0===s?void 0:s.ROW_REF)!==(null===(i=e.DETAILS)||void 0===i?void 0:i.ROW_REF)}))),"MODIFY"===r&&(e=e.map((e=>{var t;return(null===(t=e.DETAILS)||void 0===t?void 0:t.ROW_REF)===i?Object.assign(Object.assign({},e),s):e})))}})):!t||e&&0!==e.length||(e=[...new Set(t.ROW)]),e);var M;let b=M=class{get isConnected(){return this._isConnected}set isConnected(e){this._isConnected=e,this.isConnectedSubject.next(this._isConnected)}constructor(e,t,s,i,r,n){var o;this.http=e,this.messageBuilder=t,this.session=s,this.metaCache=i,this.serializer=r,this.config=n,this.isWorking=!1,this._isConnected=!1,this.isConnectedSubject=new g.t(this._isConnected),this.isConnected$=null===(o=this.isConnectedSubject)||void 0===o?void 0:o.asObservable(),this.ongoingTurbo={},this.streams=new Map}checkHost(){return(0,i.sH)(this,void 0,void 0,(function*(){try{return this.getMessage({MESSAGE_TYPE:I.Go.HEARTBEAT_PING,SOURCE_REF:"host check"}).then((e=>e.MESSAGE_TYPE===I.Go.HEARTBEAT_PONG))}catch(e){return h.v.error(e),!1}}))}send(e,t){return this.http.post(M.getUrl(this.host,e),{body:M.getBody(e),headers:this.messageBuilder.createHTTPHeadersFromMessage(e)})}httpMode(){return!0}setValidSession(e){h.v.deprecated("setValidSession","Please refrain from calling this API as this state is managed internally.","15.0.0")}connect(e){return(0,i.sH)(this,void 0,void 0,(function*(){return this.host=e,this.host.endsWith("/")||(this.host=this.host.concat("/")),this.checkHost().then((e=>(this.isConnected=e,this.session.setSessionStorageItem("hostUrl",this.host),e)))}))}disconnect(){this.isConnected=!1,this.streams.clear(),this.ongoingTurbo={},this.host=void 0}snapshot(e,t){return(0,i.sH)(this,void 0,void 0,(function*(){const s=this.messageBuilder.createDataLogonMessage(e,t);return h.v.debug(`HTTP MODE - ${s.MESSAGE_TYPE} (snapshot) message created -> `,s),this.send(s).then((e=>(this.dataLogoff(s.SOURCE_REF).catch((e=>h.v.error(e))),e)))}))}stream(e,t,s,i){const r=this.messageBuilder.createDataLogonMessage(e,i);h.v.debug(`HTTP MODE - ${r.MESSAGE_TYPE} (stream) message created -> `,r);const n=r.SOURCE_REF;this.streams.set(n,{SOURCE_REF:n,POLLING_FREQUENCY:new g.t(this.config.polling.POLLING_FREQUENCY),RESOURCE_NAME:e});const o=this.streams.get(n).POLLING_FREQUENCY,a=(0,S.x)((0,v.H)(this.send(r)),o.pipe((0,R.n)((e=>(0,m.Y)(e)))).pipe((0,R.n)((()=>(0,v.H)(this.getMessage(r)))))).pipe((0,p.v)((()=>this.streams.has(n))),(0,T.j)((()=>{h.v.debug(`Terminating stream for ${e} - ${n}`),this.dataLogoff(n)})));return this.streams.get(n).STREAM=a,a}streamState(e,t=(()=>{}),s=(()=>{}),i,r=[]){return this.stream(e,t,s,i).pipe((0,a.S)(C,r))}streamWithoutAutoTeardown(e,t,s,i){return h.v.deprecated("streamWithoutAutoTeardown","Please use 'stream' api instead.","15.0.0"),this.stream(e,t,s,i)}getMessage(e){return(0,i.sH)(this,void 0,void 0,(function*(){return this.http.get(M.getUrl(this.host,e),{headers:this.messageBuilder.createHTTPHeadersFromMessage(e)})}))}getMoreRows(e){return(0,i.sH)(this,void 0,void 0,(function*(){const t=this.messageBuilder.createMoreRowsMessage(e);return h.v.debug(`HTTP MODE - ${t.MESSAGE_TYPE} message created -> `,t),this.send(t)}))}getMoreColumns(e){return(0,i.sH)(this,void 0,void 0,(function*(){const t=this.messageBuilder.createMoreColumnsMessage(e);return this.send(t)}))}dataLogoff(e){return(0,i.sH)(this,void 0,void 0,(function*(){const t=this.messageBuilder.createDataLogoffMessage(e);return this.send(t).then((t=>(this.streams.has(e)&&(h.v.debug(`Removing stream ${e}`),this.streams.delete(e)),t)))}))}getMetadata(e){return(0,i.sH)(this,arguments,void 0,(function*(e,t=!0){const s=this.messageBuilder.createMetaRequestMessage(e);return h.v.debug(`HTTP MODE - ${s.MESSAGE_TYPE} (metadata) message created -> `,s),this.send(s).then((e=>e.DETAILS))}))}getJSONSchema(e){return(0,i.sH)(this,void 0,void 0,(function*(){const t=this.messageBuilder.createMetaRequestMessage(e,I.Gp.JSON_SCHEMA_REQUEST);return h.v.debug(`HTTP MODE! - ${t.MESSAGE_TYPE} (json schema) message created -> `,t),this.send(t)}))}request(e,t){const s=this.messageBuilder.createRequestMessage(e,t);return h.v.debug(`HTTP MODE! - ${s.MESSAGE_TYPE} (request server) message created -> `,s),this.send(s)}getAvailableResources(e){return(0,i.sH)(this,void 0,void 0,(function*(){const t=this.messageBuilder.createResourcesMessage(e);return h.v.debug(`HTTP MODE! - ${t.MESSAGE_TYPE} (getResources) message created -> `,t),this.send(t)}))}commitEvent(e,t){return(0,i.sH)(this,void 0,void 0,(function*(){const s=this.messageBuilder.createCommitMessage(e,t);return h.v.debug(`HTTP MODE! - ${s.MESSAGE_TYPE} (commit) message created -> `,s),this.send(s).then((t=>(this.maybeTurbo(e,t),t)))}))}maybeTurbo(e,t){var s;if(!(null===(s=null==t?void 0:t.MESSAGE_TYPE)||void 0===s?void 0:s.endsWith("_ACK")))return;if(this.ongoingTurbo[e])return void h.v.debug(`${e} polling frequency is already accelerated.`);const i=this.config.polling.POLLING_MAP[e];if(!(null==i?void 0:i.TEMP_FREQUENCY)||!i.AMOUNT_OF_POLLS)return;const r=i.TEMP_FREQUENCY,n=r*i.AMOUNT_OF_POLLS,o=JSON.parse(JSON.stringify(this.config.polling.POLLING_INTERVAL_MAP)),a=JSON.parse(JSON.stringify(this.config.polling.POLLING_INTERVAL_MAP));for(const e of i.QUERIES)a[e]=r,o[e]||(o[e]=this.config.polling.POLLING_FREQUENCY);h.v.debug(`${e} TRIGGERED -> ENFORCING TURBO | FREQUENCY=${r}ms DURATION=${n}`),this.ongoingTurbo[e]=!0,this.updateIntervals({polling:{POLLING_INTERVAL_MAP:a}}),setTimeout((()=>{h.v.debug(`RESTORED ORIGINAL POLLING INTERVALS FOR ${e}`),this.updateIntervals({polling:{POLLING_INTERVAL_MAP:o}}),this.ongoingTurbo[e]=!1}),n)}updateIntervals(e){const{POLLING_INTERVAL_MAP:t}=e.polling;t&&(this.config.polling.POLLING_INTERVAL_MAP=t,this.handlePollingIntervalMapUpdate(t))}handlePollingIntervalMapUpdate(e){if(e)for(const t in e){if(!e.hasOwnProperty(t))continue;const s=e[t];this.config.polling.POLLING_INTERVAL_MAP[t]=s,h.v.debug(`Setting polling frequency for ${t} = ${s}`),[...this.streams.values()].filter((e=>e.RESOURCE_NAME===t)).forEach((e=>{var t;return null===(t=null==e?void 0:e.POLLING_FREQUENCY)||void 0===t?void 0:t.next(s)}))}}static getBody(e){return JSON.stringify(e)}static getUrl(e,t){const s=t.MESSAGE_TYPE;let i=t.MESSAGE_TYPE.replace(/_/g,"-").toLowerCase();return s===I.Gp.DATA_LOGON&&(i=t.DETAILS.DATASOURCE_NAME.replace(/_/g,"-").toLowerCase()),`${e}${i}`}};(0,i.Cg)([n.observable],b.prototype,"host",void 0),(0,i.Cg)([n.observable],b.prototype,"isWorking",void 0),(0,i.Cg)([n.observable],b.prototype,"_isConnected",void 0),(0,i.Cg)([n.volatile],b.prototype,"isConnected",null),b=M=(0,i.Cg)([(0,i.Qj)(0,O.l),(0,i.Qj)(1,I.lT),(0,i.Qj)(2,_.N),(0,i.Qj)(3,d),(0,i.Qj)(4,E.b_),(0,i.Qj)(5,f)],b);const N=o.DI.createInterface((e=>e.singleton(b)));var L=s(45230);let U=class{get isConnected(){return this.socket.isConnected}get isConnectedSubject(){return this.socket.isConnectedSubject}get isConnected$(){var e;return null===(e=this.socket.isConnectedSubject)||void 0===e?void 0:e.asObservable()}get host(){return this.socket.host}constructor(e,t,s,i,r){this.socket=e,this.messageBuilder=t,this.metaCache=s,this.events=i,this.config=r,this.isWorking=!1}httpMode(){return!1}setValidSession(e){h.v.deprecated("setValidSession","Please refrain from calling this API as this state is managed internally.","15.0.0")}send(e,t){return this.socket.send(e,t)}connect(){return(0,i.sH)(this,arguments,void 0,(function*(e=r.vN){return this.socket.reset(),this.socket.connect(e,this.config.connect,this.config.reconnect)}))}disconnect(){this.socket.reset()}snapshot(e,t){return(0,i.sH)(this,void 0,void 0,(function*(){const s=this.messageBuilder.createDataLogonMessage(e,t);return h.v.debug(`${s.MESSAGE_TYPE} (snapshot) message created -> `,s),this.socket.send(s)}))}stream(e,t,s,i){const r=this.messageBuilder.createDataLogonMessage(e,i);h.v.debug(`${r.MESSAGE_TYPE} (stream) message created -> `,r);const n=this.socket.sendForStream(r,t,(t=>{s(t),this.events.onStreamErrorEvent(e,n,t)}),(()=>{this.events.onStreamCompleteEvent(e,n)}));return this.events.onStreamEvent(e,r,n,{onMessage:t,onError:s}),n}streamState(e,t=(()=>{}),s=(()=>{}),i,r=[]){return this.stream(e,t,s,i).pipe((0,a.S)(C,r))}streamWithoutAutoTeardown(e,t,s,i){h.v.deprecated("streamWithoutAutoTeardown","Please use 'stream' api instead.","15.0.0");const r=this.messageBuilder.createDataLogonMessage(e,i);h.v.debug(`${r.MESSAGE_TYPE} (stream without auto-teardown) message created -> `,r);const n=this.socket.sendForStreamWithoutTeardown(r,t,(t=>{s(t),this.events.onStreamErrorEvent(e,n,t)}));return this.events.onStreamEvent(e,r,n,{onMessage:t,onError:s}),n}getMoreRows(e,t){return(0,i.sH)(this,void 0,void 0,(function*(){const s=this.messageBuilder.createMoreRowsMessage(e,t);return h.v.debug(`${s.MESSAGE_TYPE} message created -> `,s),this.socket.send(s,!1)}))}getMoreColumns(e){return(0,i.sH)(this,void 0,void 0,(function*(){const t=this.messageBuilder.createMoreColumnsMessage(e);return this.socket.send(t)}))}dataLogoff(e){return(0,i.sH)(this,void 0,void 0,(function*(){const t=this.messageBuilder.createDataLogoffMessage(e);return h.v.debug(`${t.MESSAGE_TYPE} message created -> `,t),this.socket.send(t)}))}getMetadata(e){return(0,i.sH)(this,arguments,void 0,(function*(e,t=!0){var s;if(t&&this.metaCache.hasMetadataFor(e))return h.v.debug(`Cached metadata retrieved for ${e}`),this.metaCache.getMetadataFor(e);const i=this.messageBuilder.createMetaRequestMessage(e);let r,n;h.v.debug(`${i.MESSAGE_TYPE} (metadata) message created -> `,i);try{this.isWorking=!0;const t=yield this.socket.send(i);r=null!==(s=null==t?void 0:t.DETAILS)&&void 0!==s?s:{},Object.keys(r).length&&this.metaCache.setMetadataFor(e,r)}catch(e){throw n=e,h.v.error(e),n}finally{this.events.onMetadataEvent(e,i,n),this.isWorking=!1}return r}))}getJSONSchema(e){return(0,i.sH)(this,arguments,void 0,(function*(e,t=!0){var s;if(t&&this.metaCache.hasJsonSchemaFor(e))return h.v.debug(`Cached JsonSchema retrieved for ${e}`),this.metaCache.getJsonSchemaFor(e);const i=this.messageBuilder.createMetaRequestMessage(e,I.Gp.JSON_SCHEMA_REQUEST);let r;h.v.debug(`${i.MESSAGE_TYPE} (json schema) message created -> `,i);try{this.isWorking=!0,r=null!==(s=yield this.socket.send(i))&&void 0!==s?s:{},Object.keys(r).length&&this.metaCache.setJsonSchemaFor(e,r)}catch(e){h.v.error(e)}finally{this.isWorking=!1}return r}))}request(e,t){const s=this.messageBuilder.createRequestMessage(e,t);return h.v.debug(`${s.MESSAGE_TYPE} (request server) message created -> `,s),this.socket.send(s)}getAvailableResources(e){return(0,i.sH)(this,void 0,void 0,(function*(){const t=this.messageBuilder.createResourcesMessage(e);return h.v.debug(`${t.MESSAGE_TYPE} (resources) message created -> `,t),this.socket.send(t)}))}commitEvent(e,t){return(0,i.sH)(this,void 0,void 0,(function*(){const s=this.messageBuilder.createCommitMessage(e,t);h.v.debug(`${s.MESSAGE_TYPE} (commit) message created -> `,s);const i=this.socket.send(s);return this.events.onCommitEvent(e,s),i.then((t=>(this.events.onCommitResponseEvent(e,t),t)))}))}};(0,i.Cg)([n.observable],U.prototype,"isWorking",void 0),U=(0,i.Cg)([(0,i.Qj)(0,L.yQ),(0,i.Qj)(1,I.lT),(0,i.Qj)(2,d),(0,i.Qj)(3,l.EQ),(0,i.Qj)(4,u.R)],U);const y="true"===r.PF||!1,P=o.DI.createInterface((e=>e.singleton(U))),D=o.DI.createInterface((e=>y?e.aliasTo(N):e.aliasTo(P)));function w(){return o.DI.getOrCreateDOMContainer().get(D)}},49587:(e,t,s)=>{s.d(t,{R:()=>n});var i=s(84674);const r={connect:{alwaysOn:!1,enableHeartbeat:!0,enableHeartbeatLogging:!1,heartbeatInterval:1e4,verboseHeartbeat:!1,enableMessageLogging:!1},reconnect:{reconnectAttempts:10,reconnectInterval:1e4,reconnectStreams:!0},isWebSocketExpression:new RegExp(/wss?:\/\/[-a-zA-Z0-9@:%._\+~#=]{1,256}\b([-a-zA-Z0-9()@:%_\+.~#?&\/=]*)\b\/*$/,"i")},n=i.DI.createInterface((e=>e.instance(r)))},32748:(e,t,s)=>{s.d(t,{l:()=>a});var i=s(55823),r=s(49229),n=s(84674);let o=class{constructor(e){this.serializer=e}get(e,t){return(0,i.sH)(this,void 0,void 0,(function*(){const s=yield fetch(e,Object.assign(Object.assign({credentials:"include",headers:{"Content-type":"application/json; charset=UTF-8"}},t),{method:"GET"}));return(t.serializer||this.serializer).deserialize(s)}))}post(e,t){return(0,i.sH)(this,void 0,void 0,(function*(){const s=yield fetch(e,Object.assign(Object.assign({credentials:"include",headers:{"Content-type":"application/json; charset=UTF-8"}},t),{method:"POST"}));return(t.serializer||this.serializer).deserialize(s)}))}};o=(0,i.Cg)([(0,i.Qj)(0,r.b_)],o);const a=n.DI.createInterface((e=>e.singleton(o)))},21281:(e,t,s)=>{s.d(t,{Go:()=>i,Gp:()=>r,lT:()=>E,x6:()=>n,z2:()=>l});var i,r,n,o=s(55823),a=s(32808),c=s(84674),d=s(56653),h=s(98316);!function(e){e.LOGON_ACK="LOGON_ACK",e.LOGON_NACK="LOGON_NACK",e.LOGOFF_ACK="LOGOFF_ACK",e.LOGOFF_NACK="LOGOFF_NACK",e.HEARTBEAT_PING="HEARTBEAT_PING",e.HEARTBEAT_PONG="HEARTBEAT_PONG",e.MORE_ROWS="MORE_ROWS",e.MORE_COLUMNS="MORE_COLUMNS",e.MORE_COLUMNS_ACK="MORE_COLUMNS_ACK",e.MSG_ACK="MSG_ACK",e.MSG_NACK="MSG_NACK",e.LOGOUT_ACK="LOGOUT_ACK",e.LOGOUT_NACK="LOGOUT_NACK",e.QUERY_UPDATE="QUERY_UPDATE"}(i||(i={})),function(e){e.EVENT_LOGIN_AUTH="EVENT_LOGIN_AUTH",e.EVENT_LOGIN_AUTH_ACK="EVENT_LOGIN_AUTH_ACK",e.EVENT_LOGIN_AUTH_NACK="EVENT_LOGIN_AUTH_NACK",e.EVENT_LOGOUT="EVENT_LOGOUT",e.DATA_LOGON="DATA_LOGON",e.DATA_LOGOFF="DATA_LOGOFF",e.META_REQUEST="META_REQUEST",e.JSON_SCHEMA_REQUEST="JSON_SCHEMA_REQUEST",e.RESOURCES_REQUEST="RESOURCES_REQUEST",e.RESOURCES_REQUEST_ACK="RESOURCES_REQUEST_ACK",e.RESOURCES_REQUEST_NACK="RESOURCES_REQUEST_NACK",e.EVENT_CHANGE_USER_PASSWORD="EVENT_CHANGE_USER_PASSWORD",e.EVENT_SELF_SERVICE_PASSWORD_RESET="EVENT_SELF_SERVICE_PASSWORD_RESET",e.EVENT_PASSWORD_RESET_ACTION="EVENT_PASSWORD_RESET_ACTION"}(r||(r={})),function(e){e.SESSION_NOT_FOUND="SESSION_NOT_FOUND",e.UNKNOWN_MESSAGE_TYPE="UNKNOWN_MESSAGE_TYPE"}(n||(n={}));const l=(e,t)=>!!Array.isArray(null==e?void 0:e.ERROR)&&(null==e?void 0:e.ERROR.some((e=>{var s,i;return(null===(s=e.CODE)||void 0===s?void 0:s.includes(`${t}`))||(null===(i=e.STATUS_CODE)||void 0===i?void 0:i.includes(`${t}`))})));let u=class{constructor(e,t){this.session=e,this.uuid=t}createLoginMessage(e){let t;switch(e.type){case d.h.BASIC:t={USER_NAME:e.username,PASSWORD:e.password,MFA_CODE:e.mfaToken};break;case d.h.REFRESH:t={USER_NAME:e.username,REFRESH_AUTH_TOKEN:e.refreshToken,MFA_CODE:e.mfaToken};break;case d.h.SSO:t={SSO_TOKEN:e.ssoToken};break;case d.h.JWT:t={JWT:e.jwt,DOMAIN:e.domain}}return{DETAILS:t,SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:r.EVENT_LOGIN_AUTH}}createLogoutMessage(e){var t,s;return{SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:r.EVENT_LOGOUT,SESSION_AUTH_TOKEN:null!==(t=e.authToken)&&void 0!==t?t:this.session.getSessionStorageItem("authToken"),SESSION_ID:null!==(s=e.sessionId)&&void 0!==s?s:this.session.getSessionStorageItem("sessionId")}}createDataLogonMessage(e,t){return{SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:r.DATA_LOGON,DETAILS:Object.assign({DATASOURCE_NAME:e},t),SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken")}}createDataLogoffMessage(e){return{SOURCE_REF:e,MESSAGE_TYPE:r.DATA_LOGOFF,SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken")}}createRequestMessage(e,t){return Object.assign({SOURCE_REF:this.uuid.createId(),SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken"),MESSAGE_TYPE:e.startsWith("REQ_")?e:`REQ_${e}`},t)}createResourcesMessage(e){return Object.assign({SOURCE_REF:this.uuid.createId(),SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken"),MESSAGE_TYPE:r.RESOURCES_REQUEST},e)}createMetaRequestMessage(e,t=r.META_REQUEST){return{SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:t,DETAILS:{FEATURE:e},SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken")}}createCommitMessage(e,t){return Object.assign({SOURCE_REF:this.uuid.createId(),SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken"),MESSAGE_TYPE:e},t)}createRefreshTokenMessage(){return{SOURCE_REF:this.uuid.createId(),SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken"),MESSAGE_TYPE:r.EVENT_LOGIN_AUTH,DETAILS:{REFRESH_AUTH_TOKEN:this.session.getSessionStorageItem("refreshToken"),MFA_CODE:this.session.getSessionStorageItem("mfaToken")}}}createChangePasswordMessage(e,t,s){return{USER_NAME:e,SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:r.EVENT_CHANGE_USER_PASSWORD,DETAILS:{OLD_PASSWORD:t,NEW_PASSWORD:s}}}createForgotPasswordMessage(e,t,s=e){return{USER_NAME:s,SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:r.EVENT_SELF_SERVICE_PASSWORD_RESET,DETAILS:{USER_NAME:e,RETURN_URL:t}}}createForgotPasswordTokenMessage(e,t,s,i=e){return{USER_NAME:i,SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:r.EVENT_PASSWORD_RESET_ACTION,DETAILS:{USER_NAME:e,RESET_TOKEN:t,NEW_PASSWORD:s}}}createMoreRowsMessage(e,t){return{SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:i.MORE_ROWS,DETAILS:{SOURCE_REF:e,VIEW_NUMBER:t},SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken")}}createMoreColumnsMessage(e){return Object.assign(Object.assign({},this.createMoreRowsMessage(e)),{MESSAGE_TYPE:i.MORE_COLUMNS})}createHTTPHeadersFromMessage(e,t="application/json; charset=UTF-8"){const s={"Content-type":t};return e.SOURCE_REF&&(s["source-ref"]=e.SOURCE_REF,s.SOURCE_REF=e.SOURCE_REF),e.SESSION_AUTH_TOKEN&&(s["SESSION-AUTH-TOKEN"]=e.SESSION_AUTH_TOKEN),e.MESSAGE_TYPE===r.EVENT_LOGOUT&&(s["SESSION-ID"]=e.SESSION_ID),s}createHeartbeatPingMessage(e=!1){return{MESSAGE_TYPE:i.HEARTBEAT_PING,SOURCE_REF:this.uuid.createId(),VERBOSE:e,DETAILS:{},SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken")}}};u=(0,o.Cg)([(0,o.Qj)(0,h.N),(0,o.Qj)(1,a.k)],u);const E=c.DI.createInterface((e=>e.singleton(u)))},45230:(e,t,s)=>{s.d(t,{yQ:()=>G,Ol:()=>k});var i=s(55823),r=s(92277),n=s(84686),o=s(49229),a=s(32808),c=s(33681),d=s(84674),h=s(50049),l=s(37970),u=s(75841),E=s(26274),g=s(53193),S=s(84190),v=s(82834),R=s(66640),m=s(53940),p=s(48653),T=s(98316),_=s(17465),O=s(49587),A=s(32748),f=s(21281);const I=1e4,C=6e4;var M;!function(e){e.Linear="linear",e.Exponential="exponential"}(M||(M={}));const b=(e,t)=>{const{reconnectInterval:s=I}=e,i=s>C?C:s,r=Math.round(Math.log2(C/i));return i*Math.pow(2,t%r)},N=e=>{const{reconnectInterval:t=I}=e;return t>C?C:t};var L,U=s(5709);class y{constructor(e){this.interval=e}get workerScript(){return`\n const startTime = Date.now();\n setInterval(function() {\n self.postMessage(Date.now() - startTime);\n }, ${this.interval});\n `}start(e){this.stop(),this.runWorker(e)}stop(){this.worker&&(this.worker.terminate(),delete this.worker)}runWorker(e){this.worker||(this.worker=new Worker(URL.createObjectURL(new Blob([this.workerScript],{type:"text/javascript"}))),this.worker.onmessage=t=>e(t.data))}}class P extends h.B{constructor(){super()}}l.c;class D{constructor(e,t,s,i){this._message=e,this._onMessage=t,this._onError=s,this._isSubscription=i}get sentMessage(){return this._message}get onReceivedMessage(){return this._onMessage}get onReceivedError(){return this._onError}get isSubscription(){return this._isSubscription}}let w=L=class{get isConfigured(){return this.status.isConfigured}get isConnecting(){return this.status.isConnecting}get isConnected(){return this.status.isConnected}get isConnectedSubject(){return this.status.isConnectedSubject}get isDisconnected(){return this.status.isDisconnected}get isDisconnectedByServer(){return this.status.isDisconnectedByServer}get isReconnecting(){return this.status.isReconnecting}get hasValidSession(){return _.v.deprecated("get hasValidSession","Use `User.isAuthenticated` from `@genesislcap/foundation-user` instead.","15.0.0"),this.user.isAuthenticated}set hasValidSession(e){_.v.deprecated("set hasValidSession","Please refrain from calling this API as this state is managed internally.","15.0.0")}get host(){var e;return null!==(e=this.url)&&void 0!==e?e:n.vN}constructor(e,t,s,i,r,n,o){this.messageBuilder=e,this.session=t,this.serializer=s,this.uuid=i,this.status=r,this.user=n,this.config=o,this.defaultInterval=1e4,this.secondsMultiplier=1e3,this.heartbeatIsEnabled=!0,this.heartbeatInterval=this.defaultInterval,this.socketMessages=()=>this.wsMessages}get heartbeatLoggingIsEnabled(){var e,t;return null!==(t=null===(e=this.connectOptions)||void 0===e?void 0:e.enableHeartbeatLogging)&&void 0!==t&&t}get messageLoggingIsEnabled(){var e,t;return null!==(t=null===(e=this.connectOptions)||void 0===e?void 0:e.enableMessageLogging)&&void 0!==t&&t}connect(e=n.vN,t,s){var r;return this.url=e,this.connectOptions=null!=t?t:this.config.connect,this.reconnectOptions=null!=s?s:this.config.reconnect,(null===(r=this.config.isWebSocketExpression)||void 0===r?void 0:r.test(this.host))?new Promise((e=>{var t,s,r,n;_.v.info(`${this.isReconnecting?"Reconnecting":"Connecting"} to ${this.url}`),this.status.isConnecting=!this.isReconnecting;(!this.isReconnecting||!(null===(t=this.reconnectOptions)||void 0===t?void 0:t.reconnectStreams))&&this.cleanMessages(),null===(s=this.socketSubscription)||void 0===s||s.unsubscribe(),this.websocket=new p.Q({url:this.url,openObserver:{next:()=>{this.session.setSessionStorageItem("hostUrl",this.url),this.status.isConnected=!0,this.prepareHeartbeat(),_.v.info("WebSocket connection is now open"),e(this.isConnected)}},closeObserver:{next:t=>{this.status.onClose(t),this.isDisconnectedByServer&&_.v.info(`WebSocket connection was closed due an error - Code: ${t.code} ${t.reason?" | Reason: "+t.reason:""}`),e(this.isConnected)}},serializer:e=>this.serializer.serialize(e),deserializer:e=>this.serializer.deserialize(e)});this.socketSubscription=this.websocket.subscribe(null!==(n=null===(r=this.connectOptions)||void 0===r?void 0:r.connectObserver)&&void 0!==n?n:{next:e=>(0,i.sH)(this,void 0,void 0,(function*(){var t;const s=`Response Message received for SourceRef: ${e.SOURCE_REF} | MessageType: ${e.MESSAGE_TYPE}`;this.logMessageTypeFlow(e.MESSAGE_TYPE,_.v.info,s);const{SOURCE_REF:i,MESSAGE_TYPE:r}=e,n=this.getMessageHandler(i,r);if(!n)return void(e.MESSAGE_TYPE===f.Go.MSG_NACK&&e.ERROR&&e.ERROR.forEach((t=>{_.v.error(`MessageType: ${e.MESSAGE_TYPE} | Error Details:`,t)})));let o=!1;switch(e.MESSAGE_TYPE){case f.Gp.EVENT_LOGIN_AUTH_ACK:{const s=e.DETAILS;s.HEARTBEAT_INTERVAL_SECS&&void 0===(null===(t=this.connectOptions)||void 0===t?void 0:t.heartbeatInterval)&&(this.heartbeatInterval=s.HEARTBEAT_INTERVAL_SECS*this.secondsMultiplier,this.prepareHeartbeat());break}case f.Go.LOGOUT_ACK:return n.onReceivedMessage.call(this,e),void this.cleanMessages();case f.Go.LOGON_ACK:return;case f.Go.LOGOFF_ACK:break;case f.Go.QUERY_UPDATE:n.isSubscription||this.sendDataLogoff(i);break;case f.Go.MSG_NACK:case f.Go.LOGON_NACK:o=!0}o?n.onReceivedError.call(this,{receivedMessage:e,sentMessage:n.sentMessage}):n.onReceivedMessage.call(this,e),this.wsMessages.next(e),n.isSubscription||this.removeMessageHandler(i)})),error:e=>{_.v.debug("Error found: ",e),this.reconnect()},complete:()=>{var e;this.isDisconnectedByServer&&(null===(e=this.connectOptions)||void 0===e?void 0:e.alwaysOn)?this.reconnect():_.v.info("Connection is now closed")}}),this.status.isConfigured=!0})):(_.v.error(`Specified host (${this.host}) is not valid WebSocket url. Connection will not proceed.`),void _.v.warn("Make sure the host url starts with wss:// or ws://"))}handleExpiredSession(){return(0,i.sH)(this,void 0,void 0,(function*(){if(this.session.getSessionStorageItem("refreshToken")){const e=this.messageBuilder.createRefreshTokenMessage(),t=yield this.send(e);this.session.setAuthResult(t),this.updateSessionAndSubscriptions(t)}else yield this.handleCookieBasedReauth()}))}handleCookieBasedReauth(){return(0,i.sH)(this,void 0,void 0,(function*(){const e=parseInt(localStorage.getItem(L.REAUTH_ACTION_LOCK_KEY)||"0");if(Date.now()-e>3e4&&localStorage.removeItem(L.REAUTH_ACTION_LOCK_KEY),localStorage.getItem(L.REAUTH_ACTION_LOCK_KEY))window.addEventListener("storage",this.onStorageEvent.bind(this));else{localStorage.setItem(L.REAUTH_ACTION_LOCK_KEY,Date.now().toString());const e=yield fetch(n.Be,{credentials:"include"});if("EVENT_LOGIN_DETAILS_ACK"!==(yield e.json()).MESSAGE_TYPE){(yield fetch(n.aW,{credentials:"include",headers:{"Content-type":"application/json; charset=UTF-8"},method:"POST",body:JSON.stringify({DETAILS:{},MESSAGE_TYPE:"EVENT_LOGIN_AUTH"})})).ok||window.location.reload()}localStorage.removeItem(L.REAUTH_ACTION_LOCK_KEY),yield this.connect()}}))}onStorageEvent(e){e.key===L.REAUTH_ACTION_LOCK_KEY&&null===e.newValue&&(this.connect(),window.removeEventListener("storage",this.onStorageEvent))}updateSessionAndSubscriptions(e){(null==e?void 0:e.MESSAGE_TYPE)===f.Gp.EVENT_LOGIN_AUTH_ACK&&this.wsMessageHandlers.forEach((t=>{t.isSubscription&&(t.sentMessage.SESSION_AUTH_TOKEN=e.SESSION_AUTH_TOKEN,this.websocket.next(t.sentMessage))}))}prepareHeartbeat(){var e,t,s,r;this.heartbeatTicker&&this.heartbeatTicker.stop();const n=()=>(0,i.sH)(this,void 0,void 0,(function*(){var e,t,s;if(!this.isConnected)return;const i=this.messageBuilder.createHeartbeatPingMessage(null===(e=this.connectOptions)||void 0===e?void 0:e.verboseHeartbeat);(null===(t=this.connectOptions)||void 0===t?void 0:t.heartbeatPingCallback)&&this.connectOptions.heartbeatPingCallback(i);const r=yield this.send(i);this.user.isAuthenticated&&!r.IS_AUTHENTICATED&&this.handleExpiredSession(),(null===(s=this.connectOptions)||void 0===s?void 0:s.heartbeatPongCallback)&&this.connectOptions.heartbeatPongCallback(r),this.heartbeatIsEnabled=r.MESSAGE_TYPE===f.Go.HEARTBEAT_PONG&&r.SOURCE_REF===i.SOURCE_REF}));if(null!==(t=null===(e=this.connectOptions)||void 0===e?void 0:e.enableHeartbeat)&&void 0!==t?t:this.heartbeatIsEnabled){const e=null!==(r=null===(s=this.connectOptions)||void 0===s?void 0:s.heartbeatInterval)&&void 0!==r?r:this.heartbeatInterval;this.heartbeatTicker=new y(e),this.heartbeatTicker.start((()=>{this.websocket&&this.isConnected&&(n(),this.heartbeatLoggingIsEnabled&&_.v.debug(`Sending a heartbeat ping every ${e} ms`))}))}}reconnect(){var e,t,s,i,r;const n=!(null===(e=this.connectOptions)||void 0===e?void 0:e.alwaysOn)&&!1===(null===(t=this.connectOptions)||void 0===t?void 0:t.enableHeartbeat);if(this.isReconnecting||n)return;this.status.isReconnecting=!0;const o=(null===(s=this.reconnectOptions)||void 0===s?void 0:s.reconnectStrategy)===M.Exponential?b:N,a=this.isConnectedSubject.asObservable().pipe((0,S.n)((e=>e?(0,u.of)(-1):((e,t)=>new l.c((s=>{let i,r=0;return function n(){s.next(r),clearTimeout(i),i=setTimeout(n,t(e,r)),r+=1}(),()=>{clearTimeout(i)}})))(this.reconnectOptions,o).pipe((0,v.Z)((e=>{var t,s,i;let r;return r=(null===(t=this.connectOptions)||void 0===t?void 0:t.alwaysOn)?e+1:null!==(i=null===(s=this.reconnectOptions)||void 0===s?void 0:s.reconnectAttempts)&&void 0!==i?i:10,e<r?(0,u.of)(e):(this.status.reconnectionLimitReached=!0,(0,E.$)((()=>new Error(`Max reconnect attempts ${r} reached.`))))}))))),(0,R.v)((()=>this.websocket&&!this.isConnected)));a.subscribe(null!==(r=null===(i=this.reconnectOptions)||void 0===i?void 0:i.reconnectObserver)&&void 0!==r?r:{next:e=>{_.v.debug(`Attempt no. ${e+1} to reconnect`),this.websocket.complete(),this.connect(this.url,this.connectOptions,this.reconnectOptions)},error:e=>{var t;_.v.debug(e),null===(t=this.socketSubscription)||void 0===t||t.unsubscribe(),this.status.isReconnecting=!1},complete:()=>{_.v.info(this.isConnected?"Reconnected":"Disconnected"),this.status.isReconnecting=!1,this.wsMessageHandlers.forEach((e=>{e.isSubscription&&this.websocket.next(e.sentMessage)}))}})}reset(){this.status.isConnected=!1,this.status.isConfigured=!1,this.websocket&&this.websocket.complete(),this.websocket=null,this.cleanMessages()}cleanMessages(){this.wsMessages&&this.wsMessages.complete(),this.wsMessages=new P,this.wsMessageHandlers=new Map}send(e,t=!0){if(!this.isConnected)return Promise.reject(new Error("WebSocket connection is closed"));const s=`Sending Message for SourceRef: ${e.SOURCE_REF} | MessageType: ${e.MESSAGE_TYPE}`;return this.logMessageTypeFlow(e.MESSAGE_TYPE,_.v.info,s),new Promise(((s,i)=>{const r=e=>{s(e)},n=e=>{i(e)};t&&this.setMessageHandler(e,r,n),this.websocket.next(e)}))}sendForStream(e,t,s,i){if(!this.isConnected)return(0,E.$)((()=>new Error("WebSocket connection is closed")));const r=`Sending Message (stream) for SourceRef: ${e.SOURCE_REF} | MessageType: ${e.MESSAGE_TYPE}`;return this.logMessageTypeFlow(e.MESSAGE_TYPE,_.v.info,r),this.setMessageHandler(e,t,s,!0),c.DOM.queueUpdate((()=>this.websocket.next(e))),new l.c((t=>{const s=new h.B;return this.wsMessages.pipe((0,m.p)((t=>t.SOURCE_REF===e.SOURCE_REF)),(0,g.Q)(s)).subscribe({next:e=>{t.next(e)},error:e=>{t.error(e)},complete:()=>{t.complete()}}),()=>{s.complete(),this.sendDataLogoff(e.SOURCE_REF),this.removeMessageHandler(e.SOURCE_REF),i&&i()}}))}sendForStreamWithoutTeardown(e,t,s){if(!this.isConnected)return(0,E.$)((()=>new Error("WebSocket connection is closed")));const i=`Sending Message (stream) for SourceRef: ${e.SOURCE_REF} | MessageType: ${e.MESSAGE_TYPE}`;return this.logMessageTypeFlow(e.MESSAGE_TYPE,_.v.info,i),this.setMessageHandler(e,t,s,!0),this.websocket.next(e),this.wsMessages.pipe((0,m.p)((t=>t.SOURCE_REF===e.SOURCE_REF)))}setMessageHandler(e,t,s,i=!1){const r=`Setting Message Handler for SourceRef: ${e.SOURCE_REF} | MessageType: ${e.MESSAGE_TYPE}`;this.logMessageTypeFlow(e.MESSAGE_TYPE,_.v.debug,r),this.wsMessageHandlers.set(e.SOURCE_REF,new D(e,t,s,i))}sendDataLogoff(e){this.send(this.messageBuilder.createDataLogoffMessage(e),!1)}removeMessageHandler(e){this.wsMessageHandlers.delete(e)}getMessageHandler(e,t){const s=`Getting Message Handler for SourceRef: ${e} | MessageType: ${t}`;return this.logMessageTypeFlow(t,_.v.debug,s),this.wsMessageHandlers.get(e)}logMessageTypeFlow(e,t,s){switch(e){case f.Gp.DATA_LOGOFF:t(s);break;case f.Go.HEARTBEAT_PING:case f.Go.HEARTBEAT_PONG:this.heartbeatLoggingIsEnabled&&t(s);break;default:this.messageLoggingIsEnabled&&t(s)}}};w.REAUTH_ACTION_LOCK_KEY="reauthActionLock",(0,i.Cg)([c.observable],w.prototype,"websocket",void 0),(0,i.Cg)([c.observable],w.prototype,"wsMessages",void 0),(0,i.Cg)([c.observable],w.prototype,"wsMessageHandlers",void 0),(0,i.Cg)([A.l],w.prototype,"http",void 0),(0,i.Cg)([c.observable],w.prototype,"heartbeatIsEnabled",void 0),w=L=(0,i.Cg)([(0,i.Qj)(0,f.lT),(0,i.Qj)(1,T.N),(0,i.Qj)(2,o.b_),(0,i.Qj)(3,a.k),(0,i.Qj)(4,U.S5),(0,i.Qj)(5,r.KJ),(0,i.Qj)(6,O.R)],w);const G=d.DI.createInterface((e=>e.singleton(w)));function k(){return d.DI.getOrCreateDOMContainer().get(G)}},5709:(e,t,s)=>{s.d(t,{S5:()=>d});var i=s(55823),r=s(92277),n=s(33681),o=s(84674),a=s(97156);class c{constructor(){this.isConfigured=!1,this.isConnecting=!1,this.isConnected=!1,this.isReconnecting=!1,this.reconnectionLimitReached=!1,this.isConnectedSubject=new a.t(this.isConnected)}get hasValidSession(){return this.user.isAuthenticated}get isDisconnected(){return!this.isConnected}get isDisconnectedByServer(){return void 0!==this.closedClean&&!this.closedClean}isConnectedChanged(){var e;this.isConnected&&this.resetClosedState(),this.isConnecting=!1,this.isReconnecting=!1,null===(e=this.isConnectedSubject)||void 0===e||e.next(this.isConnected)}isReconnectingChanged(){this.isReconnecting&&(this.reconnectionLimitReached=!1)}resetClosedState(){this.closedCode=void 0,this.closedReason=void 0,this.closedClean=void 0}serialize(){return{isConfigured:this.isConfigured,isConnecting:this.isConnecting,isConnected:this.isConnected,isDisconnected:this.isDisconnected,isDisconnectedByServer:this.isDisconnectedByServer,isReconnecting:this.isReconnecting,reconnectionLimitReached:this.reconnectionLimitReached,hasValidSession:this.hasValidSession,closedCode:this.closedCode,closedReason:this.closedReason,closedClean:this.closedClean}}onClose(e){this.isConnected=!1,this.closedCode=e.code,this.closedReason=e.reason,this.closedClean=e.wasClean}}(0,i.Cg)([n.observable],c.prototype,"isConfigured",void 0),(0,i.Cg)([n.observable],c.prototype,"isConnecting",void 0),(0,i.Cg)([n.observable],c.prototype,"isConnected",void 0),(0,i.Cg)([n.observable],c.prototype,"isReconnecting",void 0),(0,i.Cg)([n.observable],c.prototype,"reconnectionLimitReached",void 0),(0,i.Cg)([n.observable],c.prototype,"closedCode",void 0),(0,i.Cg)([n.observable],c.prototype,"closedReason",void 0),(0,i.Cg)([n.observable],c.prototype,"closedClean",void 0),(0,i.Cg)([r.KJ],c.prototype,"user",void 0);const d=o.DI.createInterface((e=>e.singleton(c)))},34193:(e,t,s)=>{s.d(t,{d:()=>r});var i=s(17465);function r(e,t="ROW_REF"){const s=e=>{const s=Object.assign(Object.assign({},e),{[t]:e.DETAILS[t]});return delete s.DETAILS,s},r=[],n=[],o=[];for(const t of e.ROW)if(t.DETAILS)switch(t.DETAILS.OPERATION){case"INSERT":r.push(s(t));break;case"MODIFY":o.push(s(t));break;case"DELETE":n.push(s(t));break;default:i.v.error(`Unsupported operation type: '${t.DETAILS.OPERATION}'`)}return{inserts:r,deletes:n,updates:o,SOURCE_REF:e.SOURCE_REF}}},6884:(e,t,s)=>{s.d(t,{aB:()=>a,OD:()=>n});var i=s(84674);var r=s(34193);class n{}n.MAX_ROWS_250=250,n.MAX_VIEW_1000=1e3,n.REQ_REP_POLLING_INTERVAL_MS=1e4,n.DATASERVER_ROW_ID="ROW_REF",n.REQUEST_SERVER_ROW_ID="RECORD_ID",n.DEFAULT_PAGINATION_PAGE_SIZE=25;const o={options:{criteria:"",isSnapshot:!1,maxRows:n.MAX_ROWS_250,maxView:n.MAX_VIEW_1000,pollingInterval:n.REQ_REP_POLLING_INTERVAL_MS,movingView:!1,orderBy:"",resourceName:"",reverse:!1,pollTriggerEvents:[]},criteriaToFields:function(e){const t=e.split("&&").map((e=>e.trim())),s={};return t.forEach((e=>{if(e.startsWith("Expr"))switch(e.match(/Expr\.(\w+)\(/)[1]){case"dateIsToday":{const t=/Expr\.dateIsToday\((\w+)\)/,[,i]=e.match(t),r=new Date;s[`${i}_FROM`]=`${r.toISOString().replace(/-/g,"").split("T")[0]}-00:00`,r.setDate(r.getDate()+1),s[`${i}_TO`]=`${r.toISOString().replace(/-/g,"").split("T")[0]}-00:00`}break;case"dateTimeIsGreaterEqual":{const t=/Expr\.dateTimeIsGreaterEqual\((\w+), ?['"](.+)['"]\)/,[,i,r]=e.match(t);s[`${i}_FROM`]=r}break;case"dateTimeIsLessEqual":{const t=/Expr\.dateTimeIsLessEqual\((\w+), ?['"](.+)['"]\)/,[,i,r]=e.match(t);s[`${i}_TO`]=r}break;case"dateIsGreaterEqual":{const t=/Expr\.dateIsGreaterEqual\((\w+), ?['"](.+)['"]\)/,[,i,r]=e.match(t);s[`${i}_FROM`]=r}break;case"dateIsLessEqual":{const t=/Expr\.dateIsLessEqual\((\w+), ?['"](.+)['"]\)/,[,i,r]=e.match(t);s[`${i}_TO`]=r}break;case"containsIgnoreCase":{const t=/Expr\.containsIgnoreCase\((\w+), ?['"](.+)['"]\)/,[,i,r]=e.match(t);s[i]=`*${r}*`}}else{const t=e.substr(0,e.indexOf("=")).trim().replace(/["']/g,""),i=e.substr(e.lastIndexOf("=")+1,e.length).trim().replace(/["']/g,"");s[t]=i}})),s},dataServerResultFilter:r.d},a=i.DI.createInterface((e=>e.instance(o)))},9033:(e,t,s)=>{s.d(t,{yW:()=>M});var i=s(55823),r=s(33681),n=s(84674),o=s(50049),a=s(8790),c=s(1762),d=s(51046),h=s(66640),l=s(84190),u=s(65052),E=s(40113),g=s(26347),S=s(24669),v=s(48707),R=s(17465),m=s(79780);const p={throwWhenUnavailable:!0,throwWhenUnknown:!1},T=n.DI.createInterface((e=>e.instance(p))),_=(0,m.Es)("genesis-resources");let O=class{constructor(e,t){this.connect=e,this.config=t}isValidResource(e){return(0,i.sH)(this,void 0,void 0,(function*(){if(!(e=null==e?void 0:e.trim()))return!1;yield this.fetchResources();return!!this.resources.find((t=>t.RESOURCE_NAME===e))}))}getResourceTypeFor(e){return(0,i.sH)(this,void 0,void 0,(function*(){yield this.fetchResources();const t=this.resources.find((t=>t.RESOURCE_NAME===e));if(t)return t.RESOURCE_TYPE;const s=`${e} resource does not exist.`;if(R.v.error(s),this.config.throwWhenUnknown)throw new Error(s)}))}getAllResources(){return(0,i.sH)(this,void 0,void 0,(function*(){return this.resources||(yield this.fetchResources()),this.resources}))}destroy(){this.resources=void 0,this.resourcesPromise=void 0}fetchResources(){return(0,i.sH)(this,void 0,void 0,(function*(){var e;if(this.resources)return Promise.resolve();if(this.resourcesPromise)yield this.resourcesPromise;else{this.resourcesPromise=this.connect.getAvailableResources();const t=yield this.resourcesPromise;if(this.resources=null==t?void 0:t.RESOURCES,!(null===(e=this.resources)||void 0===e?void 0:e.length)){const e="Genesis resources unavailable.";if(R.v.error(e),this.config.throwWhenUnavailable)throw new Error(e)}this.postLoadedMessage(),this.resourcesPromise=void 0}}))}postLoadedMessage(){const e=n.DI.getOrCreateDOMContainer().get(_);e.postMessage("resources-loaded",this.resources),e.close()}};O=(0,i.Cg)([(0,i.Qj)(0,g.dm),(0,i.Qj)(1,T)],O);const A=n.DI.createInterface((e=>e.singleton(O)));var f=s(6884),I=s(39087);let C=class{get initialized(){var e;return!!(null===(e=this.status)||void 0===e?void 0:e.isInitialized)}constructor(e,t,s,i,r){this.connect=e,this.auth=t,this.resources=s,this.config=i,this.connectEvents=r,this.fetchMetadataRequired=!0,this.startStreamRequired=!0,this.originalFieldDef=[],this.fieldMetadata=[],this.requestFields=[],this.customRequestFields=[],this.availableIndexes=[],this.readOnly=!0,this._allParams=null,this.pollTrigger$=new o.B}triggerPoll(){this.pollTrigger$.next()}validResourceName(e){return R.v.deprecated("Datasource.validResourceName","Use `GenesisResources.isValidResource` instead."),!!e&&!!e.trim().length}init(e){return(0,i.sH)(this,arguments,void 0,(function*(e,t=this.fetchMetadataRequired,s=this.startStreamRequired){this.fetchMetadataRequired=t,this.options=Object.assign(Object.assign({},this.config.options),e),this.invalidateCache();const i=this.options.resourceName;if(!(this.connect.isConnected||(yield this.connect.connect())))return R.v.error(`Unable to connect to ${this.connect.host} to get ${i} datasource`),this.reportStatus(),!1;return(yield this.resources.isValidResource(i))?(this.resourceType=yield this.resources.getResourceTypeFor(i),this.resourceType?(this.fetchMetadataRequired&&(yield this.fetchAndApplyMetadata(this.options.resourceName),this._allParams=null),R.v.debug(`Initializing ${i} datasource from ${this.connect.host}`),!this.options.isSnapshot&&s&&(this.stream=yield this.createStream()),R.v.debug(`${i} datasource initialization ${this.initialized?"was successful.":"has failed."}`),this.reportStatus(),this.initialized):(R.v.error(`Unable to get the resource type for ${i} datasource from ${this.connect.host}`),this.reportStatus(),!1)):(R.v.error(`${i} datasource does not exist on ${this.connect.host}`),this.reportStatus(),!1)}))}startStream(){return(0,i.sH)(this,void 0,void 0,(function*(){this.options.isSnapshot||void 0!==this.stream||(this.stream=yield this.createStream())}))}destroy(){var e,t;R.v.debug("Datasource.destroy",null===(e=this.options)||void 0===e?void 0:e.resourceName),this.commitResponseUnsubscribe&&(this.commitResponseUnsubscribe(),this.commitResponseUnsubscribe=void 0),null===(t=this.pollTrigger$)||void 0===t||t.complete(),this.status=void 0,this.fetchMetadataRequired=void 0,this.options={},this.resourceType=void 0,this.availableIndexes=[],this.originalFieldDef=[],this.fieldMetadata=[],this.requestFields=[],this.stream=void 0}get allResourceParams(){var e;if(this._allParams)return this._allParams;let t;if(this.options.orderBy)if((null===(e=this.availableIndexes)||void 0===e?void 0:e.findIndex((e=>e.NAME===this.options.orderBy)))>-1)t=this.options.orderBy;else{const e=this.availableIndexes.map((e=>e.NAME));R.v.warn("Specified [orderBy] index is not valid and will not be used. See https://learn.genesis.global/docs/database/data-types/index-entities/ - Available indexes:",e)}return this._allParams={CRITERIA_MATCH:this.options.criteria,MAX_ROWS:this.options.maxRows,VIEW_NUMBER:this.options.viewNumber,FIELDS:this.options.fields,MAX_VIEW:this.options.maxView,MOVING_VIEW:this.options.movingView,ORDER_BY:t,REVERSE:this.options.reverse,DISABLE_POLLING:this.options.disablePolling,POLLING_INTERVAL:this.options.pollingInterval,REQUEST:this.options.request},R.v.debug("Getting configured params:",this._allParams),this._allParams}get dataserverOnlyParams(){return{CRITERIA_MATCH:this.allResourceParams.CRITERIA_MATCH,MAX_ROWS:this.allResourceParams.MAX_ROWS,VIEW_NUMBER:this.allResourceParams.VIEW_NUMBER,FIELDS:this.allResourceParams.FIELDS,MAX_VIEW:this.allResourceParams.MAX_VIEW,MOVING_VIEW:this.allResourceParams.MOVING_VIEW,ORDER_BY:this.allResourceParams.ORDER_BY,REVERSE:this.allResourceParams.REVERSE}}get requestOnlyParams(){var e;const t=this.allResourceParams,{REQUEST:s}=t,r=(0,i.Tt)(t,["REQUEST"]),n={DETAILS:{CRITERIA_MATCH:this.options.requestAutoSetup?void 0:r.CRITERIA_MATCH,MAX_ROWS:r.MAX_ROWS,VIEW_NUMBER:r.VIEW_NUMBER},REQUEST:s};return n.REQUEST||(this.options.requestAutoSetup?n.REQUEST=Object.assign(Object.assign({},Object.fromEntries(this.requestFields.map((e=>[e.NAME,"*"])))),(null===(e=null==this?void 0:this.options)||void 0===e?void 0:e.criteria)?this.config.criteriaToFields(this.options.criteria):{}):n.REQUEST={}),n}snapshot(e){return(0,i.sH)(this,void 0,void 0,(function*(){switch(R.v.debug(`Requesting snapshot for ${this.options.resourceName} (${this.resourceType}).`),this.resourceType){case I.v.DATASERVER:return this.connect.snapshot(this.options.resourceName,Object.assign(Object.assign({},this.dataserverOnlyParams),e));case I.v.REQUEST_SERVER:return this.connect.request(this.options.resourceName,Object.assign(Object.assign({},this.requestOnlyParams),e));default:throw new Error(`Snapshot not supported for selected resource type: ${this.resourceType}`)}}))}snapshotFiltered(){return(0,i.sH)(this,arguments,void 0,(function*(e="ROW_REF"){const t=yield this.snapshot();return Array.isArray(t)?t:t.REPLY?t.REPLY:t.ROW?this.config.dataServerResultFilter(t,e).inserts:void 0}))}createStream(){return(0,i.sH)(this,void 0,void 0,(function*(){if(![I.v.DATASERVER,I.v.REQUEST_SERVER].includes(this.resourceType))throw new Error(`Streaming not supported for selected resource type: ${this.resourceType}`);return this.resourceType===I.v.DATASERVER?this.createDataserverStream():(R.v.debug(`Creating fake stream by polling ${this.options.resourceName} REQUEST_SERVER`),this.createReqRepStream())}))}createDataserverStream(){return(0,i.sH)(this,void 0,void 0,(function*(){return this.connect.stream(this.options.resourceName,(e=>{}),(e=>R.v.error(e)),this.dataserverOnlyParams)}))}createReqRepStream(){this.commitResponseUnsubscribe=this.connectEvents.addCommitResponseListener((e=>{var t;const{eventName:s,response:i}=e.detail;this.options.pollTriggerEvents&&this.options.pollTriggerEvents.includes(s)&&(null===(t=i.MESSAGE_TYPE)||void 0===t?void 0:t.endsWith("_ACK"))&&(R.v.debug(`Received commit response for ${s}, triggering poll.`),this.triggerPoll())}));const e=this.allResourceParams.DISABLE_POLLING?void 0:this.allResourceParams.POLLING_INTERVAL,t=()=>(0,a.z)([this.connect.isConnected$,this.auth.isLoggedIn$]).pipe((0,h.v)((()=>this.connect.isConnected&&this.auth.isLoggedIn)),(0,l.n)((()=>(0,c.H)(this.snapshot()))));return e?this.pollTrigger$.pipe((0,u.Z)(0),(0,l.n)((()=>(0,d.O)(0,e).pipe((0,l.n)(t))))):this.pollTrigger$.pipe((0,u.Z)(0),(0,l.n)(t))}fetchAndApplyMetadata(e){return(0,i.sH)(this,void 0,void 0,(function*(){var t,s;try{R.v.debug(`Requesting metadata for ${this.options.resourceName} Datasource`);const e=yield this.connect.getMetadata(this.options.resourceName);e&&(this.availableIndexes=null!==(t=e.INDEXES)&&void 0!==t?t:[],this.originalFieldDef=(0,v.a)(e),this.fieldMetadata=(0,v.X)(this.originalFieldDef),this.requestFields=e.REQUEST_FIELD||[],this.customRequestFields=e.FIELD||[],this.fetchMetadataRequired=!1),this.status=this.normaliseStatus({isInitialized:!0,metadataRequired:!0,hasMetadata:(null===(s=this.fieldMetadata)||void 0===s?void 0:s.length)>0})}catch(t){R.v.error(`Metadata Fetch failed for ${e}:`,t),this.status=this.normaliseStatus({isInitialized:!1,metadataRequired:!0,hasMetadata:!1})}}))}reportStatus(e={}){var t;const s=null!==(t=this.config.eventEmitter)&&void 0!==t?t:document;this.status=this.normaliseStatus(e),R.v.debug(`Dispatching '${I.w}'`,this.status),null==s||s.dispatchEvent(new CustomEvent(I.w,{detail:this.status,bubbles:s!==document,composed:!0}))}normaliseStatus(e){var t,s,i,r,n;const o=null!==(t=e.isInitialized)&&void 0!==t?t:this.initialized,a=null!==(s=e.metadataRequired)&&void 0!==s?s:this.fetchMetadataRequired,c=null!==(i=e.hasMetadata)&&void 0!==i?i:(null===(r=this.fieldMetadata)||void 0===r?void 0:r.length)>0;return{name:null===(n=this.options)||void 0===n?void 0:n.resourceName,type:this.resourceType,isInitialized:o,metadataRequired:a,hasMetadata:c}}invalidateCache(){this._allParams=null}};(0,i.Cg)([r.observable],C.prototype,"status",void 0),(0,i.Cg)([r.observable],C.prototype,"fetchMetadataRequired",void 0),(0,i.Cg)([r.observable],C.prototype,"startStreamRequired",void 0),(0,i.Cg)([r.observable],C.prototype,"originalFieldDef",void 0),(0,i.Cg)([r.observable],C.prototype,"fieldMetadata",void 0),(0,i.Cg)([r.observable],C.prototype,"requestFields",void 0),(0,i.Cg)([r.observable],C.prototype,"customRequestFields",void 0),(0,i.Cg)([r.observable],C.prototype,"availableIndexes",void 0),(0,i.Cg)([r.observable],C.prototype,"readOnly",void 0),(0,i.Cg)([r.observable],C.prototype,"stream",void 0),C=(0,i.Cg)([(0,i.Qj)(0,g.dm),(0,i.Qj)(1,E.N),(0,i.Qj)(2,A),(0,i.Qj)(3,f.aB),(0,i.Qj)(4,S.a4)],C);const M=n.DI.createInterface((e=>e.transient(C)))},40370:(e,t,s)=>{s.d(t,{C:()=>a});var i=s(55823),r=s(33681),n=s(17465),o=s(39087);const a=e=>{class t extends e{constructor(){super(),this.hasOwnProperty("onDatasourceStatusChanged")||(this.onDatasourceStatusChanged=e=>{var t;this.resourceName||n.v.warn("Target classes must have a resourceName property to use the DatasourceEventHandler mixin.");const s=e.detail;if(s.name===this.resourceName){const e=null!==(t=this.datasourceStatus)&&void 0!==t?t:{isInitialized:!1,hasMetadata:!1};(e.isInitialized!==s.isInitialized||s.metadataRequired&&e.hasMetadata!==s.hasMetadata)&&(this.datasourceStatus=s)}})}datasourceStatusChanged(e,t){n.v.debug("Target classes should override the datasourceStatusChanged method of the DatasourceEventHandler mixin to respond to changes in the target datasource.")}connectedCallback(){super.connectedCallback(),document.addEventListener(o.w,this.onDatasourceStatusChanged,{passive:!0,capture:!0})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(o.w,this.onDatasourceStatusChanged,{capture:!0})}}return(0,i.Cg)([r.observable],t.prototype,"datasourceStatus",void 0),t}},39087:(e,t,s)=>{var i;s.d(t,{v:()=>i,w:()=>r}),function(e){e.DATASERVER="DATASERVER",e.EVENT_HANDLER="EVENT_HANDLER",e.REQUEST_SERVER="REQUEST_SERVER"}(i||(i={}));const r="datasource-status-changed"},96730:(e,t,s)=>{function i(e,t=";"){return e?e.split(t).map((e=>e.trim())).sort(((e,t)=>e.localeCompare(t))).join(t):e}s.d(t,{Q:()=>i})},41119:(e,t,s)=>{var i;s.d(t,{v:()=>r,w:()=>i}),function(e){e.STRING="STRING",e.NUMBER="NUMBER",e.BOOLEAN="BOOLEAN",e.ENUM="ENUM",e.DATE="DATE",e.DATETIME="DATETIME",e.CUSTOM="CUSTOM",e.NANO_TIMESTAMP="NANO_TIMESTAMP"}(i||(i={}));const r={STRING:i.STRING,ENUM:i.ENUM,BOOLEAN:i.BOOLEAN,INT:i.NUMBER,LONG:i.NUMBER,DOUBLE:i.NUMBER,BIGDECIMAL:i.NUMBER,DATE:i.DATE,DATETIME:i.DATETIME,NANO_TIMESTAMP:i.NANO_TIMESTAMP}},48707:(e,t,s)=>{s.d(t,{X:()=>o,a:()=>a});var i=s(39087),r=s(17465),n=s(41119);const o=e=>e?e.map((e=>{const t={name:e.NAME,type:n.v[e.TYPE]||n.w.STRING};if(e.TYPE===n.w.ENUM&&e.VALID_VALUES)try{t.enumOptions=Array.isArray(e.VALID_VALUES)?e.VALID_VALUES:e.VALID_VALUES.split("|")}catch(e){r.v.error(e),t.enumOptions=[]}return t})):null,a=e=>{var t;const s=null==e?void 0:e.TYPE;if(s===i.v.DATASERVER)return e.FIELD||[];if(s===i.v.REQUEST_SERVER)return e.REPLY_FIELD||(null===(t=e.REPLY)||void 0===t?void 0:t.FIELD)||[];throw new Error(`Unsupported resource type: ${s}`)}},98316:(e,t,s)=>{s.d(t,{N:()=>n});var i=s(84674);class r{constructor(){this.storageKeyPrefix="",this.returnUrl=this.getSessionStorageItem("returnUrl")||""}deleteUserFromSessionStorage(){["authToken","refreshToken","sessionId","ssoToken"].forEach((e=>this.removeSessionStorageItem(e))),this.removeLocalStorageItem("refreshToken")}setStorageKeyPrefix(e){this.storageKeyPrefix=`${e.replace(/\s/g,"")}/`}setAuthResult(e){var t;this.setSessionStorageItem("authToken",e.SESSION_AUTH_TOKEN),this.setSessionStorageItem("refreshToken",e.REFRESH_AUTH_TOKEN),this.setSessionStorageItem("username",e.USER_NAME),this.setSessionStorageItem("sessionId",e.SESSION_ID),(null===(t=e.DETAILS)||void 0===t?void 0:t.MFA_CODE)&&this.setSessionStorageItem("mfaToken",e.DETAILS.MFA_CODE)}captureReturnUrl(){const{pathname:e,search:t,hash:s}=location;if(e&&(e.includes("/login")||e.includes("/auth")))return;const i=`${"/"!==e?e:""}`;this.returnUrl=`${i}${t}${s}`,this.setSessionStorageItem("returnUrl",this.returnUrl)}setItem(e,t,s){"local"===s?localStorage.setItem(this.storageKeyPrefix+e,t):sessionStorage.setItem(this.storageKeyPrefix+e,t)}getItem(e,t){return"local"===t?localStorage.getItem(this.storageKeyPrefix+e):sessionStorage.getItem(this.storageKeyPrefix+e)}removeItem(e,t){"local"===t?localStorage.removeItem(this.storageKeyPrefix+e):sessionStorage.removeItem(this.storageKeyPrefix+e)}setLocalStorageItem(e,t){this.setItem(e,t,"local")}setSessionStorageItem(e,t){this.setItem(e,t,"session")}getLocalStorageItem(e){return this.getItem(e,"local")}getSessionStorageItem(e){return this.getItem(e,"session")}removeLocalStorageItem(e){this.removeItem(e,"local")}removeSessionStorageItem(e){this.removeItem(e,"session")}}const n=i.DI.createInterface((e=>e.singleton(r)))},17465:(e,t,s)=>{s.d(t,{v:()=>r});var i=s(30568);const r=(0,i.createLogger)("foundation-comms")},92277:(e,t,s)=>{s.d(t,{KJ:()=>E});var i=s(55823),r=s(17190),n=s(33681),o=s(84674),a=s(79780);const c=(0,s(30568).createLogger)("foundation-user"),d={trackActionExclusions:[],trackPathExclusions:[""],setUser(e,t){if(e.isAuthenticated)throw new Error("User already set. If this is intentional, please call User.unset first.");return c.debug("setUser",t),e.rawProperties=structuredClone(t),e.userKVs=t.userKVs,e.details=t.details,e.permission=t.permission,e.profile=t.profile,e.sourceRef=t.sourceRef,e.userName=t.userName,e.isAuthenticated=!0,e},unsetUser:e=>(c.debug("unsetUser"),e.rawProperties=void 0,e.userKVs=void 0,e.details=void 0,e.permission=void 0,e.profile=void 0,e.sourceRef=void 0,e.userName=void 0,e.isAuthenticated=!1,e)},h=o.DI.createInterface((e=>e.instance(d))),l=(0,a.Es)("genesis-user");class u{constructor(){this.pathHistory=[],this.actionHistory=[],this.isAuthenticated=!1,this.authenticationChangeListeners=(0,r.r)()}set(e){return this.config.setUser(this,e)}unset(){return this.config.unsetUser(this)}get isAnonymous(){return!this.isAuthenticated}isAdmin(){return this.hasProfile("ADMIN")}isBanned(){return this.hasProfile("BANNED")}hasPermission(e){return this.hasKey(this.permission,e)}hasProfile(e){return this.hasKey(this.profile,e)}trackPath(){const{pathname:e,search:t,hash:s}=location,i=`${`${"/"!==e?e:""}`}${t}${s}`;if(!this.config.trackPathExclusions.includes(i))return this.pathHistory.push(i),i}clearPaths(){this.pathHistory=[]}lastPath(){const e=this.pathHistory.length;return e>0?this.pathHistory[e-1]:void 0}trackAction(e){this.config.trackActionExclusions.includes(e)||this.actionHistory.push(e)}clearActions(){this.actionHistory=[]}lastAction(){const e=this.actionHistory.length;return e>0?this.actionHistory[e-1]:void 0}clearTrackingHistory(){this.clearPaths(),this.clearActions()}hasKey(e,t){return!!(e&&e.length&&t)&&(Array.isArray(t)||(t=[t]),t.some((t=>e.includes(t))))}addAuthenticationChangeListener(e){var t;return null===(t=this.authenticationChangeListeners)||void 0===t?void 0:t.subscribe(e)}isAuthenticatedChanged(){var e;null===(e=this.authenticationChangeListeners)||void 0===e||e.publish(new CustomEvent("user-authentication-change",{detail:this.isAuthenticated}));const t=o.DI.getOrCreateDOMContainer().get(l);t.postMessage("user-authentication-change",this.isAuthenticated),t.close()}userNameChanged(){n.Observable.notify(this,"username")}get username(){return n.Observable.track(this,"username"),this.userName}permissionChanged(){n.Observable.notify(this,"permissions")}get permissions(){return n.Observable.track(this,"permissions"),this.permission}profileChanged(){n.Observable.notify(this,"profiles")}get profiles(){return n.Observable.track(this,"profiles"),this.profile}hasAdminProfile(){return this.isAdmin()}}(0,i.Cg)([h],u.prototype,"config",void 0),(0,i.Cg)([n.observable],u.prototype,"pathHistory",void 0),(0,i.Cg)([n.observable],u.prototype,"actionHistory",void 0),(0,i.Cg)([n.observable],u.prototype,"isAuthenticated",void 0),(0,i.Cg)([n.observable],u.prototype,"userKVs",void 0),(0,i.Cg)([n.observable],u.prototype,"details",void 0),(0,i.Cg)([n.observable],u.prototype,"permission",void 0),(0,i.Cg)([n.observable],u.prototype,"profile",void 0),(0,i.Cg)([n.observable],u.prototype,"sourceRef",void 0),(0,i.Cg)([n.observable],u.prototype,"userName",void 0),(0,i.Cg)([n.observable],u.prototype,"rawProperties",void 0);const E=o.DI.createInterface((e=>e.singleton(u)))},68424:(e,t,s)=>{s.d(t,{J:()=>n});var i=s(28745);function r(e){const t=[],s=new Set;return function e(i){const r=Array.from(i.querySelectorAll("*"));t.push(...r),r.forEach((t=>{t.shadowRoot&&!s.has(t.shadowRoot)&&(s.add(t.shadowRoot),e(t.shadowRoot))}))}(e),t}function n(e,t){let s=e;for(;s;){const e=s.tagName.toLowerCase();if(e.endsWith("-design-system-provider")){const t=e.split("-design-system-provider")[0];if(t)return i.v.debug(`Found provider by ancestor search: ${e}, prefix: ${t}`),t}s=s.parentElement?s.parentElement:s.getRootNode&&s.getRootNode()instanceof ShadowRoot?s.getRootNode().host:null}const n=document.querySelectorAll('[class*="-design-system-provider"],[id*="-design-system-provider"]'),o=Array.from(n),a=r(document).filter((e=>{var t;const s=null===(t=e.tagName)||void 0===t?void 0:t.toLowerCase();return(null==s?void 0:s.endsWith("-design-system-provider"))||!1}));if(o.push(...a),o.length>0){const e=o[0].tagName.toLowerCase(),t=e.split("-design-system-provider")[0];if(t)return i.v.debug(`Found provider by document search: ${e}, prefix: ${t}`),t}return i.v.debug(`No provider found. Falling back to ${t}.`),t}},40729:(e,t,s)=>{s.d(t,{O:()=>d});var i=s(33681);const r=new Map([["FAST-TEXT-AREA","input"],["FAST-TEXT-FIELD","input"],["FOUNDATION-TEXT-AREA","input"],["FOUNDATION-TEXT-FIELD","input"],["INPUT","input"],["ZERO-TEXT-FIELD","input"]]);function n(e){this.keyAttr||(this.target[this.targetName]=e)}function o(e,t){this.keyAttr&&(this.updateTarget=n),this.originalBind.call(this,e,t),this.target.addEventListener(this.changeEvent,this.changeHandler)}function a(){this.originalUnbind.call(this),this.target.removeEventListener(this.changeEvent,this.changeHandler)}class c extends i.HTMLBindingDirective{constructor(e,t,s,i){super(e),this.keyAttr=i,this.conversionType=t,this.eventName=s}createBehavior(e){const t=super.createBehavior(e);return t.originalBind=t.bind,t.originalUnbind=t.unbind,t.keyAttr=this.keyAttr,t.bind=o,t.unbind=a,t.changeEvent=function(e,t){var s;const i=e.tagName;return"default"===t?null!==(s=r.get(i))&&void 0!==s?s:"change":t}(e,this.eventName),t.changeHandler=()=>{const e="boolean"===this.conversionType?t.target.checked:t.target.value;if(this.keyAttr){const s=t.bindingObserver.last,i=t.target[this.keyAttr];s.propertySource[s.propertyName][i]=this.convert(e)}else{const s=t.bindingObserver.last;s.propertySource[s.propertyName]=this.convert(e)}},t}convert(e){if(null==e)return e;switch(this.conversionType){case"time":const t=new Date(e).getTime();return isNaN(t)?void 0:t;case"number":return e.length?Number(e):void 0;case"string":return String(e);case"boolean":return Boolean(e);default:return e}}}function d(e,t="string",s="default",i){return new c(e,t,s,i)}},84686:(e,t,s)=>{s.d(t,{Be:()=>S,H6:()=>O,OB:()=>r,PF:()=>n,aW:()=>E,vN:()=>a});let i="webpack";try{i="webpack"}catch(e){}let r="/";try{r="auto".replace(/\/$/,"")}catch(e){}let n,o="gwf";try{"undefined"!=typeof SOCKET_EXT&&(o=SOCKET_EXT)}catch(e){}try{n=FORCE_HTTP}catch(e){}const a=`${location.protocol.replace("http","ws")}//${location.host}${r}/${o}/`;"true"===n?location.protocol:location.protocol.replace("http","ws");let c,d,h,l,u=null;try{"undefined"!=typeof API_HOST&&(u=API_HOST)}catch(e){}try{c=""}catch(e){}try{d=DEFAULT_ORGANISATION}catch(e){}try{h=DEFAULT_PASSWORD}catch(e){}try{l=DEFAULT_USER}catch(e){}let E="gwf/event-login-auth";"undefined"!=typeof GENX_LOGIN_URL&&(E=GENX_LOGIN_URL);let g="gwf/event-login-auth";"undefined"!=typeof GENX_LOGIN_REFRESH_URL&&(g=GENX_LOGIN_REFRESH_URL);let S="gwf/event-login-details";"undefined"!=typeof GENX_LOGIN_DETAILS_URL&&(S=GENX_LOGIN_DETAILS_URL);let v="gwf/event-logout";"undefined"!=typeof GENX_LOGOUT_URL&&(v=GENX_LOGOUT_URL);let R="gwf/event-change-user-password";"undefined"!=typeof GENX_CHANGE_PASSWORD_URL&&(R=GENX_CHANGE_PASSWORD_URL);let m="gwf/event-self-service-password-reset";"undefined"!=typeof GENX_FORGOT_PASSWORD_URL&&(m=GENX_FORGOT_PASSWORD_URL);let p="gwf/event-password-reset-action";"undefined"!=typeof GENX_RESET_PASSWORD_URL&&(p=GENX_RESET_PASSWORD_URL);let T="gwf/sso/list";"undefined"!=typeof GENX_SSO_LIST_URL&&(T=GENX_SSO_LIST_URL);let _="gwf/{type}/login?idp={id}";"undefined"!=typeof GENX_SSO_LOGIN_URL&&(_=GENX_SSO_LOGIN_URL);let O="default";"undefined"!=typeof GENX_ENVIRONMENT_LEVEL&&(O=GENX_ENVIRONMENT_LEVEL)},12066:(e,t,s)=>{s.d(t,{CL:()=>r,Ey:()=>a,zT:()=>o});const i=10;function r(e){return!e||isNaN(e)?null:new Date(e).toISOString().slice(0,i)}const n=19;function o(e){return!e||isNaN(e)?null:new Date(e).toISOString().slice(0,n).replace("T"," ")}function a(e,t){return t?o(e):r(e)}},17190:(e,t,s)=>{s.d(t,{j:()=>r,r:()=>i});const i=()=>{let e=[];return{subscribe:t=>(e.push(t),()=>e=e.filter((e=>e!==t))),publish(t){e.forEach((e=>e(t)))}}},r=(e,t)=>{const s={root:document.documentElement};new IntersectionObserver((e=>{e.forEach((e=>{t(e.intersectionRatio>0)}))}),s).observe(e)}},49229:(e,t,s)=>{s.d(t,{b_:()=>h});var i=s(55823),r=s(84674),n=s(61455);const o=r.DI.createInterface();function a(e){return Number.isSafeInteger(+e)?Number(e):(0,n.Fq)(e)?BigInt.asIntN(64,e):parseFloat(e)}const c={parse:e=>(0,n.qg)(e,null,a),stringify:e=>(0,n.As)(e)};let d=class{constructor(e=c){this.config=e,this.serialize=e=>this.config.stringify(e)}deserialize(e){return e?"string"==typeof e?this.config.parse(e):e&&e.ok?e.text().then((e=>this.config.parse(e))):(e&&e.data&&(e=e.data),this.config.parse(e)):Promise.resolve({})}};d=(0,i.Cg)([(0,i.Qj)(0,(0,r.optional)(o))],d);const h=r.DI.createInterface((e=>e.singleton(d)))},32808:(e,t,s)=>{s.d(t,{k:()=>c});var i=s(55823),r=s(84674),n=s(31261),o=s(28745);class a{constructor(){}createId(e=!1){const t=(0,n.A)();return e&&o.v.debug(`UUID.createID ${t}`),t}createRemoteId(){return(0,i.sH)(this,arguments,void 0,(function*(e=!1){const t=(0,n.A)();return e&&o.v.debug(`UUID.createRemoteID ${t}`),t}))}}const c=r.DI.createInterface((e=>e.singleton(a)))}}]);
2
2
  //# sourceMappingURL=347.85a76472fa50b39b10ff3870491f9fda.js.map
@@ -179,6 +179,7 @@
179
179
  icon-size="${a=>{var e;return null===(e=a.params)||void 0===e?void 0:e.iconSize}}"
180
180
  text-color="${a=>{var e;return null===(e=a.params)||void 0===e?void 0:e.textColor}}"
181
181
  text="${a=>{var e;return null===(e=a.params)||void 0===e?void 0:e.text}}"
182
+ date-countdown-unit="${a=>{var e;return null===(e=a.params)||void 0===e?void 0:e.dateCountdownUnit}}"
182
183
  date-countdown="${a=>{var e;return null===(e=a.params)||void 0===e?void 0:e.dateCountdown}}"
183
184
  date-countdown-completed-message="${a=>{var e;return null===(e=a.params)||void 0===e?void 0:e.dateCountdownCompletedMessage}}"
184
185
  >
@@ -8558,9 +8559,9 @@
8558
8559
  </span>
8559
8560
  ${e=>(0,o.P)(a,e.gridErrorItems.filter((({type:a})=>"datasource"===a)))}
8560
8561
  </template>
8561
- `,g=i()},55365:(a,e,r)=>{r.d(e,{A7:()=>h,IX:()=>c,Kb:()=>s,W3:()=>t,YO:()=>m,b7:()=>d,eL:()=>l,h1:()=>v,k7:()=>p,lz:()=>w,mJ:()=>o,mr:()=>u,o2:()=>f,uA:()=>b});var t,o,i=r(95777),g=r(33681),n=r(84674);!function(a){a.foregroundColor="--ag-foreground-color",a.dataColor="--ag-data-color",a.secondaryForegroundColor="--ag-secondary-foreground-color",a.headerForegroundColor="--ag-header-foreground-color",a.disabledForegroundColor="--ag-disabled-foreground-color",a.backgroundColor="--ag-background-color",a.headerBackgroundColor="--ag-header-background-color",a.subheaderBackgroundColor="--ag-subheader-background-color",a.subheaderToolbarBackgroundColor="--ag-subheader-toolbar-background-color",a.controlPanelBackgroundColor="--ag-control-panel-background-color",a.selectedRowBackgroundColor="--ag-selected-row-background-color",a.oddRowBackgroundColor="--ag-odd-row-background-color",a.rowHoverColor="--ag-row-hover-color",a.rangeSelectionBorderColor="--ag-range-selection-border-color",a.rangeSelectionBackgroundColor="--ag-range-selection-background-color",a.selectedTabUnderlineColor="--ag-selected-tab-underline-color",a.rangeSelectionChartCategoryBackgroundColor="--ag-range-selection-chart-category-background-color",a.rangeSelectionChartBackgroundColor="--ag-range-selection-chart-background-color",a.headerCellHoverBackgroundColor="--ag-header-cell-hover-background-color",a.headerCellMovingBackgroundColor="--ag-header-cell-moving-background-color",a.chipBackgroundColor="--ag-chip-background-color",a.borderColor="--ag-border-color",a.secondaryBorderColor="--ag-secondary-border-color",a.rowBorderColor="--ag-row-border-color",a.headerColumnSeparatorColor="--ag-header-column-separator-color",a.headerColumnResizeHandleColor="--ag-header-column-resize-handle-color",a.inputBorderColor="--ag-input-border-color",a.inputDisabledBorderColor="--ag-input-disabled-border-color",a.inputDisabledBackgroundColor="--ag-input-disabled-background-color",a.checkboxBackgroundColor="--ag-checkbox-background-color",a.checkboxCheckedColor="--ag-checkbox-checked-color",a.checkboxUncheckedColor="--ag-checkbox-unchecked-color",a.checkboxIndeterminateColor="--ag-checkbox-indeterminate-color",a.toggleButtonOffBorderColor="--ag-toggle-button-off-border-color",a.toggleButtonOffBackgroundColor="--ag-toggle-button-off-background-color",a.toggleButtonOnBorderColor="--ag-toggle-button-on-border-color",a.toggleButtonOnBackgroundColor="--ag-toggle-button-on-background-color",a.toggleButtonSwitchBackgroundColor="--ag-toggle-button-switch-background-color",a.toggleButtonSwitchBorderColor="--ag-toggle-button-switch-border-color",a.minichartSelectedChartColor="--ag-minichart-selected-chart-color",a.minichartSelectedPageColor="--ag-minichart-selected-page-color",a.modalOverlayBackgroundColor="--ag-modal-overlay-background-color",a.inputFocusBoxShadow="--ag-input-focus-box-shadow",a.inputFocusBorderColor="--ag-input-focus-border-color"}(t||(t={})),function(a){a.alpine="ag-theme-alpine",a.alpineDark="ag-theme-alpine-dark",a.balham="ag-theme-balham",a.balhamDark="ag-theme-balham-dark",a.material="ag-theme-material"}(o||(o={}));const l=a=>`${a}-token-map`,d=a=>`${a}-fonts`,s=(a,e)=>g.css`
8562
+ `,g=i()},55365:(a,e,r)=>{r.d(e,{A7:()=>h,IX:()=>c,Kb:()=>s,W3:()=>t,YO:()=>m,b7:()=>d,eL:()=>l,h1:()=>v,k7:()=>p,lz:()=>w,mJ:()=>o,mr:()=>u,o2:()=>f,uA:()=>b});var t,o,i=r(38612),g=r(33681),n=r(84674);!function(a){a.foregroundColor="--ag-foreground-color",a.dataColor="--ag-data-color",a.secondaryForegroundColor="--ag-secondary-foreground-color",a.headerForegroundColor="--ag-header-foreground-color",a.disabledForegroundColor="--ag-disabled-foreground-color",a.backgroundColor="--ag-background-color",a.headerBackgroundColor="--ag-header-background-color",a.subheaderBackgroundColor="--ag-subheader-background-color",a.subheaderToolbarBackgroundColor="--ag-subheader-toolbar-background-color",a.controlPanelBackgroundColor="--ag-control-panel-background-color",a.selectedRowBackgroundColor="--ag-selected-row-background-color",a.oddRowBackgroundColor="--ag-odd-row-background-color",a.rowHoverColor="--ag-row-hover-color",a.rangeSelectionBorderColor="--ag-range-selection-border-color",a.rangeSelectionBackgroundColor="--ag-range-selection-background-color",a.selectedTabUnderlineColor="--ag-selected-tab-underline-color",a.rangeSelectionChartCategoryBackgroundColor="--ag-range-selection-chart-category-background-color",a.rangeSelectionChartBackgroundColor="--ag-range-selection-chart-background-color",a.headerCellHoverBackgroundColor="--ag-header-cell-hover-background-color",a.headerCellMovingBackgroundColor="--ag-header-cell-moving-background-color",a.chipBackgroundColor="--ag-chip-background-color",a.borderColor="--ag-border-color",a.secondaryBorderColor="--ag-secondary-border-color",a.rowBorderColor="--ag-row-border-color",a.headerColumnSeparatorColor="--ag-header-column-separator-color",a.headerColumnResizeHandleColor="--ag-header-column-resize-handle-color",a.inputBorderColor="--ag-input-border-color",a.inputDisabledBorderColor="--ag-input-disabled-border-color",a.inputDisabledBackgroundColor="--ag-input-disabled-background-color",a.checkboxBackgroundColor="--ag-checkbox-background-color",a.checkboxCheckedColor="--ag-checkbox-checked-color",a.checkboxUncheckedColor="--ag-checkbox-unchecked-color",a.checkboxIndeterminateColor="--ag-checkbox-indeterminate-color",a.toggleButtonOffBorderColor="--ag-toggle-button-off-border-color",a.toggleButtonOffBackgroundColor="--ag-toggle-button-off-background-color",a.toggleButtonOnBorderColor="--ag-toggle-button-on-border-color",a.toggleButtonOnBackgroundColor="--ag-toggle-button-on-background-color",a.toggleButtonSwitchBackgroundColor="--ag-toggle-button-switch-background-color",a.toggleButtonSwitchBorderColor="--ag-toggle-button-switch-border-color",a.minichartSelectedChartColor="--ag-minichart-selected-chart-color",a.minichartSelectedPageColor="--ag-minichart-selected-page-color",a.modalOverlayBackgroundColor="--ag-modal-overlay-background-color",a.inputFocusBoxShadow="--ag-input-focus-box-shadow",a.inputFocusBorderColor="--ag-input-focus-border-color"}(t||(t={})),function(a){a.alpine="ag-theme-alpine",a.alpineDark="ag-theme-alpine-dark",a.balham="ag-theme-balham",a.balhamDark="ag-theme-balham-dark",a.material="ag-theme-material"}(o||(o={}));const l=a=>`${a}-token-map`,d=a=>`${a}-fonts`,s=(a,e)=>g.css`
8562
8563
  .${l(a)} {
8563
8564
  ${new i.CSSVarsTokenMapper(e)}
8564
8565
  }
8565
- `;var c,p;!function(a){a.action="action",a.actionsMenu="actionsMenu",a.boolean="boolean",a.editable="editable",a.text="text",a.select="select",a.statusPill="statusPill",a.dateEditor="dateEditor",a.selectEditor="selectEditor",a.numberEditor="numberEditor",a.stringEditor="stringEditor",a.multiselectEditor="multiselectEditor"}(c||(c={})),function(a){a.labelValue="labelValue",a.pagination="pagination",a.loadMore="loadMore",a.reload="reload"}(p||(p={}));const u="onGridReady",h="__editedColumn",v="__errorColumn",m={},w=n.DI.createInterface((a=>a.instance(m)));var b;!function(a){a.camelCase="camelCase",a.capitalCase="capitalCase",a.dotCase="dotCase",a.headerCase="headerCase",a.noCase="noCase",a.paramCase="paramCase",a.pascalCase="pascalCase",a.pathCase="pathCase",a.sentenceCase="sentenceCase",a.snakeCase="snakeCase"}(b||(b={}));const f={rows:!0,maxRows:!1,aggregation:!0,loadMore:{tooltip:"Load more rows from server"},reload:{tooltip:"Reload the datasource."}}},11749:(a,e,r)=>{r.d(e,{H:()=>i});var t=r(55823),o=r(98316);class i{getColumnState(a){return(0,t.sH)(this,void 0,void 0,(function*(){const e=this.session.getLocalStorageItem("gridOptions");if(e){const r=JSON.parse(e);if(a in r)return JSON.parse(r[a])}return[]}))}saveColumnState(a,e){return(0,t.sH)(this,void 0,void 0,(function*(){const r=JSON.parse(this.session.getLocalStorageItem("gridOptions")||"{}");r[a]=JSON.stringify(e),this.session.setLocalStorageItem("gridOptions",JSON.stringify(r))}))}getFilterModel(a){return(0,t.sH)(this,void 0,void 0,(function*(){const e=this.session.getLocalStorageItem("gridOptions");if(e){const r=JSON.parse(e);if(a in r)return JSON.parse(r[a])}return{}}))}saveFilterModel(a,e){return(0,t.sH)(this,void 0,void 0,(function*(){const r=JSON.parse(this.session.getLocalStorageItem("gridOptions")||"{}");r[a]=JSON.stringify(e),this.session.setLocalStorageItem("gridOptions",JSON.stringify(r))}))}}(0,t.Cg)([o.N],i.prototype,"session",void 0)},53397:(a,e,r)=>{r.d(e,{l:()=>i});var t=r(84674),o=r(11749);const i=t.DI.createInterface((a=>a.singleton(o.H)))},52540:(a,e,r)=>{r.d(e,{k:()=>t});class t{init(a){this.element=document.createElement("div"),this.element.classList.add("ag-status-name-value","ag-status-panel"),this.element.setAttribute("data-test-id","grid-label-value-panel"),this.element.setAttribute("role","status");const e=a;e.hide&&(this.element.style.display="none"),this.element.setAttribute("aria-label",`${e.label}: ${e.value}`);const r=document.createElement("span");r.setAttribute("data-test-id","grid-label-value-label"),r.setAttribute("aria-hidden","true"),r.innerHTML=`${e.label}:&nbsp; `;const t=document.createElement("span");t.classList.add("ag-status-name-value-value"),t.setAttribute("data-test-id","grid-label-value-value"),t.setAttribute("aria-hidden","true"),t.innerHTML=e.value,this.element.appendChild(r),this.element.appendChild(t)}getGui(){return this.element}destroy(){}}},49104:(a,e,r)=>{r.d(e,{s:()=>g});var t=r(55823),o=r(68424),i=r(63486);class g{constructor(){this.buttonLabel="Load More",this.isLoading=!1,this.isLeftAligned=!1}init(a){var e,r,t;for(this.params=a,this.gridApi=a.api,this.element=document.createElement("div"),this.element.classList.add("ag-status-panel","ag-load-more-panel"),this.element.setAttribute("data-test-id","grid-load-more-panel"),this.element.setAttribute("role","region"),this.element.setAttribute("aria-label","Load more data controls"),this.element.style.display="flex",this.element.style.alignItems="center",this.isLeftAligned=(null===(t=null===(r=null===(e=this.gridApi)||void 0===e?void 0:e.gridOptionsService)||void 0===r?void 0:r.gridOptions)||void 0===t?void 0:t.pagination)||!1,this.element.style.justifyContent=this.isLeftAligned?"flex-start":"flex-end",this.element.style.paddingLeft="var(--ag-grid-size)",this.element.style.paddingRight="var(--ag-grid-size)",this.element.style.height="var(--ag-status-bar-height)",this.designSystemPrefix=(0,o.J)(this.element,"zero"),this.createProgressRing(),this.createLoadMoreButton(),this.updateButtonVisibility();this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.isLeftAligned?(this.element.appendChild(this.loadMoreButton),this.element.appendChild(this.progressRing)):(this.element.appendChild(this.progressRing),this.element.appendChild(this.loadMoreButton))}createProgressRing(){this.progressRing=document.createElement(`${this.designSystemPrefix}-progress-ring`),this.progressRing.setAttribute("data-test-id","grid-load-more-progress"),this.progressRing.setAttribute("aria-label","Loading more data"),this.progressRing.style.width="20px",this.progressRing.style.height="20px",this.progressRing.style.margin=this.isLeftAligned?"0 0 0 8px":"0 8px 0 0",this.progressRing.style.display="none"}createLoadMoreButton(){var a,e;this.loadMoreButton=document.createElement(`${this.designSystemPrefix}-button`),this.loadMoreButton.setAttribute("data-test-id","grid-load-more-button");const r=(null===(a=this.params)||void 0===a?void 0:a.appearance)||"outline";this.loadMoreButton.setAttribute("appearance",r),this.loadMoreButton.textContent=this.buttonLabel,this.loadMoreButton.style.margin="2px 8px",this.loadMoreButton.style.minWidth="120px",this.loadMoreButton.style.textAlign="center",this.loadMoreButton.style.height="24px",this.loadMoreButton.style.lineHeight="20px",(null===(e=this.params)||void 0===e?void 0:e.tooltip)&&(this.loadMoreButton.setAttribute("title",this.params.tooltip),this.loadMoreButton.setAttribute("aria-describedby","grid-load-more-tooltip")),this.updateAriaLabel(),this.loadMoreButton.setAttribute("role","button"),this.clickHandler=()=>(0,t.sH)(this,void 0,void 0,(function*(){if(!this.isLoading)try{this.showLoading(!0),yield(0,i.c)(500),this.params.onLoadMore&&this.params.onLoadMore()}catch(a){this.showLoading(!1)}})),this.loadMoreButton.addEventListener("click",this.clickHandler)}updateAriaLabel(){var a,e;let r;r=(null===(a=this.params)||void 0===a?void 0:a.tooltip)?this.params.tooltip:this.isLoading?"Loading more data":(null===(e=this.params)||void 0===e?void 0:e.moreRows)?"Load more rows from server":"No more rows available",this.loadMoreButton.setAttribute("aria-label",r)}showLoading(a){var e;this.isLoading=a,a?(this.progressRing.style.display="inline-block",this.loadMoreButton.setAttribute("disabled","true"),this.loadMoreButton.textContent="Loading..."):(this.progressRing.style.display="none",(null===(e=this.params)||void 0===e?void 0:e.moreRows)?(this.loadMoreButton.textContent="Load More",this.loadMoreButton.removeAttribute("disabled")):(this.loadMoreButton.textContent="No More Rows",this.loadMoreButton.setAttribute("disabled","true"))),this.updateAriaLabel()}updateButtonVisibility(){this.params&&!this.isLoading&&(this.progressRing.style.display="none",this.params.moreRows?(this.loadMoreButton.style.display="inline-flex",this.loadMoreButton.textContent="Load More",this.loadMoreButton.removeAttribute("disabled")):(this.loadMoreButton.style.display="inline-flex",this.loadMoreButton.textContent="No More Rows",this.loadMoreButton.setAttribute("disabled","true")),this.updateAriaLabel())}updateParams(a){var e,r;const t=this.params;this.params=Object.assign(Object.assign({},this.params),a),(null==t?void 0:t.tooltip)!==(null===(e=this.params)||void 0===e?void 0:e.tooltip)&&(null===(r=this.params)||void 0===r?void 0:r.tooltip)&&this.loadMoreButton.setAttribute("title",this.params.tooltip),this.isLoading&&this.showLoading(!1),this.updateButtonVisibility()}getGui(){return this.element}destroy(){this.loadMoreButton&&this.clickHandler&&this.loadMoreButton.removeEventListener("click",this.clickHandler)}}},19060:(a,e,r)=>{r.d(e,{h:()=>t});class t{init(a){this.api=a.api,this.element=document.createElement("div"),this.element.className="ag-status-panel",this.element.setAttribute("data-test-id","grid-pagination-panel"),this.element.setAttribute("role","navigation"),this.element.setAttribute("aria-label","Pagination controls"),this.element.style.display="flex",this.element.style.alignItems="center",this.element.style.justifyContent="flex-end",this.element.style.height="var(--ag-status-bar-height)",this.createPaginationPanel(),this.updateDisplay(),this.paginationChangedHandler=()=>{this.updateDisplay()},this.api.addEventListener("paginationChanged",this.paginationChangedHandler)}getGui(){return this.element}createPaginationPanel(){this.paginationPanel=document.createElement("div"),this.paginationPanel.className="ag-paging-panel ag-unselectable",this.paginationPanel.setAttribute("id","ag-pagination-clone"),this.paginationPanel.setAttribute("data-test-id","grid-pagination-controls"),this.paginationSummaryPanel=document.createElement("span"),this.paginationSummaryPanel.className="ag-paging-row-summary-panel",this.paginationSummaryPanel.setAttribute("role","status"),this.paginationSummaryPanel.setAttribute("data-test-id","grid-pagination-summary"),this.paginationSummaryPanel.setAttribute("aria-label","Row count summary"),this.firstPageButton=this.createPaginationButton("btFirst","ag-paging-button ag-disabled","First Page",!0),this.firstPageButton.setAttribute("data-test-id","grid-pagination-first"),this.prevPageButton=this.createPaginationButton("btPrevious","ag-paging-button ag-disabled","Previous Page",!0),this.prevPageButton.setAttribute("data-test-id","grid-pagination-previous"),this.descriptionPanel=document.createElement("span"),this.descriptionPanel.className="ag-paging-description",this.descriptionPanel.setAttribute("role","status"),this.descriptionPanel.setAttribute("data-test-id","grid-pagination-description"),this.descriptionPanel.setAttribute("aria-label","Current page information"),this.pageStartDisplay=document.createElement("span"),this.pageStartDisplay.className="ag-paging-number",this.pageStartDisplay.setAttribute("id","ag-pagination-clone-start-page"),this.pageStartDisplay.setAttribute("data-test-id","grid-pagination-page-label"),this.pageStartDisplay.textContent="Page",this.pageNumberDisplay=document.createElement("span"),this.pageNumberDisplay.className="ag-paging-number",this.pageNumberDisplay.setAttribute("id","ag-pagination-clone-start-page-number"),this.pageNumberDisplay.setAttribute("ref","lbCurrent"),this.pageNumberDisplay.setAttribute("data-test-id","grid-pagination-current-page"),this.pageNumberDisplay.setAttribute("aria-label","Current page number"),this.pageNumberDisplay.textContent="1",this.pageOfDisplay=document.createElement("span"),this.pageOfDisplay.className="ag-paging-number",this.pageOfDisplay.setAttribute("id","ag-pagination-clone-of-page"),this.pageOfDisplay.setAttribute("data-test-id","grid-pagination-of-label"),this.pageOfDisplay.textContent="of",this.pageNumberTotalDisplay=document.createElement("span"),this.pageNumberTotalDisplay.className="ag-paging-number",this.pageNumberTotalDisplay.setAttribute("id","ag-pagination-clone-of-page-number"),this.pageNumberTotalDisplay.setAttribute("ref","lbTotal"),this.pageNumberTotalDisplay.setAttribute("data-test-id","grid-pagination-total-pages"),this.pageNumberTotalDisplay.setAttribute("aria-label","Total number of pages"),this.pageNumberTotalDisplay.textContent="1",this.nextPageButton=this.createPaginationButton("btNext","ag-paging-button","Next Page",!1),this.nextPageButton.setAttribute("data-test-id","grid-pagination-next"),this.lastPageButton=this.createPaginationButton("btLast","ag-paging-button","Last Page",!1),this.lastPageButton.setAttribute("data-test-id","grid-pagination-last"),this.descriptionPanel.appendChild(this.pageStartDisplay),this.descriptionPanel.appendChild(document.createTextNode(" ")),this.descriptionPanel.appendChild(this.pageNumberDisplay),this.descriptionPanel.appendChild(document.createTextNode(" ")),this.descriptionPanel.appendChild(this.pageOfDisplay),this.descriptionPanel.appendChild(document.createTextNode(" ")),this.descriptionPanel.appendChild(this.pageNumberTotalDisplay),this.paginationPanel.appendChild(this.paginationSummaryPanel),this.paginationPanel.appendChild(this.firstPageButton),this.paginationPanel.appendChild(this.prevPageButton),this.paginationPanel.appendChild(this.descriptionPanel),this.paginationPanel.appendChild(this.nextPageButton),this.paginationPanel.appendChild(this.lastPageButton),this.element.appendChild(this.paginationPanel),this.addPaginationEventListeners()}addPaginationEventListeners(){this.firstPageButton.addEventListener("click",(()=>this.goToPage("first"))),this.prevPageButton.addEventListener("click",(()=>this.goToPage("previous"))),this.nextPageButton.addEventListener("click",(()=>this.goToPage("next"))),this.lastPageButton.addEventListener("click",(()=>this.goToPage("last"))),this.firstPageButton.addEventListener("keydown",(a=>{"Enter"!==a.key&&" "!==a.key||(a.preventDefault(),this.goToPage("first"))})),this.prevPageButton.addEventListener("keydown",(a=>{"Enter"!==a.key&&" "!==a.key||(a.preventDefault(),this.goToPage("previous"))})),this.nextPageButton.addEventListener("keydown",(a=>{"Enter"!==a.key&&" "!==a.key||(a.preventDefault(),this.goToPage("next"))})),this.lastPageButton.addEventListener("keydown",(a=>{"Enter"!==a.key&&" "!==a.key||(a.preventDefault(),this.goToPage("last"))}))}createPaginationButton(a,e,r,t){const o=document.createElement("div");o.setAttribute("ref",a),o.className=e,o.setAttribute("role","button"),o.setAttribute("aria-label",r),o.setAttribute("tabindex",t?"-1":"0"),t&&o.setAttribute("aria-disabled","true");const i=document.createElement("span");return i.className=`ag-icon ag-icon-${a.substring(2).toLowerCase()}`,i.setAttribute("unselectable","on"),i.setAttribute("role","presentation"),o.appendChild(i),o}goToPage(a){switch(a){case"first":this.api.paginationGoToFirstPage();break;case"previous":this.api.paginationGoToPreviousPage();break;case"next":this.api.paginationGoToNextPage();break;case"last":this.api.paginationGoToLastPage()}}updateDisplay(){const a=this.api.paginationGetCurrentPage()+1,e=this.api.paginationGetTotalPages()||1,r=this.api.paginationGetPageSize(),t=this.api.paginationGetRowCount();this.pageNumberDisplay.textContent=a.toString(),this.pageNumberTotalDisplay.textContent=e.toString();const o=(a-1)*r+1,i=Math.min(a*r,t);this.paginationSummaryPanel.textContent=`${t>0?o:0} to ${i} of ${t}`;const g=1===a,n=a>=e;this.updateButtonState(this.firstPageButton,g),this.updateButtonState(this.prevPageButton,g),this.updateButtonState(this.nextPageButton,n),this.updateButtonState(this.lastPageButton,n)}updateButtonState(a,e){e?(a.classList.add("ag-disabled"),a.setAttribute("aria-disabled","true"),a.setAttribute("tabindex","-1")):(a.classList.remove("ag-disabled"),a.setAttribute("aria-disabled","false"),a.setAttribute("tabindex","0"))}destroy(){this.api&&this.paginationChangedHandler&&this.api.removeEventListener("paginationChanged",this.paginationChangedHandler),this.api=null,this.paginationChangedHandler=null}}},88863:(a,e,r)=>{r.d(e,{W:()=>g});var t=r(55823),o=r(68424),i=r(63486);class g{constructor(){this.isReloading=!1}init(a){this.params=a,this.element=document.createElement("div"),this.element.classList.add("ag-status-panel","ag-reload-panel"),this.element.setAttribute("data-test-id","grid-reload-panel"),this.element.setAttribute("role","region"),this.element.setAttribute("aria-label","Reload data controls"),this.element.style.display="flex",this.element.style.alignItems="center",this.element.style.justifyContent="center",this.element.style.paddingLeft="var(--ag-grid-size)",this.element.style.height="var(--ag-status-bar-height)",this.designSystemPrefix=(0,o.J)(this.element,"zero"),this.createRefreshIcon(),this.createProgressRing(),this.element.appendChild(this.refreshIcon),this.element.appendChild(this.progressRing),this.progressRing.style.display="none"}createProgressRing(){this.progressRing=document.createElement(`${this.designSystemPrefix}-progress-ring`),this.progressRing.setAttribute("data-test-id","grid-reload-progress"),this.progressRing.setAttribute("aria-label","Reloading data"),this.progressRing.style.width="20px",this.progressRing.style.height="20px",this.progressRing.style.margin="4px",this.progressRing.style.display="none"}createRefreshIcon(){var a,e,r,o;if("zero"===this.designSystemPrefix||"rapid"===this.designSystemPrefix){this.refreshIcon=document.createElement(`${this.designSystemPrefix}-icon`);const r=(null===(a=this.params)||void 0===a?void 0:a.icon)||"refresh";this.refreshIcon.setAttribute("name",r),this.refreshIcon.setAttribute("aria-label",(null===(e=this.params)||void 0===e?void 0:e.tooltip)||"Reload grid data")}else this.refreshIcon=document.createElement("div"),this.refreshIcon.textContent="↻",this.refreshIcon.setAttribute("aria-label",(null===(r=this.params)||void 0===r?void 0:r.tooltip)||"Reload grid data");this.refreshIcon.setAttribute("data-test-id","grid-reload-button"),this.refreshIcon.setAttribute("role","button"),this.refreshIcon.setAttribute("tabindex","0"),this.refreshIcon.style.cursor="pointer",this.refreshIcon.style.width="28px",this.refreshIcon.style.height="28px",this.refreshIcon.style.display="flex",this.refreshIcon.style.alignItems="center",this.refreshIcon.style.justifyContent="center",this.refreshIcon.style.fontSize="20px",(null===(o=this.params)||void 0===o?void 0:o.tooltip)&&this.refreshIcon.setAttribute("title",this.params.tooltip),this.mouseoverHandler=()=>{this.isReloading||(this.refreshIcon.style.opacity="0.7")},this.refreshIcon.addEventListener("mouseover",this.mouseoverHandler),this.mouseoutHandler=()=>{this.isReloading||(this.refreshIcon.style.opacity="1")},this.refreshIcon.addEventListener("mouseout",this.mouseoutHandler),this.clickHandler=()=>(0,t.sH)(this,void 0,void 0,(function*(){if(!this.isReloading)try{this.showReloading(!0),yield(0,i.c)(500),this.params.onReload&&this.params.onReload(),this.showReloading(!1)}catch(a){this.showReloading(!1)}})),this.refreshIcon.addEventListener("click",this.clickHandler),this.refreshIcon.addEventListener("keydown",(a=>{"Enter"!==a.key&&" "!==a.key||(a.preventDefault(),this.clickHandler(new MouseEvent("click")))}))}showReloading(a){this.isReloading=a,a?(this.refreshIcon.style.display="none",this.progressRing.style.display="inline-block"):(this.refreshIcon.style.display="inline-flex",this.progressRing.style.display="none")}updateParams(a){var e,r;const t=this.params;this.params=Object.assign(Object.assign({},this.params),a),(null==t?void 0:t.tooltip)!==(null===(e=this.params)||void 0===e?void 0:e.tooltip)&&((null===(r=this.params)||void 0===r?void 0:r.tooltip)?(this.refreshIcon.setAttribute("title",this.params.tooltip),this.refreshIcon.setAttribute("aria-label",this.params.tooltip)):(this.refreshIcon.removeAttribute("title"),this.refreshIcon.setAttribute("aria-label","Reload grid data")))}getGui(){return this.element}destroy(){this.refreshIcon&&(this.refreshIcon.removeEventListener("mouseover",this.mouseoverHandler),this.refreshIcon.removeEventListener("mouseout",this.mouseoutHandler),this.refreshIcon.removeEventListener("click",this.clickHandler))}}},73203:(a,e,r)=>{r.d(e,{y:()=>t});class t{init(a){const e=this.eGui=document.createElement("div"),r=a.value;e.classList.add("custom-tooltip"),e.style["background-color"]="#f14376",e.style.border="1px inside",e.style["border-color"]="#2e3339",e.style["border-radius"]="4px",e.style.padding="5px",e.style["box-shadow"]="0px 4px 10px 0px rgba(0, 0, 0, 0.25);",e.innerHTML=`<span style='color: #000000; font-size: 10px'>${r}</span>`}getGui(){return this.eGui}}},23201:(a,e,r)=>{function t(a,e){const r={},t=[],o="field",i="colId";return e.forEach((e=>{const g=a.find((a=>a[o]===e[i]||a[i]&&a[i]===e[i]));if(g){const a=Object.assign(Object.assign({},g),e);r[g[o]]=a,t.push(a)}})),a.forEach((a=>{if(!r.hasOwnProperty(a[o])){const e=Object.assign({},a);r[a[o]]=e,t.push(e)}})),t}r.d(e,{y:()=>t})},1510:(a,e,r)=>{r.d(e,{v:()=>o});var t=r(22661);const o=(0,t.createLogger)("grid-pro")},49874:(a,e,r)=>{function t(a){const e=[];for(const[r]of a)r&&e.push(r);return e}function o(a){const e=[];function r(a){for(const r of a)null!==r&&e.push(r)}for(const[e,t]of a)null!==e&&null!==t&&r(t);return e}r.d(e,{P:()=>o,i:()=>t})},50103:(a,e,r)=>{r.d(e,{w:()=>t});const t=a=>a.replace(/([a-z])([A-Z])|\s+/g,"$1-$2").toLowerCase()},21409:(a,e,r)=>{r.d(e,{S:()=>o});var t=r(55823);const o=a=>{var e,r,o,g,n,l,d,s,c;return c=class extends a{constructor(...a){super(a),e.add(this),r.set(this,{_key:"dom"}),o.set(this,""),g.set(this,!1),n.set(this,void 0),l.set(this,!1)}cloneNode(a){const e=this.deepClone();return a&&Array.from(this.childNodes).forEach((a=>{e.appendChild(a.cloneNode(!0))})),e}deepClone(){const a=document.createElement(this.tagName.toLowerCase());return this.getAttributeNames().forEach((e=>a.setAttribute(e,this.getAttribute(e)))),a}get shouldRunDisconnect(){return!!(0,t.gn)(this,l,"f")||("dom"===(0,t.gn)(this,r,"f")._key||"foundation-layout-cache"!==(0,t.gn)(this,r,"f")._key&&!((0,t.gn)(this,r,"f").dragging||!(0,t.gn)(this,r,"f").hasFirstLoaded||(0,t.gn)(this,e,"m",d).call(this,"disconnect")))}get shouldRunConnect(){if((0,t.gn)(this,l,"f"))return!0;if("dom"===(0,t.gn)(this,r,"f")._key)return!0;if("foundation-layout-cache"===(0,t.gn)(this,r,"f")._key)return!1;let a="reconnect";return!1===(0,t.gn)(this,g,"f")&&((0,t.GG)(this,g,!0,"f"),a="connect"),!((0,t.gn)(this,r,"f").dragging||!(0,t.gn)(this,r,"f").hasFirstLoaded||(0,t.gn)(this,e,"m",d).call(this,a))}connectedCallback(){super.connectedCallback(),"foundation-layout"!==(0,t.gn)(this,r,"f")._key&&(0,t.GG)(this,r,(0,t.gn)(this,e,"m",s).call(this,this),"f")}},r=new WeakMap,o=new WeakMap,g=new WeakMap,n=new WeakMap,l=new WeakMap,e=new WeakSet,d=function(a){var e,i;if("foundation-layout"!==(0,t.gn)(this,r,"f")._key)throw new Error("LifecycleMixin: should not be checking a token change if container not in the layout");const g=(0,t.gn)(this,o,"f")!==(0,t.gn)(this,r,"f").lifecycleUpdateToken;let d=!1;return"connect"===a?(0,t.GG)(this,o,null!==(e=(0,t.gn)(this,r,"f").lifecycleUpdateToken)&&void 0!==e?e:"","f"):"disconnect"===a?(d=g,(0,t.GG)(this,n,setTimeout((()=>{(0,t.GG)(this,l,d,"f"),(0,t.gn)(this,l,"f")&&this.disconnectedCallback()}),1e4),"f")):"reconnect"===a&&(d=g,(0,t.GG)(this,o,null!==(i=(0,t.gn)(this,r,"f").lifecycleUpdateToken)&&void 0!==i?i:"","f"),clearTimeout((0,t.gn)(this,n,"f"))),d},s=function a(r){var o;if(!0===r.getRootNode()[i])return{_key:"foundation-layout-cache"};if(r.getRootNode()instanceof Document||!(null===(o=r.getRootNode())||void 0===o?void 0:o.host))return{_key:"dom"};const g=r.getRootNode().host;if("FoundationLayoutMain"===g.class){const a=g;return a._key="foundation-layout",a}return(0,t.gn)(this,e,"m",a).call(this,g)},c},i=Symbol("layout-cache-document")},21530:(a,e,r)=>{r.d(e,{O:()=>o});var t=r(28745);const o=(a,e)=>{var r;let o=document.getElementById(e);if(o)return void t.v.debug(`\n An element with the id of '${e}' already exists and likely has the css rules applied.\n `);const i=null!==(r=document.head)&&void 0!==r?r:document.getElementsByTagName("head")[0];o=document.createElement("style"),o.id=e,i.appendChild(o);if((a.match(/}/g)||[]).length>1)return o.textContent=a,()=>{o&&i.removeChild(o)};{const e=o.sheet.insertRule(a);return()=>{o&&(o.sheet.deleteRule(e),i.removeChild(o))}}}},63486:(a,e,r)=>{r.d(e,{c:()=>t});const t=a=>new Promise((e=>{setTimeout(e,a)}))},28745:(a,e,r)=>{r.d(e,{v:()=>o});var t=r(22661);const o=(0,t.createLogger)("foundation-utils")}}]);
8566
- //# sourceMappingURL=445.17ba2e4456a0a3ca26429dc0698faf69.js.map
8566
+ `;var c,p;!function(a){a.action="action",a.actionsMenu="actionsMenu",a.boolean="boolean",a.editable="editable",a.text="text",a.select="select",a.statusPill="statusPill",a.dateEditor="dateEditor",a.selectEditor="selectEditor",a.numberEditor="numberEditor",a.stringEditor="stringEditor",a.multiselectEditor="multiselectEditor"}(c||(c={})),function(a){a.labelValue="labelValue",a.pagination="pagination",a.loadMore="loadMore",a.reload="reload"}(p||(p={}));const u="onGridReady",h="__editedColumn",v="__errorColumn",m={},w=n.DI.createInterface((a=>a.instance(m)));var b;!function(a){a.camelCase="camelCase",a.capitalCase="capitalCase",a.dotCase="dotCase",a.headerCase="headerCase",a.noCase="noCase",a.paramCase="paramCase",a.pascalCase="pascalCase",a.pathCase="pathCase",a.sentenceCase="sentenceCase",a.snakeCase="snakeCase"}(b||(b={}));const f={rows:!0,maxRows:!1,aggregation:!0,loadMore:{tooltip:"Load more rows from server"},reload:{tooltip:"Reload the datasource."}}},11749:(a,e,r)=>{r.d(e,{H:()=>i});var t=r(55823),o=r(98316);class i{getColumnState(a){return(0,t.sH)(this,void 0,void 0,(function*(){const e=this.session.getLocalStorageItem("gridOptions");if(e){const r=JSON.parse(e);if(a in r)return JSON.parse(r[a])}return[]}))}saveColumnState(a,e){return(0,t.sH)(this,void 0,void 0,(function*(){const r=JSON.parse(this.session.getLocalStorageItem("gridOptions")||"{}");r[a]=JSON.stringify(e),this.session.setLocalStorageItem("gridOptions",JSON.stringify(r))}))}getFilterModel(a){return(0,t.sH)(this,void 0,void 0,(function*(){const e=this.session.getLocalStorageItem("gridOptions");if(e){const r=JSON.parse(e);if(a in r)return JSON.parse(r[a])}return{}}))}saveFilterModel(a,e){return(0,t.sH)(this,void 0,void 0,(function*(){const r=JSON.parse(this.session.getLocalStorageItem("gridOptions")||"{}");r[a]=JSON.stringify(e),this.session.setLocalStorageItem("gridOptions",JSON.stringify(r))}))}}(0,t.Cg)([o.N],i.prototype,"session",void 0)},53397:(a,e,r)=>{r.d(e,{l:()=>i});var t=r(84674),o=r(11749);const i=t.DI.createInterface((a=>a.singleton(o.H)))},52540:(a,e,r)=>{r.d(e,{k:()=>t});class t{init(a){this.element=document.createElement("div"),this.element.classList.add("ag-status-name-value","ag-status-panel"),this.element.setAttribute("data-test-id","grid-label-value-panel"),this.element.setAttribute("role","status");const e=a;e.hide&&(this.element.style.display="none"),this.element.setAttribute("aria-label",`${e.label}: ${e.value}`);const r=document.createElement("span");r.setAttribute("data-test-id","grid-label-value-label"),r.setAttribute("aria-hidden","true"),r.innerHTML=`${e.label}:&nbsp; `;const t=document.createElement("span");t.classList.add("ag-status-name-value-value"),t.setAttribute("data-test-id","grid-label-value-value"),t.setAttribute("aria-hidden","true"),t.innerHTML=e.value,this.element.appendChild(r),this.element.appendChild(t)}getGui(){return this.element}destroy(){}}},49104:(a,e,r)=>{r.d(e,{s:()=>g});var t=r(55823),o=r(68424),i=r(63486);class g{constructor(){this.buttonLabel="Load More",this.isLoading=!1,this.isLeftAligned=!1}init(a){var e,r,t;for(this.params=a,this.gridApi=a.api,this.element=document.createElement("div"),this.element.classList.add("ag-status-panel","ag-load-more-panel"),this.element.setAttribute("data-test-id","grid-load-more-panel"),this.element.setAttribute("role","region"),this.element.setAttribute("aria-label","Load more data controls"),this.element.style.display="flex",this.element.style.alignItems="center",this.isLeftAligned=(null===(t=null===(r=null===(e=this.gridApi)||void 0===e?void 0:e.gridOptionsService)||void 0===r?void 0:r.gridOptions)||void 0===t?void 0:t.pagination)||!1,this.element.style.justifyContent=this.isLeftAligned?"flex-start":"flex-end",this.element.style.paddingLeft="var(--ag-grid-size)",this.element.style.paddingRight="var(--ag-grid-size)",this.element.style.height="var(--ag-status-bar-height)",this.designSystemPrefix=(0,o.J)(this.element,"zero"),this.createProgressRing(),this.createLoadMoreButton(),this.updateButtonVisibility();this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.isLeftAligned?(this.element.appendChild(this.loadMoreButton),this.element.appendChild(this.progressRing)):(this.element.appendChild(this.progressRing),this.element.appendChild(this.loadMoreButton))}createProgressRing(){this.progressRing=document.createElement(`${this.designSystemPrefix}-progress-ring`),this.progressRing.setAttribute("data-test-id","grid-load-more-progress"),this.progressRing.setAttribute("aria-label","Loading more data"),this.progressRing.style.width="20px",this.progressRing.style.height="20px",this.progressRing.style.margin=this.isLeftAligned?"0 0 0 8px":"0 8px 0 0",this.progressRing.style.display="none"}createLoadMoreButton(){var a,e;this.loadMoreButton=document.createElement(`${this.designSystemPrefix}-button`),this.loadMoreButton.setAttribute("data-test-id","grid-load-more-button");const r=(null===(a=this.params)||void 0===a?void 0:a.appearance)||"outline";this.loadMoreButton.setAttribute("appearance",r),this.loadMoreButton.textContent=this.buttonLabel,this.loadMoreButton.style.margin="2px 8px",this.loadMoreButton.style.minWidth="120px",this.loadMoreButton.style.textAlign="center",this.loadMoreButton.style.height="24px",this.loadMoreButton.style.lineHeight="20px",(null===(e=this.params)||void 0===e?void 0:e.tooltip)&&(this.loadMoreButton.setAttribute("title",this.params.tooltip),this.loadMoreButton.setAttribute("aria-describedby","grid-load-more-tooltip")),this.updateAriaLabel(),this.loadMoreButton.setAttribute("role","button"),this.clickHandler=()=>(0,t.sH)(this,void 0,void 0,(function*(){if(!this.isLoading)try{this.showLoading(!0),yield(0,i.c)(500),this.params.onLoadMore&&this.params.onLoadMore()}catch(a){this.showLoading(!1)}})),this.loadMoreButton.addEventListener("click",this.clickHandler)}updateAriaLabel(){var a,e;let r;r=(null===(a=this.params)||void 0===a?void 0:a.tooltip)?this.params.tooltip:this.isLoading?"Loading more data":(null===(e=this.params)||void 0===e?void 0:e.moreRows)?"Load more rows from server":"No more rows available",this.loadMoreButton.setAttribute("aria-label",r)}showLoading(a){var e;this.isLoading=a,a?(this.progressRing.style.display="inline-block",this.loadMoreButton.setAttribute("disabled","true"),this.loadMoreButton.textContent="Loading..."):(this.progressRing.style.display="none",(null===(e=this.params)||void 0===e?void 0:e.moreRows)?(this.loadMoreButton.textContent="Load More",this.loadMoreButton.removeAttribute("disabled")):(this.loadMoreButton.textContent="No More Rows",this.loadMoreButton.setAttribute("disabled","true"))),this.updateAriaLabel()}updateButtonVisibility(){this.params&&!this.isLoading&&(this.progressRing.style.display="none",this.params.moreRows?(this.loadMoreButton.style.display="inline-flex",this.loadMoreButton.textContent="Load More",this.loadMoreButton.removeAttribute("disabled")):(this.loadMoreButton.style.display="inline-flex",this.loadMoreButton.textContent="No More Rows",this.loadMoreButton.setAttribute("disabled","true")),this.updateAriaLabel())}updateParams(a){var e,r;const t=this.params;this.params=Object.assign(Object.assign({},this.params),a),(null==t?void 0:t.tooltip)!==(null===(e=this.params)||void 0===e?void 0:e.tooltip)&&(null===(r=this.params)||void 0===r?void 0:r.tooltip)&&this.loadMoreButton.setAttribute("title",this.params.tooltip),this.isLoading&&this.showLoading(!1),this.updateButtonVisibility()}getGui(){return this.element}destroy(){this.loadMoreButton&&this.clickHandler&&this.loadMoreButton.removeEventListener("click",this.clickHandler)}}},19060:(a,e,r)=>{r.d(e,{h:()=>t});class t{init(a){this.api=a.api,this.element=document.createElement("div"),this.element.className="ag-status-panel",this.element.setAttribute("data-test-id","grid-pagination-panel"),this.element.setAttribute("role","navigation"),this.element.setAttribute("aria-label","Pagination controls"),this.element.style.display="flex",this.element.style.alignItems="center",this.element.style.justifyContent="flex-end",this.element.style.height="var(--ag-status-bar-height)",this.createPaginationPanel(),this.updateDisplay(),this.paginationChangedHandler=()=>{this.updateDisplay()},this.api.addEventListener("paginationChanged",this.paginationChangedHandler)}getGui(){return this.element}createPaginationPanel(){this.paginationPanel=document.createElement("div"),this.paginationPanel.className="ag-paging-panel ag-unselectable",this.paginationPanel.setAttribute("id","ag-pagination-clone"),this.paginationPanel.setAttribute("data-test-id","grid-pagination-controls"),this.paginationSummaryPanel=document.createElement("span"),this.paginationSummaryPanel.className="ag-paging-row-summary-panel",this.paginationSummaryPanel.setAttribute("role","status"),this.paginationSummaryPanel.setAttribute("data-test-id","grid-pagination-summary"),this.paginationSummaryPanel.setAttribute("aria-label","Row count summary"),this.firstPageButton=this.createPaginationButton("btFirst","ag-paging-button ag-disabled","First Page",!0),this.firstPageButton.setAttribute("data-test-id","grid-pagination-first"),this.prevPageButton=this.createPaginationButton("btPrevious","ag-paging-button ag-disabled","Previous Page",!0),this.prevPageButton.setAttribute("data-test-id","grid-pagination-previous"),this.descriptionPanel=document.createElement("span"),this.descriptionPanel.className="ag-paging-description",this.descriptionPanel.setAttribute("role","status"),this.descriptionPanel.setAttribute("data-test-id","grid-pagination-description"),this.descriptionPanel.setAttribute("aria-label","Current page information"),this.pageStartDisplay=document.createElement("span"),this.pageStartDisplay.className="ag-paging-number",this.pageStartDisplay.setAttribute("id","ag-pagination-clone-start-page"),this.pageStartDisplay.setAttribute("data-test-id","grid-pagination-page-label"),this.pageStartDisplay.textContent="Page",this.pageNumberDisplay=document.createElement("span"),this.pageNumberDisplay.className="ag-paging-number",this.pageNumberDisplay.setAttribute("id","ag-pagination-clone-start-page-number"),this.pageNumberDisplay.setAttribute("ref","lbCurrent"),this.pageNumberDisplay.setAttribute("data-test-id","grid-pagination-current-page"),this.pageNumberDisplay.setAttribute("aria-label","Current page number"),this.pageNumberDisplay.textContent="1",this.pageOfDisplay=document.createElement("span"),this.pageOfDisplay.className="ag-paging-number",this.pageOfDisplay.setAttribute("id","ag-pagination-clone-of-page"),this.pageOfDisplay.setAttribute("data-test-id","grid-pagination-of-label"),this.pageOfDisplay.textContent="of",this.pageNumberTotalDisplay=document.createElement("span"),this.pageNumberTotalDisplay.className="ag-paging-number",this.pageNumberTotalDisplay.setAttribute("id","ag-pagination-clone-of-page-number"),this.pageNumberTotalDisplay.setAttribute("ref","lbTotal"),this.pageNumberTotalDisplay.setAttribute("data-test-id","grid-pagination-total-pages"),this.pageNumberTotalDisplay.setAttribute("aria-label","Total number of pages"),this.pageNumberTotalDisplay.textContent="1",this.nextPageButton=this.createPaginationButton("btNext","ag-paging-button","Next Page",!1),this.nextPageButton.setAttribute("data-test-id","grid-pagination-next"),this.lastPageButton=this.createPaginationButton("btLast","ag-paging-button","Last Page",!1),this.lastPageButton.setAttribute("data-test-id","grid-pagination-last"),this.descriptionPanel.appendChild(this.pageStartDisplay),this.descriptionPanel.appendChild(document.createTextNode(" ")),this.descriptionPanel.appendChild(this.pageNumberDisplay),this.descriptionPanel.appendChild(document.createTextNode(" ")),this.descriptionPanel.appendChild(this.pageOfDisplay),this.descriptionPanel.appendChild(document.createTextNode(" ")),this.descriptionPanel.appendChild(this.pageNumberTotalDisplay),this.paginationPanel.appendChild(this.paginationSummaryPanel),this.paginationPanel.appendChild(this.firstPageButton),this.paginationPanel.appendChild(this.prevPageButton),this.paginationPanel.appendChild(this.descriptionPanel),this.paginationPanel.appendChild(this.nextPageButton),this.paginationPanel.appendChild(this.lastPageButton),this.element.appendChild(this.paginationPanel),this.addPaginationEventListeners()}addPaginationEventListeners(){this.firstPageButton.addEventListener("click",(()=>this.goToPage("first"))),this.prevPageButton.addEventListener("click",(()=>this.goToPage("previous"))),this.nextPageButton.addEventListener("click",(()=>this.goToPage("next"))),this.lastPageButton.addEventListener("click",(()=>this.goToPage("last"))),this.firstPageButton.addEventListener("keydown",(a=>{"Enter"!==a.key&&" "!==a.key||(a.preventDefault(),this.goToPage("first"))})),this.prevPageButton.addEventListener("keydown",(a=>{"Enter"!==a.key&&" "!==a.key||(a.preventDefault(),this.goToPage("previous"))})),this.nextPageButton.addEventListener("keydown",(a=>{"Enter"!==a.key&&" "!==a.key||(a.preventDefault(),this.goToPage("next"))})),this.lastPageButton.addEventListener("keydown",(a=>{"Enter"!==a.key&&" "!==a.key||(a.preventDefault(),this.goToPage("last"))}))}createPaginationButton(a,e,r,t){const o=document.createElement("div");o.setAttribute("ref",a),o.className=e,o.setAttribute("role","button"),o.setAttribute("aria-label",r),o.setAttribute("tabindex",t?"-1":"0"),t&&o.setAttribute("aria-disabled","true");const i=document.createElement("span");return i.className=`ag-icon ag-icon-${a.substring(2).toLowerCase()}`,i.setAttribute("unselectable","on"),i.setAttribute("role","presentation"),o.appendChild(i),o}goToPage(a){switch(a){case"first":this.api.paginationGoToFirstPage();break;case"previous":this.api.paginationGoToPreviousPage();break;case"next":this.api.paginationGoToNextPage();break;case"last":this.api.paginationGoToLastPage()}}updateDisplay(){const a=this.api.paginationGetCurrentPage()+1,e=this.api.paginationGetTotalPages()||1,r=this.api.paginationGetPageSize(),t=this.api.paginationGetRowCount();this.pageNumberDisplay.textContent=a.toString(),this.pageNumberTotalDisplay.textContent=e.toString();const o=(a-1)*r+1,i=Math.min(a*r,t);this.paginationSummaryPanel.textContent=`${t>0?o:0} to ${i} of ${t}`;const g=1===a,n=a>=e;this.updateButtonState(this.firstPageButton,g),this.updateButtonState(this.prevPageButton,g),this.updateButtonState(this.nextPageButton,n),this.updateButtonState(this.lastPageButton,n)}updateButtonState(a,e){e?(a.classList.add("ag-disabled"),a.setAttribute("aria-disabled","true"),a.setAttribute("tabindex","-1")):(a.classList.remove("ag-disabled"),a.setAttribute("aria-disabled","false"),a.setAttribute("tabindex","0"))}destroy(){this.api&&this.paginationChangedHandler&&this.api.removeEventListener("paginationChanged",this.paginationChangedHandler),this.api=null,this.paginationChangedHandler=null}}},88863:(a,e,r)=>{r.d(e,{W:()=>g});var t=r(55823),o=r(68424),i=r(63486);class g{constructor(){this.isReloading=!1}init(a){this.params=a,this.element=document.createElement("div"),this.element.classList.add("ag-status-panel","ag-reload-panel"),this.element.setAttribute("data-test-id","grid-reload-panel"),this.element.setAttribute("role","region"),this.element.setAttribute("aria-label","Reload data controls"),this.element.style.display="flex",this.element.style.alignItems="center",this.element.style.justifyContent="center",this.element.style.paddingLeft="var(--ag-grid-size)",this.element.style.height="var(--ag-status-bar-height)",this.designSystemPrefix=(0,o.J)(this.element,"zero"),this.createRefreshIcon(),this.createProgressRing(),this.element.appendChild(this.refreshIcon),this.element.appendChild(this.progressRing),this.progressRing.style.display="none"}createProgressRing(){this.progressRing=document.createElement(`${this.designSystemPrefix}-progress-ring`),this.progressRing.setAttribute("data-test-id","grid-reload-progress"),this.progressRing.setAttribute("aria-label","Reloading data"),this.progressRing.style.width="20px",this.progressRing.style.height="20px",this.progressRing.style.margin="4px",this.progressRing.style.display="none"}createRefreshIcon(){var a,e,r,o;if("zero"===this.designSystemPrefix||"rapid"===this.designSystemPrefix){this.refreshIcon=document.createElement(`${this.designSystemPrefix}-icon`);const r=(null===(a=this.params)||void 0===a?void 0:a.icon)||"refresh";this.refreshIcon.setAttribute("name",r),this.refreshIcon.setAttribute("aria-label",(null===(e=this.params)||void 0===e?void 0:e.tooltip)||"Reload grid data")}else this.refreshIcon=document.createElement("div"),this.refreshIcon.textContent="↻",this.refreshIcon.setAttribute("aria-label",(null===(r=this.params)||void 0===r?void 0:r.tooltip)||"Reload grid data");this.refreshIcon.setAttribute("data-test-id","grid-reload-button"),this.refreshIcon.setAttribute("role","button"),this.refreshIcon.setAttribute("tabindex","0"),this.refreshIcon.style.cursor="pointer",this.refreshIcon.style.width="28px",this.refreshIcon.style.height="28px",this.refreshIcon.style.display="flex",this.refreshIcon.style.alignItems="center",this.refreshIcon.style.justifyContent="center",this.refreshIcon.style.fontSize="20px",(null===(o=this.params)||void 0===o?void 0:o.tooltip)&&this.refreshIcon.setAttribute("title",this.params.tooltip),this.mouseoverHandler=()=>{this.isReloading||(this.refreshIcon.style.opacity="0.7")},this.refreshIcon.addEventListener("mouseover",this.mouseoverHandler),this.mouseoutHandler=()=>{this.isReloading||(this.refreshIcon.style.opacity="1")},this.refreshIcon.addEventListener("mouseout",this.mouseoutHandler),this.clickHandler=()=>(0,t.sH)(this,void 0,void 0,(function*(){if(!this.isReloading)try{this.showReloading(!0),yield(0,i.c)(500),this.params.onReload&&this.params.onReload(),this.showReloading(!1)}catch(a){this.showReloading(!1)}})),this.refreshIcon.addEventListener("click",this.clickHandler),this.refreshIcon.addEventListener("keydown",(a=>{"Enter"!==a.key&&" "!==a.key||(a.preventDefault(),this.clickHandler(new MouseEvent("click")))}))}showReloading(a){this.isReloading=a,a?(this.refreshIcon.style.display="none",this.progressRing.style.display="inline-block"):(this.refreshIcon.style.display="inline-flex",this.progressRing.style.display="none")}updateParams(a){var e,r;const t=this.params;this.params=Object.assign(Object.assign({},this.params),a),(null==t?void 0:t.tooltip)!==(null===(e=this.params)||void 0===e?void 0:e.tooltip)&&((null===(r=this.params)||void 0===r?void 0:r.tooltip)?(this.refreshIcon.setAttribute("title",this.params.tooltip),this.refreshIcon.setAttribute("aria-label",this.params.tooltip)):(this.refreshIcon.removeAttribute("title"),this.refreshIcon.setAttribute("aria-label","Reload grid data")))}getGui(){return this.element}destroy(){this.refreshIcon&&(this.refreshIcon.removeEventListener("mouseover",this.mouseoverHandler),this.refreshIcon.removeEventListener("mouseout",this.mouseoutHandler),this.refreshIcon.removeEventListener("click",this.clickHandler))}}},73203:(a,e,r)=>{r.d(e,{y:()=>t});class t{init(a){const e=this.eGui=document.createElement("div"),r=a.value;e.classList.add("custom-tooltip"),e.style["background-color"]="#f14376",e.style.border="1px inside",e.style["border-color"]="#2e3339",e.style["border-radius"]="4px",e.style.padding="5px",e.style["box-shadow"]="0px 4px 10px 0px rgba(0, 0, 0, 0.25);",e.innerHTML=`<span style='color: #000000; font-size: 10px'>${r}</span>`}getGui(){return this.eGui}}},23201:(a,e,r)=>{function t(a,e){const r={},t=[],o="field",i="colId";return e.forEach((e=>{const g=a.find((a=>a[o]===e[i]||a[i]&&a[i]===e[i]));if(g){const a=Object.assign(Object.assign({},g),e);r[g[o]]=a,t.push(a)}})),a.forEach((a=>{if(!r.hasOwnProperty(a[o])){const e=Object.assign({},a);r[a[o]]=e,t.push(e)}})),t}r.d(e,{y:()=>t})},1510:(a,e,r)=>{r.d(e,{v:()=>o});var t=r(30568);const o=(0,t.createLogger)("grid-pro")},49874:(a,e,r)=>{function t(a){const e=[];for(const[r]of a)r&&e.push(r);return e}function o(a){const e=[];function r(a){for(const r of a)null!==r&&e.push(r)}for(const[e,t]of a)null!==e&&null!==t&&r(t);return e}r.d(e,{P:()=>o,i:()=>t})},50103:(a,e,r)=>{r.d(e,{w:()=>t});const t=a=>a.replace(/([a-z])([A-Z])|\s+/g,"$1-$2").toLowerCase()},21409:(a,e,r)=>{r.d(e,{S:()=>o});var t=r(55823);const o=a=>{var e,r,o,g,n,l,d,s,c;return c=class extends a{constructor(...a){super(a),e.add(this),r.set(this,{_key:"dom"}),o.set(this,""),g.set(this,!1),n.set(this,void 0),l.set(this,!1)}cloneNode(a){const e=this.deepClone();return a&&Array.from(this.childNodes).forEach((a=>{e.appendChild(a.cloneNode(!0))})),e}deepClone(){const a=document.createElement(this.tagName.toLowerCase());return this.getAttributeNames().forEach((e=>a.setAttribute(e,this.getAttribute(e)))),a}get shouldRunDisconnect(){return!!(0,t.gn)(this,l,"f")||("dom"===(0,t.gn)(this,r,"f")._key||"foundation-layout-cache"!==(0,t.gn)(this,r,"f")._key&&!((0,t.gn)(this,r,"f").dragging||!(0,t.gn)(this,r,"f").hasFirstLoaded||(0,t.gn)(this,e,"m",d).call(this,"disconnect")))}get shouldRunConnect(){if((0,t.gn)(this,l,"f"))return!0;if("dom"===(0,t.gn)(this,r,"f")._key)return!0;if("foundation-layout-cache"===(0,t.gn)(this,r,"f")._key)return!1;let a="reconnect";return!1===(0,t.gn)(this,g,"f")&&((0,t.GG)(this,g,!0,"f"),a="connect"),!((0,t.gn)(this,r,"f").dragging||!(0,t.gn)(this,r,"f").hasFirstLoaded||(0,t.gn)(this,e,"m",d).call(this,a))}connectedCallback(){super.connectedCallback(),"foundation-layout"!==(0,t.gn)(this,r,"f")._key&&(0,t.GG)(this,r,(0,t.gn)(this,e,"m",s).call(this,this),"f")}},r=new WeakMap,o=new WeakMap,g=new WeakMap,n=new WeakMap,l=new WeakMap,e=new WeakSet,d=function(a){var e,i;if("foundation-layout"!==(0,t.gn)(this,r,"f")._key)throw new Error("LifecycleMixin: should not be checking a token change if container not in the layout");const g=(0,t.gn)(this,o,"f")!==(0,t.gn)(this,r,"f").lifecycleUpdateToken;let d=!1;return"connect"===a?(0,t.GG)(this,o,null!==(e=(0,t.gn)(this,r,"f").lifecycleUpdateToken)&&void 0!==e?e:"","f"):"disconnect"===a?(d=g,(0,t.GG)(this,n,setTimeout((()=>{(0,t.GG)(this,l,d,"f"),(0,t.gn)(this,l,"f")&&this.disconnectedCallback()}),1e4),"f")):"reconnect"===a&&(d=g,(0,t.GG)(this,o,null!==(i=(0,t.gn)(this,r,"f").lifecycleUpdateToken)&&void 0!==i?i:"","f"),clearTimeout((0,t.gn)(this,n,"f"))),d},s=function a(r){var o;if(!0===r.getRootNode()[i])return{_key:"foundation-layout-cache"};if(r.getRootNode()instanceof Document||!(null===(o=r.getRootNode())||void 0===o?void 0:o.host))return{_key:"dom"};const g=r.getRootNode().host;if("FoundationLayoutMain"===g.class){const a=g;return a._key="foundation-layout",a}return(0,t.gn)(this,e,"m",a).call(this,g)},c},i=Symbol("layout-cache-document")},21530:(a,e,r)=>{r.d(e,{O:()=>o});var t=r(28745);const o=(a,e)=>{var r;let o=document.getElementById(e);if(o)return void t.v.debug(`\n An element with the id of '${e}' already exists and likely has the css rules applied.\n `);const i=null!==(r=document.head)&&void 0!==r?r:document.getElementsByTagName("head")[0];o=document.createElement("style"),o.id=e,i.appendChild(o);if((a.match(/}/g)||[]).length>1)return o.textContent=a,()=>{o&&i.removeChild(o)};{const e=o.sheet.insertRule(a);return()=>{o&&(o.sheet.deleteRule(e),i.removeChild(o))}}}},63486:(a,e,r)=>{r.d(e,{c:()=>t});const t=a=>new Promise((e=>{setTimeout(e,a)}))},28745:(a,e,r)=>{r.d(e,{v:()=>o});var t=r(30568);const o=(0,t.createLogger)("foundation-utils")}}]);
8567
+ //# sourceMappingURL=445.fab068cc85b71309f300284dbcdf1335.js.map