@finsemble/finsemble-core 6.1.4 → 6.1.5

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 (107) hide show
  1. package/.mocharc.js +12 -12
  2. package/.nycrc.json +7 -7
  3. package/README.md +24 -24
  4. package/assets/fonts/LICENSE.txt +202 -202
  5. package/configs/core/config.json +214 -214
  6. package/configs/core/securityPolicies.json +24 -24
  7. package/configs/core/services.json +233 -233
  8. package/configs/schemas/README.md +1 -1
  9. package/configs/schemas/fileBasedSchemas/appdConfigFile.schema.json +5 -5
  10. package/configs/schemas/fileBasedSchemas/applicationConfigFile.schema.json +5 -5
  11. package/configs/schemas/fileBasedSchemas/componentsFile.schema.json +5 -5
  12. package/configs/schemas/fileBasedSchemas/coreConfigFile.schema.json +5 -5
  13. package/configs/schemas/fileBasedSchemas/dashbarFile.schema.json +5 -5
  14. package/configs/schemas/fileBasedSchemas/manifestFile.schema.json +5 -5
  15. package/configs/schemas/fileBasedSchemas/securityPoliciesFile.schema.json +5 -5
  16. package/configs/schemas/fileBasedSchemas/servicesFile.schema.json +5 -5
  17. package/configs/schemas/fileBasedSchemas/uiComponentsFile.schema.json +5 -5
  18. package/configs/schemas/fileBasedSchemas/workspacesFile.schema.json +5 -5
  19. package/configs/schemas/finsemble.schema.json +4006 -4006
  20. package/dist/FSBL.js +1 -1
  21. package/dist/clients/Interop/FinsembleDesktopAgent.md +154 -154
  22. package/dist/clients/Interop/tsconfig.json +7 -7
  23. package/dist/clients/Startup/README.md +28 -28
  24. package/dist/clients/dragAndDropAssets/dragAndDropScrim.css +54 -54
  25. package/dist/clients/dragAndDropAssets/ff-delete-circle.svg +10 -10
  26. package/dist/clients/dragAndDropAssets/ff-share.svg +13 -13
  27. package/dist/components/system/notification/ff-close.svg +14 -14
  28. package/dist/components/system/notification/finsemble_logo_white.svg +15 -15
  29. package/dist/components/system/notification/notification.html +155 -155
  30. package/dist/configs/core/config.json +214 -214
  31. package/dist/configs/core/securityPolicies.json +24 -24
  32. package/dist/configs/core/services.json +233 -233
  33. package/dist/configs/schemas/README.md +1 -1
  34. package/dist/configs/schemas/fileBasedSchemas/appdConfigFile.schema.json +5 -5
  35. package/dist/configs/schemas/fileBasedSchemas/applicationConfigFile.schema.json +5 -5
  36. package/dist/configs/schemas/fileBasedSchemas/componentsFile.schema.json +5 -5
  37. package/dist/configs/schemas/fileBasedSchemas/coreConfigFile.schema.json +5 -5
  38. package/dist/configs/schemas/fileBasedSchemas/dashbarFile.schema.json +5 -5
  39. package/dist/configs/schemas/fileBasedSchemas/manifestFile.schema.json +5 -5
  40. package/dist/configs/schemas/fileBasedSchemas/securityPoliciesFile.schema.json +5 -5
  41. package/dist/configs/schemas/fileBasedSchemas/servicesFile.schema.json +5 -5
  42. package/dist/configs/schemas/fileBasedSchemas/uiComponentsFile.schema.json +5 -5
  43. package/dist/configs/schemas/fileBasedSchemas/workspacesFile.schema.json +5 -5
  44. package/dist/configs/schemas/finsemble.schema.json +4006 -4006
  45. package/dist/finsemble-javascript-adapter.js +1 -1
  46. package/dist/index.js +1 -1
  47. package/dist/javascript-adapter-example-app.html +37 -37
  48. package/dist/services/Interop/DevTools.tsx +71 -71
  49. package/dist/services/Interop/Interop.html +15 -15
  50. package/dist/services/Interop/InteropService.js +1 -1
  51. package/dist/services/Interop/InteropService.md +148 -148
  52. package/dist/services/Interop/InteropServiceUI.css +12 -12
  53. package/dist/services/Interop/InteropServiceUI.js +1 -1
  54. package/dist/services/Interop/InteropServiceUI.tsx +39 -39
  55. package/dist/services/Interop/devtoolsEnhancer.tsx +63 -63
  56. package/dist/services/Interop/tsconfig.json +7 -7
  57. package/dist/services/ServiceTemplate.md +39 -39
  58. package/dist/services/assimilation/assimilation.html +18 -18
  59. package/dist/services/assimilation/assimilationService.js +1 -1
  60. package/dist/services/authentication/authentication.html +17 -17
  61. package/dist/services/authentication/authenticationService.js +1 -1
  62. package/dist/services/authentication/dialogSignOn.html +199 -199
  63. package/dist/services/config/config.html +17 -17
  64. package/dist/services/config/configService.js +1 -1
  65. package/dist/services/dataStore/dataStore.html +18 -18
  66. package/dist/services/dataStore/dataStoreService.js +1 -1
  67. package/dist/services/hotkeys/hotkeys.html +18 -18
  68. package/dist/services/hotkeys/hotkeysService.js +1 -1
  69. package/dist/services/linker/linker.html +18 -18
  70. package/dist/services/linker/linkerService.js +1 -1
  71. package/dist/services/logger/logger.html +18 -18
  72. package/dist/services/logger/loggerService.js +1 -1
  73. package/dist/services/logger/loggerUI.js +1 -1
  74. package/dist/services/logger/src/app.css +860 -860
  75. package/dist/services/logger/src/components/Views/Logs/rightPanel/consoleView.css +379 -379
  76. package/dist/services/logger/src/components/objectInspector/README.md +1 -1
  77. package/dist/services/notification/notification.html +11 -11
  78. package/dist/services/notification/notificationService.js +1 -1
  79. package/dist/services/preferences/preferencesService.js +1 -1
  80. package/dist/services/router/router.html +18 -18
  81. package/dist/services/router/routerService.js +1 -1
  82. package/dist/services/search/search.html +17 -17
  83. package/dist/services/search/searchService.js +1 -1
  84. package/dist/services/storage/adapters/instrumentedIndexedDBAdapter.js +1 -1
  85. package/dist/services/storage/storage.html +17 -17
  86. package/dist/services/storage/storageService.js +1 -1
  87. package/dist/services/systemManager/bootTasks/testTasks/_aReadMe.md +119 -119
  88. package/dist/services/systemManager/systemManager.html +24 -24
  89. package/dist/services/systemManager/systemManager.js +1 -1
  90. package/dist/services/window/Docking/GroupRequirements.md +18 -18
  91. package/dist/services/window/Splintering/SplinterAgentSlave.html +13 -13
  92. package/dist/services/window/Splintering/SplinterAgentSlave.js +1 -1
  93. package/dist/services/window/Splintering/Splintering.md +118 -118
  94. package/dist/services/window/StackedWindowManager/StackRequirements.md +23 -23
  95. package/dist/services/window/WindowBehaviorRequirements.md +25 -25
  96. package/dist/services/window/windowService.html +10 -10
  97. package/dist/services/window/windowService.js +1 -1
  98. package/dist/services/workspace/dev-docs/importExportFormat.md +51 -51
  99. package/dist/services/workspace/dev-docs/remotelyPersistedWorkspaces.md +62 -62
  100. package/dist/services/workspace/workspace.html +18 -18
  101. package/dist/services/workspace/workspace.schema.json +48 -48
  102. package/dist/services/workspace/workspaceService.js +1 -1
  103. package/package.json +1 -1
  104. package/tsconfig.json +23 -23
  105. package/types/index.d.ts +40 -55
  106. package/types/index.tsbuildinfo +1 -1
  107. package/types.tsconfig.json +15 -15
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see notificationService.js.LICENSE.txt */
2
- (()=>{var e={57664:(e,t,n)=>{"use strict";function r(e,...t){return(...n)=>e(...t,...n)}function i(e){return function(...t){var n=t.pop();return e.call(this,t,n)}}n.r(t),n.d(t,{default:()=>pt,apply:()=>r,applyEach:()=>L,applyEachSeries:()=>N,asyncify:()=>l,auto:()=>D,autoInject:()=>z,cargo:()=>H,cargoQueue:()=>V,compose:()=>K,concat:()=>Z,concatLimit:()=>Q,concatSeries:()=>X,constant:()=>ee,detect:()=>ne,detectLimit:()=>re,detectSeries:()=>ie,dir:()=>se,doUntil:()=>ue,doWhilst:()=>ae,each:()=>le,eachLimit:()=>fe,eachOf:()=>A,eachOfLimit:()=>E,eachOfSeries:()=>R,eachSeries:()=>de,ensureAsync:()=>he,every:()=>pe,everyLimit:()=>ye,everySeries:()=>ge,filter:()=>_e,filterLimit:()=>be,filterSeries:()=>Se,forever:()=>Ce,groupBy:()=>Ie,groupByLimit:()=>Ee,groupBySeries:()=>Oe,log:()=>Ae,map:()=>T,mapLimit:()=>J,mapSeries:()=>k,mapValues:()=>Le,mapValuesLimit:()=>Te,mapValuesSeries:()=>Re,memoize:()=>ke,nextTick:()=>Ne,parallel:()=>Pe,parallelLimit:()=>De,priorityQueue:()=>Be,queue:()=>We,race:()=>ze,reduce:()=>G,reduceRight:()=>$e,reflect:()=>qe,reflectAll:()=>Ue,reject:()=>Ve,rejectLimit:()=>Ge,rejectSeries:()=>Ye,retry:()=>Je,retryable:()=>Ze,seq:()=>Y,series:()=>Xe,setImmediate:()=>c,some:()=>et,someLimit:()=>tt,someSeries:()=>nt,sortBy:()=>rt,timeout:()=>it,times:()=>st,timesLimit:()=>ot,timesSeries:()=>at,transform:()=>ut,tryEach:()=>ct,unmemoize:()=>lt,until:()=>dt,waterfall:()=>ht,whilst:()=>ft,all:()=>pe,allLimit:()=>ye,allSeries:()=>ge,any:()=>et,anyLimit:()=>tt,anySeries:()=>nt,find:()=>ne,findLimit:()=>re,findSeries:()=>ie,flatMap:()=>Z,flatMapLimit:()=>Q,flatMapSeries:()=>X,forEach:()=>le,forEachSeries:()=>de,forEachLimit:()=>fe,forEachOf:()=>A,forEachOfSeries:()=>R,forEachOfLimit:()=>E,inject:()=>G,foldl:()=>G,foldr:()=>$e,select:()=>_e,selectLimit:()=>be,selectSeries:()=>Se,wrapSync:()=>l,during:()=>ft,doDuring:()=>ae});var o="function"==typeof setImmediate&&setImmediate,s="object"==typeof process&&"function"==typeof process.nextTick;function a(e){setTimeout(e,0)}function u(e){return(t,...n)=>e((()=>t(...n)))}var c=u(o?setImmediate:s?process.nextTick:a);function l(e){return h(e)?function(...t){const n=t.pop();return f(e.apply(this,t),n)}:i((function(t,n){var r;try{r=e.apply(this,t)}catch(e){return n(e)}if(r&&"function"==typeof r.then)return f(r,n);n(null,r)}))}function f(e,t){return e.then((e=>{d(t,null,e)}),(e=>{d(t,e&&e.message?e:new Error(e))}))}function d(e,t,n){try{e(t,n)}catch(e){c((e=>{throw e}),e)}}function h(e){return"AsyncFunction"===e[Symbol.toStringTag]}function p(e){if("function"!=typeof e)throw new Error("expected a function");return h(e)?l(e):e}function y(e,t=e.length){if(!t)throw new Error("arity is undefined");return function(...n){return"function"==typeof n[t-1]?e.apply(this,n):new Promise(((r,i)=>{n[t-1]=(e,...t)=>{if(e)return i(e);r(t.length>1?t:t[0])},e.apply(this,n)}))}}function g(e){return function(t,...n){return y((function(r){var i=this;return e(t,((e,t)=>{p(e).apply(i,n.concat(t))}),r)}))}}function m(e,t,n,r){t=t||[];var i=[],o=0,s=p(n);return e(t,((e,t,n)=>{var r=o++;s(e,((e,t)=>{i[r]=t,n(e)}))}),(e=>{r(e,i)}))}function v(e){return e&&"number"==typeof e.length&&e.length>=0&&e.length%1==0}const w={};function _(e){function t(...t){if(null!==e){var n=e;e=null,n.apply(this,t)}}return Object.assign(t,e),t}function b(e){return function(...t){if(null===e)throw new Error("Callback was already called.");var n=e;e=null,n.apply(this,t)}}function S(e,t,n,r){let i=!1,o=!1,s=!1,a=0,u=0;function c(){a>=t||s||i||(s=!0,e.next().then((({value:e,done:t})=>{if(!o&&!i){if(s=!1,t)return i=!0,void(a<=0&&r(null));a++,n(e,u,l),u++,c()}})).catch(f))}function l(e,t){if(a-=1,!o)return e?f(e):!1===e?(i=!0,void(o=!0)):t===w||i&&a<=0?(i=!0,r(null)):void c()}function f(e){o||(s=!1,i=!0,r(e))}c()}var C=e=>(t,n,r)=>{if(r=_(r),e<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return r(null);if("AsyncGenerator"===t[Symbol.toStringTag])return S(t,e,n,r);if(function(e){return"function"==typeof e[Symbol.asyncIterator]}(t))return S(t[Symbol.asyncIterator](),e,n,r);var i=function(e){if(v(e))return function(e){var t=-1,n=e.length;return function(){return++t<n?{value:e[t],key:t}:null}}(e);var t,n,r,i,o=function(e){return e[Symbol.iterator]&&e[Symbol.iterator]()}(e);return o?function(e){var t=-1;return function(){var n=e.next();return n.done?null:(t++,{value:n.value,key:t})}}(o):(n=(t=e)?Object.keys(t):[],r=-1,i=n.length,function(){var e=n[++r];return r<i?{value:t[e],key:e}:null})}(t),o=!1,s=!1,a=0,u=!1;function c(e,t){if(!s)if(a-=1,e)o=!0,r(e);else if(!1===e)o=!0,s=!0;else{if(t===w||o&&a<=0)return o=!0,r(null);u||l()}}function l(){for(u=!0;a<e&&!o;){var t=i();if(null===t)return o=!0,void(a<=0&&r(null));a+=1,n(t.value,t.key,b(c))}u=!1}l()},E=y((function(e,t,n,r){return C(t)(e,p(n),r)}),4);function I(e,t,n){n=_(n);var r=0,i=0,{length:o}=e,s=!1;function a(e,t){!1===e&&(s=!0),!0!==s&&(e?n(e):++i!==o&&t!==w||n(null))}for(0===o&&n(null);r<o;r++)t(e[r],r,b(a))}function O(e,t,n){return E(e,1/0,t,n)}var A=y((function(e,t,n){return(v(e)?I:O)(e,p(t),n)}),3),T=y((function(e,t,n){return m(A,e,t,n)}),3),L=g(T),R=y((function(e,t,n){return E(e,1,t,n)}),3),k=y((function(e,t,n){return m(R,e,t,n)}),3),N=g(k);const M=Symbol("promiseCallback");function P(){let e,t;function n(n,...r){if(n)return t(n);e(r.length>1?r:r[0])}return n[M]=new Promise(((n,r)=>{e=n,t=r})),n}function D(e,t,n){"number"!=typeof t&&(n=t,t=null),n=_(n||P());var r=Object.keys(e).length;if(!r)return n(null);t||(t=r);var i={},o=0,s=!1,a=!1,u=Object.create(null),c=[],l=[],f={};function d(e,t){c.push((()=>function(e,t){if(!a){var r=b(((t,...r)=>{if(o--,!1!==t)if(r.length<2&&([r]=r),t){var c={};if(Object.keys(i).forEach((e=>{c[e]=i[e]})),c[e]=r,a=!0,u=Object.create(null),s)return;n(t,c)}else i[e]=r,(u[e]||[]).forEach((e=>e())),h();else s=!0}));o++;var c=p(t[t.length-1]);t.length>1?c(i,r):c(r)}}(e,t)))}function h(){if(!s){if(0===c.length&&0===o)return n(null,i);for(;c.length&&o<t;)c.shift()()}}function y(t){var n=[];return Object.keys(e).forEach((r=>{const i=e[r];Array.isArray(i)&&i.indexOf(t)>=0&&n.push(r)})),n}return Object.keys(e).forEach((t=>{var n=e[t];if(!Array.isArray(n))return d(t,[n]),void l.push(t);var r=n.slice(0,n.length-1),i=r.length;if(0===i)return d(t,n),void l.push(t);f[t]=i,r.forEach((o=>{if(!e[o])throw new Error("async.auto task `"+t+"` has a non-existent dependency `"+o+"` in "+r.join(", "));var s,a;(a=u[s=o])||(a=u[s]=[]),a.push((()=>{0==--i&&d(t,n)}))}))})),function(){for(var e=0;l.length;)e++,y(l.pop()).forEach((e=>{0==--f[e]&&l.push(e)}));if(e!==r)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}(),h(),n[M]}var W=/^(?:async\s+)?(?:function)?\s*\w*\s*\(\s*([^)]+)\s*\)(?:\s*{)/,x=/^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/,j=/,/,F=/(=.+)?(\s*)$/,B=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm;function z(e,t){var n={};return Object.keys(e).forEach((t=>{var r,i=e[t],o=h(i),s=!o&&1===i.length||o&&0===i.length;if(Array.isArray(i))r=[...i],i=r.pop(),n[t]=r.concat(r.length>0?a:i);else if(s)n[t]=i;else{if(r=function(e){const t=e.toString().replace(B,"");let n=t.match(W);if(n||(n=t.match(x)),!n)throw new Error("could not parse args in autoInject\nSource:\n"+t);let[,r]=n;return r.replace(/\s/g,"").split(j).map((e=>e.replace(F,"").trim()))}(i),0===i.length&&!o&&0===r.length)throw new Error("autoInject task functions require explicit parameters.");o||r.pop(),n[t]=r.concat(a)}function a(e,t){var n=r.map((t=>e[t]));n.push(t),p(i)(...n)}})),D(n,t)}class ${constructor(){this.head=this.tail=null,this.length=0}removeLink(e){return e.prev?e.prev.next=e.next:this.head=e.next,e.next?e.next.prev=e.prev:this.tail=e.prev,e.prev=e.next=null,this.length-=1,e}empty(){for(;this.head;)this.shift();return this}insertAfter(e,t){t.prev=e,t.next=e.next,e.next?e.next.prev=t:this.tail=t,e.next=t,this.length+=1}insertBefore(e,t){t.prev=e.prev,t.next=e,e.prev?e.prev.next=t:this.head=t,e.prev=t,this.length+=1}unshift(e){this.head?this.insertBefore(this.head,e):q(this,e)}push(e){this.tail?this.insertAfter(this.tail,e):q(this,e)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var e=this.head;e;)yield e.data,e=e.next}remove(e){for(var t=this.head;t;){var{next:n}=t;e(t)&&this.removeLink(t),t=n}return this}}function q(e,t){e.length=1,e.head=e.tail=t}function U(e,t,n){if(null==t)t=1;else if(0===t)throw new RangeError("Concurrency must not be zero");var r=p(e),i=0,o=[];const s={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function a(e,t){return e?t?void(s[e]=s[e].filter((e=>e!==t))):s[e]=[]:Object.keys(s).forEach((e=>s[e]=[]))}function u(e,...t){s[e].forEach((e=>e(...t)))}var l=!1;function f(e,t,n,r){if(null!=r&&"function"!=typeof r)throw new Error("task callback must be a function");var i,o;function s(e,...t){return e?n?o(e):i():t.length<=1?i(t[0]):void i(t)}m.started=!0;var a={data:e,callback:n?s:r||s};if(t?m._tasks.unshift(a):m._tasks.push(a),l||(l=!0,c((()=>{l=!1,m.process()}))),n||!r)return new Promise(((e,t)=>{i=e,o=t}))}function d(e){return function(t,...n){i-=1;for(var r=0,s=e.length;r<s;r++){var a=e[r],c=o.indexOf(a);0===c?o.shift():c>0&&o.splice(c,1),a.callback(t,...n),null!=t&&u("error",t,a.data)}i<=m.concurrency-m.buffer&&u("unsaturated"),m.idle()&&u("drain"),m.process()}}function h(e){return!(0!==e.length||!m.idle()||(c((()=>u("drain"))),0))}const y=e=>t=>{if(!t)return new Promise(((t,n)=>{!function(e,r){const i=(...r)=>{a(e,i),((e,r)=>{if(e)return n(e);t(r)})(...r)};s[e].push(i)}(e)}));a(e),function(e,t){s[e].push(t)}(e,t)};var g=!1,m={_tasks:new $,*[Symbol.iterator](){yield*m._tasks[Symbol.iterator]()},concurrency:t,payload:n,buffer:t/4,started:!1,paused:!1,push(e,t){if(Array.isArray(e)){if(h(e))return;return e.map((e=>f(e,!1,!1,t)))}return f(e,!1,!1,t)},pushAsync(e,t){if(Array.isArray(e)){if(h(e))return;return e.map((e=>f(e,!1,!0,t)))}return f(e,!1,!0,t)},kill(){a(),m._tasks.empty()},unshift(e,t){if(Array.isArray(e)){if(h(e))return;return e.map((e=>f(e,!0,!1,t)))}return f(e,!0,!1,t)},unshiftAsync(e,t){if(Array.isArray(e)){if(h(e))return;return e.map((e=>f(e,!0,!0,t)))}return f(e,!0,!0,t)},remove(e){m._tasks.remove(e)},process(){if(!g){for(g=!0;!m.paused&&i<m.concurrency&&m._tasks.length;){var e=[],t=[],n=m._tasks.length;m.payload&&(n=Math.min(n,m.payload));for(var s=0;s<n;s++){var a=m._tasks.shift();e.push(a),o.push(a),t.push(a.data)}i+=1,0===m._tasks.length&&u("empty"),i===m.concurrency&&u("saturated");var c=b(d(e));r(t,c)}g=!1}},length:()=>m._tasks.length,running:()=>i,workersList:()=>o,idle:()=>m._tasks.length+i===0,pause(){m.paused=!0},resume(){!1!==m.paused&&(m.paused=!1,c(m.process))}};return Object.defineProperties(m,{saturated:{writable:!1,value:y("saturated")},unsaturated:{writable:!1,value:y("unsaturated")},empty:{writable:!1,value:y("empty")},drain:{writable:!1,value:y("drain")},error:{writable:!1,value:y("error")}}),m}function H(e,t){return U(e,1,t)}function V(e,t,n){return U(e,t,n)}var G=y((function(e,t,n,r){r=_(r);var i=p(n);return R(e,((e,n,r)=>{i(t,e,((e,n)=>{t=n,r(e)}))}),(e=>r(e,t)))}),4);function Y(...e){var t=e.map(p);return function(...e){var n=this,r=e[e.length-1];return"function"==typeof r?e.pop():r=P(),G(t,e,((e,t,r)=>{t.apply(n,e.concat(((e,...t)=>{r(e,t)})))}),((e,t)=>r(e,...t))),r[M]}}function K(...e){return Y(...e.reverse())}var J=y((function(e,t,n,r){return m(C(t),e,n,r)}),4),Q=y((function(e,t,n,r){var i=p(n);return J(e,t,((e,t)=>{i(e,((e,...n)=>e?t(e):t(e,n)))}),((e,t)=>{for(var n=[],i=0;i<t.length;i++)t[i]&&(n=n.concat(...t[i]));return r(e,n)}))}),4),Z=y((function(e,t,n){return Q(e,1/0,t,n)}),3),X=y((function(e,t,n){return Q(e,1,t,n)}),3);function ee(...e){return function(...t){return t.pop()(null,...e)}}function te(e,t){return(n,r,i,o)=>{var s,a=!1;const u=p(i);n(r,((n,r,i)=>{u(n,((r,o)=>r||!1===r?i(r):e(o)&&!s?(a=!0,s=t(!0,n),i(null,w)):void i()))}),(e=>{if(e)return o(e);o(null,a?s:t(!1))}))}}var ne=y((function(e,t,n){return te((e=>e),((e,t)=>t))(A,e,t,n)}),3),re=y((function(e,t,n,r){return te((e=>e),((e,t)=>t))(C(t),e,n,r)}),4),ie=y((function(e,t,n){return te((e=>e),((e,t)=>t))(C(1),e,t,n)}),3);function oe(e){return(t,...n)=>p(t)(...n,((t,...n)=>{"object"==typeof console&&(t?console.error&&console.error(t):console[e]&&n.forEach((t=>console[e](t))))}))}var se=oe("dir"),ae=y((function(e,t,n){n=b(n);var r,i=p(e),o=p(t);function s(e,...t){if(e)return n(e);!1!==e&&(r=t,o(...t,a))}function a(e,t){return e?n(e):!1!==e?t?void i(s):n(null,...r):void 0}return a(null,!0)}),3);function ue(e,t,n){const r=p(t);return ae(e,((...e)=>{const t=e.pop();r(...e,((e,n)=>t(e,!n)))}),n)}function ce(e){return(t,n,r)=>e(t,r)}var le=y((function(e,t,n){return A(e,ce(p(t)),n)}),3),fe=y((function(e,t,n,r){return C(t)(e,ce(p(n)),r)}),4),de=y((function(e,t,n){return fe(e,1,t,n)}),3);function he(e){return h(e)?e:function(...t){var n=t.pop(),r=!0;t.push(((...e)=>{r?c((()=>n(...e))):n(...e)})),e.apply(this,t),r=!1}}var pe=y((function(e,t,n){return te((e=>!e),(e=>!e))(A,e,t,n)}),3),ye=y((function(e,t,n,r){return te((e=>!e),(e=>!e))(C(t),e,n,r)}),4),ge=y((function(e,t,n){return te((e=>!e),(e=>!e))(R,e,t,n)}),3);function me(e,t,n,r){var i=new Array(t.length);e(t,((e,t,r)=>{n(e,((e,n)=>{i[t]=!!n,r(e)}))}),(e=>{if(e)return r(e);for(var n=[],o=0;o<t.length;o++)i[o]&&n.push(t[o]);r(null,n)}))}function ve(e,t,n,r){var i=[];e(t,((e,t,r)=>{n(e,((n,o)=>{if(n)return r(n);o&&i.push({index:t,value:e}),r(n)}))}),(e=>{if(e)return r(e);r(null,i.sort(((e,t)=>e.index-t.index)).map((e=>e.value)))}))}function we(e,t,n,r){return(v(t)?me:ve)(e,t,p(n),r)}var _e=y((function(e,t,n){return we(A,e,t,n)}),3),be=y((function(e,t,n,r){return we(C(t),e,n,r)}),4),Se=y((function(e,t,n){return we(R,e,t,n)}),3),Ce=y((function(e,t){var n=b(t),r=p(he(e));return function e(t){if(t)return n(t);!1!==t&&r(e)}()}),2),Ee=y((function(e,t,n,r){var i=p(n);return J(e,t,((e,t)=>{i(e,((n,r)=>n?t(n):t(n,{key:r,val:e})))}),((e,t)=>{for(var n={},{hasOwnProperty:i}=Object.prototype,o=0;o<t.length;o++)if(t[o]){var{key:s}=t[o],{val:a}=t[o];i.call(n,s)?n[s].push(a):n[s]=[a]}return r(e,n)}))}),4);function Ie(e,t,n){return Ee(e,1/0,t,n)}function Oe(e,t,n){return Ee(e,1,t,n)}var Ae=oe("log"),Te=y((function(e,t,n,r){r=_(r);var i={},o=p(n);return C(t)(e,((e,t,n)=>{o(e,t,((e,r)=>{if(e)return n(e);i[t]=r,n(e)}))}),(e=>r(e,i)))}),4);function Le(e,t,n){return Te(e,1/0,t,n)}function Re(e,t,n){return Te(e,1,t,n)}function ke(e,t=(e=>e)){var n=Object.create(null),r=Object.create(null),o=p(e),s=i(((e,i)=>{var s=t(...e);s in n?c((()=>i(null,...n[s]))):s in r?r[s].push(i):(r[s]=[i],o(...e,((e,...t)=>{e||(n[s]=t);var i=r[s];delete r[s];for(var o=0,a=i.length;o<a;o++)i[o](e,...t)})))}));return s.memo=n,s.unmemoized=e,s}var Ne=u(s?process.nextTick:o?setImmediate:a),Me=y(((e,t,n)=>{var r=v(t)?[]:{};e(t,((e,t,n)=>{p(e)(((e,...i)=>{i.length<2&&([i]=i),r[t]=i,n(e)}))}),(e=>n(e,r)))}),3);function Pe(e,t){return Me(A,e,t)}function De(e,t,n){return Me(C(t),e,n)}function We(e,t){var n=p(e);return U(((e,t)=>{n(e[0],t)}),t,1)}class xe{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(e){let t;for(;e>0&&Fe(this.heap[e],this.heap[t=je(e)]);){let n=this.heap[e];this.heap[e]=this.heap[t],this.heap[t]=n,e=t}}percDown(e){let t;for(;(t=1+(e<<1))<this.heap.length&&(t+1<this.heap.length&&Fe(this.heap[t+1],this.heap[t])&&(t+=1),!Fe(this.heap[e],this.heap[t]));){let n=this.heap[e];this.heap[e]=this.heap[t],this.heap[t]=n,e=t}}push(e){e.pushCount=++this.pushCount,this.heap.push(e),this.percUp(this.heap.length-1)}unshift(e){return this.heap.push(e)}shift(){let[e]=this.heap;return this.heap[0]=this.heap[this.heap.length-1],this.heap.pop(),this.percDown(0),e}toArray(){return[...this]}*[Symbol.iterator](){for(let e=0;e<this.heap.length;e++)yield this.heap[e].data}remove(e){let t=0;for(let n=0;n<this.heap.length;n++)e(this.heap[n])||(this.heap[t]=this.heap[n],t++);this.heap.splice(t);for(let e=je(this.heap.length-1);e>=0;e--)this.percDown(e);return this}}function je(e){return(e+1>>1)-1}function Fe(e,t){return e.priority!==t.priority?e.priority<t.priority:e.pushCount<t.pushCount}function Be(e,t){var n=We(e,t);return n._tasks=new xe,n.push=function(e,t=0,r=(()=>{})){if("function"!=typeof r)throw new Error("task callback must be a function");if(n.started=!0,Array.isArray(e)||(e=[e]),0===e.length&&n.idle())return c((()=>n.drain()));for(var i=0,o=e.length;i<o;i++){var s={data:e[i],priority:t,callback:r};n._tasks.push(s)}c(n.process)},delete n.unshift,n}var ze=y((function(e,t){if(t=_(t),!Array.isArray(e))return t(new TypeError("First argument to race must be an array of functions"));if(!e.length)return t();for(var n=0,r=e.length;n<r;n++)p(e[n])(t)}),2);function $e(e,t,n,r){var i=[...e].reverse();return G(i,t,n,r)}function qe(e){var t=p(e);return i((function(e,n){return e.push(((e,...t)=>{let r={};if(e&&(r.error=e),t.length>0){var i=t;t.length<=1&&([i]=t),r.value=i}n(null,r)})),t.apply(this,e)}))}function Ue(e){var t;return Array.isArray(e)?t=e.map(qe):(t={},Object.keys(e).forEach((n=>{t[n]=qe.call(this,e[n])}))),t}function He(e,t,n,r){const i=p(n);return we(e,t,((e,t)=>{i(e,((e,n)=>{t(e,!n)}))}),r)}var Ve=y((function(e,t,n){return He(A,e,t,n)}),3),Ge=y((function(e,t,n,r){return He(C(t),e,n,r)}),4),Ye=y((function(e,t,n){return He(R,e,t,n)}),3);function Ke(e){return function(){return e}}function Je(e,t,n){var r={times:5,intervalFunc:Ke(0)};if(arguments.length<3&&"function"==typeof e?(n=t||P(),t=e):(Qe(r,e),n=n||P()),"function"!=typeof t)throw new Error("Invalid arguments for async.retry");var i=p(t),o=1;function s(){i(((e,...t)=>{!1!==e&&(e&&o++<r.times&&("function"!=typeof r.errorFilter||r.errorFilter(e))?setTimeout(s,r.intervalFunc(o-1)):n(e,...t))}))}return s(),n[M]}function Qe(e,t){if("object"==typeof t)e.times=+t.times||5,e.intervalFunc="function"==typeof t.interval?t.interval:Ke(+t.interval||0),e.errorFilter=t.errorFilter;else{if("number"!=typeof t&&"string"!=typeof t)throw new Error("Invalid arguments for async.retry");e.times=+t||5}}function Ze(e,t){t||(t=e,e=null);let n=e&&e.arity||t.length;h(t)&&(n+=1);var r=p(t);return i(((t,i)=>{function o(e){r(...t,e)}return(t.length<n-1||null==i)&&(t.push(i),i=P()),e?Je(e,o,i):Je(o,i),i[M]}))}function Xe(e,t){return Me(R,e,t)}var et=y((function(e,t,n){return te(Boolean,(e=>e))(A,e,t,n)}),3),tt=y((function(e,t,n,r){return te(Boolean,(e=>e))(C(t),e,n,r)}),4),nt=y((function(e,t,n){return te(Boolean,(e=>e))(R,e,t,n)}),3),rt=y((function(e,t,n){var r=p(t);return T(e,((e,t)=>{r(e,((n,r)=>{if(n)return t(n);t(n,{value:e,criteria:r})}))}),((e,t)=>{if(e)return n(e);n(null,t.sort(i).map((e=>e.value)))}));function i(e,t){var n=e.criteria,r=t.criteria;return n<r?-1:n>r?1:0}}),3);function it(e,t,n){var r=p(e);return i(((i,o)=>{var s,a=!1;i.push(((...e)=>{a||(o(...e),clearTimeout(s))})),s=setTimeout((function(){var t=e.name||"anonymous",r=new Error('Callback function "'+t+'" timed out.');r.code="ETIMEDOUT",n&&(r.info=n),a=!0,o(r)}),t),r(...i)}))}function ot(e,t,n,r){var i=p(n);return J(function(e){for(var t=Array(e);e--;)t[e]=e;return t}(e),t,i,r)}function st(e,t,n){return ot(e,1/0,t,n)}function at(e,t,n){return ot(e,1,t,n)}function ut(e,t,n,r){arguments.length<=3&&"function"==typeof t&&(r=n,n=t,t=Array.isArray(e)?[]:{}),r=_(r||P());var i=p(n);return A(e,((e,n,r)=>{i(t,e,n,r)}),(e=>r(e,t))),r[M]}var ct=y((function(e,t){var n,r=null;return de(e,((e,t)=>{p(e)(((e,...i)=>{if(!1===e)return t(e);i.length<2?[n]=i:n=i,r=e,t(e?null:{})}))}),(()=>t(r,n)))}));function lt(e){return(...t)=>(e.unmemoized||e)(...t)}var ft=y((function(e,t,n){n=b(n);var r=p(t),i=p(e),o=[];function s(e,...t){if(e)return n(e);o=t,!1!==e&&i(a)}function a(e,t){return e?n(e):!1!==e?t?void r(s):n(null,...o):void 0}return i(a)}),3);function dt(e,t,n){const r=p(e);return ft((e=>r(((t,n)=>e(t,!n)))),t,n)}var ht=y((function(e,t){if(t=_(t),!Array.isArray(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();var n=0;function r(t){p(e[n++])(...t,b(i))}function i(i,...o){if(!1!==i)return i||n===e.length?t(i,...o):void r(o)}r([])}));const pt={apply:r,applyEach:L,applyEachSeries:N,asyncify:l,auto:D,autoInject:z,cargo:H,cargoQueue:V,compose:K,concat:Z,concatLimit:Q,concatSeries:X,constant:ee,detect:ne,detectLimit:re,detectSeries:ie,dir:se,doUntil:ue,doWhilst:ae,each:le,eachLimit:fe,eachOf:A,eachOfLimit:E,eachOfSeries:R,eachSeries:de,ensureAsync:he,every:pe,everyLimit:ye,everySeries:ge,filter:_e,filterLimit:be,filterSeries:Se,forever:Ce,groupBy:Ie,groupByLimit:Ee,groupBySeries:Oe,log:Ae,map:T,mapLimit:J,mapSeries:k,mapValues:Le,mapValuesLimit:Te,mapValuesSeries:Re,memoize:ke,nextTick:Ne,parallel:Pe,parallelLimit:De,priorityQueue:Be,queue:We,race:ze,reduce:G,reduceRight:$e,reflect:qe,reflectAll:Ue,reject:Ve,rejectLimit:Ge,rejectSeries:Ye,retry:Je,retryable:Ze,seq:Y,series:Xe,setImmediate:c,some:et,someLimit:tt,someSeries:nt,sortBy:rt,timeout:it,times:st,timesLimit:ot,timesSeries:at,transform:ut,tryEach:ct,unmemoize:lt,until:dt,waterfall:ht,whilst:ft,all:pe,allLimit:ye,allSeries:ge,any:et,anyLimit:tt,anySeries:nt,find:ne,findLimit:re,findSeries:ie,flatMap:Z,flatMapLimit:Q,flatMapSeries:X,forEach:le,forEachSeries:de,forEachLimit:fe,forEachOf:A,forEachOfSeries:R,forEachOfLimit:E,inject:G,foldl:G,foldr:$e,select:_e,selectLimit:be,selectSeries:Se,wrapSync:l,during:ft,doDuring:ae}},33998:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigUtilInstance=void 0;var r=s(n(72551)),i=n(51742),o=s(n(53059));function s(e){return e&&e.__esModule?e:{default:e}}const a=new function(){const e=this;this.resolveConfigVariables=function(e,t){let n=0,i=0,o=!0;function s(e){const t=e.split(/[/\\:?=&\s]/);for(let n=0;n<t.length;n++)if("$"===t[n][0]){const i=t[n].substring(1);let s=a(i);if(void 0!==s){const a=e.replace(t[n],s);r.default.system.verbose("forceObjectsToLogger","ConfigUtil.resolveConfigVariables:resolveString configString",t[n],i,s,"old value=",e,"value=",a),o=!0,e=a}}return e}function a(t){let n=e[t];return void 0===n&&(e.custom?(n=e.custom[t],void 0===n&&r.default.system.warn("ConfigUtil.resolveString",`Missing [${t}] variable from finsemble.custom configuration object`)):r.default.system.error("ConfigUtil.resolveString",`Missing "custom" node from finsemble configuration - unable to get variable resoution for variable: ${t}`)),n}function u(e,t,n){r.default.system.verbose("forceObjectsToLogger","resolveArray","pass",t,"recursionLevel",n,"configArray:",e);for(let r=0;r<e.length;r++){const i=e[r];"string"==typeof i&&i.indexOf("$")>-1?e[r]=s(i):i instanceof Array?u(i,t,n+1):"object"==typeof i&&c(i,t,n+1)}}function c(e,t,n){e=e||{},r.default.system.verbose("forceObjectsToLogger","ConfigUtil.resolveConfigVariables:resolveObject","pass",t,"recursionLevel",n,"configObject:",e),Object.keys(e).forEach((r=>{const i=e[r];"string"==typeof i&&i.indexOf("$")>-1?e[r]=s(i):i instanceof Array?u(i,t,n+1):"object"==typeof i&&c(i,t,n+1)}))}for(;o&&i++<100;)o=!1,c(t,++n,1);i>=100&&r.default.system.error("forceObjectsToLogger","resolveConfigVariables exceeded maximum passes so continuing -- probably a recursive macro definitions. Look in this config for unresolved macro variables",e)},this.getExpandedRawManifest=function(t,n){function o(t,s,a){r.default.system.debug("forceObjectsToLogger","ConfigUtil.getExpandedRawManifest:getRawManifest",s,a),s.getManifest((n=>{r.default.system.debug("forceObjectsToLogger","ConfigUtil.getExpandedRawManifest:getExpandedRawManifest: manifest retrieved. Pre-variable resolution",n),e.resolveConfigVariables(n.finsemble,n.finsemble),r.default.system.debug("forceObjectsToLogger","ConfigUtil.getExpandedRawManifest:getExpandedRawManifest:Complete. post-variable resolution",n),t(n)}),(e=>{e&&(r.default.system.error("ConfigUtil.getExpandedRawManifest:application.getManifest:err",e),n&&n()),s.getParentUuid((e=>{const n=i.System.Application.wrap(e);r.default.system.debug("forceObjectsToLogger","uuid",e,"parentApplication",n),a<10?o(t,n,++a):t("could not find manifest in parent applications")}))}))}r.default.system.debug("ConfigUtil.getExpandedRawManifest starting"),i.System.ready((()=>{const e=i.System.Application.getCurrent();o(t,e,1)}))},this.readConfigFile=function(e,t){r.default.system.debug(`fetching ${e}`),fetch(e,{credentials:"include",cache:"no-cache"}).then((e=>e.json())).catch((n=>{t(`Failure importing ${e}: ${n}`,null)})).then((e=>{t(null,e)}))},this.getInitialManifest=function(t){i.System.ready((()=>{i.System.Application.getCurrent().getManifest((n=>{n.finsemble=n.finsemble||{},e.resolveConfigVariables(n.finsemble,n.finsemble),n.finsemble.applicationRoot||r.default.system.error("FATAL ERROR: applicationRoot was not defined in manifest file.");const i=`${n.finsemble.moduleRoot}/configs/core/config.json`;e.readConfigFile(i,((o,s)=>{o?r.default.system.error(`ConfigUtil.getInitialManifest:getCoreConfig:failed importing into finsemble config. $moduleRoot=${n.finsemble.moduleRoot}; Full Path=${i}`,o):(Object.keys(s).forEach((e=>{if("importConfig"===e){n.finsemble.importConfig=n.finsemble.importConfig||[];for(let e=0;e<s.importConfig.length;e++)n.finsemble.importConfig.unshift(s.importConfig[e])}else if("importThirdPartyConfig"===e){n.finsemble.importThirdPartyConfig=n.finsemble.importThirdPartyConfig||[];for(let e=0;e<s.importThirdPartyConfig.length;e++)n.finsemble.importThirdPartyConfig.unshift(s.importThirdPartyConfig[e])}else n.finsemble[e]=s[e]})),e.resolveConfigVariables(n.finsemble,n.finsemble),r.default.system.debug("forceObjectsToLogger","ConfigUtil.getInitialManifest:getCoreConfig:Initial Manifest after variables Resolved",n)),t(n)}))}))}))},this.promptAndSaveJSONToLocalFile=function(e,t){r.default.system.debug("saveJSONToLocalFile",e,t);const n=JSON.stringify(t,null,"\t"),i=`data:application/json;charset=utf-8,${encodeURIComponent(n)}`,o=`${e}.json`,s=document.createElement("a");s.setAttribute("href",i),s.setAttribute("download",o),s.click()},this.configFormatForExport=function(e,t){r.default.system.debug("configFormatForExport starting",e,t);let n=o.default.cloneDeep(t);if("raw"===e);else if("all"===e)delete n.importConfig,delete n.comment;else if("application"===e)delete n.importConfig,delete n.comment,delete n.system,delete n.services;else if("workspace"===e)n={workspace:n};else if("workspaceTemplate"===e){const e={};e[n.name]=n,n={workspaceTemplates:e}}else"services"===e?n=n.services:"components"===e&&(n=n.components);return n},this.getDefault=function(e,t,n){let r=n;if(e){try{const n=t.split(".");let i=e;for(let e=1;e<n.length;e++)i=i[n[e]];r=i}catch(e){r=n}void 0===r&&(r=n)}return r},this.getFile=async function(e,t=Function.prototype){r.default.system.debug(`fetching import ${e}`);let n=null;return await fetch(e,{credentials:"include",cache:"no-cache"}).then((e=>e.json())).catch((n=>{t(`failure importing ${e}: ${n}`,null)})).then((e=>{t(null,e),n=e})),n}};t.ConfigUtilInstance=a},93802:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(5939),i=u(n(72551)),o=u(n(88021)),s=u(n(71879)),a=n(24232);function u(e){return e&&e.__esModule?e:{default:e}}let c;class l extends r.EventEmitter{constructor(e,t,n){if(super(),!n||!n.System)throw new Error("Monitors class requires dependency injection. Ensure that System is being passed in.");({System:c}=n),this.cachedMonitorInfo=null,this.limitedMonitorRefreshQueue=new o.default({concurrency:1}),this.bindAllFunctions(),this.limitedMonitorRefreshQueue.add((()=>this.refreshMonitors(e))),c.addEventListener("monitor-info-changed",(()=>{this.limitedMonitorRefreshQueue.add((()=>this.refreshMonitors(t)))})),c.addEventListener("session-changed",(e=>{e&&("object"!=typeof e||!e.hasOwnProperty("reason")||"unlock"!==e.reason&&"remote-connect"!==e.reason&&"unknown"!==e.reason)||this.limitedMonitorRefreshQueue.add((()=>this.refreshMonitors(t)))}))}bindAllFunctions(){let e=this;for(let t of Object.getOwnPropertyNames(Object.getPrototypeOf(e))){let n=e[t];n instanceof Function&&n!==l&&(e[t]=e[t].bind(e))}}asyncIt(e,t){return t(e),e}rationalizeMonitor(e){e.monitorRect.width=e.monitorRect.right-e.monitorRect.left,e.monitorRect.height=e.monitorRect.bottom-e.monitorRect.top,e.availableRect.width=e.availableRect.right-e.availableRect.left,e.availableRect.height=e.availableRect.bottom-e.availableRect.top}calculateMonitorScale(e,t){return(t.right-t.left)/(e.right-e.left)}monitorInfoIsChanged(e,t){if(!e||!t)return!0;if(e.nonPrimaryMonitors.length!==t.nonPrimaryMonitors.length)return!0;if(!(0,a.checkIfBoundsAreEqual)(e.primaryMonitor.availableRect,t.primaryMonitor.availableRect))return!0;if(!(0,a.checkIfBoundsAreEqual)(e.primaryMonitor.monitorRect,t.primaryMonitor.monitorRect))return!0;e.nonPrimaryMonitors.sort(((e,t)=>e.deviceName>t.deviceName?1:e.deviceName<t.deviceName?-1:0)),t.nonPrimaryMonitors.sort(((e,t)=>e.deviceName>t.deviceName?1:e.deviceName<t.deviceName?-1:0));let n=!1;return e.nonPrimaryMonitors.forEach(((e,r)=>{const i=t.nonPrimaryMonitors[r];(0,a.checkIfBoundsAreEqual)(e.availableRect,i.availableRect)&&(0,a.checkIfBoundsAreEqual)(e.monitorRect,i.monitorRect)||(n=!0)})),n}async refreshMonitors(e=Function.prototype){this.limitedMonitorRefreshQueue.clear();const t=await c.getMonitorInfo();if(!this.monitorInfoIsChanged(this.cachedMonitorInfo,t))return i.default.system.info("Skipped refreshMonitors because monitors do not change."),e(this.allMonitors);this.allMonitors=[];let{primaryMonitor:n}=t;if(Object.entries(n).length){n.whichMonitor="primary",n.position=0,this.allMonitors.push(Object.assign({},n));for(let e=0;e<t.nonPrimaryMonitors.length;e++){let n=t.nonPrimaryMonitors[e];n.whichMonitor=e,n.position=e+1,this.allMonitors.push(n)}for(let e=0;e<this.allMonitors.length;e++){let t=this.allMonitors[e];this.rationalizeMonitor(t)}this.cachedMonitorInfo=(0,s.default)(t),e(this.allMonitors),this.ready=!0,1===this.limitedMonitorRefreshQueue.pending&&this.emit("monitors-changed",{monitors:this.allMonitors})}else i.default.system.info("There is no primary monitor in 'monitorInfo' - the system is still in the process of updating the monitor information. Returning from monitorsAndScaling -> refreshMonitors")}getAllMonitors(e=Function.prototype){return this.ready?this.asyncIt(JSON.parse(JSON.stringify(this.allMonitors)),e):e?void this.refreshMonitors(e):"not ready"}getMonitorFromScaledXY(e,t,n=Function.prototype){return new Promise((r=>{if(!this.ready)return this.refreshMonitors((()=>{this.getMonitorFromScaledXY(e,t,n)})),"not ready";let i=null;for(var o=this.allMonitors,s=0;s<o.length;s++){var a=o[s],{monitorRect:u}=a;if(e>=u.left&&e<u.right&&t>=u.top&&t<u.bottom){i=a;break}}r(i),n(i)}))}getMonitorFromUnscaledXY(e,t,n=Function.prototype){if(!this.ready)return this.refreshMonitors((()=>{this.getMonitorFromUnscaledXY(e,t,n)})),"not ready";for(var r=this.allMonitors,i=0;i<r.length;i++){var o=r[i],s=o.monitor.scaledRect;if(e>=s.left&&e<s.right&&t>=s.top&&t<s.bottom)return this.asyncIt(o,n)}return this.asyncIt(null,n)}async translatePointFromScaled(e,t=Function.prototype){if(!this.ready)return this.refreshMonitors((()=>{this.translatePointFromScaled(e,t)})),"not ready";var n;e.point?({point:n}=e):n=e;var{monitor:r}=e;r||(r=(await this.getMonitorFromScaledXY(n.x,n.y)).data);let i=null;if(r){var o=n.x-r.monitorRect.left,s=n.y-r.monitorRect.top,a=o*r.deviceScaleFactor,u=s*r.deviceScaleFactor;i={x:a+r.monitor.scaledRect.left,y:u+r.monitor.scaledRect.top}}return t(i),Promise.resolve(i)}translatePointToScaled(e,t=Function.prototype){if(!this.ready)return this.refreshMonitors((()=>{this.translatePointToScaled(e,t)})),"not ready";var n;e.point?({point:n}=e):n=e;var r=e.monitor||this.getMonitorFromUnscaledXY(n.x,n.y);if(!r)return this.asyncIt(null,t);var i=n.x-r.monitor.scaledRect.left,o=n.y-r.monitor.scaledRect.top,s=i/r.deviceScaleFactor,a=o/r.deviceScaleFactor,u={x:s+r.monitorRect.left,y:a+r.monitorRect.top};return this.asyncIt(u,t)}async translateRectToScaled(e,t=Function.prototype){let n;if(!this.ready)return this.refreshMonitors((()=>{this.translateRectToScaled(e,t)})),"not ready";var r=this.translatePointToScaled({x:e.left,y:e.top}),i=this.translatePointToScaled({x:e.right,y:e.bottom});return!r&&i&&(n=await this.getMonitorFromScaledXY(i),r=this.translatePointToScaled({monitor:n,point:{x:e.left,y:e.top}})),!i&&r&&(n=await this.getMonitorFromScaledXY(i),i=this.translatePointToScaled({monitor:n,point:{x:e.right,y:e.bottom}})),this.asyncIt({top:r?r.y:null,left:r?r.x:null,bottom:i?i.y:null,right:i?i.x:null,height:r&&i?i.y-r.y:null,width:r&&i?i.x-r.x:null},t)}translateRectFromScaled(e,t=Function.prototype){if(!this.ready)return this.refreshMonitors((()=>{this.translateRectFromScaled(e,t)})),"not ready";var n=this.translatePointFromScaled({x:e.left,y:e.top}),r=this.translatePointFromScaled({x:e.right,y:e.bottom});return!n&&r&&(n=this.translatePointFromScaled({monitor:this.getMonitorFromUnscaledXY(r),point:{x:e.left,y:e.top}})),!r&&n&&(r=this.translatePointFromScaled({monitor:this.getMonitorFromUnscaledXY(n),point:{x:e.right,y:e.bottom}})),this.asyncIt({top:n?n.y:null,left:n?n.x:null,bottom:r?r.y:null,right:r?r.x:null,height:n&&r?r.y-n.y:null,width:n&&r?r.x-n.x:null},t)}}var f=l;t.default=f},21014:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=new function(){let e=3;this.diagLevel=function(){return e},this.setDiagLevel=function(t){e=t},this.validationEnabled=function(){return e>=4}};t.default=n},73699:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(72551)),i=n(33998),o=n(51742),s=a(n(5020));function a(e){return e&&e.__esModule?e:{default:e}}let u=null;var c=new function(){const e={},t={};let a=null;this.getDefaultTemplateURL=function(e){a?setTimeout((()=>{e(a)}),0):(u||(u=n(70010).default),u.getValue({field:"finsemble"},((t,n)=>{a=i.ConfigUtilInstance.getDefault(n,"finsemble.notificationURL",`${n.moduleRoot}/components/system/notification/notification.html`),e(a)})))},this.alert=function(e,t,n,r,i){const o=this;i&&i.url?this.alertInternal(e,t,n,r,i,i.url):this.getDefaultTemplateURL((s=>{o.alertInternal(e,t,n,r,i,s)}))},this.alertInternal=function(n,i,a,u,c,l){let f=!1;const d=`UserNotification.alert.${a}`,h=(c=c||{}).duration||864e5;switch(i){case"ONCE-SINCE-STARTUP":d in e?f=!1:(f=!0,e[d]=!0);break;case"MAX-COUNT":{let e=0;const n=c.maxCount||1;d in t&&(e=t[d]),t[d]=++e,e<=n&&(f=!0);break}default:f=!0}if(r.default.log("UserNotification.alert",n,f,i,a,u,c),f){const e={url:l,message:u,timeout:h};s.default.systemLog({notification:!0},`Notification: ${u}`),new o.System.Notification(e)}}};t.default=c},13712:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,i=(r=n(21014))&&r.__esModule?r:{default:r},o=new function(){function e(e,t,n){const r=function(){try{throw Error("")}catch(e){return e}}(),i=r.stack.split("\n")[5],o=i.indexOf("at "),s=i.slice(o+2,i.length),a=r.stack.split("\n")[6],u=a.indexOf("at "),c=a.slice(u+2,a.length);console.warn(`parameter validation failed: parameter ${e} is of type '${typeof t}' but should be of type '${n}' in${s} called by${c}`)}this.args=function(){let t=!0;if(i.default.validationEnabled()){const n=arguments.length;if((n+1)%2!=0)for(let r=0;r<n;r+=2){let n=!1;const i=arguments[r];let o=arguments[r+1];if("="===o.slice(-1)&&(o=o.slice(0,-1),n=!0),typeof i!==o&&!(n&&void 0===i||void 0!==i&&"any"===o)){e(r/2+1,i,o),t=!1;break}}else console.warn(`validate.args requires even number of parameters: ${JSON.stringify(arguments)}`)}return t},this.args2=function(){let t=!0;if(i.default.validationEnabled()){const n=arguments.length;if((n+1)%3!=0)for(let r=0;r<n;r+=3){let n=!1;const i=arguments[r],o=arguments[r+1];let s=arguments[r+2];if("="===s.slice(-1)&&(s=s.slice(0,-1),n=!0),typeof o!==s&&!(n&&void 0===o||void 0!==o&&"any"===s)){e(i,o,s),t=!1;break}}else console.warn(`validate.args requires even number of parameters: ${JSON.stringify(arguments)}`)}return t}};t.default=o},33034:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,s){if("function"!=typeof r)throw new TypeError("The listener must be a function");var a=new i(r,o||e,s),u=n?n+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],a]:e._events[u].push(a):(e._events[u]=a,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function a(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),a.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},a.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,s=new Array(o);i<o;i++)s[i]=r[i].fn;return s},a.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},a.prototype.emit=function(e,t,r,i,o,s){var a=n?n+e:e;if(!this._events[a])return!1;var u,c,l=this._events[a],f=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),f){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,r),!0;case 4:return l.fn.call(l.context,t,r,i),!0;case 5:return l.fn.call(l.context,t,r,i,o),!0;case 6:return l.fn.call(l.context,t,r,i,o,s),!0}for(c=1,u=new Array(f-1);c<f;c++)u[c-1]=arguments[c];l.fn.apply(l.context,u)}else{var d,h=l.length;for(c=0;c<h;c++)switch(l[c].once&&this.removeListener(e,l[c].fn,void 0,!0),f){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,t);break;case 3:l[c].fn.call(l[c].context,t,r);break;case 4:l[c].fn.call(l[c].context,t,r,i);break;default:if(!u)for(d=1,u=new Array(f-1);d<f;d++)u[d-1]=arguments[d];l[c].fn.apply(l[c].context,u)}}return!0},a.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},a.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},a.prototype.removeListener=function(e,t,r,i){var o=n?n+e:e;if(!this._events[o])return this;if(!t)return s(this,o),this;var a=this._events[o];if(a.fn)a.fn!==t||i&&!a.once||r&&a.context!==r||s(this,o);else{for(var u=0,c=[],l=a.length;u<l;u++)(a[u].fn!==t||i&&!a[u].once||r&&a[u].context!==r)&&c.push(a[u]);c.length?this._events[o]=1===c.length?c[0]:c:s(this,o)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&s(this,t)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,e.exports=a},5939:e=>{"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}y(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&y(e,"error",t,{once:!0})}(e,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function c(e,t,n,r){var i,o,s,c;if(a(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=u(e))>0&&s.length>i&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,c=l,console&&console.warn&&console.warn(c)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=l.bind(r);return i.listener=n,r.wrapFn=i,i}function d(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):p(i,i.length)}function h(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function p(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function y(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){r.once&&e.removeEventListener(t,i),n(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)r(u,this,t);else{var c=u.length,l=p(u,c);for(n=0;n<c;++n)r(l[n],this,t)}return!0},o.prototype.addListener=function(e,t){return c(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return c(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,f(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,f(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,r,i,o,s;if(a(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},o.prototype.listeners=function(e){return d(this,e,!0)},o.prototype.rawListeners=function(e){return d(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},o.prototype.listenerCount=h,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},84155:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>Sr,Collection:()=>C,Iterable:()=>br,List:()=>rn,Map:()=>Mt,OrderedMap:()=>vn,OrderedSet:()=>ir,Range:()=>$n,Record:()=>cr,Repeat:()=>gr,Seq:()=>H,Set:()=>Dn,Stack:()=>En,fromJS:()=>mr,get:()=>rt,getIn:()=>qn,has:()=>nt,hasIn:()=>Hn,hash:()=>fe,is:()=>ae,isAssociative:()=>S,isCollection:()=>m,isImmutable:()=>k,isIndexed:()=>b,isKeyed:()=>w,isList:()=>nn,isMap:()=>ie,isOrdered:()=>M,isOrderedMap:()=>oe,isOrderedSet:()=>kn,isPlainObject:()=>Xe,isRecord:()=>R,isSeq:()=>T,isSet:()=>Rn,isStack:()=>Cn,isValueObject:()=>se,merge:()=>wt,mergeDeep:()=>bt,mergeDeepWith:()=>St,mergeWith:()=>_t,remove:()=>ot,removeIn:()=>ft,set:()=>st,setIn:()=>ct,update:()=>ht,updateIn:()=>at,version:()=>_r});var r=32,i=31,o={};function s(e){e&&(e.value=!0)}function a(){}function u(e){return void 0===e.size&&(e.size=e.__iterate(l)),e.size}function c(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?u(e)+t:t}function l(){return!0}function f(e,t,n){return(0===e&&!y(e)||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function d(e,t){return p(e,t,0)}function h(e,t){return p(e,t,t)}function p(e,t,n){return void 0===e?n:y(e)?t===1/0?t:0|Math.max(0,t+e):void 0===t||t===e?e:0|Math.min(t,e)}function y(e){return e<0||0===e&&1/e==-1/0}var g="@@__IMMUTABLE_ITERABLE__@@";function m(e){return Boolean(e&&e[g])}var v="@@__IMMUTABLE_KEYED__@@";function w(e){return Boolean(e&&e[v])}var _="@@__IMMUTABLE_INDEXED__@@";function b(e){return Boolean(e&&e[_])}function S(e){return w(e)||b(e)}var C=function(e){return m(e)?e:H(e)},E=function(e){function t(e){return w(e)?e:V(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(C),I=function(e){function t(e){return b(e)?e:G(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(C),O=function(e){function t(e){return m(e)&&!S(e)?e:Y(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(C);C.Keyed=E,C.Indexed=I,C.Set=O;var A="@@__IMMUTABLE_SEQ__@@";function T(e){return Boolean(e&&e[A])}var L="@@__IMMUTABLE_RECORD__@@";function R(e){return Boolean(e&&e[L])}function k(e){return m(e)||R(e)}var N="@@__IMMUTABLE_ORDERED__@@";function M(e){return Boolean(e&&e[N])}var P="function"==typeof Symbol&&Symbol.iterator,D=P||"@@iterator",W=function(e){this.next=e};function x(e,t,n,r){var i=0===e?t:1===e?n:[t,n];return r?r.value=i:r={value:i,done:!1},r}function j(){return{value:void 0,done:!0}}function F(e){return!!$(e)}function B(e){return e&&"function"==typeof e.next}function z(e){var t=$(e);return t&&t.call(e)}function $(e){var t=e&&(P&&e[P]||e["@@iterator"]);if("function"==typeof t)return t}W.prototype.toString=function(){return"[Iterator]"},W.KEYS=0,W.VALUES=1,W.ENTRIES=2,W.prototype.inspect=W.prototype.toSource=function(){return this.toString()},W.prototype[D]=function(){return this};var q=Object.prototype.hasOwnProperty;function U(e){return!(!Array.isArray(e)&&"string"!=typeof e)||e&&"object"==typeof e&&Number.isInteger(e.length)&&e.length>=0&&(0===e.length?1===Object.keys(e).length:e.hasOwnProperty(e.length-1))}var H=function(e){function t(e){return null==e?X():k(e)?e.toSeq():function(e){var t=ne(e);if(t)return t;if("object"==typeof e)return new J(e);throw new TypeError("Expected Array or collection object of values, or keyed object: "+e)}(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq {","}")},t.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},t.prototype.__iterate=function(e,t){var n=this._cache;if(n){for(var r=n.length,i=0;i!==r;){var o=n[t?r-++i:i++];if(!1===e(o[1],o[0],this))break}return i}return this.__iterateUncached(e,t)},t.prototype.__iterator=function(e,t){var n=this._cache;if(n){var r=n.length,i=0;return new W((function(){if(i===r)return{value:void 0,done:!0};var o=n[t?r-++i:i++];return x(e,o[0],o[1])}))}return this.__iteratorUncached(e,t)},t}(C),V=function(e){function t(e){return null==e?X().toKeyedSeq():m(e)?w(e)?e.toSeq():e.fromEntrySeq():R(e)?e.toSeq():ee(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toKeyedSeq=function(){return this},t}(H),G=function(e){function t(e){return null==e?X():m(e)?w(e)?e.entrySeq():e.toIndexedSeq():R(e)?e.toSeq().entrySeq():te(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toIndexedSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq [","]")},t}(H),Y=function(e){function t(e){return(m(e)&&!S(e)?e:G(e)).toSetSeq()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toSetSeq=function(){return this},t}(H);H.isSeq=T,H.Keyed=V,H.Set=Y,H.Indexed=G,H.prototype[A]=!0;var K=function(e){function t(e){this._array=e,this.size=e.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this.has(e)?this._array[c(this,e)]:t},t.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length,i=0;i!==r;){var o=t?r-++i:i++;if(!1===e(n[o],o,this))break}return i},t.prototype.__iterator=function(e,t){var n=this._array,r=n.length,i=0;return new W((function(){if(i===r)return{value:void 0,done:!0};var o=t?r-++i:i++;return x(e,o,n[o])}))},t}(G),J=function(e){function t(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},t.prototype.has=function(e){return q.call(this._object,e)},t.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,i=r.length,o=0;o!==i;){var s=r[t?i-++o:o++];if(!1===e(n[s],s,this))break}return o},t.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,i=r.length,o=0;return new W((function(){if(o===i)return{value:void 0,done:!0};var s=r[t?i-++o:o++];return x(e,s,n[s])}))},t}(V);J.prototype[N]=!0;var Q,Z=function(e){function t(e){this._collection=e,this.size=e.length||e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=z(this._collection),r=0;if(B(n))for(var i;!(i=n.next()).done&&!1!==e(i.value,r++,this););return r},t.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=z(this._collection);if(!B(n))return new W(j);var r=0;return new W((function(){var t=n.next();return t.done?t:x(e,r++,t.value)}))},t}(G);function X(){return Q||(Q=new K([]))}function ee(e){var t=Array.isArray(e)?new K(e):F(e)?new Z(e):void 0;if(t)return t.fromEntrySeq();if("object"==typeof e)return new J(e);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+e)}function te(e){var t=ne(e);if(t)return t;throw new TypeError("Expected Array or collection object of values: "+e)}function ne(e){return U(e)?new K(e):F(e)?new Z(e):void 0}var re="@@__IMMUTABLE_MAP__@@";function ie(e){return Boolean(e&&e[re])}function oe(e){return ie(e)&&M(e)}function se(e){return Boolean(e&&"function"==typeof e.equals&&"function"==typeof e.hashCode)}function ae(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!!(se(e)&&se(t)&&e.equals(t))}var ue="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function ce(e){return e>>>1&1073741824|3221225471&e}var le=Object.prototype.valueOf;function fe(e){if(null==e)return de(e);if("function"==typeof e.hashCode)return ce(e.hashCode(e));var t,n,r,i=(t=e).valueOf!==le&&"function"==typeof t.valueOf?t.valueOf(t):t;if(null==i)return de(i);switch(typeof i){case"boolean":return i?1108378657:1108378656;case"number":return function(e){if(e!=e||e===1/0)return 0;var t=0|e;for(t!==e&&(t^=4294967295*e);e>4294967295;)t^=e/=4294967295;return ce(t)}(i);case"string":return i.length>Se?(void 0===(r=Ie[n=i])&&(r=he(n),Ee===Ce&&(Ee=0,Ie={}),Ee++,Ie[n]=r),r):he(i);case"object":case"function":return function(e){var t;if(ve&&void 0!==(t=me.get(e)))return t;if(void 0!==(t=e[be]))return t;if(!ye){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[be]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}if(t=ge(),ve)me.set(e,t);else{if(void 0!==pe&&!1===pe(e))throw new Error("Non-extensible objects are not allowed as keys.");if(ye)Object.defineProperty(e,be,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[be]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[be]=t}}return t}(i);case"symbol":return function(e){var t=we[e];return void 0!==t||(t=ge(),we[e]=t),t}(i);default:if("function"==typeof i.toString)return he(i.toString());throw new Error("Value type "+typeof i+" cannot be hashed.")}}function de(e){return null===e?1108378658:1108378659}function he(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return ce(t)}var pe=Object.isExtensible,ye=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}();function ge(){var e=++_e;return 1073741824&_e&&(_e=0),e}var me,ve="function"==typeof WeakMap;ve&&(me=new WeakMap);var we=Object.create(null),_e=0,be="__immutablehash__";"function"==typeof Symbol&&(be=Symbol(be));var Se=16,Ce=255,Ee=0,Ie={},Oe=function(e){function t(e,t){this._iter=e,this._useKeys=t,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this._iter.get(e,t)},t.prototype.has=function(e){return this._iter.has(e)},t.prototype.valueSeq=function(){return this._iter.valueSeq()},t.prototype.reverse=function(){var e=this,t=Ne(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},t.prototype.map=function(e,t){var n=this,r=ke(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate((function(t,r){return e(t,r,n)}),t)},t.prototype.__iterator=function(e,t){return this._iter.__iterator(e,t)},t}(V);Oe.prototype[N]=!0;var Ae=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.includes=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(e,t){var n=this,r=0;return t&&u(this),this._iter.__iterate((function(i){return e(i,t?n.size-++r:r++,n)}),t)},t.prototype.__iterator=function(e,t){var n=this,r=this._iter.__iterator(1,t),i=0;return t&&u(this),new W((function(){var o=r.next();return o.done?o:x(e,t?n.size-++i:i++,o.value,o)}))},t}(G),Te=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.has=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate((function(t){return e(t,t,n)}),t)},t.prototype.__iterator=function(e,t){var n=this._iter.__iterator(1,t);return new W((function(){var t=n.next();return t.done?t:x(e,t.value,t.value,t)}))},t}(Y),Le=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.entrySeq=function(){return this._iter.toSeq()},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate((function(t){if(t){qe(t);var r=m(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}}),t)},t.prototype.__iterator=function(e,t){var n=this._iter.__iterator(1,t);return new W((function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){qe(r);var i=m(r);return x(e,i?r.get(0):r[0],i?r.get(1):r[1],t)}}}))},t}(V);function Re(e){var t=He(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=Ve,t.__iterateUncached=function(t,n){var r=this;return e.__iterate((function(e,n){return!1!==t(n,e,r)}),n)},t.__iteratorUncached=function(t,n){if(2===t){var r=e.__iterator(t,n);return new W((function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e}))}return e.__iterator(1===t?0:1,n)},t}function ke(e,t,n){var r=He(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,i){var s=e.get(r,o);return s===o?i:t.call(n,s,r,e)},r.__iterateUncached=function(r,i){var o=this;return e.__iterate((function(e,i,s){return!1!==r(t.call(n,e,i,s),i,o)}),i)},r.__iteratorUncached=function(r,i){var o=e.__iterator(2,i);return new W((function(){var i=o.next();if(i.done)return i;var s=i.value,a=s[0];return x(r,a,t.call(n,s[1],a,e),i)}))},r}function Ne(e,t){var n=this,r=He(e);return r._iter=e,r.size=e.size,r.reverse=function(){return e},e.flip&&(r.flip=function(){var t=Re(e);return t.reverse=function(){return e.flip()},t}),r.get=function(n,r){return e.get(t?n:-1-n,r)},r.has=function(n){return e.has(t?n:-1-n)},r.includes=function(t){return e.includes(t)},r.cacheResult=Ve,r.__iterate=function(n,r){var i=this,o=0;return r&&u(e),e.__iterate((function(e,s){return n(e,t?s:r?i.size-++o:o++,i)}),!r)},r.__iterator=function(r,i){var o=0;i&&u(e);var s=e.__iterator(2,!i);return new W((function(){var e=s.next();if(e.done)return e;var a=e.value;return x(r,t?a[0]:i?n.size-++o:o++,a[1],e)}))},r}function Me(e,t,n,r){var i=He(e);return r&&(i.has=function(r){var i=e.get(r,o);return i!==o&&!!t.call(n,i,r,e)},i.get=function(r,i){var s=e.get(r,o);return s!==o&&t.call(n,s,r,e)?s:i}),i.__iterateUncached=function(i,o){var s=this,a=0;return e.__iterate((function(e,o,u){if(t.call(n,e,o,u))return a++,i(e,r?o:a-1,s)}),o),a},i.__iteratorUncached=function(i,o){var s=e.__iterator(2,o),a=0;return new W((function(){for(;;){var o=s.next();if(o.done)return o;var u=o.value,c=u[0],l=u[1];if(t.call(n,l,c,e))return x(i,r?c:a++,l,o)}}))},i}function Pe(e,t,n,r){var i=e.size;if(f(t,n,i))return e;var o=d(t,i),s=h(n,i);if(o!=o||s!=s)return Pe(e.toSeq().cacheResult(),t,n,r);var a,u=s-o;u==u&&(a=u<0?0:u);var l=He(e);return l.size=0===a?a:e.size&&a||void 0,!r&&T(e)&&a>=0&&(l.get=function(t,n){return(t=c(this,t))>=0&&t<a?e.get(t+o,n):n}),l.__iterateUncached=function(t,n){var i=this;if(0===a)return 0;if(n)return this.cacheResult().__iterate(t,n);var s=0,u=!0,c=0;return e.__iterate((function(e,n){if(!u||!(u=s++<o))return c++,!1!==t(e,r?n:c-1,i)&&c!==a})),c},l.__iteratorUncached=function(t,n){if(0!==a&&n)return this.cacheResult().__iterator(t,n);if(0===a)return new W(j);var i=e.__iterator(t,n),s=0,u=0;return new W((function(){for(;s++<o;)i.next();if(++u>a)return{value:void 0,done:!0};var e=i.next();return r||1===t||e.done?e:x(t,u-1,0===t?void 0:e.value[1],e)}))},l}function De(e,t,n,r){var i=He(e);return i.__iterateUncached=function(i,o){var s=this;if(o)return this.cacheResult().__iterate(i,o);var a=!0,u=0;return e.__iterate((function(e,o,c){if(!a||!(a=t.call(n,e,o,c)))return u++,i(e,r?o:u-1,s)})),u},i.__iteratorUncached=function(i,o){var s=this;if(o)return this.cacheResult().__iterator(i,o);var a=e.__iterator(2,o),u=!0,c=0;return new W((function(){var e,o,l;do{if((e=a.next()).done)return r||1===i?e:x(i,c++,0===i?void 0:e.value[1],e);var f=e.value;o=f[0],l=f[1],u&&(u=t.call(n,l,o,s))}while(u);return 2===i?e:x(i,o,l,e)}))},i}function We(e,t){var n=w(e),r=[e].concat(t).map((function(e){return m(e)?n&&(e=E(e)):e=n?ee(e):te(Array.isArray(e)?e:[e]),e})).filter((function(e){return 0!==e.size}));if(0===r.length)return e;if(1===r.length){var i=r[0];if(i===e||n&&w(i)||b(e)&&b(i))return i}var o=new K(r);return n?o=o.toKeyedSeq():b(e)||(o=o.toSetSeq()),(o=o.flatten(!0)).size=r.reduce((function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}}),0),o}function xe(e,t,n){var r=He(e);return r.__iterateUncached=function(i,o){if(o)return this.cacheResult().__iterate(i,o);var s=0,a=!1;return function e(u,c){u.__iterate((function(o,u){return(!t||c<t)&&m(o)?e(o,c+1):(s++,!1===i(o,n?u:s-1,r)&&(a=!0)),!a}),o)}(e,0),s},r.__iteratorUncached=function(r,i){if(i)return this.cacheResult().__iterator(r,i);var o=e.__iterator(r,i),s=[],a=0;return new W((function(){for(;o;){var e=o.next();if(!1===e.done){var u=e.value;if(2===r&&(u=u[1]),t&&!(s.length<t)||!m(u))return n?e:x(r,a++,u,e);s.push(o),o=u.__iterator(r,i)}else o=s.pop()}return{value:void 0,done:!0}}))},r}function je(e,t,n){t||(t=Ge);var r=w(e),i=0,o=e.toSeq().map((function(t,r){return[r,t,i++,n?n(t,r,e):t]})).valueSeq().toArray();return o.sort((function(e,n){return t(e[3],n[3])||e[2]-n[2]})).forEach(r?function(e,t){o[t].length=2}:function(e,t){o[t]=e[1]}),r?V(o):b(e)?G(o):Y(o)}function Fe(e,t,n){if(t||(t=Ge),n){var r=e.toSeq().map((function(t,r){return[t,n(t,r,e)]})).reduce((function(e,n){return Be(t,e[1],n[1])?n:e}));return r&&r[0]}return e.reduce((function(e,n){return Be(t,e,n)?n:e}))}function Be(e,t,n){var r=e(n,t);return 0===r&&n!==t&&(null==n||n!=n)||r>0}function ze(e,t,n,r){var i=He(e),o=new K(n).map((function(e){return e.size}));return i.size=r?o.max():o.min(),i.__iterate=function(e,t){for(var n,r=this.__iterator(1,t),i=0;!(n=r.next()).done&&!1!==e(n.value,i++,this););return i},i.__iteratorUncached=function(e,i){var o=n.map((function(e){return e=C(e),z(i?e.reverse():e)})),s=0,a=!1;return new W((function(){var n;return a||(n=o.map((function(e){return e.next()})),a=r?n.every((function(e){return e.done})):n.some((function(e){return e.done}))),a?{value:void 0,done:!0}:x(e,s++,t.apply(null,n.map((function(e){return e.value}))))}))},i}function $e(e,t){return e===t?e:T(e)?t:e.constructor(t)}function qe(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Ue(e){return w(e)?E:b(e)?I:O}function He(e){return Object.create((w(e)?V:b(e)?G:Y).prototype)}function Ve(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):H.prototype.cacheResult.call(this)}function Ge(e,t){return void 0===e&&void 0===t?0:void 0===e?1:void 0===t?-1:e>t?1:e<t?-1:0}function Ye(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),i=0;i<n;i++)r[i]=e[i+t];return r}function Ke(e,t){if(!e)throw new Error(t)}function Je(e){Ke(e!==1/0,"Cannot perform this action with an infinite size.")}function Qe(e){if(U(e)&&"string"!=typeof e)return e;if(M(e))return e.toArray();throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+e)}Ae.prototype.cacheResult=Oe.prototype.cacheResult=Te.prototype.cacheResult=Le.prototype.cacheResult=Ve;var Ze=Object.prototype.toString;function Xe(e){if(!e||"object"!=typeof e||"[object Object]"!==Ze.call(e))return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;for(var n=t,r=Object.getPrototypeOf(t);null!==r;)n=r,r=Object.getPrototypeOf(n);return n===t}function et(e){return"object"==typeof e&&(k(e)||Array.isArray(e)||Xe(e))}function tt(e){try{return"string"==typeof e?JSON.stringify(e):String(e)}catch(t){return JSON.stringify(e)}}function nt(e,t){return k(e)?e.has(t):et(e)&&q.call(e,t)}function rt(e,t,n){return k(e)?e.get(t,n):nt(e,t)?"function"==typeof e.get?e.get(t):e[t]:n}function it(e){if(Array.isArray(e))return Ye(e);var t={};for(var n in e)q.call(e,n)&&(t[n]=e[n]);return t}function ot(e,t){if(!et(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(k(e)){if(!e.remove)throw new TypeError("Cannot update immutable value without .remove() method: "+e);return e.remove(t)}if(!q.call(e,t))return e;var n=it(e);return Array.isArray(n)?n.splice(t,1):delete n[t],n}function st(e,t,n){if(!et(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(k(e)){if(!e.set)throw new TypeError("Cannot update immutable value without .set() method: "+e);return e.set(t,n)}if(q.call(e,t)&&n===e[t])return e;var r=it(e);return r[t]=n,r}function at(e,t,n,r){r||(r=n,n=void 0);var i=ut(k(e),e,Qe(t),0,n,r);return i===o?n:i}function ut(e,t,n,r,i,s){var a=t===o;if(r===n.length){var u=a?i:t,c=s(u);return c===u?t:c}if(!a&&!et(t))throw new TypeError("Cannot update within non-data-structure value in path ["+n.slice(0,r).map(tt)+"]: "+t);var l=n[r],f=a?o:rt(t,l,o),d=ut(f===o?e:k(f),f,n,r+1,i,s);return d===f?t:d===o?ot(t,l):st(a?e?Ht():{}:t,l,d)}function ct(e,t,n){return at(e,t,o,(function(){return n}))}function lt(e,t){return ct(this,e,t)}function ft(e,t){return at(e,t,(function(){return o}))}function dt(e){return ft(this,e)}function ht(e,t,n,r){return at(e,[t],n,r)}function pt(e,t,n){return 1===arguments.length?e(this):ht(this,e,t,n)}function yt(e,t,n){return at(this,e,t,n)}function gt(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return vt(this,e)}function mt(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if("function"!=typeof e)throw new TypeError("Invalid merger function: "+e);return vt(this,t,e)}function vt(e,t,n){for(var r=[],i=0;i<t.length;i++){var s=E(t[i]);0!==s.size&&r.push(s)}return 0===r.length?e:0!==e.toSeq().size||e.__ownerID||1!==r.length?e.withMutations((function(e){for(var t=n?function(t,r){ht(e,r,o,(function(e){return e===o?t:n(e,t,r)}))}:function(t,n){e.set(n,t)},i=0;i<r.length;i++)r[i].forEach(t)})):e.constructor(r[0])}function wt(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return Et(e,t)}function _t(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return Et(t,n,e)}function bt(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return Ct(e,t)}function St(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return Ct(t,n,e)}function Ct(e,t,n){return Et(e,t,function(e){return function t(n,r,i){return et(n)&&et(r)?Et(n,[r],t):e?e(n,r,i):r}}(n))}function Et(e,t,n){if(!et(e))throw new TypeError("Cannot merge into non-data-structure value: "+e);if(k(e))return"function"==typeof n&&e.mergeWith?e.mergeWith.apply(e,[n].concat(t)):e.merge?e.merge.apply(e,t):e.concat.apply(e,t);for(var r=Array.isArray(e),i=e,o=r?I:E,s=r?function(t){i===e&&(i=it(i)),i.push(t)}:function(t,r){var o=q.call(i,r),s=o&&n?n(i[r],t,r):t;o&&s===i[r]||(i===e&&(i=it(i)),i[r]=s)},a=0;a<t.length;a++)o(t[a]).forEach(s);return i}function It(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return Ct(this,e)}function Ot(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return Ct(this,t,e)}function At(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return at(this,e,Ht(),(function(e){return Et(e,t)}))}function Tt(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return at(this,e,Ht(),(function(e){return Ct(e,t)}))}function Lt(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this}function Rt(){return this.__ownerID?this:this.__ensureOwner(new a)}function kt(){return this.__ensureOwner()}function Nt(){return this.__altered}var Mt=function(e){function t(t){return null==t?Ht():ie(t)&&!M(t)?t:Ht().withMutations((function(n){var r=e(t);Je(r.size),r.forEach((function(e,t){return n.set(t,e)}))}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return Ht().withMutations((function(t){for(var n=0;n<e.length;n+=2){if(n+1>=e.length)throw new Error("Missing value for key: "+e[n]);t.set(e[n],e[n+1])}}))},t.prototype.toString=function(){return this.__toString("Map {","}")},t.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},t.prototype.set=function(e,t){return Vt(this,e,t)},t.prototype.remove=function(e){return Vt(this,e,o)},t.prototype.deleteAll=function(e){var t=C(e);return 0===t.size?this:this.withMutations((function(e){t.forEach((function(t){return e.remove(t)}))}))},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Ht()},t.prototype.sort=function(e){return vn(je(this,e))},t.prototype.sortBy=function(e,t){return vn(je(this,t,e))},t.prototype.map=function(e,t){var n=this;return this.withMutations((function(r){r.forEach((function(i,o){r.set(o,e.call(t,i,o,n))}))}))},t.prototype.__iterator=function(e,t){return new zt(this,e,t)},t.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate((function(t){return r++,e(t[1],t[0],n)}),t),r},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Ut(this.size,this._root,e,this.__hash):0===this.size?Ht():(this.__ownerID=e,this.__altered=!1,this)},t}(E);Mt.isMap=ie;var Pt=Mt.prototype;Pt[re]=!0,Pt.delete=Pt.remove,Pt.removeAll=Pt.deleteAll,Pt.setIn=lt,Pt.removeIn=Pt.deleteIn=dt,Pt.update=pt,Pt.updateIn=yt,Pt.merge=Pt.concat=gt,Pt.mergeWith=mt,Pt.mergeDeep=It,Pt.mergeDeepWith=Ot,Pt.mergeIn=At,Pt.mergeDeepIn=Tt,Pt.withMutations=Lt,Pt.wasAltered=Nt,Pt.asImmutable=kt,Pt["@@transducer/init"]=Pt.asMutable=Rt,Pt["@@transducer/step"]=function(e,t){return e.set(t[0],t[1])},Pt["@@transducer/result"]=function(e){return e.asImmutable()};var Dt=function(e,t){this.ownerID=e,this.entries=t};Dt.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,s=i.length;o<s;o++)if(ae(n,i[o][0]))return i[o][1];return r},Dt.prototype.update=function(e,t,n,r,i,u,c){for(var l=i===o,f=this.entries,d=0,h=f.length;d<h&&!ae(r,f[d][0]);d++);var p=d<h;if(p?f[d][1]===i:l)return this;if(s(c),(l||!p)&&s(u),!l||1!==f.length){if(!p&&!l&&f.length>=Zt)return function(e,t,n,r){e||(e=new a);for(var i=new Ft(e,fe(n),[n,r]),o=0;o<t.length;o++){var s=t[o];i=i.update(e,0,void 0,s[0],s[1])}return i}(e,f,r,i);var y=e&&e===this.ownerID,g=y?f:Ye(f);return p?l?d===h-1?g.pop():g[d]=g.pop():g[d]=[r,i]:g.push([r,i]),y?(this.entries=g,this):new Dt(e,g)}};var Wt=function(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n};Wt.prototype.get=function(e,t,n,r){void 0===t&&(t=fe(n));var o=1<<((0===e?t:t>>>e)&i),s=this.bitmap;return 0==(s&o)?r:this.nodes[Jt(s&o-1)].get(e+5,t,n,r)},Wt.prototype.update=function(e,t,n,s,a,u,c){void 0===n&&(n=fe(s));var l=(0===t?n:n>>>t)&i,f=1<<l,d=this.bitmap,h=0!=(d&f);if(!h&&a===o)return this;var p=Jt(d&f-1),y=this.nodes,g=h?y[p]:void 0,m=Gt(g,e,t+5,n,s,a,u,c);if(m===g)return this;if(!h&&m&&y.length>=Xt)return function(e,t,n,i,o){for(var s=0,a=new Array(r),u=0;0!==n;u++,n>>>=1)a[u]=1&n?t[s++]:void 0;return a[i]=o,new xt(e,s+1,a)}(e,y,d,l,m);if(h&&!m&&2===y.length&&Yt(y[1^p]))return y[1^p];if(h&&m&&1===y.length&&Yt(m))return m;var v=e&&e===this.ownerID,w=h?m?d:d^f:d|f,_=h?m?Qt(y,p,m,v):function(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var i=new Array(r),o=0,s=0;s<r;s++)s===t&&(o=1),i[s]=e[s+o];return i}(y,p,v):function(e,t,n,r){var i=e.length+1;if(r&&t+1===i)return e[t]=n,e;for(var o=new Array(i),s=0,a=0;a<i;a++)a===t?(o[a]=n,s=-1):o[a]=e[a+s];return o}(y,p,m,v);return v?(this.bitmap=w,this.nodes=_,this):new Wt(e,w,_)};var xt=function(e,t,n){this.ownerID=e,this.count=t,this.nodes=n};xt.prototype.get=function(e,t,n,r){void 0===t&&(t=fe(n));var o=(0===e?t:t>>>e)&i,s=this.nodes[o];return s?s.get(e+5,t,n,r):r},xt.prototype.update=function(e,t,n,r,s,a,u){void 0===n&&(n=fe(r));var c=(0===t?n:n>>>t)&i,l=s===o,f=this.nodes,d=f[c];if(l&&!d)return this;var h=Gt(d,e,t+5,n,r,s,a,u);if(h===d)return this;var p=this.count;if(d){if(!h&&--p<en)return function(e,t,n,r){for(var i=0,o=0,s=new Array(n),a=0,u=1,c=t.length;a<c;a++,u<<=1){var l=t[a];void 0!==l&&a!==r&&(i|=u,s[o++]=l)}return new Wt(e,i,s)}(e,f,p,c)}else p++;var y=e&&e===this.ownerID,g=Qt(f,c,h,y);return y?(this.count=p,this.nodes=g,this):new xt(e,p,g)};var jt=function(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n};jt.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,s=i.length;o<s;o++)if(ae(n,i[o][0]))return i[o][1];return r},jt.prototype.update=function(e,t,n,r,i,a,u){void 0===n&&(n=fe(r));var c=i===o;if(n!==this.keyHash)return c?this:(s(u),s(a),Kt(this,e,t,n,[r,i]));for(var l=this.entries,f=0,d=l.length;f<d&&!ae(r,l[f][0]);f++);var h=f<d;if(h?l[f][1]===i:c)return this;if(s(u),(c||!h)&&s(a),c&&2===d)return new Ft(e,this.keyHash,l[1^f]);var p=e&&e===this.ownerID,y=p?l:Ye(l);return h?c?f===d-1?y.pop():y[f]=y.pop():y[f]=[r,i]:y.push([r,i]),p?(this.entries=y,this):new jt(e,this.keyHash,y)};var Ft=function(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n};Ft.prototype.get=function(e,t,n,r){return ae(n,this.entry[0])?this.entry[1]:r},Ft.prototype.update=function(e,t,n,r,i,a,u){var c=i===o,l=ae(r,this.entry[0]);return(l?i===this.entry[1]:c)?this:(s(u),c?void s(a):l?e&&e===this.ownerID?(this.entry[1]=i,this):new Ft(e,this.keyHash,[r,i]):(s(a),Kt(this,e,t,fe(r),[r,i])))},Dt.prototype.iterate=jt.prototype.iterate=function(e,t){for(var n=this.entries,r=0,i=n.length-1;r<=i;r++)if(!1===e(n[t?i-r:r]))return!1},Wt.prototype.iterate=xt.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,i=n.length-1;r<=i;r++){var o=n[t?i-r:r];if(o&&!1===o.iterate(e,t))return!1}},Ft.prototype.iterate=function(e,t){return e(this.entry)};var Bt,zt=function(e){function t(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&qt(e._root)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n=t.node,r=t.index++,i=void 0;if(n.entry){if(0===r)return $t(e,n.entry)}else if(n.entries){if(r<=(i=n.entries.length-1))return $t(e,n.entries[this._reverse?i-r:r])}else if(r<=(i=n.nodes.length-1)){var o=n.nodes[this._reverse?i-r:r];if(o){if(o.entry)return $t(e,o.entry);t=this._stack=qt(o,t)}continue}t=this._stack=this._stack.__prev}return{value:void 0,done:!0}},t}(W);function $t(e,t){return x(e,t[0],t[1])}function qt(e,t){return{node:e,index:0,__prev:t}}function Ut(e,t,n,r){var i=Object.create(Pt);return i.size=e,i._root=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Ht(){return Bt||(Bt=Ut(0))}function Vt(e,t,n){var r,i;if(e._root){var s={value:!1},a={value:!1};if(r=Gt(e._root,e.__ownerID,0,void 0,t,n,s,a),!a.value)return e;i=e.size+(s.value?n===o?-1:1:0)}else{if(n===o)return e;i=1,r=new Dt(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=i,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?Ut(i,r):Ht()}function Gt(e,t,n,r,i,a,u,c){return e?e.update(t,n,r,i,a,u,c):a===o?e:(s(c),s(u),new Ft(t,r,[i,a]))}function Yt(e){return e.constructor===Ft||e.constructor===jt}function Kt(e,t,n,r,o){if(e.keyHash===r)return new jt(t,r,[e.entry,o]);var s,a=(0===n?e.keyHash:e.keyHash>>>n)&i,u=(0===n?r:r>>>n)&i,c=a===u?[Kt(e,t,n+5,r,o)]:(s=new Ft(t,r,o),a<u?[e,s]:[s,e]);return new Wt(t,1<<a|1<<u,c)}function Jt(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,127&(e+=e>>8)+(e>>16)}function Qt(e,t,n,r){var i=r?e:Ye(e);return i[t]=n,i}var Zt=8,Xt=16,en=8,tn="@@__IMMUTABLE_LIST__@@";function nn(e){return Boolean(e&&e[tn])}var rn=function(e){function t(t){var n=fn();if(null==t)return n;if(nn(t))return t;var i=e(t),o=i.size;return 0===o?n:(Je(o),o>0&&o<r?ln(0,o,5,null,new sn(i.toArray())):n.withMutations((function(e){e.setSize(o),i.forEach((function(t,n){return e.set(n,t)}))})))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("List [","]")},t.prototype.get=function(e,t){if((e=c(this,e))>=0&&e<this.size){var n=pn(this,e+=this._origin);return n&&n.array[e&i]}return t},t.prototype.set=function(e,t){return function(e,t,n){if((t=c(e,t))!=t)return e;if(t>=e.size||t<0)return e.withMutations((function(e){t<0?yn(e,t).set(0,n):yn(e,0,t+1).set(t,n)}));t+=e._origin;var r=e._tail,i=e._root,o={value:!1};return t>=gn(e._capacity)?r=dn(r,e.__ownerID,0,t,n,o):i=dn(i,e.__ownerID,e._level,t,n,o),o.value?e.__ownerID?(e._root=i,e._tail=r,e.__hash=void 0,e.__altered=!0,e):ln(e._origin,e._capacity,e._level,i,r):e}(this,e,t)},t.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},t.prototype.insert=function(e,t){return this.splice(e,0,t)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=this.__hash=void 0,this.__altered=!0,this):fn()},t.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations((function(n){yn(n,0,t+e.length);for(var r=0;r<e.length;r++)n.set(t+r,e[r])}))},t.prototype.pop=function(){return yn(this,0,-1)},t.prototype.unshift=function(){var e=arguments;return this.withMutations((function(t){yn(t,-e.length);for(var n=0;n<e.length;n++)t.set(n,e[n])}))},t.prototype.shift=function(){return yn(this,1)},t.prototype.concat=function(){for(var t=arguments,n=[],r=0;r<arguments.length;r++){var i=t[r],o=e("string"!=typeof i&&F(i)?i:[i]);0!==o.size&&n.push(o)}return 0===n.length?this:0!==this.size||this.__ownerID||1!==n.length?this.withMutations((function(e){n.forEach((function(t){return t.forEach((function(t){return e.push(t)}))}))})):this.constructor(n[0])},t.prototype.setSize=function(e){return yn(this,0,e)},t.prototype.map=function(e,t){var n=this;return this.withMutations((function(r){for(var i=0;i<n.size;i++)r.set(i,e.call(t,r.get(i),i,n))}))},t.prototype.slice=function(e,t){var n=this.size;return f(e,t,n)?this:yn(this,d(e,n),h(t,n))},t.prototype.__iterator=function(e,t){var n=t?this.size:0,r=cn(this,t);return new W((function(){var i=r();return i===un?{value:void 0,done:!0}:x(e,t?--n:n++,i)}))},t.prototype.__iterate=function(e,t){for(var n,r=t?this.size:0,i=cn(this,t);(n=i())!==un&&!1!==e(n,t?--r:r++,this););return r},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?ln(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):0===this.size?fn():(this.__ownerID=e,this.__altered=!1,this)},t}(I);rn.isList=nn;var on=rn.prototype;on[tn]=!0,on.delete=on.remove,on.merge=on.concat,on.setIn=lt,on.deleteIn=on.removeIn=dt,on.update=pt,on.updateIn=yt,on.mergeIn=At,on.mergeDeepIn=Tt,on.withMutations=Lt,on.wasAltered=Nt,on.asImmutable=kt,on["@@transducer/init"]=on.asMutable=Rt,on["@@transducer/step"]=function(e,t){return e.push(t)},on["@@transducer/result"]=function(e){return e.asImmutable()};var sn=function(e,t){this.array=e,this.ownerID=t};sn.prototype.removeBefore=function(e,t,n){if(n===t?1<<t:0===this.array.length)return this;var r=n>>>t&i;if(r>=this.array.length)return new sn([],e);var o,s=0===r;if(t>0){var a=this.array[r];if((o=a&&a.removeBefore(e,t-5,n))===a&&s)return this}if(s&&!o)return this;var u=hn(this,e);if(!s)for(var c=0;c<r;c++)u.array[c]=void 0;return o&&(u.array[r]=o),u},sn.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t:0)||0===this.array.length)return this;var r,o=n-1>>>t&i;if(o>=this.array.length)return this;if(t>0){var s=this.array[o];if((r=s&&s.removeAfter(e,t-5,n))===s&&o===this.array.length-1)return this}var a=hn(this,e);return a.array.splice(o+1),r&&(a.array[o]=r),a};var an,un={};function cn(e,t){var n=e._origin,i=e._capacity,o=gn(i),s=e._tail;return function e(a,u,c){return 0===u?function(e,a){var u=a===o?s&&s.array:e&&e.array,c=a>n?0:n-a,l=i-a;return l>r&&(l=r),function(){if(c===l)return un;var e=t?--l:c++;return u&&u[e]}}(a,c):function(o,s,a){var u,c=o&&o.array,l=a>n?0:n-a>>s,f=1+(i-a>>s);return f>r&&(f=r),function(){for(;;){if(u){var n=u();if(n!==un)return n;u=null}if(l===f)return un;var r=t?--f:l++;u=e(c&&c[r],s-5,a+(r<<s))}}}(a,u,c)}(e._root,e._level,0)}function ln(e,t,n,r,i,o,s){var a=Object.create(on);return a.size=t-e,a._origin=e,a._capacity=t,a._level=n,a._root=r,a._tail=i,a.__ownerID=o,a.__hash=s,a.__altered=!1,a}function fn(){return an||(an=ln(0,0,5))}function dn(e,t,n,r,o,a){var u,c=r>>>n&i,l=e&&c<e.array.length;if(!l&&void 0===o)return e;if(n>0){var f=e&&e.array[c],d=dn(f,t,n-5,r,o,a);return d===f?e:((u=hn(e,t)).array[c]=d,u)}return l&&e.array[c]===o?e:(a&&s(a),u=hn(e,t),void 0===o&&c===u.array.length-1?u.array.pop():u.array[c]=o,u)}function hn(e,t){return t&&e&&t===e.ownerID?e:new sn(e?e.array.slice():[],t)}function pn(e,t){if(t>=gn(e._capacity))return e._tail;if(t<1<<e._level+5){for(var n=e._root,r=e._level;n&&r>0;)n=n.array[t>>>r&i],r-=5;return n}}function yn(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new a,o=e._origin,s=e._capacity,u=o+t,c=void 0===n?s:n<0?s+n:o+n;if(u===o&&c===s)return e;if(u>=c)return e.clear();for(var l=e._level,f=e._root,d=0;u+d<0;)f=new sn(f&&f.array.length?[void 0,f]:[],r),d+=1<<(l+=5);d&&(u+=d,o+=d,c+=d,s+=d);for(var h=gn(s),p=gn(c);p>=1<<l+5;)f=new sn(f&&f.array.length?[f]:[],r),l+=5;var y=e._tail,g=p<h?pn(e,c-1):p>h?new sn([],r):y;if(y&&p>h&&u<s&&y.array.length){for(var m=f=hn(f,r),v=l;v>5;v-=5){var w=h>>>v&i;m=m.array[w]=hn(m.array[w],r)}m.array[h>>>5&i]=y}if(c<s&&(g=g&&g.removeAfter(r,0,c)),u>=p)u-=p,c-=p,l=5,f=null,g=g&&g.removeBefore(r,0,u);else if(u>o||p<h){for(d=0;f;){var _=u>>>l&i;if(_!==p>>>l&i)break;_&&(d+=(1<<l)*_),l-=5,f=f.array[_]}f&&u>o&&(f=f.removeBefore(r,l,u-d)),f&&p<h&&(f=f.removeAfter(r,l,p-d)),d&&(u-=d,c-=d)}return e.__ownerID?(e.size=c-u,e._origin=u,e._capacity=c,e._level=l,e._root=f,e._tail=g,e.__hash=void 0,e.__altered=!0,e):ln(u,c,l,f,g)}function gn(e){return e<r?0:e-1>>>5<<5}var mn,vn=function(e){function t(e){return null==e?_n():oe(e)?e:_n().withMutations((function(t){var n=E(e);Je(n.size),n.forEach((function(e,n){return t.set(n,e)}))}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("OrderedMap {","}")},t.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this.__altered=!0,this):_n()},t.prototype.set=function(e,t){return bn(this,e,t)},t.prototype.remove=function(e){return bn(this,e,o)},t.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate((function(t){return t&&e(t[1],t[0],n)}),t)},t.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?wn(t,n,e,this.__hash):0===this.size?_n():(this.__ownerID=e,this.__altered=!1,this._map=t,this._list=n,this)},t}(Mt);function wn(e,t,n,r){var i=Object.create(vn.prototype);return i.size=e?e.size:0,i._map=e,i._list=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function _n(){return mn||(mn=wn(Ht(),fn()))}function bn(e,t,n){var i,s,a=e._map,u=e._list,c=a.get(t),l=void 0!==c;if(n===o){if(!l)return e;u.size>=r&&u.size>=2*a.size?(i=(s=u.filter((function(e,t){return void 0!==e&&c!==t}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(i.__ownerID=s.__ownerID=e.__ownerID)):(i=a.remove(t),s=c===u.size-1?u.pop():u.set(c,void 0))}else if(l){if(n===u.get(c)[1])return e;i=a,s=u.set(c,[t,n])}else i=a.set(t,u.size),s=u.set(u.size,[t,n]);return e.__ownerID?(e.size=i.size,e._map=i,e._list=s,e.__hash=void 0,e.__altered=!0,e):wn(i,s)}vn.isOrderedMap=oe,vn.prototype[N]=!0,vn.prototype.delete=vn.prototype.remove;var Sn="@@__IMMUTABLE_STACK__@@";function Cn(e){return Boolean(e&&e[Sn])}var En=function(e){function t(e){return null==e?Tn():Cn(e)?e:Tn().pushAll(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("Stack [","]")},t.prototype.get=function(e,t){var n=this._head;for(e=c(this,e);n&&e--;)n=n.next;return n?n.value:t},t.prototype.peek=function(){return this._head&&this._head.value},t.prototype.push=function(){var e=arguments;if(0===arguments.length)return this;for(var t=this.size+arguments.length,n=this._head,r=arguments.length-1;r>=0;r--)n={value:e[r],next:n};return this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):An(t,n)},t.prototype.pushAll=function(t){if(0===(t=e(t)).size)return this;if(0===this.size&&Cn(t))return t;Je(t.size);var n=this.size,r=this._head;return t.__iterate((function(e){n++,r={value:e,next:r}}),!0),this.__ownerID?(this.size=n,this._head=r,this.__hash=void 0,this.__altered=!0,this):An(n,r)},t.prototype.pop=function(){return this.slice(1)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Tn()},t.prototype.slice=function(t,n){if(f(t,n,this.size))return this;var r=d(t,this.size);if(h(n,this.size)!==this.size)return e.prototype.slice.call(this,t,n);for(var i=this.size-r,o=this._head;r--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):An(i,o)},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?An(this.size,this._head,e,this.__hash):0===this.size?Tn():(this.__ownerID=e,this.__altered=!1,this)},t.prototype.__iterate=function(e,t){var n=this;if(t)return new K(this.toArray()).__iterate((function(t,r){return e(t,r,n)}),t);for(var r=0,i=this._head;i&&!1!==e(i.value,r++,this);)i=i.next;return r},t.prototype.__iterator=function(e,t){if(t)return new K(this.toArray()).__iterator(e,t);var n=0,r=this._head;return new W((function(){if(r){var t=r.value;return r=r.next,x(e,n++,t)}return{value:void 0,done:!0}}))},t}(I);En.isStack=Cn;var In,On=En.prototype;function An(e,t,n,r){var i=Object.create(On);return i.size=e,i._head=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Tn(){return In||(In=An(0))}On[Sn]=!0,On.shift=On.pop,On.unshift=On.push,On.unshiftAll=On.pushAll,On.withMutations=Lt,On.wasAltered=Nt,On.asImmutable=kt,On["@@transducer/init"]=On.asMutable=Rt,On["@@transducer/step"]=function(e,t){return e.unshift(t)},On["@@transducer/result"]=function(e){return e.asImmutable()};var Ln="@@__IMMUTABLE_SET__@@";function Rn(e){return Boolean(e&&e[Ln])}function kn(e){return Rn(e)&&M(e)}function Nn(e,t){if(e===t)return!0;if(!m(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||w(e)!==w(t)||b(e)!==b(t)||M(e)!==M(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!S(e);if(M(e)){var r=e.entries();return t.every((function(e,t){var i=r.next().value;return i&&ae(i[1],e)&&(n||ae(i[0],t))}))&&r.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var s=e;e=t,t=s}var a=!0,u=t.__iterate((function(t,r){if(n?!e.has(t):i?!ae(t,e.get(r,o)):!ae(e.get(r,o),t))return a=!1,!1}));return a&&e.size===u}function Mn(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}function Pn(e){if(!e||"object"!=typeof e)return e;if(!m(e)){if(!et(e))return e;e=H(e)}if(w(e)){var t={};return e.__iterate((function(e,n){t[n]=Pn(e)})),t}var n=[];return e.__iterate((function(e){n.push(Pn(e))})),n}var Dn=function(e){function t(t){return null==t?Bn():Rn(t)&&!M(t)?t:Bn().withMutations((function(n){var r=e(t);Je(r.size),r.forEach((function(e){return n.add(e)}))}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(E(e).keySeq())},t.intersect=function(e){return(e=C(e).toArray()).length?xn.intersect.apply(t(e.pop()),e):Bn()},t.union=function(e){return(e=C(e).toArray()).length?xn.union.apply(t(e.pop()),e):Bn()},t.prototype.toString=function(){return this.__toString("Set {","}")},t.prototype.has=function(e){return this._map.has(e)},t.prototype.add=function(e){return jn(this,this._map.set(e,e))},t.prototype.remove=function(e){return jn(this,this._map.remove(e))},t.prototype.clear=function(){return jn(this,this._map.clear())},t.prototype.map=function(e,t){var n=this,r=!1,i=jn(this,this._map.mapEntries((function(i){var o=i[1],s=e.call(t,o,o,n);return s!==o&&(r=!0),[s,s]}),t));return r?i:this},t.prototype.union=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return 0===(t=t.filter((function(e){return 0!==e.size}))).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations((function(n){for(var r=0;r<t.length;r++)e(t[r]).forEach((function(e){return n.add(e)}))})):this.constructor(t[0])},t.prototype.intersect=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(0===t.length)return this;t=t.map((function(t){return e(t)}));var r=[];return this.forEach((function(e){t.every((function(t){return t.includes(e)}))||r.push(e)})),this.withMutations((function(e){r.forEach((function(t){e.remove(t)}))}))},t.prototype.subtract=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(0===t.length)return this;t=t.map((function(t){return e(t)}));var r=[];return this.forEach((function(e){t.some((function(t){return t.includes(e)}))&&r.push(e)})),this.withMutations((function(e){r.forEach((function(t){e.remove(t)}))}))},t.prototype.sort=function(e){return ir(je(this,e))},t.prototype.sortBy=function(e,t){return ir(je(this,t,e))},t.prototype.wasAltered=function(){return this._map.wasAltered()},t.prototype.__iterate=function(e,t){var n=this;return this._map.__iterate((function(t){return e(t,t,n)}),t)},t.prototype.__iterator=function(e,t){return this._map.__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):0===this.size?this.__empty():(this.__ownerID=e,this._map=t,this)},t}(O);Dn.isSet=Rn;var Wn,xn=Dn.prototype;function jn(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function Fn(e,t){var n=Object.create(xn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Bn(){return Wn||(Wn=Fn(Ht()))}xn[Ln]=!0,xn.delete=xn.remove,xn.merge=xn.concat=xn.union,xn.withMutations=Lt,xn.asImmutable=kt,xn["@@transducer/init"]=xn.asMutable=Rt,xn["@@transducer/step"]=function(e,t){return e.add(t)},xn["@@transducer/result"]=function(e){return e.asImmutable()},xn.__empty=Bn,xn.__make=Fn;var zn,$n=function(e){function t(e,n,r){if(!(this instanceof t))return new t(e,n,r);if(Ke(0!==r,"Cannot step a Range by 0"),e=e||0,void 0===n&&(n=1/0),r=void 0===r?1:Math.abs(r),n<e&&(r=-r),this._start=e,this._end=n,this._step=r,this.size=Math.max(0,Math.ceil((n-e)/r-1)+1),0===this.size){if(zn)return zn;zn=this}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},t.prototype.get=function(e,t){return this.has(e)?this._start+c(this,e)*this._step:t},t.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},t.prototype.slice=function(e,n){return f(e,n,this.size)?this:(e=d(e,this.size),(n=h(n,this.size))<=e?new t(0,0):new t(this.get(e,this._end),this.get(n,this._end),this._step))},t.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step==0){var n=t/this._step;if(n>=0&&n<this.size)return n}return-1},t.prototype.lastIndexOf=function(e){return this.indexOf(e)},t.prototype.__iterate=function(e,t){for(var n=this.size,r=this._step,i=t?this._start+(n-1)*r:this._start,o=0;o!==n&&!1!==e(i,t?n-++o:o++,this);)i+=t?-r:r;return o},t.prototype.__iterator=function(e,t){var n=this.size,r=this._step,i=t?this._start+(n-1)*r:this._start,o=0;return new W((function(){if(o===n)return{value:void 0,done:!0};var s=i;return i+=t?-r:r,x(e,t?n-++o:o++,s)}))},t.prototype.equals=function(e){return e instanceof t?this._start===e._start&&this._end===e._end&&this._step===e._step:Nn(this,e)},t}(G);function qn(e,t,n){for(var r=Qe(t),i=0;i!==r.length;)if((e=rt(e,r[i++],o))===o)return n;return e}function Un(e,t){return qn(this,e,t)}function Hn(e,t){return qn(e,t,o)!==o}function Vn(){Je(this.size);var e={};return this.__iterate((function(t,n){e[n]=t})),e}C.isIterable=m,C.isKeyed=w,C.isIndexed=b,C.isAssociative=S,C.isOrdered=M,C.Iterator=W,Mn(C,{toArray:function(){Je(this.size);var e=new Array(this.size||0),t=w(this),n=0;return this.__iterate((function(r,i){e[n++]=t?[i,r]:r})),e},toIndexedSeq:function(){return new Ae(this)},toJS:function(){return Pn(this)},toKeyedSeq:function(){return new Oe(this,!0)},toMap:function(){return Mt(this.toKeyedSeq())},toObject:Vn,toOrderedMap:function(){return vn(this.toKeyedSeq())},toOrderedSet:function(){return ir(w(this)?this.valueSeq():this)},toSet:function(){return Dn(w(this)?this.valueSeq():this)},toSetSeq:function(){return new Te(this)},toSeq:function(){return b(this)?this.toIndexedSeq():w(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return En(w(this)?this.valueSeq():this)},toList:function(){return rn(w(this)?this.valueSeq():this)},toString:function(){return"[Collection]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return $e(this,We(this,e))},includes:function(e){return this.some((function(t){return ae(t,e)}))},entries:function(){return this.__iterator(2)},every:function(e,t){Je(this.size);var n=!0;return this.__iterate((function(r,i,o){if(!e.call(t,r,i,o))return n=!1,!1})),n},filter:function(e,t){return $e(this,Me(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return Je(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){Je(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate((function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""})),t},keys:function(){return this.__iterator(0)},map:function(e,t){return $e(this,ke(this,e,t))},reduce:function(e,t,n){return Jn(this,e,t,n,arguments.length<2,!1)},reduceRight:function(e,t,n){return Jn(this,e,t,n,arguments.length<2,!0)},reverse:function(){return $e(this,Ne(this,!0))},slice:function(e,t){return $e(this,Pe(this,e,t,!0))},some:function(e,t){return!this.every(Xn(e),t)},sort:function(e){return $e(this,je(this,e))},values:function(){return this.__iterator(1)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(e,t){return u(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return function(e,t,n){var r=Mt().asMutable();return e.__iterate((function(i,o){r.update(t.call(n,i,o,e),0,(function(e){return e+1}))})),r.asImmutable()}(this,e,t)},equals:function(e){return Nn(this,e)},entrySeq:function(){var e=this;if(e._cache)return new K(e._cache);var t=e.toSeq().map(Zn).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(Xn(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate((function(n,i,o){if(e.call(t,n,i,o))return r=[i,n],!1})),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(e){return this.find(l,null,e)},flatMap:function(e,t){return $e(this,function(e,t,n){var r=Ue(e);return e.toSeq().map((function(i,o){return r(t.call(n,i,o,e))})).flatten(!0)}(this,e,t))},flatten:function(e){return $e(this,xe(this,e,!0))},fromEntrySeq:function(){return new Le(this)},get:function(e,t){return this.find((function(t,n){return ae(n,e)}),void 0,t)},getIn:Un,groupBy:function(e,t){return function(e,t,n){var r=w(e),i=(M(e)?vn():Mt()).asMutable();e.__iterate((function(o,s){i.update(t.call(n,o,s,e),(function(e){return(e=e||[]).push(r?[s,o]:o),e}))}));var o=Ue(e);return i.map((function(t){return $e(e,o(t))})).asImmutable()}(this,e,t)},has:function(e){return this.get(e,o)!==o},hasIn:function(e){return Hn(this,e)},isSubset:function(e){return e="function"==typeof e.includes?e:C(e),this.every((function(t){return e.includes(t)}))},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:C(e)).isSubset(this)},keyOf:function(e){return this.findKey((function(t){return ae(t,e)}))},keySeq:function(){return this.toSeq().map(Qn).toIndexedSeq()},last:function(e){return this.toSeq().reverse().first(e)},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return Fe(this,e)},maxBy:function(e,t){return Fe(this,t,e)},min:function(e){return Fe(this,e?er(e):nr)},minBy:function(e,t){return Fe(this,t?er(t):nr,e)},rest:function(){return this.slice(1)},skip:function(e){return 0===e?this:this.slice(Math.max(0,e))},skipLast:function(e){return 0===e?this:this.slice(0,-Math.max(0,e))},skipWhile:function(e,t){return $e(this,De(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(Xn(e),t)},sortBy:function(e,t){return $e(this,je(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return this.slice(-Math.max(0,e))},takeWhile:function(e,t){return $e(this,function(e,t,n){var r=He(e);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var s=0;return e.__iterate((function(e,i,a){return t.call(n,e,i,a)&&++s&&r(e,i,o)})),s},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var s=e.__iterator(2,i),a=!0;return new W((function(){if(!a)return{value:void 0,done:!0};var e=s.next();if(e.done)return e;var i=e.value,u=i[0],c=i[1];return t.call(n,c,u,o)?2===r?e:x(r,u,c,e):(a=!1,{value:void 0,done:!0})}))},r}(this,e,t))},takeUntil:function(e,t){return this.takeWhile(Xn(e),t)},update:function(e){return e(this)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(e){if(e.size===1/0)return 0;var t=M(e),n=w(e),r=t?1:0;return function(e,t){return t=ue(t,3432918353),t=ue(t<<15|t>>>-15,461845907),t=ue(t<<13|t>>>-13,5),t=ue((t=(t+3864292196|0)^e)^t>>>16,2246822507),ce((t=ue(t^t>>>13,3266489909))^t>>>16)}(e.__iterate(n?t?function(e,t){r=31*r+rr(fe(e),fe(t))|0}:function(e,t){r=r+rr(fe(e),fe(t))|0}:t?function(e){r=31*r+fe(e)|0}:function(e){r=r+fe(e)|0}),r)}(this))}});var Gn=C.prototype;Gn[g]=!0,Gn[D]=Gn.values,Gn.toJSON=Gn.toArray,Gn.__toStringMapper=tt,Gn.inspect=Gn.toSource=function(){return this.toString()},Gn.chain=Gn.flatMap,Gn.contains=Gn.includes,Mn(E,{flip:function(){return $e(this,Re(this))},mapEntries:function(e,t){var n=this,r=0;return $e(this,this.toSeq().map((function(i,o){return e.call(t,[o,i],r++,n)})).fromEntrySeq())},mapKeys:function(e,t){var n=this;return $e(this,this.toSeq().flip().map((function(r,i){return e.call(t,r,i,n)})).flip())}});var Yn=E.prototype;Yn[v]=!0,Yn[D]=Gn.entries,Yn.toJSON=Vn,Yn.__toStringMapper=function(e,t){return tt(t)+": "+tt(e)},Mn(I,{toKeyedSeq:function(){return new Oe(this,!1)},filter:function(e,t){return $e(this,Me(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return $e(this,Ne(this,!1))},slice:function(e,t){return $e(this,Pe(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(t||0,0),0===n||2===n&&!t)return this;e=d(e,e<0?this.count():this.size);var r=this.slice(0,e);return $e(this,1===n?r:r.concat(Ye(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(e){return this.get(0,e)},flatten:function(e){return $e(this,xe(this,e,!1))},get:function(e,t){return(e=c(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find((function(t,n){return n===e}),void 0,t)},has:function(e){return(e=c(this,e))>=0&&(void 0!==this.size?this.size===1/0||e<this.size:-1!==this.indexOf(e))},interpose:function(e){return $e(this,function(e,t){var n=He(e);return n.size=e.size&&2*e.size-1,n.__iterateUncached=function(n,r){var i=this,o=0;return e.__iterate((function(e){return(!o||!1!==n(t,o++,i))&&!1!==n(e,o++,i)}),r),o},n.__iteratorUncached=function(n,r){var i,o=e.__iterator(1,r),s=0;return new W((function(){return(!i||s%2)&&(i=o.next()).done?i:s%2?x(n,s++,t):x(n,s++,i.value,i)}))},n}(this,e))},interleave:function(){var e=[this].concat(Ye(arguments)),t=ze(this.toSeq(),G.of,e),n=t.flatten(!0);return t.size&&(n.size=t.size*e.length),$e(this,n)},keySeq:function(){return $n(0,this.size)},last:function(e){return this.get(-1,e)},skipWhile:function(e,t){return $e(this,De(this,e,t,!1))},zip:function(){var e=[this].concat(Ye(arguments));return $e(this,ze(this,tr,e))},zipAll:function(){var e=[this].concat(Ye(arguments));return $e(this,ze(this,tr,e,!0))},zipWith:function(e){var t=Ye(arguments);return t[0]=this,$e(this,ze(this,e,t))}});var Kn=I.prototype;function Jn(e,t,n,r,i,o){return Je(e.size),e.__iterate((function(e,o,s){i?(i=!1,n=e):n=t.call(r,n,e,o,s)}),o),n}function Qn(e,t){return t}function Zn(e,t){return[t,e]}function Xn(e){return function(){return!e.apply(this,arguments)}}function er(e){return function(){return-e.apply(this,arguments)}}function tr(){return Ye(arguments)}function nr(e,t){return e<t?1:e>t?-1:0}function rr(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}Kn[_]=!0,Kn[N]=!0,Mn(O,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),O.prototype.has=Gn.includes,O.prototype.contains=O.prototype.includes,Mn(V,E.prototype),Mn(G,I.prototype),Mn(Y,O.prototype);var ir=function(e){function t(e){return null==e?ur():kn(e)?e:ur().withMutations((function(t){var n=O(e);Je(n.size),n.forEach((function(e){return t.add(e)}))}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(E(e).keySeq())},t.prototype.toString=function(){return this.__toString("OrderedSet {","}")},t}(Dn);ir.isOrderedSet=kn;var or,sr=ir.prototype;function ar(e,t){var n=Object.create(sr);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function ur(){return or||(or=ar(_n()))}sr[N]=!0,sr.zip=Kn.zip,sr.zipWith=Kn.zipWith,sr.zipAll=Kn.zipAll,sr.__empty=ur,sr.__make=ar;var cr=function(e,t){var n;!function(e){if(R(e))throw new Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(k(e))throw new Error("Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.");if(null===e||"object"!=typeof e)throw new Error("Can not call `Record` with a non-object as default values. Use a plain javascript object instead.")}(e);var r=function(o){var s=this;if(o instanceof r)return o;if(!(this instanceof r))return new r(o);if(!n){n=!0;var a=Object.keys(e),u=i._indices={};i._name=t,i._keys=a,i._defaultValues=e;for(var c=0;c<a.length;c++){var l=a[c];u[l]=c,i[l]?"object"==typeof console&&console.warn&&console.warn("Cannot define "+dr(this)+' with property "'+l+'" since that property name is part of the Record API.'):pr(i,l)}}return this.__ownerID=void 0,this._values=rn().withMutations((function(e){e.setSize(s._keys.length),E(o).forEach((function(t,n){e.set(s._indices[n],t===s._defaultValues[n]?void 0:t)}))})),this},i=r.prototype=Object.create(lr);return i.constructor=r,t&&(r.displayName=t),r};cr.prototype.toString=function(){for(var e,t=dr(this)+" { ",n=this._keys,r=0,i=n.length;r!==i;r++)t+=(r?", ":"")+(e=n[r])+": "+tt(this.get(e));return t+" }"},cr.prototype.equals=function(e){return this===e||e&&hr(this).equals(hr(e))},cr.prototype.hashCode=function(){return hr(this).hashCode()},cr.prototype.has=function(e){return this._indices.hasOwnProperty(e)},cr.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._indices[e],r=this._values.get(n);return void 0===r?this._defaultValues[e]:r},cr.prototype.set=function(e,t){if(this.has(e)){var n=this._values.set(this._indices[e],t===this._defaultValues[e]?void 0:t);if(n!==this._values&&!this.__ownerID)return fr(this,n)}return this},cr.prototype.remove=function(e){return this.set(e)},cr.prototype.clear=function(){var e=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:fr(this,e)},cr.prototype.wasAltered=function(){return this._values.wasAltered()},cr.prototype.toSeq=function(){return hr(this)},cr.prototype.toJS=function(){return Pn(this)},cr.prototype.entries=function(){return this.__iterator(2)},cr.prototype.__iterator=function(e,t){return hr(this).__iterator(e,t)},cr.prototype.__iterate=function(e,t){return hr(this).__iterate(e,t)},cr.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._values.__ensureOwner(e);return e?fr(this,t,e):(this.__ownerID=e,this._values=t,this)},cr.isRecord=R,cr.getDescriptiveName=dr;var lr=cr.prototype;function fr(e,t,n){var r=Object.create(Object.getPrototypeOf(e));return r._values=t,r.__ownerID=n,r}function dr(e){return e.constructor.displayName||e.constructor.name||"Record"}function hr(e){return ee(e._keys.map((function(t){return[t,e.get(t)]})))}function pr(e,t){try{Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){Ke(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}catch(e){}}lr[L]=!0,lr.delete=lr.remove,lr.deleteIn=lr.removeIn=dt,lr.getIn=Un,lr.hasIn=Gn.hasIn,lr.merge=gt,lr.mergeWith=mt,lr.mergeIn=At,lr.mergeDeep=It,lr.mergeDeepWith=Ot,lr.mergeDeepIn=Tt,lr.setIn=lt,lr.update=pt,lr.updateIn=yt,lr.withMutations=Lt,lr.asMutable=Rt,lr.asImmutable=kt,lr[D]=lr.entries,lr.toJSON=lr.toObject=Gn.toObject,lr.inspect=lr.toSource=function(){return this.toString()};var yr,gr=function(e){function t(e,n){if(!(this instanceof t))return new t(e,n);if(this._value=e,this.size=void 0===n?1/0:Math.max(0,n),0===this.size){if(yr)return yr;yr=this}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},t.prototype.get=function(e,t){return this.has(e)?this._value:t},t.prototype.includes=function(e){return ae(this._value,e)},t.prototype.slice=function(e,n){var r=this.size;return f(e,n,r)?this:new t(this._value,h(n,r)-d(e,r))},t.prototype.reverse=function(){return this},t.prototype.indexOf=function(e){return ae(this._value,e)?0:-1},t.prototype.lastIndexOf=function(e){return ae(this._value,e)?this.size:-1},t.prototype.__iterate=function(e,t){for(var n=this.size,r=0;r!==n&&!1!==e(this._value,t?n-++r:r++,this););return r},t.prototype.__iterator=function(e,t){var n=this,r=this.size,i=0;return new W((function(){return i===r?{value:void 0,done:!0}:x(e,t?r-++i:i++,n._value)}))},t.prototype.equals=function(e){return e instanceof t?ae(this._value,e._value):Nn(e)},t}(G);function mr(e,t){return vr([],t||wr,e,"",t&&t.length>2?[]:void 0,{"":e})}function vr(e,t,n,r,i,o){var s=Array.isArray(n)?G:Xe(n)?V:null;if(s){if(~e.indexOf(n))throw new TypeError("Cannot convert circular structure to Immutable");e.push(n),i&&""!==r&&i.push(r);var a=t.call(o,r,s(n).map((function(r,o){return vr(e,t,r,o,i,n)})),i&&i.slice());return e.pop(),i&&i.pop(),a}return n}function wr(e,t){return w(t)?t.toMap():t.toList()}var _r="4.0.0-rc.14",br=C;const Sr={version:_r,Collection:C,Iterable:C,Seq:H,Map:Mt,OrderedMap:vn,List:rn,Stack:En,Set:Dn,OrderedSet:ir,Record:cr,Range:$n,Repeat:gr,is:ae,fromJS:mr,hash:fe,isImmutable:k,isCollection:m,isKeyed:w,isIndexed:b,isAssociative:S,isOrdered:M,isValueObject:se,isPlainObject:Xe,isSeq:T,isList:nn,isMap:ie,isOrderedMap:oe,isStack:Cn,isSet:Rn,isOrderedSet:kn,isRecord:R,get:rt,getIn:qn,has:nt,hasIn:Hn,merge:wt,mergeDeep:bt,mergeWith:_t,mergeDeepWith:St,remove:ot,removeIn:ft,set:st,setIn:ct,update:ht,updateIn:at}},24081:(e,t,n)=>{var r=n(21059)(n(158),"DataView");e.exports=r},15999:(e,t,n)=>{var r=n(13387),i=n(69252),o=n(31125),s=n(9021),a=n(68131);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,e.exports=u},26811:(e,t,n)=>{var r=n(72215),i=n(56105),o=n(30484),s=n(8046),a=n(30603);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,e.exports=u},60945:(e,t,n)=>{var r=n(21059)(n(158),"Map");e.exports=r},25835:(e,t,n)=>{var r=n(73633),i=n(39382),o=n(28850),s=n(70756),a=n(2769);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,e.exports=u},27540:(e,t,n)=>{var r=n(21059)(n(158),"Promise");e.exports=r},80476:(e,t,n)=>{var r=n(21059)(n(158),"Set");e.exports=r},74868:(e,t,n)=>{var r=n(25835),i=n(57554),o=n(18800);function s(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}s.prototype.add=s.prototype.push=i,s.prototype.has=o,e.exports=s},34987:(e,t,n)=>{var r=n(26811),i=n(73832),o=n(31676),s=n(33577),a=n(43343),u=n(20488);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=s,c.prototype.has=a,c.prototype.set=u,e.exports=c},44937:(e,t,n)=>{var r=n(158).Symbol;e.exports=r},48596:(e,t,n)=>{var r=n(158).Uint8Array;e.exports=r},18307:(e,t,n)=>{var r=n(21059)(n(158),"WeakMap");e.exports=r},90929:e=>{e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},73034:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},5680:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}},92554:(e,t,n)=>{var r=n(65086),i=n(67016),o=n(93706),s=n(77638),a=n(49699),u=n(70094),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),l=!n&&i(e),f=!n&&!l&&s(e),d=!n&&!l&&!f&&u(e),h=n||l||f||d,p=h?r(e.length,String):[],y=p.length;for(var g in e)!t&&!c.call(e,g)||h&&("length"==g||f&&("offset"==g||"parent"==g)||d&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||a(g,y))||p.push(g);return p}},57041:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},52824:e=>{e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},99280:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},96122:(e,t,n)=>{var r=n(88039),i=n(1316),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var s=e[t];o.call(e,t)&&i(s,n)&&(void 0!==n||t in e)||r(e,t,n)}},33993:(e,t,n)=>{var r=n(1316);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},73977:(e,t,n)=>{var r=n(34386),i=n(23150);e.exports=function(e,t){return e&&r(t,i(t),e)}},5081:(e,t,n)=>{var r=n(34386),i=n(61530);e.exports=function(e,t){return e&&r(t,i(t),e)}},88039:(e,t,n)=>{var r=n(88689);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},49548:(e,t,n)=>{var r=n(34987),i=n(73034),o=n(96122),s=n(73977),a=n(5081),u=n(728),c=n(86923),l=n(21375),f=n(1584),d=n(47461),h=n(31441),p=n(35551),y=n(75539),g=n(83394),m=n(45010),v=n(93706),w=n(77638),_=n(55948),b=n(23619),S=n(78255),C=n(23150),E=n(61530),I="[object Arguments]",O="[object Function]",A="[object Object]",T={};T[I]=T["[object Array]"]=T["[object ArrayBuffer]"]=T["[object DataView]"]=T["[object Boolean]"]=T["[object Date]"]=T["[object Float32Array]"]=T["[object Float64Array]"]=T["[object Int8Array]"]=T["[object Int16Array]"]=T["[object Int32Array]"]=T["[object Map]"]=T["[object Number]"]=T[A]=T["[object RegExp]"]=T["[object Set]"]=T["[object String]"]=T["[object Symbol]"]=T["[object Uint8Array]"]=T["[object Uint8ClampedArray]"]=T["[object Uint16Array]"]=T["[object Uint32Array]"]=!0,T["[object Error]"]=T[O]=T["[object WeakMap]"]=!1,e.exports=function e(t,n,L,R,k,N){var M,P=1&n,D=2&n,W=4&n;if(L&&(M=k?L(t,R,k,N):L(t)),void 0!==M)return M;if(!b(t))return t;var x=v(t);if(x){if(M=y(t),!P)return c(t,M)}else{var j=p(t),F=j==O||"[object GeneratorFunction]"==j;if(w(t))return u(t,P);if(j==A||j==I||F&&!k){if(M=D||F?{}:m(t),!P)return D?f(t,a(M,t)):l(t,s(M,t))}else{if(!T[j])return k?t:{};M=g(t,j,P)}}N||(N=new r);var B=N.get(t);if(B)return B;N.set(t,M),S(t)?t.forEach((function(r){M.add(e(r,n,L,r,t,N))})):_(t)&&t.forEach((function(r,i){M.set(i,e(r,n,L,i,t,N))}));var z=x?void 0:(W?D?h:d:D?E:C)(t);return i(z||t,(function(r,i){z&&(r=t[i=r]),o(M,i,e(r,n,L,i,t,N))})),M}},33776:(e,t,n)=>{var r=n(23619),i=Object.create,o=function(){function e(){}return function(t){if(!r(t))return{};if(i)return i(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=o},22153:(e,t,n)=>{var r=n(52824),i=n(76648);e.exports=function e(t,n,o,s,a){var u=-1,c=t.length;for(o||(o=i),a||(a=[]);++u<c;){var l=t[u];n>0&&o(l)?n>1?e(l,n-1,o,s,a):r(a,l):s||(a[a.length]=l)}return a}},51845:(e,t,n)=>{var r=n(49160),i=n(46384);e.exports=function(e,t){for(var n=0,o=(t=r(t,e)).length;null!=e&&n<o;)e=e[i(t[n++])];return n&&n==o?e:void 0}},45328:(e,t,n)=>{var r=n(52824),i=n(93706);e.exports=function(e,t,n){var o=t(e);return i(e)?o:r(o,n(e))}},20194:(e,t,n)=>{var r=n(44937),i=n(15401),o=n(92445),s=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?i(e):o(e)}},56640:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},64634:(e,t,n)=>{var r=n(20194),i=n(81653);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},95372:(e,t,n)=>{var r=n(55365),i=n(81653);e.exports=function e(t,n,o,s,a){return t===n||(null==t||null==n||!i(t)&&!i(n)?t!=t&&n!=n:r(t,n,o,s,e,a))}},55365:(e,t,n)=>{var r=n(34987),i=n(95428),o=n(1108),s=n(71711),a=n(35551),u=n(93706),c=n(77638),l=n(70094),f="[object Arguments]",d="[object Array]",h="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,y,g,m){var v=u(e),w=u(t),_=v?d:a(e),b=w?d:a(t),S=(_=_==f?h:_)==h,C=(b=b==f?h:b)==h,E=_==b;if(E&&c(e)){if(!c(t))return!1;v=!0,S=!1}if(E&&!S)return m||(m=new r),v||l(e)?i(e,t,n,y,g,m):o(e,t,_,n,y,g,m);if(!(1&n)){var I=S&&p.call(e,"__wrapped__"),O=C&&p.call(t,"__wrapped__");if(I||O){var A=I?e.value():e,T=O?t.value():t;return m||(m=new r),g(A,T,n,y,m)}}return!!E&&(m||(m=new r),s(e,t,n,y,g,m))}},2471:(e,t,n)=>{var r=n(35551),i=n(81653);e.exports=function(e){return i(e)&&"[object Map]"==r(e)}},4249:(e,t,n)=>{var r=n(39277),i=n(83481),o=n(23619),s=n(91223),a=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,f=c.hasOwnProperty,d=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?d:a).test(s(e))}},42388:(e,t,n)=>{var r=n(35551),i=n(81653);e.exports=function(e){return i(e)&&"[object Set]"==r(e)}},88595:(e,t,n)=>{var r=n(20194),i=n(62008),o=n(81653),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!s[r(e)]}},76324:(e,t,n)=>{var r=n(3067),i=n(32501),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},21506:(e,t,n)=>{var r=n(23619),i=n(3067),o=n(90807),s=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=i(e),n=[];for(var a in e)("constructor"!=a||!t&&s.call(e,a))&&n.push(a);return n}},11241:(e,t,n)=>{var r=n(10722),i=n(47975);e.exports=function(e,t){return r(e,t,(function(t,n){return i(e,n)}))}},10722:(e,t,n)=>{var r=n(51845),i=n(68400),o=n(49160);e.exports=function(e,t,n){for(var s=-1,a=t.length,u={};++s<a;){var c=t[s],l=r(e,c);n(l,c)&&i(u,o(c,e),l)}return u}},68400:(e,t,n)=>{var r=n(96122),i=n(49160),o=n(49699),s=n(23619),a=n(46384);e.exports=function(e,t,n,u){if(!s(e))return e;for(var c=-1,l=(t=i(t,e)).length,f=l-1,d=e;null!=d&&++c<l;){var h=a(t[c]),p=n;if("__proto__"===h||"constructor"===h||"prototype"===h)return e;if(c!=f){var y=d[h];void 0===(p=u?u(y,h,d):void 0)&&(p=s(y)?y:o(t[c+1])?[]:{})}r(d,h,p),d=d[h]}return e}},86920:(e,t,n)=>{var r=n(80446),i=n(88689),o=n(41549),s=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:o;e.exports=s},65086:e=>{e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},80430:(e,t,n)=>{var r=n(44937),i=n(57041),o=n(93706),s=n(81878),a=r?r.prototype:void 0,u=a?a.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(s(t))return u?u.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},12383:(e,t,n)=>{var r=n(38725),i=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(i,""):e}},2723:e=>{e.exports=function(e){return function(t){return e(t)}}},67446:e=>{e.exports=function(e,t){return e.has(t)}},49160:(e,t,n)=>{var r=n(93706),i=n(63140),o=n(39230),s=n(33270);e.exports=function(e,t){return r(e)?e:i(e,t)?[e]:o(s(e))}},53310:(e,t,n)=>{var r=n(48596);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},728:(e,t,n)=>{e=n.nmd(e);var r=n(158),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,s=o&&o.exports===i?r.Buffer:void 0,a=s?s.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=a?a(n):new e.constructor(n);return e.copy(r),r}},14352:(e,t,n)=>{var r=n(53310);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},44694:e=>{var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},29169:(e,t,n)=>{var r=n(44937),i=r?r.prototype:void 0,o=i?i.valueOf:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},69752:(e,t,n)=>{var r=n(53310);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},86923:e=>{e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},34386:(e,t,n)=>{var r=n(96122),i=n(88039);e.exports=function(e,t,n,o){var s=!n;n||(n={});for(var a=-1,u=t.length;++a<u;){var c=t[a],l=o?o(n[c],e[c],c,n,e):void 0;void 0===l&&(l=e[c]),s?i(n,c,l):r(n,c,l)}return n}},21375:(e,t,n)=>{var r=n(34386),i=n(45278);e.exports=function(e,t){return r(e,i(e),t)}},1584:(e,t,n)=>{var r=n(34386),i=n(27508);e.exports=function(e,t){return r(e,i(e),t)}},38728:(e,t,n)=>{var r=n(158)["__core-js_shared__"];e.exports=r},88689:(e,t,n)=>{var r=n(21059),i=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},95428:(e,t,n)=>{var r=n(74868),i=n(99280),o=n(67446);e.exports=function(e,t,n,s,a,u){var c=1&n,l=e.length,f=t.length;if(l!=f&&!(c&&f>l))return!1;var d=u.get(e),h=u.get(t);if(d&&h)return d==t&&h==e;var p=-1,y=!0,g=2&n?new r:void 0;for(u.set(e,t),u.set(t,e);++p<l;){var m=e[p],v=t[p];if(s)var w=c?s(v,m,p,t,e,u):s(m,v,p,e,t,u);if(void 0!==w){if(w)continue;y=!1;break}if(g){if(!i(t,(function(e,t){if(!o(g,t)&&(m===e||a(m,e,n,s,u)))return g.push(t)}))){y=!1;break}}else if(m!==v&&!a(m,v,n,s,u)){y=!1;break}}return u.delete(e),u.delete(t),y}},1108:(e,t,n)=>{var r=n(44937),i=n(48596),o=n(1316),s=n(95428),a=n(11382),u=n(76680),c=r?r.prototype:void 0,l=c?c.valueOf:void 0;e.exports=function(e,t,n,r,c,f,d){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var h=a;case"[object Set]":var p=1&r;if(h||(h=u),e.size!=t.size&&!p)return!1;var y=d.get(e);if(y)return y==t;r|=2,d.set(e,t);var g=s(h(e),h(t),r,c,f,d);return d.delete(e),g;case"[object Symbol]":if(l)return l.call(e)==l.call(t)}return!1}},71711:(e,t,n)=>{var r=n(47461),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,s,a){var u=1&n,c=r(e),l=c.length;if(l!=r(t).length&&!u)return!1;for(var f=l;f--;){var d=c[f];if(!(u?d in t:i.call(t,d)))return!1}var h=a.get(e),p=a.get(t);if(h&&p)return h==t&&p==e;var y=!0;a.set(e,t),a.set(t,e);for(var g=u;++f<l;){var m=e[d=c[f]],v=t[d];if(o)var w=u?o(v,m,d,t,e,a):o(m,v,d,e,t,a);if(!(void 0===w?m===v||s(m,v,n,o,a):w)){y=!1;break}g||(g="constructor"==d)}if(y&&!g){var _=e.constructor,b=t.constructor;_==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof b&&b instanceof b||(y=!1)}return a.delete(e),a.delete(t),y}},39169:(e,t,n)=>{var r=n(30597),i=n(53039),o=n(47209);e.exports=function(e){return o(i(e,void 0,r),e+"")}},14528:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},47461:(e,t,n)=>{var r=n(45328),i=n(45278),o=n(23150);e.exports=function(e){return r(e,o,i)}},31441:(e,t,n)=>{var r=n(45328),i=n(27508),o=n(61530);e.exports=function(e){return r(e,o,i)}},5662:(e,t,n)=>{var r=n(10205);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},21059:(e,t,n)=>{var r=n(4249),i=n(4759);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},97959:(e,t,n)=>{var r=n(78579)(Object.getPrototypeOf,Object);e.exports=r},15401:(e,t,n)=>{var r=n(44937),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,a),n=e[a];try{e[a]=void 0;var r=!0}catch(e){}var i=s.call(e);return r&&(t?e[a]=n:delete e[a]),i}},45278:(e,t,n)=>{var r=n(5680),i=n(59174),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(e){return null==e?[]:(e=Object(e),r(s(e),(function(t){return o.call(e,t)})))}:i;e.exports=a},27508:(e,t,n)=>{var r=n(52824),i=n(97959),o=n(45278),s=n(59174),a=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,o(e)),e=i(e);return t}:s;e.exports=a},35551:(e,t,n)=>{var r=n(24081),i=n(60945),o=n(27540),s=n(80476),a=n(18307),u=n(20194),c=n(91223),l="[object Map]",f="[object Promise]",d="[object Set]",h="[object WeakMap]",p="[object DataView]",y=c(r),g=c(i),m=c(o),v=c(s),w=c(a),_=u;(r&&_(new r(new ArrayBuffer(1)))!=p||i&&_(new i)!=l||o&&_(o.resolve())!=f||s&&_(new s)!=d||a&&_(new a)!=h)&&(_=function(e){var t=u(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case y:return p;case g:return l;case m:return f;case v:return d;case w:return h}return t}),e.exports=_},4759:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},96919:(e,t,n)=>{var r=n(49160),i=n(67016),o=n(93706),s=n(49699),a=n(62008),u=n(46384);e.exports=function(e,t,n){for(var c=-1,l=(t=r(t,e)).length,f=!1;++c<l;){var d=u(t[c]);if(!(f=null!=e&&n(e,d)))break;e=e[d]}return f||++c!=l?f:!!(l=null==e?0:e.length)&&a(l)&&s(d,l)&&(o(e)||i(e))}},13387:(e,t,n)=>{var r=n(45155);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},69252:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},31125:(e,t,n)=>{var r=n(45155),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},9021:(e,t,n)=>{var r=n(45155),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},68131:(e,t,n)=>{var r=n(45155);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},75539:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var n=e.length,r=new e.constructor(n);return n&&"string"==typeof e[0]&&t.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},83394:(e,t,n)=>{var r=n(53310),i=n(14352),o=n(44694),s=n(29169),a=n(69752);e.exports=function(e,t,n){var u=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new u(+e);case"[object DataView]":return i(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return a(e,n);case"[object Map]":return new u;case"[object Number]":case"[object String]":return new u(e);case"[object RegExp]":return o(e);case"[object Set]":return new u;case"[object Symbol]":return s(e)}}},45010:(e,t,n)=>{var r=n(33776),i=n(97959),o=n(3067);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:r(i(e))}},76648:(e,t,n)=>{var r=n(44937),i=n(67016),o=n(93706),s=r?r.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||i(e)||!!(s&&e&&e[s])}},49699:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},63140:(e,t,n)=>{var r=n(93706),i=n(81878),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||s.test(e)||!o.test(e)||null!=t&&e in Object(t)}},10205:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},83481:(e,t,n)=>{var r,i=n(38728),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!o&&o in e}},3067:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},72215:e=>{e.exports=function(){this.__data__=[],this.size=0}},56105:(e,t,n)=>{var r=n(33993),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0||(n==t.length-1?t.pop():i.call(t,n,1),--this.size,0))}},30484:(e,t,n)=>{var r=n(33993);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},8046:(e,t,n)=>{var r=n(33993);e.exports=function(e){return r(this.__data__,e)>-1}},30603:(e,t,n)=>{var r=n(33993);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},73633:(e,t,n)=>{var r=n(15999),i=n(26811),o=n(60945);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},39382:(e,t,n)=>{var r=n(5662);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},28850:(e,t,n)=>{var r=n(5662);e.exports=function(e){return r(this,e).get(e)}},70756:(e,t,n)=>{var r=n(5662);e.exports=function(e){return r(this,e).has(e)}},2769:(e,t,n)=>{var r=n(5662);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},11382:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},32202:(e,t,n)=>{var r=n(54883);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},45155:(e,t,n)=>{var r=n(21059)(Object,"create");e.exports=r},32501:(e,t,n)=>{var r=n(78579)(Object.keys,Object);e.exports=r},90807:e=>{e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},41771:(e,t,n)=>{e=n.nmd(e);var r=n(14528),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,s=o&&o.exports===i&&r.process,a=function(){try{return o&&o.require&&o.require("util").types||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=a},92445:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},78579:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},53039:(e,t,n)=>{var r=n(90929),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,s=-1,a=i(o.length-t,0),u=Array(a);++s<a;)u[s]=o[t+s];s=-1;for(var c=Array(t+1);++s<t;)c[s]=o[s];return c[t]=n(u),r(e,this,c)}}},158:(e,t,n)=>{var r=n(14528),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},57554:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},18800:e=>{e.exports=function(e){return this.__data__.has(e)}},76680:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},47209:(e,t,n)=>{var r=n(86920),i=n(10832)(r);e.exports=i},10832:e=>{var t=Date.now;e.exports=function(e){var n=0,r=0;return function(){var i=t(),o=16-(i-r);if(r=i,o>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},73832:(e,t,n)=>{var r=n(26811);e.exports=function(){this.__data__=new r,this.size=0}},31676:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},33577:e=>{e.exports=function(e){return this.__data__.get(e)}},43343:e=>{e.exports=function(e){return this.__data__.has(e)}},20488:(e,t,n)=>{var r=n(26811),i=n(60945),o=n(25835);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var s=n.__data__;if(!i||s.length<199)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(s)}return n.set(e,t),this.size=n.size,this}},39230:(e,t,n)=>{var r=n(32202),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,s=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,(function(e,n,r,i){t.push(r?i.replace(o,"$1"):n||e)})),t}));e.exports=s},46384:(e,t,n)=>{var r=n(81878);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},91223:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},38725:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},71879:(e,t,n)=>{var r=n(49548);e.exports=function(e){return r(e,4)}},99748:(e,t,n)=>{var r=n(49548);e.exports=function(e){return r(e,5)}},80446:e=>{e.exports=function(e){return function(){return e}}},76897:(e,t,n)=>{var r=n(23619),i=n(98253),o=n(95053),s=Math.max,a=Math.min;e.exports=function(e,t,n){var u,c,l,f,d,h,p=0,y=!1,g=!1,m=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=u,r=c;return u=c=void 0,p=t,f=e.apply(r,n)}function w(e){return p=e,d=setTimeout(b,t),y?v(e):f}function _(e){var n=e-h;return void 0===h||n>=t||n<0||g&&e-p>=l}function b(){var e=i();if(_(e))return S(e);d=setTimeout(b,function(e){var n=t-(e-h);return g?a(n,l-(e-p)):n}(e))}function S(e){return d=void 0,m&&u?v(e):(u=c=void 0,f)}function C(){var e=i(),n=_(e);if(u=arguments,c=this,h=e,n){if(void 0===d)return w(h);if(g)return clearTimeout(d),d=setTimeout(b,t),v(h)}return void 0===d&&(d=setTimeout(b,t)),f}return t=o(t)||0,r(n)&&(y=!!n.leading,l=(g="maxWait"in n)?s(o(n.maxWait)||0,t):l,m="trailing"in n?!!n.trailing:m),C.cancel=function(){void 0!==d&&clearTimeout(d),p=0,u=h=c=d=void 0},C.flush=function(){return void 0===d?f:S(i())},C}},1316:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},30597:(e,t,n)=>{var r=n(22153);e.exports=function(e){return null!=e&&e.length?r(e,1):[]}},80089:(e,t,n)=>{var r=n(51845);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},47975:(e,t,n)=>{var r=n(56640),i=n(96919);e.exports=function(e,t){return null!=e&&i(e,t,r)}},41549:e=>{e.exports=function(e){return e}},67016:(e,t,n)=>{var r=n(64634),i=n(81653),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(e){return i(e)&&s.call(e,"callee")&&!a.call(e,"callee")};e.exports=u},93706:e=>{var t=Array.isArray;e.exports=t},51528:(e,t,n)=>{var r=n(39277),i=n(62008);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},77638:(e,t,n)=>{e=n.nmd(e);var r=n(158),i=n(30647),o=t&&!t.nodeType&&t,s=o&&e&&!e.nodeType&&e,a=s&&s.exports===o?r.Buffer:void 0,u=(a?a.isBuffer:void 0)||i;e.exports=u},47184:(e,t,n)=>{var r=n(95372);e.exports=function(e,t){return r(e,t)}},65162:(e,t,n)=>{var r=n(95372);e.exports=function(e,t,n){var i=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===i?r(e,t,void 0,n):!!i}},39277:(e,t,n)=>{var r=n(20194),i=n(23619);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},62008:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},55948:(e,t,n)=>{var r=n(2471),i=n(2723),o=n(41771),s=o&&o.isMap,a=s?i(s):r;e.exports=a},23619:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},81653:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},78255:(e,t,n)=>{var r=n(42388),i=n(2723),o=n(41771),s=o&&o.isSet,a=s?i(s):r;e.exports=a},81878:(e,t,n)=>{var r=n(20194),i=n(81653);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},70094:(e,t,n)=>{var r=n(88595),i=n(2723),o=n(41771),s=o&&o.isTypedArray,a=s?i(s):r;e.exports=a},23150:(e,t,n)=>{var r=n(92554),i=n(76324),o=n(51528);e.exports=function(e){return o(e)?r(e):i(e)}},61530:(e,t,n)=>{var r=n(92554),i=n(21506),o=n(51528);e.exports=function(e){return o(e)?r(e,!0):i(e)}},53059:function(e,t,n){var r;e=n.nmd(e),function(){var i,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",u=32,c=128,l=1/0,f=9007199254740991,d=NaN,h=4294967295,p=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],y="[object Arguments]",g="[object Array]",m="[object Boolean]",v="[object Date]",w="[object Error]",_="[object Function]",b="[object GeneratorFunction]",S="[object Map]",C="[object Number]",E="[object Object]",I="[object Promise]",O="[object RegExp]",A="[object Set]",T="[object String]",L="[object Symbol]",R="[object WeakMap]",k="[object ArrayBuffer]",N="[object DataView]",M="[object Float32Array]",P="[object Float64Array]",D="[object Int8Array]",W="[object Int16Array]",x="[object Int32Array]",j="[object Uint8Array]",F="[object Uint8ClampedArray]",B="[object Uint16Array]",z="[object Uint32Array]",$=/\b__p \+= '';/g,q=/\b(__p \+=) '' \+/g,U=/(__e\(.*?\)|\b__t\)) \+\n'';/g,H=/&(?:amp|lt|gt|quot|#39);/g,V=/[&<>"']/g,G=RegExp(H.source),Y=RegExp(V.source),K=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,ie=/\s/,oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,se=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ce=/[()=,{}\[\]\/\s]/,le=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,de=/\w*$/,he=/^[-+]0x[0-9a-f]+$/i,pe=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,me=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,we=/($^)/,_e=/['\n\r\u2028\u2029\\]/g,be="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Se="a-z\\xdf-\\xf6\\xf8-\\xff",Ce="A-Z\\xc0-\\xd6\\xd8-\\xde",Ee="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ie="["+Ee+"]",Oe="["+be+"]",Ae="\\d+",Te="["+Se+"]",Le="[^\\ud800-\\udfff"+Ee+Ae+"\\u2700-\\u27bf"+Se+Ce+"]",Re="\\ud83c[\\udffb-\\udfff]",ke="[^\\ud800-\\udfff]",Ne="(?:\\ud83c[\\udde6-\\uddff]){2}",Me="[\\ud800-\\udbff][\\udc00-\\udfff]",Pe="["+Ce+"]",De="(?:"+Te+"|"+Le+")",We="(?:"+Pe+"|"+Le+")",xe="(?:['’](?:d|ll|m|re|s|t|ve))?",je="(?:['’](?:D|LL|M|RE|S|T|VE))?",Fe="(?:"+Oe+"|"+Re+")?",Be="[\\ufe0e\\ufe0f]?",ze=Be+Fe+"(?:\\u200d(?:"+[ke,Ne,Me].join("|")+")"+Be+Fe+")*",$e="(?:"+["[\\u2700-\\u27bf]",Ne,Me].join("|")+")"+ze,qe="(?:"+[ke+Oe+"?",Oe,Ne,Me,"[\\ud800-\\udfff]"].join("|")+")",Ue=RegExp("['’]","g"),He=RegExp(Oe,"g"),Ve=RegExp(Re+"(?="+Re+")|"+qe+ze,"g"),Ge=RegExp([Pe+"?"+Te+"+"+xe+"(?="+[Ie,Pe,"$"].join("|")+")",We+"+"+je+"(?="+[Ie,Pe+De,"$"].join("|")+")",Pe+"?"+De+"+"+xe,Pe+"+"+je,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ae,$e].join("|"),"g"),Ye=RegExp("[\\u200d\\ud800-\\udfff"+be+"\\ufe0e\\ufe0f]"),Ke=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Je=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Qe=-1,Ze={};Ze[M]=Ze[P]=Ze[D]=Ze[W]=Ze[x]=Ze[j]=Ze[F]=Ze[B]=Ze[z]=!0,Ze[y]=Ze[g]=Ze[k]=Ze[m]=Ze[N]=Ze[v]=Ze[w]=Ze[_]=Ze[S]=Ze[C]=Ze[E]=Ze[O]=Ze[A]=Ze[T]=Ze[R]=!1;var Xe={};Xe[y]=Xe[g]=Xe[k]=Xe[N]=Xe[m]=Xe[v]=Xe[M]=Xe[P]=Xe[D]=Xe[W]=Xe[x]=Xe[S]=Xe[C]=Xe[E]=Xe[O]=Xe[A]=Xe[T]=Xe[L]=Xe[j]=Xe[F]=Xe[B]=Xe[z]=!0,Xe[w]=Xe[_]=Xe[R]=!1;var et={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tt=parseFloat,nt=parseInt,rt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,it="object"==typeof self&&self&&self.Object===Object&&self,ot=rt||it||Function("return this")(),st=t&&!t.nodeType&&t,at=st&&e&&!e.nodeType&&e,ut=at&&at.exports===st,ct=ut&&rt.process,lt=function(){try{return at&&at.require&&at.require("util").types||ct&&ct.binding&&ct.binding("util")}catch(e){}}(),ft=lt&&lt.isArrayBuffer,dt=lt&&lt.isDate,ht=lt&&lt.isMap,pt=lt&&lt.isRegExp,yt=lt&&lt.isSet,gt=lt&&lt.isTypedArray;function mt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function vt(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(r,s,n(s),e)}return r}function wt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function _t(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function bt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function St(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}function Ct(e,t){return!(null==e||!e.length)&&Mt(e,t,0)>-1}function Et(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function It(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Ot(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function At(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function Tt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function Lt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Rt=xt("length");function kt(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function Nt(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Mt(e,t,n){return t==t?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):Nt(e,Dt,n)}function Pt(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function Dt(e){return e!=e}function Wt(e,t){var n=null==e?0:e.length;return n?Bt(e,t)/n:d}function xt(e){return function(t){return null==t?i:t[e]}}function jt(e){return function(t){return null==e?i:e[t]}}function Ft(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function Bt(e,t){for(var n,r=-1,o=e.length;++r<o;){var s=t(e[r]);s!==i&&(n=n===i?s:n+s)}return n}function zt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function $t(e){return e?e.slice(0,an(e)+1).replace(re,""):e}function qt(e){return function(t){return e(t)}}function Ut(e,t){return It(t,(function(t){return e[t]}))}function Ht(e,t){return e.has(t)}function Vt(e,t){for(var n=-1,r=e.length;++n<r&&Mt(t,e[n],0)>-1;);return n}function Gt(e,t){for(var n=e.length;n--&&Mt(t,e[n],0)>-1;);return n}function Yt(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Kt=jt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Jt=jt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function Qt(e){return"\\"+et[e]}function Zt(e){return Ye.test(e)}function Xt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function en(e,t){return function(n){return e(t(n))}}function tn(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n];s!==t&&s!==a||(e[n]=a,o[i++]=n)}return o}function nn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function rn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function on(e){return Zt(e)?function(e){for(var t=Ve.lastIndex=0;Ve.test(e);)++t;return t}(e):Rt(e)}function sn(e){return Zt(e)?function(e){return e.match(Ve)||[]}(e):function(e){return e.split("")}(e)}function an(e){for(var t=e.length;t--&&ie.test(e.charAt(t)););return t}var un=jt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),cn=function e(t){var n,r=(t=null==t?ot:cn.defaults(ot.Object(),t,cn.pick(ot,Je))).Array,ie=t.Date,be=t.Error,Se=t.Function,Ce=t.Math,Ee=t.Object,Ie=t.RegExp,Oe=t.String,Ae=t.TypeError,Te=r.prototype,Le=Se.prototype,Re=Ee.prototype,ke=t["__core-js_shared__"],Ne=Le.toString,Me=Re.hasOwnProperty,Pe=0,De=(n=/[^.]+$/.exec(ke&&ke.keys&&ke.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",We=Re.toString,xe=Ne.call(Ee),je=ot._,Fe=Ie("^"+Ne.call(Me).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Be=ut?t.Buffer:i,ze=t.Symbol,$e=t.Uint8Array,qe=Be?Be.allocUnsafe:i,Ve=en(Ee.getPrototypeOf,Ee),Ye=Ee.create,et=Re.propertyIsEnumerable,rt=Te.splice,it=ze?ze.isConcatSpreadable:i,st=ze?ze.iterator:i,at=ze?ze.toStringTag:i,ct=function(){try{var e=co(Ee,"defineProperty");return e({},"",{}),e}catch(e){}}(),lt=t.clearTimeout!==ot.clearTimeout&&t.clearTimeout,Rt=ie&&ie.now!==ot.Date.now&&ie.now,jt=t.setTimeout!==ot.setTimeout&&t.setTimeout,ln=Ce.ceil,fn=Ce.floor,dn=Ee.getOwnPropertySymbols,hn=Be?Be.isBuffer:i,pn=t.isFinite,yn=Te.join,gn=en(Ee.keys,Ee),mn=Ce.max,vn=Ce.min,wn=ie.now,_n=t.parseInt,bn=Ce.random,Sn=Te.reverse,Cn=co(t,"DataView"),En=co(t,"Map"),In=co(t,"Promise"),On=co(t,"Set"),An=co(t,"WeakMap"),Tn=co(Ee,"create"),Ln=An&&new An,Rn={},kn=Fo(Cn),Nn=Fo(En),Mn=Fo(In),Pn=Fo(On),Dn=Fo(An),Wn=ze?ze.prototype:i,xn=Wn?Wn.valueOf:i,jn=Wn?Wn.toString:i;function Fn(e){if(na(e)&&!Hs(e)&&!(e instanceof qn)){if(e instanceof $n)return e;if(Me.call(e,"__wrapped__"))return Bo(e)}return new $n(e)}var Bn=function(){function e(){}return function(t){if(!ta(t))return{};if(Ye)return Ye(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function zn(){}function $n(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function qn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function Un(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Hn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Vn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Vn;++t<n;)this.add(e[t])}function Yn(e){var t=this.__data__=new Hn(e);this.size=t.size}function Kn(e,t){var n=Hs(e),r=!n&&Us(e),i=!n&&!r&&Ks(e),o=!n&&!r&&!i&&la(e),s=n||r||i||o,a=s?zt(e.length,Oe):[],u=a.length;for(var c in e)!t&&!Me.call(e,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||mo(c,u))||a.push(c);return a}function Jn(e){var t=e.length;return t?e[Vr(0,t-1)]:i}function Qn(e,t){return Po(Ai(e),sr(t,0,e.length))}function Zn(e){return Po(Ai(e))}function Xn(e,t,n){(n!==i&&!zs(e[t],n)||n===i&&!(t in e))&&ir(e,t,n)}function er(e,t,n){var r=e[t];Me.call(e,t)&&zs(r,n)&&(n!==i||t in e)||ir(e,t,n)}function tr(e,t){for(var n=e.length;n--;)if(zs(e[n][0],t))return n;return-1}function nr(e,t,n,r){return fr(e,(function(e,i,o){t(r,e,n(e),o)})),r}function rr(e,t){return e&&Ti(t,Na(t),e)}function ir(e,t,n){"__proto__"==t&&ct?ct(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function or(e,t){for(var n=-1,o=t.length,s=r(o),a=null==e;++n<o;)s[n]=a?i:Aa(e,t[n]);return s}function sr(e,t,n){return e==e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function ar(e,t,n,r,o,s){var a,u=1&t,c=2&t,l=4&t;if(n&&(a=o?n(e,r,o,s):n(e)),a!==i)return a;if(!ta(e))return e;var f=Hs(e);if(f){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Me.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!u)return Ai(e,a)}else{var d=ho(e),h=d==_||d==b;if(Ks(e))return bi(e,u);if(d==E||d==y||h&&!o){if(a=c||h?{}:yo(e),!u)return c?function(e,t){return Ti(e,fo(e),t)}(e,function(e,t){return e&&Ti(t,Ma(t),e)}(a,e)):function(e,t){return Ti(e,lo(e),t)}(e,rr(a,e))}else{if(!Xe[d])return o?e:{};a=function(e,t,n){var r,i=e.constructor;switch(t){case k:return Si(e);case m:case v:return new i(+e);case N:return function(e,t){var n=t?Si(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case M:case P:case D:case W:case x:case j:case F:case B:case z:return Ci(e,n);case S:return new i;case C:case T:return new i(e);case O:return function(e){var t=new e.constructor(e.source,de.exec(e));return t.lastIndex=e.lastIndex,t}(e);case A:return new i;case L:return r=e,xn?Ee(xn.call(r)):{}}}(e,d,u)}}s||(s=new Yn);var p=s.get(e);if(p)return p;s.set(e,a),aa(e)?e.forEach((function(r){a.add(ar(r,t,n,r,e,s))})):ra(e)&&e.forEach((function(r,i){a.set(i,ar(r,t,n,i,e,s))}));var g=f?i:(l?c?no:to:c?Ma:Na)(e);return wt(g||e,(function(r,i){g&&(r=e[i=r]),er(a,i,ar(r,t,n,i,e,s))})),a}function ur(e,t,n){var r=n.length;if(null==e)return!r;for(e=Ee(e);r--;){var o=n[r],s=t[o],a=e[o];if(a===i&&!(o in e)||!s(a))return!1}return!0}function cr(e,t,n){if("function"!=typeof e)throw new Ae(o);return Ro((function(){e.apply(i,n)}),t)}function lr(e,t,n,r){var i=-1,o=Ct,s=!0,a=e.length,u=[],c=t.length;if(!a)return u;n&&(t=It(t,qt(n))),r?(o=Et,s=!1):t.length>=200&&(o=Ht,s=!1,t=new Gn(t));e:for(;++i<a;){var l=e[i],f=null==n?l:n(l);if(l=r||0!==l?l:0,s&&f==f){for(var d=c;d--;)if(t[d]===f)continue e;u.push(l)}else o(t,f,r)||u.push(l)}return u}Fn.templateSettings={escape:K,evaluate:J,interpolate:Q,variable:"",imports:{_:Fn}},Fn.prototype=zn.prototype,Fn.prototype.constructor=Fn,$n.prototype=Bn(zn.prototype),$n.prototype.constructor=$n,qn.prototype=Bn(zn.prototype),qn.prototype.constructor=qn,Un.prototype.clear=function(){this.__data__=Tn?Tn(null):{},this.size=0},Un.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Un.prototype.get=function(e){var t=this.__data__;if(Tn){var n=t[e];return n===s?i:n}return Me.call(t,e)?t[e]:i},Un.prototype.has=function(e){var t=this.__data__;return Tn?t[e]!==i:Me.call(t,e)},Un.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Tn&&t===i?s:t,this},Hn.prototype.clear=function(){this.__data__=[],this.size=0},Hn.prototype.delete=function(e){var t=this.__data__,n=tr(t,e);return!(n<0||(n==t.length-1?t.pop():rt.call(t,n,1),--this.size,0))},Hn.prototype.get=function(e){var t=this.__data__,n=tr(t,e);return n<0?i:t[n][1]},Hn.prototype.has=function(e){return tr(this.__data__,e)>-1},Hn.prototype.set=function(e,t){var n=this.__data__,r=tr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Vn.prototype.clear=function(){this.size=0,this.__data__={hash:new Un,map:new(En||Hn),string:new Un}},Vn.prototype.delete=function(e){var t=ao(this,e).delete(e);return this.size-=t?1:0,t},Vn.prototype.get=function(e){return ao(this,e).get(e)},Vn.prototype.has=function(e){return ao(this,e).has(e)},Vn.prototype.set=function(e,t){var n=ao(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Gn.prototype.add=Gn.prototype.push=function(e){return this.__data__.set(e,s),this},Gn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.clear=function(){this.__data__=new Hn,this.size=0},Yn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Yn.prototype.get=function(e){return this.__data__.get(e)},Yn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Hn){var r=n.__data__;if(!En||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Vn(r)}return n.set(e,t),this.size=n.size,this};var fr=ki(wr),dr=ki(_r,!0);function hr(e,t){var n=!0;return fr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function pr(e,t,n){for(var r=-1,o=e.length;++r<o;){var s=e[r],a=t(s);if(null!=a&&(u===i?a==a&&!ca(a):n(a,u)))var u=a,c=s}return c}function yr(e,t){var n=[];return fr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function gr(e,t,n,r,i){var o=-1,s=e.length;for(n||(n=go),i||(i=[]);++o<s;){var a=e[o];t>0&&n(a)?t>1?gr(a,t-1,n,r,i):Ot(i,a):r||(i[i.length]=a)}return i}var mr=Ni(),vr=Ni(!0);function wr(e,t){return e&&mr(e,t,Na)}function _r(e,t){return e&&vr(e,t,Na)}function br(e,t){return St(t,(function(t){return Zs(e[t])}))}function Sr(e,t){for(var n=0,r=(t=mi(t,e)).length;null!=e&&n<r;)e=e[jo(t[n++])];return n&&n==r?e:i}function Cr(e,t,n){var r=t(e);return Hs(e)?r:Ot(r,n(e))}function Er(e){return null==e?e===i?"[object Undefined]":"[object Null]":at&&at in Ee(e)?function(e){var t=Me.call(e,at),n=e[at];try{e[at]=i;var r=!0}catch(e){}var o=We.call(e);return r&&(t?e[at]=n:delete e[at]),o}(e):function(e){return We.call(e)}(e)}function Ir(e,t){return e>t}function Or(e,t){return null!=e&&Me.call(e,t)}function Ar(e,t){return null!=e&&t in Ee(e)}function Tr(e,t,n){for(var o=n?Et:Ct,s=e[0].length,a=e.length,u=a,c=r(a),l=1/0,f=[];u--;){var d=e[u];u&&t&&(d=It(d,qt(t))),l=vn(d.length,l),c[u]=!n&&(t||s>=120&&d.length>=120)?new Gn(u&&d):i}d=e[0];var h=-1,p=c[0];e:for(;++h<s&&f.length<l;){var y=d[h],g=t?t(y):y;if(y=n||0!==y?y:0,!(p?Ht(p,g):o(f,g,n))){for(u=a;--u;){var m=c[u];if(!(m?Ht(m,g):o(e[u],g,n)))continue e}p&&p.push(g),f.push(y)}}return f}function Lr(e,t,n){var r=null==(e=Oo(e,t=mi(t,e)))?e:e[jo(Qo(t))];return null==r?i:mt(r,e,n)}function Rr(e){return na(e)&&Er(e)==y}function kr(e,t,n,r,o){return e===t||(null==e||null==t||!na(e)&&!na(t)?e!=e&&t!=t:function(e,t,n,r,o,s){var a=Hs(e),u=Hs(t),c=a?g:ho(e),l=u?g:ho(t),f=(c=c==y?E:c)==E,d=(l=l==y?E:l)==E,h=c==l;if(h&&Ks(e)){if(!Ks(t))return!1;a=!0,f=!1}if(h&&!f)return s||(s=new Yn),a||la(e)?Xi(e,t,n,r,o,s):function(e,t,n,r,i,o,s){switch(n){case N:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case k:return!(e.byteLength!=t.byteLength||!o(new $e(e),new $e(t)));case m:case v:case C:return zs(+e,+t);case w:return e.name==t.name&&e.message==t.message;case O:case T:return e==t+"";case S:var a=Xt;case A:var u=1&r;if(a||(a=nn),e.size!=t.size&&!u)return!1;var c=s.get(e);if(c)return c==t;r|=2,s.set(e,t);var l=Xi(a(e),a(t),r,i,o,s);return s.delete(e),l;case L:if(xn)return xn.call(e)==xn.call(t)}return!1}(e,t,c,n,r,o,s);if(!(1&n)){var p=f&&Me.call(e,"__wrapped__"),_=d&&Me.call(t,"__wrapped__");if(p||_){var b=p?e.value():e,I=_?t.value():t;return s||(s=new Yn),o(b,I,n,r,s)}}return!!h&&(s||(s=new Yn),function(e,t,n,r,o,s){var a=1&n,u=to(e),c=u.length;if(c!=to(t).length&&!a)return!1;for(var l=c;l--;){var f=u[l];if(!(a?f in t:Me.call(t,f)))return!1}var d=s.get(e),h=s.get(t);if(d&&h)return d==t&&h==e;var p=!0;s.set(e,t),s.set(t,e);for(var y=a;++l<c;){var g=e[f=u[l]],m=t[f];if(r)var v=a?r(m,g,f,t,e,s):r(g,m,f,e,t,s);if(!(v===i?g===m||o(g,m,n,r,s):v)){p=!1;break}y||(y="constructor"==f)}if(p&&!y){var w=e.constructor,_=t.constructor;w==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof _&&_ instanceof _||(p=!1)}return s.delete(e),s.delete(t),p}(e,t,n,r,o,s))}(e,t,n,r,kr,o))}function Nr(e,t,n,r){var o=n.length,s=o,a=!r;if(null==e)return!s;for(e=Ee(e);o--;){var u=n[o];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<s;){var c=(u=n[o])[0],l=e[c],f=u[1];if(a&&u[2]){if(l===i&&!(c in e))return!1}else{var d=new Yn;if(r)var h=r(l,f,c,e,t,d);if(!(h===i?kr(f,l,3,r,d):h))return!1}}return!0}function Mr(e){return!(!ta(e)||(t=e,De&&De in t))&&(Zs(e)?Fe:ye).test(Fo(e));var t}function Pr(e){return"function"==typeof e?e:null==e?iu:"object"==typeof e?Hs(e)?Fr(e[0],e[1]):jr(e):hu(e)}function Dr(e){if(!So(e))return gn(e);var t=[];for(var n in Ee(e))Me.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Wr(e,t){return e<t}function xr(e,t){var n=-1,i=Gs(e)?r(e.length):[];return fr(e,(function(e,r,o){i[++n]=t(e,r,o)})),i}function jr(e){var t=uo(e);return 1==t.length&&t[0][2]?Eo(t[0][0],t[0][1]):function(n){return n===e||Nr(n,e,t)}}function Fr(e,t){return wo(e)&&Co(t)?Eo(jo(e),t):function(n){var r=Aa(n,e);return r===i&&r===t?Ta(n,e):kr(t,r,3)}}function Br(e,t,n,r,o){e!==t&&mr(t,(function(s,a){if(o||(o=new Yn),ta(s))!function(e,t,n,r,o,s,a){var u=To(e,n),c=To(t,n),l=a.get(c);if(l)Xn(e,n,l);else{var f=s?s(u,c,n+"",e,t,a):i,d=f===i;if(d){var h=Hs(c),p=!h&&Ks(c),y=!h&&!p&&la(c);f=c,h||p||y?Hs(u)?f=u:Ys(u)?f=Ai(u):p?(d=!1,f=bi(c,!0)):y?(d=!1,f=Ci(c,!0)):f=[]:oa(c)||Us(c)?(f=u,Us(u)?f=va(u):ta(u)&&!Zs(u)||(f=yo(c))):d=!1}d&&(a.set(c,f),o(f,c,r,s,a),a.delete(c)),Xn(e,n,f)}}(e,t,a,n,Br,r,o);else{var u=r?r(To(e,a),s,a+"",e,t,o):i;u===i&&(u=s),Xn(e,a,u)}}),Ma)}function zr(e,t){var n=e.length;if(n)return mo(t+=t<0?n:0,n)?e[t]:i}function $r(e,t,n){t=t.length?It(t,(function(e){return Hs(e)?function(t){return Sr(t,1===e.length?e[0]:e)}:e})):[iu];var r=-1;return t=It(t,qt(so())),function(e,t){var r=e.length;for(e.sort((function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,s=i.length,a=n.length;++r<s;){var u=Ei(i[r],o[r]);if(u)return r>=a?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}));r--;)e[r]=e[r].value;return e}(xr(e,(function(e,n,i){return{criteria:It(t,(function(t){return t(e)})),index:++r,value:e}})))}function qr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var s=t[r],a=Sr(e,s);n(a,s)&&Qr(o,mi(s,e),a)}return o}function Ur(e,t,n,r){var i=r?Pt:Mt,o=-1,s=t.length,a=e;for(e===t&&(t=Ai(t)),n&&(a=It(e,qt(n)));++o<s;)for(var u=0,c=t[o],l=n?n(c):c;(u=i(a,l,u,r))>-1;)a!==e&&rt.call(a,u,1),rt.call(e,u,1);return e}function Hr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;mo(i)?rt.call(e,i,1):ci(e,i)}}return e}function Vr(e,t){return e+fn(bn()*(t-e+1))}function Gr(e,t){var n="";if(!e||t<1||t>f)return n;do{t%2&&(n+=e),(t=fn(t/2))&&(e+=e)}while(t);return n}function Yr(e,t){return ko(Io(e,t,iu),e+"")}function Kr(e){return Jn(za(e))}function Jr(e,t){var n=za(e);return Po(n,sr(t,0,n.length))}function Qr(e,t,n,r){if(!ta(e))return e;for(var o=-1,s=(t=mi(t,e)).length,a=s-1,u=e;null!=u&&++o<s;){var c=jo(t[o]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=a){var f=u[c];(l=r?r(f,c,u):i)===i&&(l=ta(f)?f:mo(t[o+1])?[]:{})}er(u,c,l),u=u[c]}return e}var Zr=Ln?function(e,t){return Ln.set(e,t),e}:iu,Xr=ct?function(e,t){return ct(e,"toString",{configurable:!0,enumerable:!1,value:tu(t),writable:!0})}:iu;function ei(e){return Po(za(e))}function ti(e,t,n){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var s=r(o);++i<o;)s[i]=e[i+t];return s}function ni(e,t){var n;return fr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function ri(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,s=e[o];null!==s&&!ca(s)&&(n?s<=t:s<t)?r=o+1:i=o}return i}return ii(e,t,iu,n)}function ii(e,t,n,r){var o=0,s=null==e?0:e.length;if(0===s)return 0;for(var a=(t=n(t))!=t,u=null===t,c=ca(t),l=t===i;o<s;){var f=fn((o+s)/2),d=n(e[f]),h=d!==i,p=null===d,y=d==d,g=ca(d);if(a)var m=r||y;else m=l?y&&(r||h):u?y&&h&&(r||!p):c?y&&h&&!p&&(r||!g):!p&&!g&&(r?d<=t:d<t);m?o=f+1:s=f}return vn(s,4294967294)}function oi(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n],a=t?t(s):s;if(!n||!zs(a,u)){var u=a;o[i++]=0===s?0:s}}return o}function si(e){return"number"==typeof e?e:ca(e)?d:+e}function ai(e){if("string"==typeof e)return e;if(Hs(e))return It(e,ai)+"";if(ca(e))return jn?jn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ui(e,t,n){var r=-1,i=Ct,o=e.length,s=!0,a=[],u=a;if(n)s=!1,i=Et;else if(o>=200){var c=t?null:Gi(e);if(c)return nn(c);s=!1,i=Ht,u=new Gn}else u=t?[]:a;e:for(;++r<o;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,s&&f==f){for(var d=u.length;d--;)if(u[d]===f)continue e;t&&u.push(f),a.push(l)}else i(u,f,n)||(u!==a&&u.push(f),a.push(l))}return a}function ci(e,t){return null==(e=Oo(e,t=mi(t,e)))||delete e[jo(Qo(t))]}function li(e,t,n,r){return Qr(e,t,n(Sr(e,t)),r)}function fi(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ti(e,r?0:o,r?o+1:i):ti(e,r?o+1:0,r?i:o)}function di(e,t){var n=e;return n instanceof qn&&(n=n.value()),At(t,(function(e,t){return t.func.apply(t.thisArg,Ot([e],t.args))}),n)}function hi(e,t,n){var i=e.length;if(i<2)return i?ui(e[0]):[];for(var o=-1,s=r(i);++o<i;)for(var a=e[o],u=-1;++u<i;)u!=o&&(s[o]=lr(s[o]||a,e[u],t,n));return ui(gr(s,1),t,n)}function pi(e,t,n){for(var r=-1,o=e.length,s=t.length,a={};++r<o;){var u=r<s?t[r]:i;n(a,e[r],u)}return a}function yi(e){return Ys(e)?e:[]}function gi(e){return"function"==typeof e?e:iu}function mi(e,t){return Hs(e)?e:wo(e,t)?[e]:xo(wa(e))}var vi=Yr;function wi(e,t,n){var r=e.length;return n=n===i?r:n,!t&&n>=r?e:ti(e,t,n)}var _i=lt||function(e){return ot.clearTimeout(e)};function bi(e,t){if(t)return e.slice();var n=e.length,r=qe?qe(n):new e.constructor(n);return e.copy(r),r}function Si(e){var t=new e.constructor(e.byteLength);return new $e(t).set(new $e(e)),t}function Ci(e,t){var n=t?Si(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ei(e,t){if(e!==t){var n=e!==i,r=null===e,o=e==e,s=ca(e),a=t!==i,u=null===t,c=t==t,l=ca(t);if(!u&&!l&&!s&&e>t||s&&a&&c&&!u&&!l||r&&a&&c||!n&&c||!o)return 1;if(!r&&!s&&!l&&e<t||l&&n&&o&&!r&&!s||u&&n&&o||!a&&o||!c)return-1}return 0}function Ii(e,t,n,i){for(var o=-1,s=e.length,a=n.length,u=-1,c=t.length,l=mn(s-a,0),f=r(c+l),d=!i;++u<c;)f[u]=t[u];for(;++o<a;)(d||o<s)&&(f[n[o]]=e[o]);for(;l--;)f[u++]=e[o++];return f}function Oi(e,t,n,i){for(var o=-1,s=e.length,a=-1,u=n.length,c=-1,l=t.length,f=mn(s-u,0),d=r(f+l),h=!i;++o<f;)d[o]=e[o];for(var p=o;++c<l;)d[p+c]=t[c];for(;++a<u;)(h||o<s)&&(d[p+n[a]]=e[o++]);return d}function Ai(e,t){var n=-1,i=e.length;for(t||(t=r(i));++n<i;)t[n]=e[n];return t}function Ti(e,t,n,r){var o=!n;n||(n={});for(var s=-1,a=t.length;++s<a;){var u=t[s],c=r?r(n[u],e[u],u,n,e):i;c===i&&(c=e[u]),o?ir(n,u,c):er(n,u,c)}return n}function Li(e,t){return function(n,r){var i=Hs(n)?vt:nr,o=t?t():{};return i(n,e,so(r,2),o)}}function Ri(e){return Yr((function(t,n){var r=-1,o=n.length,s=o>1?n[o-1]:i,a=o>2?n[2]:i;for(s=e.length>3&&"function"==typeof s?(o--,s):i,a&&vo(n[0],n[1],a)&&(s=o<3?i:s,o=1),t=Ee(t);++r<o;){var u=n[r];u&&e(t,u,r,s)}return t}))}function ki(e,t){return function(n,r){if(null==n)return n;if(!Gs(n))return e(n,r);for(var i=n.length,o=t?i:-1,s=Ee(n);(t?o--:++o<i)&&!1!==r(s[o],o,s););return n}}function Ni(e){return function(t,n,r){for(var i=-1,o=Ee(t),s=r(t),a=s.length;a--;){var u=s[e?a:++i];if(!1===n(o[u],u,o))break}return t}}function Mi(e){return function(t){var n=Zt(t=wa(t))?sn(t):i,r=n?n[0]:t.charAt(0),o=n?wi(n,1).join(""):t.slice(1);return r[e]()+o}}function Pi(e){return function(t){return At(Za(Ua(t).replace(Ue,"")),e,"")}}function Di(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Bn(e.prototype),r=e.apply(n,t);return ta(r)?r:n}}function Wi(e){return function(t,n,r){var o=Ee(t);if(!Gs(t)){var s=so(n,3);t=Na(t),n=function(e){return s(o[e],e,o)}}var a=e(t,n,r);return a>-1?o[s?t[a]:a]:i}}function xi(e){return eo((function(t){var n=t.length,r=n,s=$n.prototype.thru;for(e&&t.reverse();r--;){var a=t[r];if("function"!=typeof a)throw new Ae(o);if(s&&!u&&"wrapper"==io(a))var u=new $n([],!0)}for(r=u?r:n;++r<n;){var c=io(a=t[r]),l="wrapper"==c?ro(a):i;u=l&&_o(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[io(l[0])].apply(u,l[3]):1==a.length&&_o(a)?u[c]():u.thru(a)}return function(){var e=arguments,r=e[0];if(u&&1==e.length&&Hs(r))return u.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++i<n;)o=t[i].call(this,o);return o}}))}function ji(e,t,n,o,s,a,u,l,f,d){var h=t&c,p=1&t,y=2&t,g=24&t,m=512&t,v=y?i:Di(e);return function i(){for(var c=arguments.length,w=r(c),_=c;_--;)w[_]=arguments[_];if(g)var b=oo(i),S=Yt(w,b);if(o&&(w=Ii(w,o,s,g)),a&&(w=Oi(w,a,u,g)),c-=S,g&&c<d){var C=tn(w,b);return Hi(e,t,ji,i.placeholder,n,w,C,l,f,d-c)}var E=p?n:this,I=y?E[e]:e;return c=w.length,l?w=Ao(w,l):m&&c>1&&w.reverse(),h&&f<c&&(w.length=f),this&&this!==ot&&this instanceof i&&(I=v||Di(I)),I.apply(E,w)}}function Fi(e,t){return function(n,r){return function(e,t,n,r){return wr(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r),{})}}function Bi(e,t){return function(n,r){var o;if(n===i&&r===i)return t;if(n!==i&&(o=n),r!==i){if(o===i)return r;"string"==typeof n||"string"==typeof r?(n=ai(n),r=ai(r)):(n=si(n),r=si(r)),o=e(n,r)}return o}}function zi(e){return eo((function(t){return t=It(t,qt(so())),Yr((function(n){var r=this;return e(t,(function(e){return mt(e,r,n)}))}))}))}function $i(e,t){var n=(t=t===i?" ":ai(t)).length;if(n<2)return n?Gr(t,e):t;var r=Gr(t,ln(e/on(t)));return Zt(t)?wi(sn(r),0,e).join(""):r.slice(0,e)}function qi(e){return function(t,n,o){return o&&"number"!=typeof o&&vo(t,n,o)&&(n=o=i),t=pa(t),n===i?(n=t,t=0):n=pa(n),function(e,t,n,i){for(var o=-1,s=mn(ln((t-e)/(n||1)),0),a=r(s);s--;)a[i?s:++o]=e,e+=n;return a}(t,n,o=o===i?t<n?1:-1:pa(o),e)}}function Ui(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ma(t),n=ma(n)),e(t,n)}}function Hi(e,t,n,r,o,s,a,c,l,f){var d=8&t;t|=d?u:64,4&(t&=~(d?64:u))||(t&=-4);var h=[e,t,o,d?s:i,d?a:i,d?i:s,d?i:a,c,l,f],p=n.apply(i,h);return _o(e)&&Lo(p,h),p.placeholder=r,No(p,e,t)}function Vi(e){var t=Ce[e];return function(e,n){if(e=ma(e),(n=null==n?0:vn(ya(n),292))&&pn(e)){var r=(wa(e)+"e").split("e");return+((r=(wa(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Gi=On&&1/nn(new On([,-0]))[1]==l?function(e){return new On(e)}:cu;function Yi(e){return function(t){var n=ho(t);return n==S?Xt(t):n==A?rn(t):function(e,t){return It(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Ki(e,t,n,s,l,f,d,h){var p=2&t;if(!p&&"function"!=typeof e)throw new Ae(o);var y=s?s.length:0;if(y||(t&=-97,s=l=i),d=d===i?d:mn(ya(d),0),h=h===i?h:ya(h),y-=l?l.length:0,64&t){var g=s,m=l;s=l=i}var v=p?i:ro(e),w=[e,t,n,s,l,g,m,f,d,h];if(v&&function(e,t){var n=e[1],r=t[1],i=n|r,o=i<131,s=r==c&&8==n||r==c&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!o&&!s)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var u=t[3];if(u){var l=e[3];e[3]=l?Ii(l,u,t[4]):u,e[4]=l?tn(e[3],a):t[4]}(u=t[5])&&(l=e[5],e[5]=l?Oi(l,u,t[6]):u,e[6]=l?tn(e[5],a):t[6]),(u=t[7])&&(e[7]=u),r&c&&(e[8]=null==e[8]?t[8]:vn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(w,v),e=w[0],t=w[1],n=w[2],s=w[3],l=w[4],!(h=w[9]=w[9]===i?p?0:e.length:mn(w[9]-y,0))&&24&t&&(t&=-25),t&&1!=t)_=8==t||16==t?function(e,t,n){var o=Di(e);return function s(){for(var a=arguments.length,u=r(a),c=a,l=oo(s);c--;)u[c]=arguments[c];var f=a<3&&u[0]!==l&&u[a-1]!==l?[]:tn(u,l);return(a-=f.length)<n?Hi(e,t,ji,s.placeholder,i,u,f,i,i,n-a):mt(this&&this!==ot&&this instanceof s?o:e,this,u)}}(e,t,h):t!=u&&33!=t||l.length?ji.apply(i,w):function(e,t,n,i){var o=1&t,s=Di(e);return function t(){for(var a=-1,u=arguments.length,c=-1,l=i.length,f=r(l+u),d=this&&this!==ot&&this instanceof t?s:e;++c<l;)f[c]=i[c];for(;u--;)f[c++]=arguments[++a];return mt(d,o?n:this,f)}}(e,t,n,s);else var _=function(e,t,n){var r=1&t,i=Di(e);return function t(){return(this&&this!==ot&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,n);return No((v?Zr:Lo)(_,w),e,t)}function Ji(e,t,n,r){return e===i||zs(e,Re[n])&&!Me.call(r,n)?t:e}function Qi(e,t,n,r,o,s){return ta(e)&&ta(t)&&(s.set(t,e),Br(e,t,i,Qi,s),s.delete(t)),e}function Zi(e){return oa(e)?i:e}function Xi(e,t,n,r,o,s){var a=1&n,u=e.length,c=t.length;if(u!=c&&!(a&&c>u))return!1;var l=s.get(e),f=s.get(t);if(l&&f)return l==t&&f==e;var d=-1,h=!0,p=2&n?new Gn:i;for(s.set(e,t),s.set(t,e);++d<u;){var y=e[d],g=t[d];if(r)var m=a?r(g,y,d,t,e,s):r(y,g,d,e,t,s);if(m!==i){if(m)continue;h=!1;break}if(p){if(!Lt(t,(function(e,t){if(!Ht(p,t)&&(y===e||o(y,e,n,r,s)))return p.push(t)}))){h=!1;break}}else if(y!==g&&!o(y,g,n,r,s)){h=!1;break}}return s.delete(e),s.delete(t),h}function eo(e){return ko(Io(e,i,Vo),e+"")}function to(e){return Cr(e,Na,lo)}function no(e){return Cr(e,Ma,fo)}var ro=Ln?function(e){return Ln.get(e)}:cu;function io(e){for(var t=e.name+"",n=Rn[t],r=Me.call(Rn,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function oo(e){return(Me.call(Fn,"placeholder")?Fn:e).placeholder}function so(){var e=Fn.iteratee||ou;return e=e===ou?Pr:e,arguments.length?e(arguments[0],arguments[1]):e}function ao(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function uo(e){for(var t=Na(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Co(i)]}return t}function co(e,t){var n=function(e,t){return null==e?i:e[t]}(e,t);return Mr(n)?n:i}var lo=dn?function(e){return null==e?[]:(e=Ee(e),St(dn(e),(function(t){return et.call(e,t)})))}:gu,fo=dn?function(e){for(var t=[];e;)Ot(t,lo(e)),e=Ve(e);return t}:gu,ho=Er;function po(e,t,n){for(var r=-1,i=(t=mi(t,e)).length,o=!1;++r<i;){var s=jo(t[r]);if(!(o=null!=e&&n(e,s)))break;e=e[s]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&ea(i)&&mo(s,i)&&(Hs(e)||Us(e))}function yo(e){return"function"!=typeof e.constructor||So(e)?{}:Bn(Ve(e))}function go(e){return Hs(e)||Us(e)||!!(it&&e&&e[it])}function mo(e,t){var n=typeof e;return!!(t=null==t?f:t)&&("number"==n||"symbol"!=n&&me.test(e))&&e>-1&&e%1==0&&e<t}function vo(e,t,n){if(!ta(n))return!1;var r=typeof t;return!!("number"==r?Gs(n)&&mo(t,n.length):"string"==r&&t in n)&&zs(n[t],e)}function wo(e,t){if(Hs(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ca(e))||X.test(e)||!Z.test(e)||null!=t&&e in Ee(t)}function _o(e){var t=io(e),n=Fn[t];if("function"!=typeof n||!(t in qn.prototype))return!1;if(e===n)return!0;var r=ro(n);return!!r&&e===r[0]}(Cn&&ho(new Cn(new ArrayBuffer(1)))!=N||En&&ho(new En)!=S||In&&ho(In.resolve())!=I||On&&ho(new On)!=A||An&&ho(new An)!=R)&&(ho=function(e){var t=Er(e),n=t==E?e.constructor:i,r=n?Fo(n):"";if(r)switch(r){case kn:return N;case Nn:return S;case Mn:return I;case Pn:return A;case Dn:return R}return t});var bo=ke?Zs:mu;function So(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Re)}function Co(e){return e==e&&!ta(e)}function Eo(e,t){return function(n){return null!=n&&n[e]===t&&(t!==i||e in Ee(n))}}function Io(e,t,n){return t=mn(t===i?e.length-1:t,0),function(){for(var i=arguments,o=-1,s=mn(i.length-t,0),a=r(s);++o<s;)a[o]=i[t+o];o=-1;for(var u=r(t+1);++o<t;)u[o]=i[o];return u[t]=n(a),mt(e,this,u)}}function Oo(e,t){return t.length<2?e:Sr(e,ti(t,0,-1))}function Ao(e,t){for(var n=e.length,r=vn(t.length,n),o=Ai(e);r--;){var s=t[r];e[r]=mo(s,n)?o[s]:i}return e}function To(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Lo=Mo(Zr),Ro=jt||function(e,t){return ot.setTimeout(e,t)},ko=Mo(Xr);function No(e,t,n){var r=t+"";return ko(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(oe,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return wt(p,(function(n){var r="_."+n[0];t&n[1]&&!Ct(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(se);return t?t[1].split(ae):[]}(r),n)))}function Mo(e){var t=0,n=0;return function(){var r=wn(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Po(e,t){var n=-1,r=e.length,o=r-1;for(t=t===i?r:t;++n<t;){var s=Vr(n,o),a=e[s];e[s]=e[n],e[n]=a}return e.length=t,e}var Do,Wo,xo=(Do=Ds((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,n,r,i){t.push(r?i.replace(le,"$1"):n||e)})),t}),(function(e){return 500===Wo.size&&Wo.clear(),e})),Wo=Do.cache,Do);function jo(e){if("string"==typeof e||ca(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Fo(e){if(null!=e){try{return Ne.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Bo(e){if(e instanceof qn)return e.clone();var t=new $n(e.__wrapped__,e.__chain__);return t.__actions__=Ai(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var zo=Yr((function(e,t){return Ys(e)?lr(e,gr(t,1,Ys,!0)):[]})),$o=Yr((function(e,t){var n=Qo(t);return Ys(n)&&(n=i),Ys(e)?lr(e,gr(t,1,Ys,!0),so(n,2)):[]})),qo=Yr((function(e,t){var n=Qo(t);return Ys(n)&&(n=i),Ys(e)?lr(e,gr(t,1,Ys,!0),i,n):[]}));function Uo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ya(n);return i<0&&(i=mn(r+i,0)),Nt(e,so(t,3),i)}function Ho(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return n!==i&&(o=ya(n),o=n<0?mn(r+o,0):vn(o,r-1)),Nt(e,so(t,3),o,!0)}function Vo(e){return null!=e&&e.length?gr(e,1):[]}function Go(e){return e&&e.length?e[0]:i}var Yo=Yr((function(e){var t=It(e,yi);return t.length&&t[0]===e[0]?Tr(t):[]})),Ko=Yr((function(e){var t=Qo(e),n=It(e,yi);return t===Qo(n)?t=i:n.pop(),n.length&&n[0]===e[0]?Tr(n,so(t,2)):[]})),Jo=Yr((function(e){var t=Qo(e),n=It(e,yi);return(t="function"==typeof t?t:i)&&n.pop(),n.length&&n[0]===e[0]?Tr(n,i,t):[]}));function Qo(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Zo=Yr(Xo);function Xo(e,t){return e&&e.length&&t&&t.length?Ur(e,t):e}var es=eo((function(e,t){var n=null==e?0:e.length,r=or(e,t);return Hr(e,It(t,(function(e){return mo(e,n)?+e:e})).sort(Ei)),r}));function ts(e){return null==e?e:Sn.call(e)}var ns=Yr((function(e){return ui(gr(e,1,Ys,!0))})),rs=Yr((function(e){var t=Qo(e);return Ys(t)&&(t=i),ui(gr(e,1,Ys,!0),so(t,2))})),is=Yr((function(e){var t=Qo(e);return t="function"==typeof t?t:i,ui(gr(e,1,Ys,!0),i,t)}));function os(e){if(!e||!e.length)return[];var t=0;return e=St(e,(function(e){if(Ys(e))return t=mn(e.length,t),!0})),zt(t,(function(t){return It(e,xt(t))}))}function ss(e,t){if(!e||!e.length)return[];var n=os(e);return null==t?n:It(n,(function(e){return mt(t,i,e)}))}var as=Yr((function(e,t){return Ys(e)?lr(e,t):[]})),us=Yr((function(e){return hi(St(e,Ys))})),cs=Yr((function(e){var t=Qo(e);return Ys(t)&&(t=i),hi(St(e,Ys),so(t,2))})),ls=Yr((function(e){var t=Qo(e);return t="function"==typeof t?t:i,hi(St(e,Ys),i,t)})),fs=Yr(os),ds=Yr((function(e){var t=e.length,n=t>1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,ss(e,n)}));function hs(e){var t=Fn(e);return t.__chain__=!0,t}function ps(e,t){return t(e)}var ys=eo((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return or(t,e)};return!(t>1||this.__actions__.length)&&r instanceof qn&&mo(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ps,args:[o],thisArg:i}),new $n(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)})),gs=Li((function(e,t,n){Me.call(e,n)?++e[n]:ir(e,n,1)})),ms=Wi(Uo),vs=Wi(Ho);function ws(e,t){return(Hs(e)?wt:fr)(e,so(t,3))}function _s(e,t){return(Hs(e)?_t:dr)(e,so(t,3))}var bs=Li((function(e,t,n){Me.call(e,n)?e[n].push(t):ir(e,n,[t])})),Ss=Yr((function(e,t,n){var i=-1,o="function"==typeof t,s=Gs(e)?r(e.length):[];return fr(e,(function(e){s[++i]=o?mt(t,e,n):Lr(e,t,n)})),s})),Cs=Li((function(e,t,n){ir(e,n,t)}));function Es(e,t){return(Hs(e)?It:xr)(e,so(t,3))}var Is=Li((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),Os=Yr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&vo(e,t[0],t[1])?t=[]:n>2&&vo(t[0],t[1],t[2])&&(t=[t[0]]),$r(e,gr(t,1),[])})),As=Rt||function(){return ot.Date.now()};function Ts(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Ki(e,c,i,i,i,i,t)}function Ls(e,t){var n;if("function"!=typeof t)throw new Ae(o);return e=ya(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Rs=Yr((function(e,t,n){var r=1;if(n.length){var i=tn(n,oo(Rs));r|=u}return Ki(e,r,t,n,i)})),ks=Yr((function(e,t,n){var r=3;if(n.length){var i=tn(n,oo(ks));r|=u}return Ki(t,r,e,n,i)}));function Ns(e,t,n){var r,s,a,u,c,l,f=0,d=!1,h=!1,p=!0;if("function"!=typeof e)throw new Ae(o);function y(t){var n=r,o=s;return r=s=i,f=t,u=e.apply(o,n)}function g(e){return f=e,c=Ro(v,t),d?y(e):u}function m(e){var n=e-l;return l===i||n>=t||n<0||h&&e-f>=a}function v(){var e=As();if(m(e))return w(e);c=Ro(v,function(e){var n=t-(e-l);return h?vn(n,a-(e-f)):n}(e))}function w(e){return c=i,p&&r?y(e):(r=s=i,u)}function _(){var e=As(),n=m(e);if(r=arguments,s=this,l=e,n){if(c===i)return g(l);if(h)return _i(c),c=Ro(v,t),y(l)}return c===i&&(c=Ro(v,t)),u}return t=ma(t)||0,ta(n)&&(d=!!n.leading,a=(h="maxWait"in n)?mn(ma(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p),_.cancel=function(){c!==i&&_i(c),f=0,r=l=s=c=i},_.flush=function(){return c===i?u:w(As())},_}var Ms=Yr((function(e,t){return cr(e,1,t)})),Ps=Yr((function(e,t,n){return cr(e,ma(t)||0,n)}));function Ds(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ae(o);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(Ds.Cache||Vn),n}function Ws(e){if("function"!=typeof e)throw new Ae(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ds.Cache=Vn;var xs=vi((function(e,t){var n=(t=1==t.length&&Hs(t[0])?It(t[0],qt(so())):It(gr(t,1),qt(so()))).length;return Yr((function(r){for(var i=-1,o=vn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return mt(e,this,r)}))})),js=Yr((function(e,t){var n=tn(t,oo(js));return Ki(e,u,i,t,n)})),Fs=Yr((function(e,t){var n=tn(t,oo(Fs));return Ki(e,64,i,t,n)})),Bs=eo((function(e,t){return Ki(e,256,i,i,i,t)}));function zs(e,t){return e===t||e!=e&&t!=t}var $s=Ui(Ir),qs=Ui((function(e,t){return e>=t})),Us=Rr(function(){return arguments}())?Rr:function(e){return na(e)&&Me.call(e,"callee")&&!et.call(e,"callee")},Hs=r.isArray,Vs=ft?qt(ft):function(e){return na(e)&&Er(e)==k};function Gs(e){return null!=e&&ea(e.length)&&!Zs(e)}function Ys(e){return na(e)&&Gs(e)}var Ks=hn||mu,Js=dt?qt(dt):function(e){return na(e)&&Er(e)==v};function Qs(e){if(!na(e))return!1;var t=Er(e);return t==w||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!oa(e)}function Zs(e){if(!ta(e))return!1;var t=Er(e);return t==_||t==b||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Xs(e){return"number"==typeof e&&e==ya(e)}function ea(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function ta(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function na(e){return null!=e&&"object"==typeof e}var ra=ht?qt(ht):function(e){return na(e)&&ho(e)==S};function ia(e){return"number"==typeof e||na(e)&&Er(e)==C}function oa(e){if(!na(e)||Er(e)!=E)return!1;var t=Ve(e);if(null===t)return!0;var n=Me.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Ne.call(n)==xe}var sa=pt?qt(pt):function(e){return na(e)&&Er(e)==O},aa=yt?qt(yt):function(e){return na(e)&&ho(e)==A};function ua(e){return"string"==typeof e||!Hs(e)&&na(e)&&Er(e)==T}function ca(e){return"symbol"==typeof e||na(e)&&Er(e)==L}var la=gt?qt(gt):function(e){return na(e)&&ea(e.length)&&!!Ze[Er(e)]},fa=Ui(Wr),da=Ui((function(e,t){return e<=t}));function ha(e){if(!e)return[];if(Gs(e))return ua(e)?sn(e):Ai(e);if(st&&e[st])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[st]());var t=ho(e);return(t==S?Xt:t==A?nn:za)(e)}function pa(e){return e?(e=ma(e))===l||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ya(e){var t=pa(e),n=t%1;return t==t?n?t-n:t:0}function ga(e){return e?sr(ya(e),0,h):0}function ma(e){if("number"==typeof e)return e;if(ca(e))return d;if(ta(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ta(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=$t(e);var n=pe.test(e);return n||ge.test(e)?nt(e.slice(2),n?2:8):he.test(e)?d:+e}function va(e){return Ti(e,Ma(e))}function wa(e){return null==e?"":ai(e)}var _a=Ri((function(e,t){if(So(t)||Gs(t))Ti(t,Na(t),e);else for(var n in t)Me.call(t,n)&&er(e,n,t[n])})),ba=Ri((function(e,t){Ti(t,Ma(t),e)})),Sa=Ri((function(e,t,n,r){Ti(t,Ma(t),e,r)})),Ca=Ri((function(e,t,n,r){Ti(t,Na(t),e,r)})),Ea=eo(or),Ia=Yr((function(e,t){e=Ee(e);var n=-1,r=t.length,o=r>2?t[2]:i;for(o&&vo(t[0],t[1],o)&&(r=1);++n<r;)for(var s=t[n],a=Ma(s),u=-1,c=a.length;++u<c;){var l=a[u],f=e[l];(f===i||zs(f,Re[l])&&!Me.call(e,l))&&(e[l]=s[l])}return e})),Oa=Yr((function(e){return e.push(i,Qi),mt(Da,i,e)}));function Aa(e,t,n){var r=null==e?i:Sr(e,t);return r===i?n:r}function Ta(e,t){return null!=e&&po(e,t,Ar)}var La=Fi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=We.call(t)),e[t]=n}),tu(iu)),Ra=Fi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=We.call(t)),Me.call(e,t)?e[t].push(n):e[t]=[n]}),so),ka=Yr(Lr);function Na(e){return Gs(e)?Kn(e):Dr(e)}function Ma(e){return Gs(e)?Kn(e,!0):function(e){if(!ta(e))return function(e){var t=[];if(null!=e)for(var n in Ee(e))t.push(n);return t}(e);var t=So(e),n=[];for(var r in e)("constructor"!=r||!t&&Me.call(e,r))&&n.push(r);return n}(e)}var Pa=Ri((function(e,t,n){Br(e,t,n)})),Da=Ri((function(e,t,n,r){Br(e,t,n,r)})),Wa=eo((function(e,t){var n={};if(null==e)return n;var r=!1;t=It(t,(function(t){return t=mi(t,e),r||(r=t.length>1),t})),Ti(e,no(e),n),r&&(n=ar(n,7,Zi));for(var i=t.length;i--;)ci(n,t[i]);return n})),xa=eo((function(e,t){return null==e?{}:function(e,t){return qr(e,t,(function(t,n){return Ta(e,n)}))}(e,t)}));function ja(e,t){if(null==e)return{};var n=It(no(e),(function(e){return[e]}));return t=so(t),qr(e,n,(function(e,n){return t(e,n[0])}))}var Fa=Yi(Na),Ba=Yi(Ma);function za(e){return null==e?[]:Ut(e,Na(e))}var $a=Pi((function(e,t,n){return t=t.toLowerCase(),e+(n?qa(t):t)}));function qa(e){return Qa(wa(e).toLowerCase())}function Ua(e){return(e=wa(e))&&e.replace(ve,Kt).replace(He,"")}var Ha=Pi((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Va=Pi((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Ga=Mi("toLowerCase"),Ya=Pi((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Ka=Pi((function(e,t,n){return e+(n?" ":"")+Qa(t)})),Ja=Pi((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Qa=Mi("toUpperCase");function Za(e,t,n){return e=wa(e),(t=n?i:t)===i?function(e){return Ke.test(e)}(e)?function(e){return e.match(Ge)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Xa=Yr((function(e,t){try{return mt(e,i,t)}catch(e){return Qs(e)?e:new be(e)}})),eu=eo((function(e,t){return wt(t,(function(t){t=jo(t),ir(e,t,Rs(e[t],e))})),e}));function tu(e){return function(){return e}}var nu=xi(),ru=xi(!0);function iu(e){return e}function ou(e){return Pr("function"==typeof e?e:ar(e,1))}var su=Yr((function(e,t){return function(n){return Lr(n,e,t)}})),au=Yr((function(e,t){return function(n){return Lr(e,n,t)}}));function uu(e,t,n){var r=Na(t),i=br(t,r);null!=n||ta(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=br(t,Na(t)));var o=!(ta(n)&&"chain"in n&&!n.chain),s=Zs(e);return wt(i,(function(n){var r=t[n];e[n]=r,s&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),i=n.__actions__=Ai(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Ot([this.value()],arguments))})})),e}function cu(){}var lu=zi(It),fu=zi(bt),du=zi(Lt);function hu(e){return wo(e)?xt(jo(e)):function(e){return function(t){return Sr(t,e)}}(e)}var pu=qi(),yu=qi(!0);function gu(){return[]}function mu(){return!1}var vu,wu=Bi((function(e,t){return e+t}),0),_u=Vi("ceil"),bu=Bi((function(e,t){return e/t}),1),Su=Vi("floor"),Cu=Bi((function(e,t){return e*t}),1),Eu=Vi("round"),Iu=Bi((function(e,t){return e-t}),0);return Fn.after=function(e,t){if("function"!=typeof t)throw new Ae(o);return e=ya(e),function(){if(--e<1)return t.apply(this,arguments)}},Fn.ary=Ts,Fn.assign=_a,Fn.assignIn=ba,Fn.assignInWith=Sa,Fn.assignWith=Ca,Fn.at=Ea,Fn.before=Ls,Fn.bind=Rs,Fn.bindAll=eu,Fn.bindKey=ks,Fn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Hs(e)?e:[e]},Fn.chain=hs,Fn.chunk=function(e,t,n){t=(n?vo(e,t,n):t===i)?1:mn(ya(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var s=0,a=0,u=r(ln(o/t));s<o;)u[a++]=ti(e,s,s+=t);return u},Fn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},Fn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Ot(Hs(n)?Ai(n):[n],gr(t,1))},Fn.cond=function(e){var t=null==e?0:e.length,n=so();return e=t?It(e,(function(e){if("function"!=typeof e[1])throw new Ae(o);return[n(e[0]),e[1]]})):[],Yr((function(n){for(var r=-1;++r<t;){var i=e[r];if(mt(i[0],this,n))return mt(i[1],this,n)}}))},Fn.conforms=function(e){return function(e){var t=Na(e);return function(n){return ur(n,e,t)}}(ar(e,1))},Fn.constant=tu,Fn.countBy=gs,Fn.create=function(e,t){var n=Bn(e);return null==t?n:rr(n,t)},Fn.curry=function e(t,n,r){var o=Ki(t,8,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Fn.curryRight=function e(t,n,r){var o=Ki(t,16,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Fn.debounce=Ns,Fn.defaults=Ia,Fn.defaultsDeep=Oa,Fn.defer=Ms,Fn.delay=Ps,Fn.difference=zo,Fn.differenceBy=$o,Fn.differenceWith=qo,Fn.drop=function(e,t,n){var r=null==e?0:e.length;return r?ti(e,(t=n||t===i?1:ya(t))<0?0:t,r):[]},Fn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?ti(e,0,(t=r-(t=n||t===i?1:ya(t)))<0?0:t):[]},Fn.dropRightWhile=function(e,t){return e&&e.length?fi(e,so(t,3),!0,!0):[]},Fn.dropWhile=function(e,t){return e&&e.length?fi(e,so(t,3),!0):[]},Fn.fill=function(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&vo(e,t,n)&&(n=0,r=o),function(e,t,n,r){var o=e.length;for((n=ya(n))<0&&(n=-n>o?0:o+n),(r=r===i||r>o?o:ya(r))<0&&(r+=o),r=n>r?0:ga(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Fn.filter=function(e,t){return(Hs(e)?St:yr)(e,so(t,3))},Fn.flatMap=function(e,t){return gr(Es(e,t),1)},Fn.flatMapDeep=function(e,t){return gr(Es(e,t),l)},Fn.flatMapDepth=function(e,t,n){return n=n===i?1:ya(n),gr(Es(e,t),n)},Fn.flatten=Vo,Fn.flattenDeep=function(e){return null!=e&&e.length?gr(e,l):[]},Fn.flattenDepth=function(e,t){return null!=e&&e.length?gr(e,t=t===i?1:ya(t)):[]},Fn.flip=function(e){return Ki(e,512)},Fn.flow=nu,Fn.flowRight=ru,Fn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},Fn.functions=function(e){return null==e?[]:br(e,Na(e))},Fn.functionsIn=function(e){return null==e?[]:br(e,Ma(e))},Fn.groupBy=bs,Fn.initial=function(e){return null!=e&&e.length?ti(e,0,-1):[]},Fn.intersection=Yo,Fn.intersectionBy=Ko,Fn.intersectionWith=Jo,Fn.invert=La,Fn.invertBy=Ra,Fn.invokeMap=Ss,Fn.iteratee=ou,Fn.keyBy=Cs,Fn.keys=Na,Fn.keysIn=Ma,Fn.map=Es,Fn.mapKeys=function(e,t){var n={};return t=so(t,3),wr(e,(function(e,r,i){ir(n,t(e,r,i),e)})),n},Fn.mapValues=function(e,t){var n={};return t=so(t,3),wr(e,(function(e,r,i){ir(n,r,t(e,r,i))})),n},Fn.matches=function(e){return jr(ar(e,1))},Fn.matchesProperty=function(e,t){return Fr(e,ar(t,1))},Fn.memoize=Ds,Fn.merge=Pa,Fn.mergeWith=Da,Fn.method=su,Fn.methodOf=au,Fn.mixin=uu,Fn.negate=Ws,Fn.nthArg=function(e){return e=ya(e),Yr((function(t){return zr(t,e)}))},Fn.omit=Wa,Fn.omitBy=function(e,t){return ja(e,Ws(so(t)))},Fn.once=function(e){return Ls(2,e)},Fn.orderBy=function(e,t,n,r){return null==e?[]:(Hs(t)||(t=null==t?[]:[t]),Hs(n=r?i:n)||(n=null==n?[]:[n]),$r(e,t,n))},Fn.over=lu,Fn.overArgs=xs,Fn.overEvery=fu,Fn.overSome=du,Fn.partial=js,Fn.partialRight=Fs,Fn.partition=Is,Fn.pick=xa,Fn.pickBy=ja,Fn.property=hu,Fn.propertyOf=function(e){return function(t){return null==e?i:Sr(e,t)}},Fn.pull=Zo,Fn.pullAll=Xo,Fn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Ur(e,t,so(n,2)):e},Fn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Ur(e,t,i,n):e},Fn.pullAt=es,Fn.range=pu,Fn.rangeRight=yu,Fn.rearg=Bs,Fn.reject=function(e,t){return(Hs(e)?St:yr)(e,Ws(so(t,3)))},Fn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=so(t,3);++r<o;){var s=e[r];t(s,r,e)&&(n.push(s),i.push(r))}return Hr(e,i),n},Fn.rest=function(e,t){if("function"!=typeof e)throw new Ae(o);return Yr(e,t=t===i?t:ya(t))},Fn.reverse=ts,Fn.sampleSize=function(e,t,n){return t=(n?vo(e,t,n):t===i)?1:ya(t),(Hs(e)?Qn:Jr)(e,t)},Fn.set=function(e,t,n){return null==e?e:Qr(e,t,n)},Fn.setWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:Qr(e,t,n,r)},Fn.shuffle=function(e){return(Hs(e)?Zn:ei)(e)},Fn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&vo(e,t,n)?(t=0,n=r):(t=null==t?0:ya(t),n=n===i?r:ya(n)),ti(e,t,n)):[]},Fn.sortBy=Os,Fn.sortedUniq=function(e){return e&&e.length?oi(e):[]},Fn.sortedUniqBy=function(e,t){return e&&e.length?oi(e,so(t,2)):[]},Fn.split=function(e,t,n){return n&&"number"!=typeof n&&vo(e,t,n)&&(t=n=i),(n=n===i?h:n>>>0)?(e=wa(e))&&("string"==typeof t||null!=t&&!sa(t))&&!(t=ai(t))&&Zt(e)?wi(sn(e),0,n):e.split(t,n):[]},Fn.spread=function(e,t){if("function"!=typeof e)throw new Ae(o);return t=null==t?0:mn(ya(t),0),Yr((function(n){var r=n[t],i=wi(n,0,t);return r&&Ot(i,r),mt(e,this,i)}))},Fn.tail=function(e){var t=null==e?0:e.length;return t?ti(e,1,t):[]},Fn.take=function(e,t,n){return e&&e.length?ti(e,0,(t=n||t===i?1:ya(t))<0?0:t):[]},Fn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ti(e,(t=r-(t=n||t===i?1:ya(t)))<0?0:t,r):[]},Fn.takeRightWhile=function(e,t){return e&&e.length?fi(e,so(t,3),!1,!0):[]},Fn.takeWhile=function(e,t){return e&&e.length?fi(e,so(t,3)):[]},Fn.tap=function(e,t){return t(e),e},Fn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Ae(o);return ta(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ns(e,t,{leading:r,maxWait:t,trailing:i})},Fn.thru=ps,Fn.toArray=ha,Fn.toPairs=Fa,Fn.toPairsIn=Ba,Fn.toPath=function(e){return Hs(e)?It(e,jo):ca(e)?[e]:Ai(xo(wa(e)))},Fn.toPlainObject=va,Fn.transform=function(e,t,n){var r=Hs(e),i=r||Ks(e)||la(e);if(t=so(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:ta(e)&&Zs(o)?Bn(Ve(e)):{}}return(i?wt:wr)(e,(function(e,r,i){return t(n,e,r,i)})),n},Fn.unary=function(e){return Ts(e,1)},Fn.union=ns,Fn.unionBy=rs,Fn.unionWith=is,Fn.uniq=function(e){return e&&e.length?ui(e):[]},Fn.uniqBy=function(e,t){return e&&e.length?ui(e,so(t,2)):[]},Fn.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?ui(e,i,t):[]},Fn.unset=function(e,t){return null==e||ci(e,t)},Fn.unzip=os,Fn.unzipWith=ss,Fn.update=function(e,t,n){return null==e?e:li(e,t,gi(n))},Fn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:li(e,t,gi(n),r)},Fn.values=za,Fn.valuesIn=function(e){return null==e?[]:Ut(e,Ma(e))},Fn.without=as,Fn.words=Za,Fn.wrap=function(e,t){return js(gi(t),e)},Fn.xor=us,Fn.xorBy=cs,Fn.xorWith=ls,Fn.zip=fs,Fn.zipObject=function(e,t){return pi(e||[],t||[],er)},Fn.zipObjectDeep=function(e,t){return pi(e||[],t||[],Qr)},Fn.zipWith=ds,Fn.entries=Fa,Fn.entriesIn=Ba,Fn.extend=ba,Fn.extendWith=Sa,uu(Fn,Fn),Fn.add=wu,Fn.attempt=Xa,Fn.camelCase=$a,Fn.capitalize=qa,Fn.ceil=_u,Fn.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=ma(n))==n?n:0),t!==i&&(t=(t=ma(t))==t?t:0),sr(ma(e),t,n)},Fn.clone=function(e){return ar(e,4)},Fn.cloneDeep=function(e){return ar(e,5)},Fn.cloneDeepWith=function(e,t){return ar(e,5,t="function"==typeof t?t:i)},Fn.cloneWith=function(e,t){return ar(e,4,t="function"==typeof t?t:i)},Fn.conformsTo=function(e,t){return null==t||ur(e,t,Na(t))},Fn.deburr=Ua,Fn.defaultTo=function(e,t){return null==e||e!=e?t:e},Fn.divide=bu,Fn.endsWith=function(e,t,n){e=wa(e),t=ai(t);var r=e.length,o=n=n===i?r:sr(ya(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},Fn.eq=zs,Fn.escape=function(e){return(e=wa(e))&&Y.test(e)?e.replace(V,Jt):e},Fn.escapeRegExp=function(e){return(e=wa(e))&&ne.test(e)?e.replace(te,"\\$&"):e},Fn.every=function(e,t,n){var r=Hs(e)?bt:hr;return n&&vo(e,t,n)&&(t=i),r(e,so(t,3))},Fn.find=ms,Fn.findIndex=Uo,Fn.findKey=function(e,t){return kt(e,so(t,3),wr)},Fn.findLast=vs,Fn.findLastIndex=Ho,Fn.findLastKey=function(e,t){return kt(e,so(t,3),_r)},Fn.floor=Su,Fn.forEach=ws,Fn.forEachRight=_s,Fn.forIn=function(e,t){return null==e?e:mr(e,so(t,3),Ma)},Fn.forInRight=function(e,t){return null==e?e:vr(e,so(t,3),Ma)},Fn.forOwn=function(e,t){return e&&wr(e,so(t,3))},Fn.forOwnRight=function(e,t){return e&&_r(e,so(t,3))},Fn.get=Aa,Fn.gt=$s,Fn.gte=qs,Fn.has=function(e,t){return null!=e&&po(e,t,Or)},Fn.hasIn=Ta,Fn.head=Go,Fn.identity=iu,Fn.includes=function(e,t,n,r){e=Gs(e)?e:za(e),n=n&&!r?ya(n):0;var i=e.length;return n<0&&(n=mn(i+n,0)),ua(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Mt(e,t,n)>-1},Fn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ya(n);return i<0&&(i=mn(r+i,0)),Mt(e,t,i)},Fn.inRange=function(e,t,n){return t=pa(t),n===i?(n=t,t=0):n=pa(n),function(e,t,n){return e>=vn(t,n)&&e<mn(t,n)}(e=ma(e),t,n)},Fn.invoke=ka,Fn.isArguments=Us,Fn.isArray=Hs,Fn.isArrayBuffer=Vs,Fn.isArrayLike=Gs,Fn.isArrayLikeObject=Ys,Fn.isBoolean=function(e){return!0===e||!1===e||na(e)&&Er(e)==m},Fn.isBuffer=Ks,Fn.isDate=Js,Fn.isElement=function(e){return na(e)&&1===e.nodeType&&!oa(e)},Fn.isEmpty=function(e){if(null==e)return!0;if(Gs(e)&&(Hs(e)||"string"==typeof e||"function"==typeof e.splice||Ks(e)||la(e)||Us(e)))return!e.length;var t=ho(e);if(t==S||t==A)return!e.size;if(So(e))return!Dr(e).length;for(var n in e)if(Me.call(e,n))return!1;return!0},Fn.isEqual=function(e,t){return kr(e,t)},Fn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:i)?n(e,t):i;return r===i?kr(e,t,i,n):!!r},Fn.isError=Qs,Fn.isFinite=function(e){return"number"==typeof e&&pn(e)},Fn.isFunction=Zs,Fn.isInteger=Xs,Fn.isLength=ea,Fn.isMap=ra,Fn.isMatch=function(e,t){return e===t||Nr(e,t,uo(t))},Fn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:i,Nr(e,t,uo(t),n)},Fn.isNaN=function(e){return ia(e)&&e!=+e},Fn.isNative=function(e){if(bo(e))throw new be("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Mr(e)},Fn.isNil=function(e){return null==e},Fn.isNull=function(e){return null===e},Fn.isNumber=ia,Fn.isObject=ta,Fn.isObjectLike=na,Fn.isPlainObject=oa,Fn.isRegExp=sa,Fn.isSafeInteger=function(e){return Xs(e)&&e>=-9007199254740991&&e<=f},Fn.isSet=aa,Fn.isString=ua,Fn.isSymbol=ca,Fn.isTypedArray=la,Fn.isUndefined=function(e){return e===i},Fn.isWeakMap=function(e){return na(e)&&ho(e)==R},Fn.isWeakSet=function(e){return na(e)&&"[object WeakSet]"==Er(e)},Fn.join=function(e,t){return null==e?"":yn.call(e,t)},Fn.kebabCase=Ha,Fn.last=Qo,Fn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=ya(n))<0?mn(r+o,0):vn(o,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):Nt(e,Dt,o,!0)},Fn.lowerCase=Va,Fn.lowerFirst=Ga,Fn.lt=fa,Fn.lte=da,Fn.max=function(e){return e&&e.length?pr(e,iu,Ir):i},Fn.maxBy=function(e,t){return e&&e.length?pr(e,so(t,2),Ir):i},Fn.mean=function(e){return Wt(e,iu)},Fn.meanBy=function(e,t){return Wt(e,so(t,2))},Fn.min=function(e){return e&&e.length?pr(e,iu,Wr):i},Fn.minBy=function(e,t){return e&&e.length?pr(e,so(t,2),Wr):i},Fn.stubArray=gu,Fn.stubFalse=mu,Fn.stubObject=function(){return{}},Fn.stubString=function(){return""},Fn.stubTrue=function(){return!0},Fn.multiply=Cu,Fn.nth=function(e,t){return e&&e.length?zr(e,ya(t)):i},Fn.noConflict=function(){return ot._===this&&(ot._=je),this},Fn.noop=cu,Fn.now=As,Fn.pad=function(e,t,n){e=wa(e);var r=(t=ya(t))?on(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return $i(fn(i),n)+e+$i(ln(i),n)},Fn.padEnd=function(e,t,n){e=wa(e);var r=(t=ya(t))?on(e):0;return t&&r<t?e+$i(t-r,n):e},Fn.padStart=function(e,t,n){e=wa(e);var r=(t=ya(t))?on(e):0;return t&&r<t?$i(t-r,n)+e:e},Fn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),_n(wa(e).replace(re,""),t||0)},Fn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&vo(e,t,n)&&(t=n=i),n===i&&("boolean"==typeof t?(n=t,t=i):"boolean"==typeof e&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=pa(e),t===i?(t=e,e=0):t=pa(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=bn();return vn(e+o*(t-e+tt("1e-"+((o+"").length-1))),t)}return Vr(e,t)},Fn.reduce=function(e,t,n){var r=Hs(e)?At:Ft,i=arguments.length<3;return r(e,so(t,4),n,i,fr)},Fn.reduceRight=function(e,t,n){var r=Hs(e)?Tt:Ft,i=arguments.length<3;return r(e,so(t,4),n,i,dr)},Fn.repeat=function(e,t,n){return t=(n?vo(e,t,n):t===i)?1:ya(t),Gr(wa(e),t)},Fn.replace=function(){var e=arguments,t=wa(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Fn.result=function(e,t,n){var r=-1,o=(t=mi(t,e)).length;for(o||(o=1,e=i);++r<o;){var s=null==e?i:e[jo(t[r])];s===i&&(r=o,s=n),e=Zs(s)?s.call(e):s}return e},Fn.round=Eu,Fn.runInContext=e,Fn.sample=function(e){return(Hs(e)?Jn:Kr)(e)},Fn.size=function(e){if(null==e)return 0;if(Gs(e))return ua(e)?on(e):e.length;var t=ho(e);return t==S||t==A?e.size:Dr(e).length},Fn.snakeCase=Ya,Fn.some=function(e,t,n){var r=Hs(e)?Lt:ni;return n&&vo(e,t,n)&&(t=i),r(e,so(t,3))},Fn.sortedIndex=function(e,t){return ri(e,t)},Fn.sortedIndexBy=function(e,t,n){return ii(e,t,so(n,2))},Fn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=ri(e,t);if(r<n&&zs(e[r],t))return r}return-1},Fn.sortedLastIndex=function(e,t){return ri(e,t,!0)},Fn.sortedLastIndexBy=function(e,t,n){return ii(e,t,so(n,2),!0)},Fn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=ri(e,t,!0)-1;if(zs(e[n],t))return n}return-1},Fn.startCase=Ka,Fn.startsWith=function(e,t,n){return e=wa(e),n=null==n?0:sr(ya(n),0,e.length),t=ai(t),e.slice(n,n+t.length)==t},Fn.subtract=Iu,Fn.sum=function(e){return e&&e.length?Bt(e,iu):0},Fn.sumBy=function(e,t){return e&&e.length?Bt(e,so(t,2)):0},Fn.template=function(e,t,n){var r=Fn.templateSettings;n&&vo(e,t,n)&&(t=i),e=wa(e),t=Sa({},t,r,Ji);var o,s,a=Sa({},t.imports,r.imports,Ji),u=Na(a),c=Ut(a,u),l=0,f=t.interpolate||we,d="__p += '",h=Ie((t.escape||we).source+"|"+f.source+"|"+(f===Q?fe:we).source+"|"+(t.evaluate||we).source+"|$","g"),p="//# sourceURL="+(Me.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Qe+"]")+"\n";e.replace(h,(function(t,n,r,i,a,u){return r||(r=i),d+=e.slice(l,u).replace(_e,Qt),n&&(o=!0,d+="' +\n__e("+n+") +\n'"),a&&(s=!0,d+="';\n"+a+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+t.length,t})),d+="';\n";var y=Me.call(t,"variable")&&t.variable;if(y){if(ce.test(y))throw new be("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(s?d.replace($,""):d).replace(q,"$1").replace(U,"$1;"),d="function("+(y||"obj")+") {\n"+(y?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var g=Xa((function(){return Se(u,p+"return "+d).apply(i,c)}));if(g.source=d,Qs(g))throw g;return g},Fn.times=function(e,t){if((e=ya(e))<1||e>f)return[];var n=h,r=vn(e,h);t=so(t),e-=h;for(var i=zt(r,t);++n<e;)t(n);return i},Fn.toFinite=pa,Fn.toInteger=ya,Fn.toLength=ga,Fn.toLower=function(e){return wa(e).toLowerCase()},Fn.toNumber=ma,Fn.toSafeInteger=function(e){return e?sr(ya(e),-9007199254740991,f):0===e?e:0},Fn.toString=wa,Fn.toUpper=function(e){return wa(e).toUpperCase()},Fn.trim=function(e,t,n){if((e=wa(e))&&(n||t===i))return $t(e);if(!e||!(t=ai(t)))return e;var r=sn(e),o=sn(t);return wi(r,Vt(r,o),Gt(r,o)+1).join("")},Fn.trimEnd=function(e,t,n){if((e=wa(e))&&(n||t===i))return e.slice(0,an(e)+1);if(!e||!(t=ai(t)))return e;var r=sn(e);return wi(r,0,Gt(r,sn(t))+1).join("")},Fn.trimStart=function(e,t,n){if((e=wa(e))&&(n||t===i))return e.replace(re,"");if(!e||!(t=ai(t)))return e;var r=sn(e);return wi(r,Vt(r,sn(t))).join("")},Fn.truncate=function(e,t){var n=30,r="...";if(ta(t)){var o="separator"in t?t.separator:o;n="length"in t?ya(t.length):n,r="omission"in t?ai(t.omission):r}var s=(e=wa(e)).length;if(Zt(e)){var a=sn(e);s=a.length}if(n>=s)return e;var u=n-on(r);if(u<1)return r;var c=a?wi(a,0,u).join(""):e.slice(0,u);if(o===i)return c+r;if(a&&(u+=c.length-u),sa(o)){if(e.slice(u).search(o)){var l,f=c;for(o.global||(o=Ie(o.source,wa(de.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var d=l.index;c=c.slice(0,d===i?u:d)}}else if(e.indexOf(ai(o),u)!=u){var h=c.lastIndexOf(o);h>-1&&(c=c.slice(0,h))}return c+r},Fn.unescape=function(e){return(e=wa(e))&&G.test(e)?e.replace(H,un):e},Fn.uniqueId=function(e){var t=++Pe;return wa(e)+t},Fn.upperCase=Ja,Fn.upperFirst=Qa,Fn.each=ws,Fn.eachRight=_s,Fn.first=Go,uu(Fn,(vu={},wr(Fn,(function(e,t){Me.call(Fn.prototype,t)||(vu[t]=e)})),vu),{chain:!1}),Fn.VERSION="4.17.21",wt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Fn[e].placeholder=Fn})),wt(["drop","take"],(function(e,t){qn.prototype[e]=function(n){n=n===i?1:mn(ya(n),0);var r=this.__filtered__&&!t?new qn(this):this.clone();return r.__filtered__?r.__takeCount__=vn(n,r.__takeCount__):r.__views__.push({size:vn(n,h),type:e+(r.__dir__<0?"Right":"")}),r},qn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),wt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;qn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:so(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),wt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");qn.prototype[e]=function(){return this[n](1).value()[0]}})),wt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");qn.prototype[e]=function(){return this.__filtered__?new qn(this):this[n](1)}})),qn.prototype.compact=function(){return this.filter(iu)},qn.prototype.find=function(e){return this.filter(e).head()},qn.prototype.findLast=function(e){return this.reverse().find(e)},qn.prototype.invokeMap=Yr((function(e,t){return"function"==typeof e?new qn(this):this.map((function(n){return Lr(n,e,t)}))})),qn.prototype.reject=function(e){return this.filter(Ws(so(e)))},qn.prototype.slice=function(e,t){e=ya(e);var n=this;return n.__filtered__&&(e>0||t<0)?new qn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=ya(t))<0?n.dropRight(-t):n.take(t-e)),n)},qn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},qn.prototype.toArray=function(){return this.take(h)},wr(qn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=Fn[r?"take"+("last"==t?"Right":""):t],s=r||/^find/.test(t);o&&(Fn.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,u=t instanceof qn,c=a[0],l=u||Hs(t),f=function(e){var t=o.apply(Fn,Ot([e],a));return r&&d?t[0]:t};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var d=this.__chain__,h=!!this.__actions__.length,p=s&&!d,y=u&&!h;if(!s&&l){t=y?t:new qn(this);var g=e.apply(t,a);return g.__actions__.push({func:ps,args:[f],thisArg:i}),new $n(g,d)}return p&&y?e.apply(this,a):(g=this.thru(f),p?r?g.value()[0]:g.value():g)})})),wt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Te[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Fn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Hs(i)?i:[],e)}return this[n]((function(n){return t.apply(Hs(n)?n:[],e)}))}})),wr(qn.prototype,(function(e,t){var n=Fn[t];if(n){var r=n.name+"";Me.call(Rn,r)||(Rn[r]=[]),Rn[r].push({name:t,func:n})}})),Rn[ji(i,2).name]=[{name:"wrapper",func:i}],qn.prototype.clone=function(){var e=new qn(this.__wrapped__);return e.__actions__=Ai(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ai(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ai(this.__views__),e},qn.prototype.reverse=function(){if(this.__filtered__){var e=new qn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},qn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Hs(e),r=t<0,i=n?e.length:0,o=function(e,t,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=vn(t,e+s);break;case"takeRight":e=mn(e,t-s)}}return{start:e,end:t}}(0,i,this.__views__),s=o.start,a=o.end,u=a-s,c=r?a:s-1,l=this.__iteratees__,f=l.length,d=0,h=vn(u,this.__takeCount__);if(!n||!r&&i==u&&h==u)return di(e,this.__actions__);var p=[];e:for(;u--&&d<h;){for(var y=-1,g=e[c+=t];++y<f;){var m=l[y],v=m.iteratee,w=m.type,_=v(g);if(2==w)g=_;else if(!_){if(1==w)continue e;break e}}p[d++]=g}return p},Fn.prototype.at=ys,Fn.prototype.chain=function(){return hs(this)},Fn.prototype.commit=function(){return new $n(this.value(),this.__chain__)},Fn.prototype.next=function(){this.__values__===i&&(this.__values__=ha(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Fn.prototype.plant=function(e){for(var t,n=this;n instanceof zn;){var r=Bo(n);r.__index__=0,r.__values__=i,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},Fn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof qn){var t=e;return this.__actions__.length&&(t=new qn(this)),(t=t.reverse()).__actions__.push({func:ps,args:[ts],thisArg:i}),new $n(t,this.__chain__)}return this.thru(ts)},Fn.prototype.toJSON=Fn.prototype.valueOf=Fn.prototype.value=function(){return di(this.__wrapped__,this.__actions__)},Fn.prototype.first=Fn.prototype.head,st&&(Fn.prototype[st]=function(){return this}),Fn}();ot._=cn,(r=function(){return cn}.call(t,n,t,e))===i||(e.exports=r)}.call(this)},54883:(e,t,n)=>{var r=n(25835);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(i.Cache||r),n}i.Cache=r,e.exports=i},98253:(e,t,n)=>{var r=n(158);e.exports=function(){return r.Date.now()}},75892:(e,t,n)=>{var r=n(11241),i=n(39169)((function(e,t){return null==e?{}:r(e,t)}));e.exports=i},59174:e=>{e.exports=function(){return[]}},30647:e=>{e.exports=function(){return!1}},38172:(e,t,n)=>{var r=n(76897),i=n(23619);e.exports=function(e,t,n){var o=!0,s=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return i(n)&&(o="leading"in n?!!n.leading:o,s="trailing"in n?!!n.trailing:s),r(e,t,{leading:o,maxWait:t,trailing:s})}},95053:(e,t,n)=>{var r=n(12383),i=n(23619),o=n(81878),s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=a.test(e);return n||u.test(e)?c(e.slice(2),n?2:8):s.test(e)?NaN:+e}},33270:(e,t,n)=>{var r=n(80430);e.exports=function(e){return null==e?"":r(e)}},42169:(e,t,n)=>{"use strict";const r=n(14561);e.exports=e=>{if(!Number.isInteger(e)&&e!==1/0||!(e>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");const t=new r;let n=0;const i=async(e,r,...i)=>{n++;const o=(async()=>e(...i))();r(o);try{await o}catch{}n--,t.size>0&&t.dequeue()()},o=(r,...o)=>new Promise((s=>{((r,o,...s)=>{t.enqueue(i.bind(null,r,o,...s)),(async()=>{await Promise.resolve(),n<e&&t.size>0&&t.dequeue()()})()})(r,s,...o)}));return Object.defineProperties(o,{activeCount:{get:()=>n},pendingCount:{get:()=>t.size},clearQueue:{value:()=>{t.clear()}}}),o}},88021:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(33034);class i extends Error{constructor(e){super(e),this.name="TimeoutError"}}class o{constructor(){Object.defineProperty(this,"_queue",{enumerable:!0,configurable:!0,writable:!0,value:[]})}enqueue(e,t){var n;const r={priority:(t={priority:0,...t}).priority,run:e};if(this.size&&(null===(n=this._queue[this.size-1])||void 0===n?void 0:n.priority)>=t.priority)return void this._queue.push(r);const i=function(e,t,n){let r=0,i=e.length;for(;i>0;){const n=Math.trunc(i/2);let s=r+n;o=e[s],t.priority-o.priority<=0?(r=++s,i-=n+1):i=n}var o;return r}(this._queue,r);this._queue.splice(i,0,r)}dequeue(){const e=this._queue.shift();return null==e?void 0:e.run}filter(e){return this._queue.filter((t=>t.priority===e.priority)).map((e=>e.run))}get size(){return this._queue.length}}const s=()=>{},a=new i;class u extends r{constructor(e){var t,n,r,i;if(super(),Object.defineProperty(this,"_carryoverConcurrencyCount",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isIntervalIgnored",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_intervalCount",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_intervalCap",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_interval",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_intervalEnd",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_intervalId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_timeoutId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_queue",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_queueClass",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pendingCount",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_concurrency",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isPaused",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_resolveEmpty",{enumerable:!0,configurable:!0,writable:!0,value:s}),Object.defineProperty(this,"_resolveIdle",{enumerable:!0,configurable:!0,writable:!0,value:s}),Object.defineProperty(this,"_timeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_throwOnTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),!("number"==typeof(e={carryoverConcurrencyCount:!1,intervalCap:Number.POSITIVE_INFINITY,interval:0,concurrency:Number.POSITIVE_INFINITY,autoStart:!0,queueClass:o,...e}).intervalCap&&e.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${null!==(n=null===(t=e.intervalCap)||void 0===t?void 0:t.toString())&&void 0!==n?n:""}\` (${typeof e.intervalCap})`);if(void 0===e.interval||!(Number.isFinite(e.interval)&&e.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${null!==(i=null===(r=e.interval)||void 0===r?void 0:r.toString())&&void 0!==i?i:""}\` (${typeof e.interval})`);this._carryoverConcurrencyCount=e.carryoverConcurrencyCount,this._isIntervalIgnored=e.intervalCap===Number.POSITIVE_INFINITY||0===e.interval,this._intervalCap=e.intervalCap,this._interval=e.interval,this._queue=new e.queueClass,this._queueClass=e.queueClass,this.concurrency=e.concurrency,this._timeout=e.timeout,this._throwOnTimeout=!0===e.throwOnTimeout,this._isPaused=!1===e.autoStart}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount<this._intervalCap}get _doesConcurrentAllowAnother(){return this._pendingCount<this._concurrency}_next(){this._pendingCount--,this._tryToStartAnother(),this.emit("next")}_resolvePromises(){this._resolveEmpty(),this._resolveEmpty=s,0===this._pendingCount&&(this._resolveIdle(),this._resolveIdle=s,this.emit("idle"))}_onResumeInterval(){this._onInterval(),this._initializeIntervalIfNeeded(),this._timeoutId=void 0}_isIntervalPaused(){const e=Date.now();if(void 0===this._intervalId){const t=this._intervalEnd-e;if(!(t<0))return void 0===this._timeoutId&&(this._timeoutId=setTimeout((()=>{this._onResumeInterval()}),t)),!0;this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0}return!1}_tryToStartAnother(){if(0===this._queue.size)return this._intervalId&&clearInterval(this._intervalId),this._intervalId=void 0,this._resolvePromises(),!1;if(!this._isPaused){const e=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){const t=this._queue.dequeue();return!!t&&(this.emit("active"),t(),e&&this._initializeIntervalIfNeeded(),!0)}}return!1}_initializeIntervalIfNeeded(){this._isIntervalIgnored||void 0!==this._intervalId||(this._intervalId=setInterval((()=>{this._onInterval()}),this._interval),this._intervalEnd=Date.now()+this._interval)}_onInterval(){0===this._intervalCount&&0===this._pendingCount&&this._intervalId&&(clearInterval(this._intervalId),this._intervalId=void 0),this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0,this._processQueue()}_processQueue(){for(;this._tryToStartAnother(););}get concurrency(){return this._concurrency}set concurrency(e){if(!("number"==typeof e&&e>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);this._concurrency=e,this._processQueue()}async add(e,t={}){return new Promise(((n,r)=>{this._queue.enqueue((async()=>{this._pendingCount++,this._intervalCount++;try{const i=void 0===this._timeout&&void 0===t.timeout?e():function(e,t,n,r){let i;const o=new Promise(((o,s)=>{if("number"!=typeof t||t<0)throw new TypeError("Expected `milliseconds` to be a positive number");t!==Number.POSITIVE_INFINITY?(r={customTimers:{setTimeout,clearTimeout},...r},i=r.customTimers.setTimeout.call(void 0,(()=>{try{o(n())}catch(e){s(e)}}),t),(async()=>{try{o(await e)}catch(e){s(e)}finally{r.customTimers.clearTimeout.call(void 0,i)}})()):o(e)}));return o.clear=()=>{clearTimeout(i),i=void 0},o}(Promise.resolve(e()),void 0===t.timeout?this._timeout:t.timeout,(()=>{(void 0===t.throwOnTimeout?this._throwOnTimeout:t.throwOnTimeout)&&r(a)})),o=await i;n(o),this.emit("completed",o)}catch(e){r(e),this.emit("error",e)}this._next()}),t),this._tryToStartAnother(),this.emit("add")}))}async addAll(e,t){return Promise.all(e.map((async e=>this.add(e,t))))}start(){return this._isPaused?(this._isPaused=!1,this._processQueue(),this):this}pause(){this._isPaused=!0}clear(){this._queue=new this._queueClass}async onEmpty(){if(0!==this._queue.size)return new Promise((e=>{const t=this._resolveEmpty;this._resolveEmpty=()=>{t(),e()}}))}async onSizeLessThan(e){if(!(this._queue.size<e))return new Promise((t=>{const n=()=>{this._queue.size<e&&(this.removeListener("next",n),t())};this.on("next",n)}))}async onIdle(){if(0!==this._pendingCount||0!==this._queue.size)return new Promise((e=>{const t=this._resolveIdle;this._resolveIdle=()=>{t(),e()}}))}get size(){return this._queue.size}sizeBy(e){return this._queue.filter(e).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){return this._timeout}set timeout(e){this._timeout=e}}},30705:(e,t,n)=>{"use strict";function r(e){return{}.toString.call(e).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function i(e,t,n,r){let o,s,a,u,c=null,l=-1;if(n){if(0===r)return null;-1!==r&&(l=r-1)}if(null==e||null==t||!Array.isArray(t)||t.length<1)c=null;else if(Array.isArray(e)){for(c=[],o=0;o<e.length;o++)s=t.slice(0),a=i(e[o],s,n,l-1),null!==a&&c.push(a);0===c.length&&(c=null)}else if("object"==typeof e)if(u=t[0],!e.hasOwnProperty(u)&&n){const r=Object.keys(e);for(c=[],o=0;o<r.length;o++){const s=e[r[o]];if(null!=s)if(Array.isArray(s))s.forEach((function(e){const r=i(e,t,n,l);null!==r&&c.push(r)}));else if("Object"===s.constructor.name){const e=i(s,t,n,l);null!==e&&c.push(e)}}0===c.length?c=null:1===c.length&&(c=c[0])}else c=t.length<2?e[u]:i(e[u],t.slice(1),n,l);return c}function o(e,t,n){let r;return r=void 0!==e?e:void 0!==t?t:n,r}function s(e,t){const n={};return e=e||{},n.negator=o(e._not,t.negator,!1),n.joinAnd="OR"!==o(e._join,t.join,"AND"),n.text=o(e._text,t.text,!1),n.word=o(e._word,t.word,!1),n.regexp=o(e._regexp,t.regexp,!1),n.start=o(e._start,t.start,!1),n.end=o(e._end,t.end,!1),n.separator=e._separator||t.separator||".",n.propertySearch=o(e._propertySearch,t.propertySearch,!1),n.propertySearchDepth=o(e._propertySearchDepth,t.propertySearchDepth,-1),n}n.r(t),n.d(t,{matchArray:()=>f,matchObject:()=>d,resetDefaults:()=>c,setDefaults:()=>u,singleMatch:()=>l});let a={};function u(e){for(const t in e)a[t]=e[t]}function c(){a={}}function l(e,t,n,i,o,s,a){let u,c,f,d,h,p=!1;if(u=typeof e,null===e)p=null===t;else if(void 0===e)p=void 0===t;else if("boolean"===u)p=t===e;else if("number"===u||e instanceof Date)null!=t&&"object"===r(t)?void 0!==t.from||void 0!==t.to||void 0!==t.gte||void 0!==t.lte?(d=t.from||t.gte,h=t.to||t.lte,p=(void 0===t.from&&void 0===t.gte||e>=d)&&(void 0===t.to&&void 0===t.lte||e<=h)):void 0===t.gt&&void 0===t.lt||(p=(void 0===t.gt||e>t.gt)&&(void 0===t.lt||e<t.lt)):p=e instanceof Date&&t instanceof Date?e.getTime()===t.getTime():e===t;else if("string"===u)"string"==typeof t&&(t=t.toLowerCase()),e=e.toLowerCase(),n?p=-1!==e.indexOf(t):o?(c=(g=(y=t).match(/(\/?)(.+)\1([a-z]*)/i))[3]&&!/^(?!.*?(.).*?\1)[gmixXsuUAJ]+$/.test(g[3])?RegExp(y):new RegExp(g[2],g[3]),p=e&&null!==e.match(c)):i?(c=new RegExp("(\\s|^)"+t+"(?=\\s|$)","i"),p=e&&null!==e.match(c)):s?(c=new RegExp("^"+t,"i"),p=e&&null!==e.match(c)):a?(c=new RegExp(t+"$","i"),p=e&&null!==e.match(c)):null!=t&&"object"===r(t)?void 0!==t.from||void 0!==t.to||void 0!==t.gte||void 0!==t.lte?(d=t.from||t.gte,h=t.to||t.lte,p=(void 0===t.from&&void 0===t.gte||e>=d)&&(void 0===t.to&&void 0===t.lte||e<=h)):void 0===t.gt&&void 0===t.lt||(p=(void 0===t.gt||e>t.gt)&&(void 0===t.lt||e<t.lt)):p=t===e;else if(void 0!==e.length)for(f=0;f<e.length&&(p=l(e[f],t,n,i,o,s,a),!p);f++);else"object"===u&&(p=void 0!==e[t]);var y,g;return p}function f(e,t){let n,r=!1,i=[],o=s(t,a);if(e&&e.length>0)for(n=0;n<e.length;n++)r=h(e[n],t,o),r&&i.push(e[n]);return i}function d(e,t){return h(e,t,s(t,a))}function h(e,t,n){let r,o,s,a,u,c;if(t=t||{},s=!!n.joinAnd,t.terms)for(o=0;o<t.terms.length;o++){if(a=d(e,t.terms[o]),n.negator&&(a=!a),n.joinAnd&&!a){s=!1;break}if(!n.joinAnd&&a){s=!0;break}}else for(r in t)if(t.hasOwnProperty(r)&&0!==r.indexOf("_")){for(c=r.split(n.separator),u=[].concat(t[r]),o=0;o<u.length&&(a=l(i(e,c,n.propertySearch,n.propertySearchDepth),u[o],n.text,n.word,n.regexp,n.start,n.end),!a);o++);if(n.negator&&(a=!a),n.joinAnd&&!a){s=!1;break}if(!n.joinAnd&&a){s=!0;break}}return s}},50586:(e,t,n)=>{var r=n(36589),i=n(22708),o=i;o.v1=r,o.v4=i,e.exports=o},98726:e=>{for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);e.exports=function(e,n){var r=n||0,i=t;return i[e[r++]]+i[e[r++]]+i[e[r++]]+i[e[r++]]+"-"+i[e[r++]]+i[e[r++]]+"-"+i[e[r++]]+i[e[r++]]+"-"+i[e[r++]]+i[e[r++]]+"-"+i[e[r++]]+i[e[r++]]+i[e[r++]]+i[e[r++]]+i[e[r++]]+i[e[r++]]}},76338:(e,t,n)=>{var r,i=n.g.crypto||n.g.msCrypto;if(i&&i.getRandomValues){var o=new Uint8Array(16);r=function(){return i.getRandomValues(o),o}}if(!r){var s=new Array(16);r=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),s[t]=e>>>((3&t)<<3)&255;return s}}e.exports=r},36589:(e,t,n)=>{var r=n(76338),i=n(98726),o=r(),s=[1|o[0],o[1],o[2],o[3],o[4],o[5]],a=16383&(o[6]<<8|o[7]),u=0,c=0;e.exports=function(e,t,n){var r=t&&n||0,o=t||[],l=void 0!==(e=e||{}).clockseq?e.clockseq:a,f=void 0!==e.msecs?e.msecs:(new Date).getTime(),d=void 0!==e.nsecs?e.nsecs:c+1,h=f-u+(d-c)/1e4;if(h<0&&void 0===e.clockseq&&(l=l+1&16383),(h<0||f>u)&&void 0===e.nsecs&&(d=0),d>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=f,c=d,a=l;var p=(1e4*(268435455&(f+=122192928e5))+d)%4294967296;o[r++]=p>>>24&255,o[r++]=p>>>16&255,o[r++]=p>>>8&255,o[r++]=255&p;var y=f/4294967296*1e4&268435455;o[r++]=y>>>8&255,o[r++]=255&y,o[r++]=y>>>24&15|16,o[r++]=y>>>16&255,o[r++]=l>>>8|128,o[r++]=255&l;for(var g=e.node||s,m=0;m<6;++m)o[r+m]=g[m];return t||i(o)}},22708:(e,t,n)=>{var r=n(76338),i=n(98726);e.exports=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"==e?new Array(16):null,e=null);var s=(e=e||{}).random||(e.rng||r)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var a=0;a<16;++a)t[o+a]=s[a];return t||i(s)}},14561:e=>{class t{constructor(e){this.value=e,this.next=void 0}}class n{constructor(){this.clear()}enqueue(e){const n=new t(e);this._head?(this._tail.next=n,this._tail=n):(this._head=n,this._tail=n),this._size++}dequeue(){const e=this._head;if(e)return this._head=this._head.next,this._size--,e.value}clear(){this._head=void 0,this._tail=void 0,this._size=0}get size(){return this._size}*[Symbol.iterator](){let e=this._head;for(;e;)yield e.value,e=e.next}}e.exports=n},34361:function(e,t,n){"use strict";var r,i,o,s,a,u,c,l,f,d,h,p,y,g=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},m=this&&this.__classPrivateFieldGet||function(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)},v=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FinsembleDesktopAgent=void 0;const w=n(98832),_=v(n(72551)),b=n(6192),S=n(81298),C=n(81298),E=v(n(60306));class I{constructor(e){r.set(this,void 0),i.set(this,void 0),g(this,r,e,"f")}start(e){const t={type:"heartbeat",meta:{uuid:e}};m(this,r,"f").transmit(S.HEARTBEAT_CHANNEL,t),g(this,i,setInterval((()=>{m(this,r,"f").transmit(S.HEARTBEAT_CHANNEL,t)}),S.HEARTBEAT_INTERVAL),"f")}stop(){clearInterval(m(this,i,"f")),g(this,i,void 0,"f")}}r=new WeakMap,i=new WeakMap;class O{constructor(e,t,n="app"){o.set(this,void 0),g(this,o,e,"f"),this.id=t,this.type=n}broadcast(e){m(this,o,"f").channelBroadcast(this.id,e)}getCurrentContext(e){return m(this,o,"f").channelGetCurrentContext(this.id,e)}addContextListener(e,t){return m(this,o,"f").channelAddContextListener(this.id,e,t)}}o=new WeakMap,t.FinsembleDesktopAgent=class{constructor({routerClient:e,startup:t}){s.set(this,!1),a.set(this,void 0),u.set(this,!1),c.set(this,""),l.set(this,`FSBL.FDC3.Client.${Date.now()}_${Math.random()}`),f.set(this,{}),d.set(this,{}),h.set(this,[]),p.set(this,void 0),y.set(this,void 0),g(this,p,e,"f"),g(this,a,new I(e),"f"),g(this,y,t,"f");const n=()=>!0===b.Globals?.FSBL?.Clients?.WindowClient?.options?.customData?.interop?.autoConnect;if(b.Globals?.FSBL?.addEventListener?b.Globals?.FSBL.addEventListener("onReady",(()=>{n()&&this.connectWhenFSBLIsReady()})):window.addEventListener("FSBLReady",(()=>{n()&&this.connectWhenFSBLIsReady()})),window.Event){const e=new Event("fdc3Ready");window&&window.dispatchEvent(e)}}meta(){return{uuid:m(this,c,"f"),href:window.document?document.location.href:""}}triggerContextListeners(e){const{context:t}=e.payload;(m(this,d,"f")[t?.type]??[]).concat(m(this,d,"f")["*"]??[]).forEach((({handler:n,channel:r})=>{e.meta.channel!==r&&(e.meta.channel||r)||n(t)}))}triggerIntentListeners(e){const{intent:t,context:n}=e.payload,r=m(this,f,"f")[t];n&&(r||[]).forEach((e=>e(n)))}handleIncoming(e){switch(_.default.log("FDC3 Client: handleIncoming",e.type,e),e.type){case"broadcast":this.triggerContextListeners(e);break;case"intent":this.triggerIntentListeners(e)}}releaseQueue(){const e=e=>(void 0!==e?.meta?.uuid&&(e.meta.uuid=m(this,c,"f")),e);m(this,h,"f").forEach((async t=>{const{message:n,handler:r,resolve:i}=t,{err:o,response:s}=await m(this,p,"f").query(S.SERVER_CHANNEL,e(n),r);i({err:o,receiveMessage:s?.data})})),g(this,h,[],"f")}async connectWhenFSBLIsReady(){m(this,u,"f")||(g(this,u,!0,"f"),await m(this,y,"f").onReady(),this.connect())}exchange(e,t=(()=>{})){return new Promise((async n=>{if(m(this,s,"f")){const{err:r,response:i}=await m(this,p,"f").query(S.SERVER_CHANNEL,e,t);n({err:r,receiveMessage:i?.data})}else m(this,h,"f").push({message:e,handler:t,resolve:n}),this.connectWhenFSBLIsReady()}))}async connect(){const e=m(this,y,"f").getStartupData(),{windowName:t="Unknown window",authenticationToken:n}=e;_.default.log(`fdc3.connect StartupData for ${t}`,e),g(this,c,t,"f");const r={type:"register",meta:this.meta(),payload:{clientChannel:m(this,l,"f"),windowName:t,authenticationToken:n}};m(this,p,"f").query(S.SERVER_CHANNEL,r,(e=>{e?_.default.error("connect error",e):(m(this,p,"f").addResponder(m(this,l,"f"),((e,t)=>{if(e||!t){const t=C.errorAsString(e??"No request received on responder");_.default.error(`FinsembleDesktopAgent can't listen on channel ${m(this,l,"f")} : ${t}`)}else t.data&&this.handleIncoming(t.data),t.sendQueryResponse(null)})),g(this,s,!0,"f"),this.releaseQueue())})),m(this,a,"f").start(m(this,c,"f"))}stop(){m(this,a,"f").stop();const e={type:"unregister",meta:this.meta()};this.exchange(e,(()=>{m(this,p,"f").removeResponder(m(this,l,"f")),g(this,s,!1,"f")}))}async getCurrentContext(e){const t={type:"currentContextRequest",meta:this.meta(),payload:{contextType:e}},{err:n,receiveMessage:r}=await this.exchange(t);return n?null:"currentContext"===r?.type&&r.payload.context?r.payload.context:null}async channelGetCurrentContext(e,t){const n={type:"currentContextRequest",meta:{...this.meta(),channel:e},payload:{contextType:t}},{err:r,receiveMessage:i}=await this.exchange(n);return r?null:"currentContext"===i?.type?i.payload.context:null}broadcast(e){const t={type:"broadcast",meta:this.meta(),payload:{context:e}};this.exchange(t)}channelBroadcast(e,t){const n={type:"broadcast",meta:{...this.meta(),channel:e},payload:{context:t}};this.exchange(n)}async getSystemChannels(){const e={type:"systemChannelRequest",meta:this.meta()},{err:t,receiveMessage:n}=await this.exchange(e);return t?[]:("systemChannels"===n?.type?n?.payload?.channels:[]).map((e=>new O(this,e,"system")))}async open(e,t){const n={type:"open",meta:this.meta(),payload:{target:e,context:t}},{err:r,receiveMessage:i}=await this.exchange(n),o=i;if(r)throw w.OpenError.ResolverUnavailable;if(o.payload.error)throw o.payload.error}async findIntent(e,t){const n={type:"findIntent",meta:this.meta(),payload:{intent:e,context:t}},{err:r,receiveMessage:i}=await this.exchange(n),o=i;if(r)throw w.ResolveError.ResolverUnavailable;if(o.payload.error)throw o.payload.error;if(!o.payload.appIntent)throw"Invalid response returned from InteropService for findIntent. No appIntent and no error.";return o.payload.appIntent}async findIntentsByContext(e){const t={type:"findIntentsByContext",meta:this.meta(),payload:{context:e}},{receiveMessage:n}=await this.exchange(t),r=n;if(r.payload.error)throw r.payload.error;return r.payload.intents||[]}async raiseIntent(e,t,n){const r={type:"raiseIntent",meta:this.meta(),payload:{intent:e,context:t,target:n}},{err:i,receiveMessage:o}=await this.exchange(r),s=o;if(i)throw w.ResolveError.ResolverUnavailable;if(s.payload.error)throw s.payload.error;if(!s.payload.data)throw"Invalid response returned from InteropService for raiseIntent. No data.";return s.payload.data}async raiseIntentForContext(e,t){const n={type:"raiseIntent",meta:this.meta(),payload:{context:e,target:t}},{err:r,receiveMessage:i}=await this.exchange(n),o=i;if(r)throw w.ResolveError.ResolverUnavailable;if(o.payload.error)throw o.payload.error;if(!o.payload.data)throw"Invalid response returned from InteropService for raiseIntentForContext. No data.";return o.payload.data}addIntentListener(e,t){m(this,f,"f")[e]=C.mmAdd(m(this,f,"f"),e,t);const n={type:"subscribeIntent",meta:this.meta(),payload:{intent:e}};return this.exchange(n),{unsubscribe:()=>{const n={type:"unsubscribeIntent",meta:this.meta(),payload:{intent:e}};this.exchange(n),m(this,f,"f")[e]=C.mmRemove(m(this,f,"f"),e,t)}}}channelAddContextListener(e,t,n){const r=n?t:"*";n||(n=t);const i={handler:n,channel:e};m(this,d,"f")[r]=C.mmAdd(m(this,f,"f"),r,i);let o={type:"subscribeContext",meta:this.meta(),payload:{contextType:r}};return e&&(o.meta.channel=e),this.exchange(o),{unsubscribe:()=>{let t={type:"unsubscribeContext",meta:this.meta(),payload:{contextType:r}};e&&(t.meta.channel=e),m(this,d,"f")[r]=C.mmRemove(m(this,f,"f"),r,i),this.exchange(t)}}}addContextListener(e,t){return this.channelAddContextListener(null,e,t)}async joinChannel(e){const t={type:"joinChannels",meta:this.meta(),payload:{channels:[e]}};await this.exchange(t)}async getOrCreateChannel(e){return new O(this,e)}async getCurrentChannels(){const e={type:"getCurrentChannels",meta:this.meta()},{err:t,receiveMessage:n}=await this.exchange(e),r=n;if(t)throw t;if(r.payload.error)throw r.payload.error;if(!r.payload.data)throw"Invalid response returned from InteropService for getCurrentChannels. No data.";return r.payload.data.map((e=>new O(this,e.channel,"system")))}async getCurrentChannel(){const e=await this.getCurrentChannels();return e&&e.length?e[0]:null}async leaveCurrentChannel(){const e={type:"leaveChannels",meta:this.meta(),payload:{}};await this.exchange(e)}getInfo(){return{fdc3Version:"1.2",provider:"Finsemble",providerVersion:E.default.version}}},s=new WeakMap,a=new WeakMap,u=new WeakMap,c=new WeakMap,l=new WeakMap,f=new WeakMap,d=new WeakMap,h=new WeakMap,p=new WeakMap,y=new WeakMap},81298:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousAuthenticationToken=t.HEARTBEAT_INTERVAL=t.HEARTBEAT_CHANNEL=t.INTENT_RESOLVER_CHANNEL=t.SERVER_CHANNEL=t.GLOBAL_CHANNEL=t.errorAsString=t.mmRemove=t.concatNoDups=t.mmAdd=void 0,t.mmAdd=function(e,t,n){return(e[t]||[]).concat([n])},t.concatNoDups=function(e,t){const n=Array.isArray(t)?t:[t],r=e?n.concat(e):n;return Array.from(new Set(r))},t.mmRemove=function(e,t,n){return(e[t]||[]).filter((e=>e===n))},t.errorAsString=function(e){return e?.message??e??null},t.GLOBAL_CHANNEL="global",t.SERVER_CHANNEL="FSBL.FDC3.Interop.Server",t.INTENT_RESOLVER_CHANNEL="FSBL.FDC3.intent.resolver",t.HEARTBEAT_CHANNEL="FSBL.FDC3.Interop.Server",t.HEARTBEAT_INTERVAL=4e3,t.AnonymousAuthenticationToken={authenticationKeyType:"unauthenticated",meta:{name:"Anonymous app"}}},10589:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FSBLService=void 0;const i=r(n(39319)),o=n(67580),s=n(51742),a=n(16925),u=n(50586),c=n(6192),l=n(34361);t.FSBLService=class{async startApp(){await s.System.ready();const e=await o.getSystemStartupData(),t=s.System.Window.getCurrent(),n=t.name??document?.location?.href??"Unknown App",r=t.name??document?.location?.href??`Unknown window-${u.v4()}`,f=o.getManifestFromStartupData(e)??{},d=o.getRouterConfig({windowName:r,systemManifest:f});await i.default.start(d);const h=a.Startup.getInstance();h.setStartupData({windowName:r,authenticationToken:{authenticationKeyType:"unauthenticated",meta:{name:n}}}),c.Globals.fdc3=new l.FinsembleDesktopAgent({routerClient:i.default,startup:h}),h.ready()}async stopApp(){i.default.stop()}}},67580:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getManifestFromStartupData=t.getSystemStartupData=t.getRouterConfig=t.getRecommendedTransport=void 0;const i=r(n(72551)),o=n(51742),s=n(33998),a={sameDomainTransport:"FinsembleTransport",crossDomainTransport:"FinsembleTransport",transportSettings:{FinsembleTransport:{serverAddress:"ws://127.0.0.1:3376"}},transportName:"FinsembleTransport"},u=e=>{if(!e)return i.default.error("No documentRoot provided to RouterConfig.isCrossDomain(). Check the moduleRoot entry of the manifest."),!0;const t=document.createElement("a");t.href=e;const n=window.location.hostname===t.hostname,r=window.location.protocol===t.protocol,o=(void 0!==window.location.port?window.location.port:80)===(void 0!==t.port?t.port:80),s=n&&o&&r;return i.default.system.debug(`Transport crossDomain=${u} (${n}:${r}:${o})`),!s};t.getRecommendedTransport=e=>{const{moduleRoot:t,router:n}=e?.finsemble,{sameDomainTransport:r="SharedWorker",crossDomainTransport:o="IPCBus"}=n??{},s=u(t)?o:r;return i.default.system.log(`Transport Info: Selected=${s} SameDomainDefault=${r} CrossDomainDefault=${o}`),console.log(`Transport Info: Selected=${s} SameDomainDefault=${r} CrossDomainDefault=${o}`),s},t.getRouterConfig=({windowName:e,systemManifest:n,transportSettings:r})=>n?((e,n)=>{if(i.default.system.info("WINDOW LIFECYCLE:STARTUP:RouterClient:routerConfigFromManifest"),e&&"string"!=typeof e){const r=e.finsemble,i=r?.router?.transportSettings??r?.IAC??{},o=r?.notificationURL??`${r.moduleRoot}/components/system/notification/notification.html`;return{windowName:n,routerDomainRoot:r.moduleRoot,transportName:t.getRecommendedTransport(e),transportSettings:i,notificationURL:o}}return i.default.system.error("WINDOW LIFECYCLE:STARTUP:RouterClient:routerConfigFromManifest failed -- fatal error. No manifest found.",e),{...a,windowName:n}})(n,e):{...a,windowName:e,transportSettings:r??{}},t.getSystemStartupData=async()=>new Promise((e=>{o.System.Window.getCurrent().getOptions((t=>{e(t)}))})),t.getManifestFromStartupData=e=>{let t=e?.manifest;return t?.finsemble&&s.ConfigUtilInstance.resolveConfigVariables(t.finsemble,t.finsemble),t}},16925:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Startup=void 0;const r=n(81298),i=n(6192),o=n(50586),s=n(4971);class a{constructor(){this.isReady=!1,this.onReadyListeners=[],this.currentStartupData={authenticationToken:r.AnonymousAuthenticationToken,windowName:`Unknown window-${o.v4()}`}}static getInstance(){return a.instance?a.instance:a.instance=s.singleton("Startup",a)}getStartupData(){return this.currentStartupData}setStartupData(e){this.currentStartupData=e}onReady(e){return new Promise((t=>{this.isReady?(e&&setTimeout(e,0),t()):this.onReadyListeners.push((()=>{e&&e(),t()}))}))}ready(){this.isReady=!0,this.onReadyListeners.forEach((e=>{e()})),i.Globals.dispatchEvent&&i.Globals.dispatchEvent(new Event("FSBLReady"))}}t.Startup=a,a.instance=null},72669:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t._BaseClient=void 0;const i=r(n(39319)),o=r(n(72551)),s=n(51742),a=n(13854);t._BaseClient=class{constructor(e){this.status="offline",this.startupTime=0,this.initialized=!1,this.startupDependencies={services:[],clients:[]},this.finsembleWindow=null,this.windowName="",this.clientReadyQueue=[],this.processClientReadyQueue=()=>{for(const e of this.clientReadyQueue)e();this.clientReadyQueue=[]},this.onReady=e=>{this.clientReadyQueue.push(e),"online"===this.status&&this.processClientReadyQueue()},this.setClientOnline=()=>{this.status="online";const e=`STARTUP:CLIENT ONLINE:${this.finWindow?.name}:${this.name}`;this.startupTime=window.performance.now()-this.startupTime;const t=()=>{this.logger.system.debug(e),this.processClientReadyQueue(),a.FSBLDependencyManagerSingleton.setClientOnline(this.name)};this._onReady?this._onReady(t):t()},this.initialize=(e=Function.prototype)=>{this.initialized||(this.initialized=!0,this.startupTime=performance.now(),this.finWindow=s.System.Window.getCurrent(),this.windowName=this.finWindow.name,this.logger.system.debug("Baseclient Init Router Ready",this.name),a.FSBLDependencyManagerSingleton.startup.waitFor(this.startupDependencies,(()=>{e(),this.setClientOnline()})))},this.onClose=e=>{e&&e()},this.name=e.name,this._onReady=e.onReady,this.startupDependencies=e.startupDependencies||{services:[],clients:[]},this.logger=o.default,this.routerClient=i.default}}},70010:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(57664),o=r(n(13712)),s=n(72669),a=r(n(5020)),u=r(n(72551));class c extends s._BaseClient{constructor(e){super(e),this.listeners=[],this.changeSub=e=>{this.subs||(this.subs={}),this.subs[e]||(this.routerClient.query("configService.addListener",e,(t=>{t&&u.default.system.error("Error adding listener to config service",t),this.routerClient.subscribe(e,this.handleChanges)})),this.subs[e]=!0)},this.handleChanges=(e,t)=>{e&&u.default.system.error(e),t.data.field||(t.data.field=null);const n=t.data.storeData?t.data.storeData:t.data.value;this.triggerListeners(t.data.field?t.data.field:"configService",n)},this.triggerListeners=(e,t)=>{if(this.listeners[e])for(let n=0;n<this.listeners[e].length;n++)"function"==typeof this.listeners[e][n]?this.listeners[e][n](null,{field:e,value:t}):u.default.system.warn("ConfigClient:triggerListeners: listener is not a function",e)},this.set=(e,t)=>{u.default.system.debug("ConfigClient.Set",e),"function"==typeof e?(t=e,o.default.args(t,"function"),e={}):o.default.args(e,"object",t,"function"),this.routerClient.query("config.set",e,((e,n)=>{t(e,n?n.data:null)}))},this.processAndSet=this.processAndSet.bind(this),this.getValue=this.getValue.bind(this),this.getValues=this.getValues.bind(this),this.setValue=this.setValue.bind(this),this.setValues=this.setValues.bind(this),this.removeValue=this.removeValue.bind(this),this.removeValues=this.removeValues.bind(this),this.addListener=this.addListener.bind(this),this.addListeners=this.addListeners.bind(this),this.removeListener=this.removeListener.bind(this),this.removeListeners=this.removeListeners.bind(this),this.setPreference=this.setPreference.bind(this),this.getPreferences=this.getPreferences.bind(this),this.unsetPreference=this.unsetPreference.bind(this)}getValue(e,t=Function.prototype){return"string"==typeof e&&(e={field:e}),new Promise(((n,r)=>{if(!e.field){const e="no field provided";return r(e),t(e)}this.routerClient.query("configService.getValue",{field:e.field},((e,i)=>e?(r(e),t(e)):(n({err:e,data:i.data}),t(e,i.data))))}))}getValues(e,t=Function.prototype){return"function"==typeof e&&(t=e,e=null),e&&!Array.isArray(e)?this.getValue(e,t):new Promise((n=>{this.routerClient.query("configService.getValues",{fields:e},((e,r)=>e?t(e):(n({err:e,data:r.data}),t(e,r.data))))}))}setValue(e,t){const n={field:e.field,value:e.value};return this.routerClient.query("configService.setValue",n,(e=>t?t(e):null))}setValues(e,t){return e?Array.isArray(e)?this.routerClient.query("configService.setValues",e,(e=>t?t(e):null)):u.default.system.error("ConfigClient.SetValues. Params must be an array"):u.default.system.error("ConfigClient.SetValues. No params given")}removeValue(e,t=Function.prototype){if(void 0!==e){if(e.field||"string"!=typeof e)return t("no field provided");e={field:e}}return e.value=null,this.setValue(e,t)}removeValues(e,t=Function.prototype){if(!Array.isArray(e))return t("The passed in parameter needs to be an array");i.map(e,this.removeValue,((e,n)=>t(e,n)))}addListener(e,t,n){let r=null;"function"==typeof e&&(t=e,e={field:r}),({field:r}=e);const i="configService"+(r?`.${r}`:"");return this.listeners[i]?this.listeners[i].push(t):this.listeners[i]=[t],this.changeSub(i),n?n():null}addListeners(e,t,n){if(!Array.isArray(e))return this.addListener({field:e.field},t,n);for(let n=0;n<e.length;n++){let i=null;const o=e[n];var r;"string"==typeof o?i=o:o.field&&(({field:i}=o),r=o.listener);const s="configService"+(i?`.${i}`:"");r||t&&"function"==typeof t&&(r=t),this.listeners[s]?this.listeners[s].push(r):this.listeners[s]=[r],this.changeSub(s)}return n?n():null}removeListener(e,t,n){let r=null;"function"==typeof e&&(n=t,t=e,e={field:r}),({field:r}=e);const i=this.name+(r?`.${r}`:"");if(this.listeners[i])for(let e=0;e<this.listeners[i].length;e++)if(this.listeners[i][e]===t)return this.listeners[i].pop(e),n?n(null,!0):null;return n?n(null,!1):null}removeListeners(e,t,n){if(!Array.isArray(e))return"function"==typeof e?this.removeListener({},e,n):e.field&&this.removeListener(e,t,n),n?.("missing fields");let r=0;for(let n=0;n<e.length;n++){let o=null;const s=e[n];var i;"string"==typeof s?o=s:s.field&&(({field:o}=s),i=e[n].listener);const a="configService"+(o?`.${o}`:"");if(!i){if(!t||"function"!=typeof t)continue;i=t}for(let e=0;e<this.listeners[a].length;e++)this.listeners[a][e]===i&&(this.listeners[a].pop(n),r++)}return r<e.length?n?.("All listeners could not be found",!1):n?n(null,!0):null}get(e,t){u.default.system.debug("ConfigClient.Get",e),u.default.system.deprecated("This functionality has been deprecated. It will be removed in a future Finsemble release. Use getValue instead.",e),1===arguments.length?(t=e,o.default.args(t,"function"),e={}):o.default.args(e,"object",t,"function"),this.routerClient.query("config.get",e,((e,n)=>{t(e,n?n.data:null)}))}processAndSet(e,t){if(u.default.system.debug("ConfigClient.processAndSet",e),o.default.args(e,"object",t,"function=")&&o.default.args2("params.newConfig",e.newConfig,"object","params.overwrite",e.overwrite,"boolean=","params.replace",e.replace,"boolean="),!e.overwrite&&e.replace){const e="cannot use replace option unless overwrite is also true";u.default.system.warn("ConfigClient.processAndSet:",e),t&&t(e,null)}else this.routerClient.query("config.processAndSet",e,((e,n)=>{t&&t(e,n?n.data:null)}))}setPreference(e,t){this.routerClient.query("PreferencesService.setPreference",e,((e,n)=>{t&&t(e,n?n.data:null)}))}async getPreferences(e){await a.default.waitForStartup("preferencesService"),this.routerClient.query("PreferencesService.getPreferences",{},((t,n)=>{u.default.system.debug("ConfigClient.getPreferences response",n),e&&e(t,n?n.data:null)}))}async unsetPreference(e,t){u.default.system.debug("ConfigClient.unsetPreference",e),this.routerClient.query("PreferencesService.unsetPreference",e,((e,n)=>{t&&t(e,n?n.data:null)}))}}const l=new c({startupDependencies:{services:["configService"]},onReady(e){e&&e()},name:"configClient"});t.default=l},68718:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(5939),o=n(72669),s=r(n(39319)),a=r(n(72551)),u=n(87063).F,c=window,l=new i.EventEmitter;function f(e,t=u){const n=[];return e.keys.forEach((e=>{if("string"!=typeof e)return a.default.system.error("FSBL.Clients.HotkeyClient - one of the keys passed into a function was not a string: ",e);e=e.toLowerCase();const r=t[e];if(!r)return a.default.system.error(`FSBL.Clients.HotkeyClient - At least one of the key codes does not map to a supported key - registering hotkey unsuccessful. Unsupported keys: ${e}`);n.push(r)})),n}const d=function(e){this.cb=e,this.shift=!1,this.ctrl=!1,this.cmd=!1,this.capsLock=!1,this.initialize()};d.prototype.keyup=function(e){switch(e.key){case"Shift":return this.shift=!1,void this.cb({key:e.key,e,keystroke:this});case"Control":case"Alt":return this.ctrl=!1,void this.cb({key:e.key,e,keystroke:this});case"Meta":case"Win":return this.cmd=!1,void this.cb({key:e.key,e,keystroke:this})}this.key&&this.cb({key:this.key,e,keystroke:this})},d.prototype.keydown=function(e){if(!this.noKeyCapture)switch(this.key=e.key,e.key){case"Meta":case"Win":this.cmd=!0;break;case"Shift":this.shift=!0;break;case"Control":case"Alt":this.ctrl=!0;break;case"CapsLock":this.capsLock=!this.capsLock;break;case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"Up":case"Down":case"Left":case"Right":this.key=null,this.cb({key:e.key,e,keystroke:this})}},d.prototype.keypress=function(e){if(this.noKeyCapture)return;const t=e.which;t<32||t>222||(this.key=e.key)},d.prototype.initialize=function(){const e=this;document.addEventListener("keyup",(t=>{e.keyup(t)})),document.addEventListener("keydown",(t=>{e.downValue=t.key,e.keydown(t)})),document.addEventListener("keypress",(t=>{e.keypress(t)})),window.addEventListener("blur",(t=>{e.ctrl=!1,e.cb({key:"Control",e:t,keystroke:e})}))};const h=[];class p extends o._BaseClient{constructor(e){super(e),this.onClose=e=>{this.removeAllHotkeys(e)},this.keyMap=u,this.listenForHotkeys=this.listenForHotkeys.bind(this),this.routerClient=s.default,this.localListeners={}}addLocalHotkey(e,t,n=(()=>{})){a.default.system.info("HotkeyClient.addLocalHotkey"),a.default.system.debug("HotkeyClient.addLocalHotkey, keyArr: ",e);const r=f({keys:e}).sort().toString(),i=()=>{document.hasFocus()&&t()};this.localListeners[r]||(this.localListeners[r]={}),this.localListeners[r][t]=i,l.addListener(r,i),this.routerClient.query("hotkeysService.registerGlobalHotkey",{keys:r,windowName:this.windowName},n)}addBrowserHotkey(e,t){this.KeyStroke||(this.KeyStroke=new d((e=>{const{key:t,keystroke:n}=e,r=[t];n.ctrl&&r.push("control"),n.shift&&r.push("shift"),n.alt&&r.push("alt"),n.cmd&&r.push("command");const i=r.sort().toString();h.forEach((e=>{const t=e.keyString.toUpperCase(),n=i.toUpperCase();n!==t&&n.replace(/(CONTROL|COMMAND)/,"COMMANDORCONTROL")!==t||e.handler()}))})));const n=f({keys:e}).sort().toString();h.push({keyString:n,handler:t})}removeLocalHotkey(e,t,n=(()=>{})){a.default.system.info("HotkeyClient.removeLocalHotkey"),a.default.system.debug("HotkeyClient.removeLocalHotkey, keyArr: ",e);const r=f({keys:e}).sort().toString(),i=this.localListeners[r][t];l.removeListener(r,i),this.routerClient.query("hotkeysService.unregisterGlobalHotkey",{keys:r,windowName:this.windowName},n)}addGlobalHotkey(e,t,n=(()=>{})){a.default.system.info("HotkeyClient.addGlobalHotkey"),a.default.system.debug("HotkeyClient.addGlobalHotkey, keyArr: ",e);const r=f({keys:e}).sort().join("+");l.addListener(r,t),this.routerClient.query("hotkeysService.registerGlobalHotkey",{keys:r,windowName:this.windowName},n)}removeGlobalHotkey(e,t,n=(()=>{})){a.default.system.info("HotkeyClient.removeGlobalHotkey"),a.default.system.debug("HotkeyClient.removeGlobalHotkey, keyArr: ",e);const r=f({keys:e}).sort().join("+");l.removeListener(r,t),this.routerClient.query("hotkeysService.unregisterGlobalHotkey",{keys:r,windowName:this.windowName},n)}listenForHotkeys(){const e=this;this.routerClient.addListener("HotkeyTriggered",((t,n)=>{t?console.error(`Hotkey Channel Error: ${JSON.stringify(t)}`):n.data.windows.includes(e.windowName)&&l.emit(n.data.keys)}))}removeAllHotkeys(e){l.removeAllListeners(),this.routerClient.query("hotkeysService.removeAllHotkeysForWindow",{windowName:this.windowName},e)}}const y=new p({onReady(e){y.listenForHotkeys(),e&&e()},name:"hotkeyClient"});c.Keystroke=d,t.default=y},9562:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=n(72669),u=s(n(95376)),c=o(n(76420)),l=s(n(13712)),f=n(51742),d=s(n(72551)),h=n(75688),p=window,y={};class g extends a._BaseClient{constructor(e){super(e),l.default.args(e,"object=")&&e&&l.default.args2("params.onReady",e.onReady,"function="),this.windowClient=e.clients.windowClient}getComponentList(e=Function.prototype){return l.default.args(e,"function="),new Promise((t=>{this.routerClient.query("Launcher.componentList",{},((n,r)=>{e(n,r.data),t({err:n,data:r.data})}))}))}getComponentDefaultConfig(e,t=Function.prototype){return l.default.args(t,"function="),new Promise((n=>{this.routerClient.query("Launcher.componentList",{},((r,i)=>{const o=i.data[e];t(r,o),n({err:r,data:o})}))}))}getMonitorInfo(e={},t=Function.prototype){const n=this;return l.default.args(t,"function="),d.default.system.debug("MONITOR: launcherClient.getMonitorInfo"),"all"===e.monitor?n.getMonitorInfoAll(t):new Promise((r=>{c.getMyWindowIdentifier((i=>{e.windowIdentifier||(e.windowIdentifier=i),n.routerClient.query("Launcher.getMonitorInfo",e,((e,n)=>{t&&t(e,n.data),d.default.system.log("MONITOR: launcherClient.getMonitorInfo query response data",n.data),r({err:e,data:n.data})}))}))}))}getMonitorInfoAll(e=Function.prototype){return l.default.args(e,"function="),d.default.system.debug("MONITOR: launcherClient.getMonitorInfoAll"),new Promise(((t,n)=>{this.routerClient.query("Launcher.getMonitorInfoAll",{},((r,i)=>{r&&(n({err:r}),e(r)),t({err:r,data:i.data}),e(r,i.data)}))}))}registerComponent(e,t=Function.prototype){return new Promise((n=>{this.routerClient.query("LauncherService.registerComponent",e,((e,r)=>{t&&t(e,r.data),n({err:e,data:r.data})}))}))}unRegisterComponent(e,t=Function.prototype){return e.componentType?new Promise((n=>{this.routerClient.query("LauncherService.unRegisterComponent",e,((e,r)=>{t&&t(e,r.data),n({err:e,data:r.data})}))})):t("No componentType provided")}locatorToIdentifier(e){let t={};return t.windowName="windowName"in e?e.windowName:"","componentType"in e&&(t.componentType=e.componentType),"uuid"in e&&(t.uuid=e.uuid),t}toggleWindowOnClick(e,t,n){const r=this;let i=this.locatorToIdentifier(t),o=`${i.windowName}:${i.uuid}`;i.windowName||(o=i.componentType),!1!==y[o]?(n.position||(n.position="absolute"),this.showWindow(t,n,(function(t,n){if(!n)return;const{finWindow:i}=n;var s=function(){y[o]=!0,r.windowClient.isMouseOverDOMElement(e,(e=>{y[o]=!e})),i.removeEventListener("blurred",s)};i.addEventListener("blurred",s)}))):y[o]=!0}showWindow(e,t,n=Function.prototype){l.default.args(e,"object",t,"object=",n,"function=");const r=this;return t||(t={}),(t=c.clone(t)).staggerPixels||0===t.staggerPixels||(t.staggerPixels=100),t.windowIdentifier=this.locatorToIdentifier(e),new Promise((e=>{c.getMyWindowIdentifier((i=>{t.relativeWindow||(t.relativeWindow=i),r.routerClient.query("Launcher.showWindow",t,(async(t,r)=>{if(t)return e({err:t}),n(t);const i=r.data.windowIdentifier;r.data.windowIdentifier.name=r.data.windowIdentifier.windowName;const{wrap:o}=await h.FinsembleWindow.getInstance({name:i.windowName});r.data.finWindow=o,e({err:t,data:r.data}),n(t,r.data)}))}))}))}spawn(e,t,n=Function.prototype){const r=this;return l.default.args(e,"string",t,"object=",n,"function="),t||(t={}),(t=c.clone(t)).component=e,t.options||(t.options={}),t.options.customData||(t.options.customData={}),t.staggerPixels||0===t.staggerPixels||(t.staggerPixels=50),d.default.system.debug(`LauncherClient.spawn starting for componentType:${e}`),new Promise((i=>{c.getMyWindowIdentifier((o=>{t.launchingWindow=o,r.callSpawn(t,((t,r)=>{d.default.system.debug(`LauncherClient.spawn completing for componentType:${e}`,t),i({err:t,response:r}),n(t,r)}))}))}))}callSpawn(e,t=Function.prototype){const n=this;return l.default.args(t,"function="),d.default.perf.debug("CallSpawn","start","from spawn to callback",e),new Promise((r=>{function i(e,n){t(e,n),r({err:e,data:n})}n.routerClient.query("Launcher.spawn",e,(async(e,t)=>{if(d.default.system.debug("CallSpawn","Initial launcher callback params",e,t),d.default.perf.debug("CallSpawn","Initial launcher callback",t),e)return i(e,t.data),d.default.system.error("LauncherClient.callSpawn",e);t.data.windowIdentifier.name=t.data.windowIdentifier.windowName;var r=t.data;if(r.windowDescriptor.native)return i(e,r);const o=r.windowIdentifier,{wrap:s}=await h.FinsembleWindow.getInstance({name:o.windowName});r.finWindow=s;const a=`Finsemble.${r.windowIdentifier.windowName}.componentReady`,u=n.routerClient.subscribe(a,((t,o)=>{if(t)return d.default.system.error(t);o&&0===Object.keys(o.data).length||(d.default.perf.debug("CallSpawn","stop"),i(e,r),n.routerClient.unsubscribe(u))}))}))}))}getMonitor(e,t=Function.prototype){return d.default.system.deprecated("This method is deprecated and will be removed in a future release. Method getMonitorInfo should be used instead."),l.default.args(t,"function="),this.getMonitorInfo({windowIdentifier:e},t)}getMyWindowIdentifier(e=Function.prototype){return l.default.args(e,"function="),new Promise((t=>{c.getMyWindowIdentifier((n=>{e(n),t(n)}))}))}getActiveDescriptors(e=Function.prototype){return l.default.args(e,"function="),new Promise((t=>{this.routerClient.query("Launcher.getActiveDescriptors",{},((n,r)=>{n&&d.default.system.error(n),e(n,r.data),t({err:n,data:r.data})}))}))}getActiveAndPendingWindowNames(e=Function.prototype){return new Promise((t=>{this.routerClient.query("Launcher.getActiveAndPendingWindowNames",{},((n,r)=>{n&&d.default.system.error(n),e(n,r.data),t({err:n,data:r.data})}))}))}async getPendingWindows(){const{err:e,response:t}=await this.routerClient.query("Launcher.getPendingWindows",{});return e&&d.default.system.error("Error retrieving pending windows:",e),{err:e,data:t.data}}addUserDefinedComponent(e,t=Function.prototype){return l.default.args(t,"function="),new Promise((n=>{this.routerClient.query("Launcher.userDefinedComponentUpdate",{type:"add",name:e.name,url:e.url},((e,r)=>{t(e,r.data),n({err:e,data:r.data})}))}))}removeUserDefinedComponent(e,t=Function.prototype){return l.default.args(t,"function="),new Promise((n=>{this.routerClient.query("Launcher.userDefinedComponentUpdate",{type:"remove",name:e.name,url:e.url},((e,r)=>{t(e,r.data),n({err:e,data:r.data})}))}))}getComponentsThatCanReceiveDataTypes(e,t=Function.prototype){return l.default.args(t,"function="),new Promise((n=>{if(!e||!e.dataTypes){const e="Invalid params. Expected: {dataTypes: string[]}";return t(e),n({err:e})}Array.isArray(e.dataTypes)||(e.dataTypes=[e.dataTypes]),this.routerClient.query("LauncherService.getComponentsThatCanReceiveDataTypes",e,((e,r)=>{t(e,r.data),n({err:e,data:r.data})}))}))}bringWindowsToFront(e={},t=Function.prototype){return l.default.args(t,"function="),e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),e.groupName&&l.default.args(e.groupName,"string"),e.componentType&&l.default.args(e.componentType,"string"),this.routerClient.query("LauncherService.bringWindowsToFront",e,((e,n)=>{t(e,n)})),Promise.resolve()}hyperFocus(e,t=Function.prototype){return d.default.system.deprecated("hyperFocus is deprecated as of version 4.0.0. This functionality may be removed in a future release"),l.default.args(t,"function="),e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),e.windowList||e.groupName||e.componentType||(e.windowList=[this.myWindowIdentifier]),e.groupName&&l.default.args(e.groupName,"string"),e.componentType&&l.default.args(e.componentType,"string"),this.routerClient.transmit("LauncherService.hyperFocus",e),t(),Promise.resolve()}minimizeWindows(e,t=Function.prototype){return l.default.args(t,"function="),e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),e.groupName&&l.default.args(e.groupName,"string"),e.componentType&&l.default.args(e.componentType,"string"),this.routerClient.transmit("LauncherService.minimizeWindows",e),t(),Promise.resolve()}createWindowGroup(e,t=Function.prototype){return l.default.args(t,"function="),e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList],delete e.groupName),l.default.args(e.groupName,"string"),new Promise((n=>{if(!e.groupName){const e="Invalid Parameters";return n({err:e}),void t(e)}this.routerClient.query("LauncherService.createWindowGroup",e,((e,r)=>{t(e,r),n({err:e,data:r})}))}))}addWindowsToGroup(e,t=Function.prototype){return l.default.args(t,"function="),new Promise((n=>{if(!e.groupName||!e.windowList){const e="Invalid Parameters";return n({err:e}),void t(e)}e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),l.default.args(e.groupName,"string"),this.routerClient.query("LauncherService.addWindowsToGroup",e,((e,r)=>{t(e,r),n({err:e,data:r})}))}))}removeWindowsFromGroup(e,t=Function.prototype){return l.default.args(t,"function="),new Promise((n=>{if(!e.groupName||!e.windowList){const e="Invalid Parameters";return n({err:e}),void t(e)}e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),this.routerClient.query("LauncherService.removeWindowsFromGroup",e,((e,r)=>{t(e,r),n({err:e,data:r})}))}))}getGroupsForWindow(e,t=Function.prototype){return l.default.args(t,"function="),"function"==typeof e&&(t=e,e=null),new Promise((n=>{e&&e.windowIdentifier?this.routerClient.query("LauncherService.getGroupsForWindow",e,((e,r)=>{n({err:e,data:r.data}),t(e,r.data)})):this.windowClient.getComponentState({field:"finsemble:windowGroups"},((e,r)=>{n({err:e,data:r}),t(e,r)}))}))}addToGroups(e,t=Function.prototype){return l.default.args(t,"function="),l.default.args(e.groupNames,"array"),e.windowIdentifier||(e.windowIdentifier=this.myWindowIdentifier),new Promise((n=>{this.routerClient.query("LauncherService.addWindowToGroups",e,((e,r)=>{t(e,r),n({err:e,data:r})}))}))}_createWrap(e,t){this.routerClient.query("LauncherService.createWrap",e,t)}start(e){const t=this;if(void 0!==p.FSBL){function n(){t.routerClient.subscribe(`Finsemble.LauncherService.updateGroups.${t.windowName}`,((e,n)=>{Array.isArray(n.data)&&t.windowClient.setComponentState({field:"finsemble:windowGroups",value:n.data})}))}p.FSBL.addEventListener("onReady",(()=>{t.windowClient.onReady((()=>{t.windowClient.getComponentState({field:"finsemble:windowGroups"},((e,r)=>{if(!e&&r)return t.addToGroups({groupNames:r},n);n()}))}))}))}setInterval((()=>{t.routerClient.transmit("Finsemble.heartbeat",{type:"component",windowName:t.windowName,componentType:"finsemble",isBrowserView:f.System.isBrowserView()})}),1e3),this.getMyWindowIdentifier((n=>{t.myWindowIdentifier=n,e&&e()}))}}let m;function v(e){return(e=e||{}).windowClient||(e.windowClient=u.default),new g({clients:e,onReady(e){d.default.system.debug("launcherClient ready",window.name),d.default.perf.debug("LauncherClientReadyTime","stop"),m.start(e)},name:"launcherClient"})}m=v(),m.constructInstance=v,t.default=m},75729:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocalLogger=void 0;const{debug:n,warn:r,log:i,error:o}=console,s=()=>{},a=s,u={warn:r,info:s,log:i,debug:n,error:o,verbose:a,deprecated:o},c={Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0,Verbose:!0,LocalOnly:!1},l={console:{Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0},dev:c,system:c,perf:c};function f(e){return"logger.service.logMessages"===e}t.LocalLogger=class{constructor(){this.start=()=>{},this.isLogMessage=f,this.setting=()=>l,this.callStack=()=>function(){const{stack:e}=function(){try{throw Error("")}catch(e){return e}}(),t=("\n",4,e.split("\n",4).join("\n").length);return`Log Stack: \n${e.substring(t).substr(1)}`}(),this.unregisterClient=()=>{},this.setRouterClient=()=>{},this.warn=r,this.info=s,this.log=i,this.debug=n,this.error=o,this.verbose=a,this.system=u,this.perf=u,this.deprecated=o}}},72551:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=t.LoggerConstructor=void 0;const r=n(51742),i=n(75729),o=n(16925),s={Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0,Verbose:!1,LocalOnly:!1},a={Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0},u=n(38172);t.LoggerConstructor=function(e){const i=this;let c;i.RouterClient=e&&e.RouterClient;let l=!1,f=!1;const d=i;let h,p,y=0,g=0;this.startupTime=0;let m=[];if("undefined"==typeof window)return;let v=r.System.Window.getCurrent().name;window.top!==window&&(v=`${v}.Frame`),this.onLogStateChangeCallback=[];let w={console:a,dev:s,system:s,perf:s};function _(e,t,n){this.category=e,!c&&r.System.isBrowserView()&&(c=r.System.getViewId()),this.logClientName=c?`${v}: view-${c}`:v,this.logType=t,this.logData=n,this.logTimestamp=window.performance.timing.navigationStart+window.performance.now()+y}function b(e,t){e&&e.dev&&(w=e,i.onLogStateChangeCallback.forEach((t=>{t(e)}))),function(e){d.system.debug("Logger updateQueueBasedOnState",e,y,"QUEUE LENGTH",m.length,w);const t=[];for(let n=0,{length:r}=m;n<r;n++)if(w[m[n].category][m[n].logType]&&!w[m[n].category].LocalOnly)e&&(m[n].logTimestamp=m[n].logTimestamp+y),t.push(m[n]);else if(w[m[n].category][m[n].logType]&&w[m[n].category].LocalOnly){const e=m[n];console.log(e.category,e.logType,e.logTimestamp-window.performance.timing.navigationStart,e.logData,"(Previously queued!)")}m=t}(t)}function S(){const{stack:e}=function(){try{throw Error("")}catch(e){return e}}(),t=("\n",4,e.split("\n",4).join("\n").length);return`Log Stack: \n${e.substring(t).substr(1)}`}this.onStateChanged=e=>{-1===this.onLogStateChangeCallback.indexOf(e)&&this.onLogStateChangeCallback.push(e)},this.setClientName=function(e){console.error("logger.setClientName() is deprecated"),v=e},this.getClientName=function(){return console.error("logger.getClientName() is deprecated"),v},this.clearMessageList=function(){m=[]},this.callStack=function(){return S()},this.setting=function(){return w};const C=console.error,E=console.warn,I=console.info,O=console.log,A=console.debug;function T(e){return e.reduce(((e,t)=>e.concat(Array.isArray(t)?T(t):t)),[])}function L(e,t){try{e.apply(console,T(t))}catch(e){(t=[]).push(S())}}let R=()=>{m.length>0&&(i.RouterClient.transmit("logger.service.logMessages",m),d.clearMessageList())};function k(e,n,r){let i,o=!1,s=!0;"forceObjectsToLogger"===r[0]&&(o=!0,s=!1,r.splice(0,1)),r=r.map((e=>s&&function(e){const t=[],n=[e];let r=0,i=0;for(;n.length&&i<1e3;){i++;const e=n.pop();if("boolean"==typeof e)r+=4;else if("string"==typeof e)r+=2*e.length;else if("number"==typeof e)r+=8;else if("object"==typeof e&&-1===t.indexOf(e)){t.push(e);for(const t in e)n.push(e[t])}}return r}(e)>5e4?(L(I,["Message too large to send to the logger.",r]),"Log argument greater than 50KB. Check local Console to see output of the object."):e));try{for(let e=0;e<r.length;e++)r[e]instanceof Error&&(r[e]=r[e].toString());i=new _(e,n,JSON.stringify(r))}catch(t){r.splice(0,r.length),r.push(S()),i=new _(e,n,`*** Logging Error: ${JSON.stringify(r)}`)}o||!function(e){return!0===e.logData.includes("Finsemble.heartbeat")}(i)?function(e){if(m.length<2e4)m.push(e);else{console.error("Logging Queue Overflowed! Dumping queue here then continuing.",m.length);let e,n=0;for(;e=m.shift();)console.log("Message "+n++,e);t.Logger.system.error("Logging Queue Overflowed! Dumping queue in client then continuing.")}}(i):++g<=5&&L(I,[`"Filtered Logger Message (${g} of first 5 shown)`,i]),f&&R()}function N(){const{windowName:e}=o.Startup.getInstance().getStartupData();v=e,window.top!==window&&(v=`${v}.Frame`);const t=`finsemble.logger.client.${v}`;!c&&r.System.isBrowserView()&&(c=r.System.getViewId()),d.system.debug("logger.service.registering",v),r.System.Window.getCurrent().getOptions((n=>{const r=n?.customData?.component?.centralLoggerNamePrefix;i.RouterClient.query("logger.service.register",{clientName:v,clientChannel:t,windowName:e,viewId:c,centralLoggerNamePrefix:r},((e,t)=>{if(e)setTimeout(N,750);else{for(const e of m)e.viewId=c;f=!0,d.system.debug("logger.service.registered"),h=t.data,"routerService"!==v?(y=p,b(h,!0)):b(h,!1),k("system","Debug",["Logger Registered"]),R()}}))})),i.RouterClient.addListener(t,((e,t)=>{d.system.debug("logger.client.setLogState",t.data),h=t.data,b(h,!1)}))}R=u(R,"routerService"===v?100:250,{leading:!1}),this.error=function(){const e=Array.prototype.slice.call(arguments);e.push(S()),w.dev.Error&&!w.dev.LocalOnly&&k("dev","Error",e),e.unshift(`dev error (${window.performance.now()}):`),L(C,e)},this.warn=function(){if(w.dev.Warn){const e=Array.prototype.slice.call(arguments);e.push(S()),w.dev.Warn&&!w.dev.LocalOnly&&k("dev","Warn",e),w.dev.Warn&&w.dev.LocalOnly&&(e.unshift(`dev warn (${window.performance.now()}):`),L(E,e))}},this.info=function(){if(w.dev.Info){const e=Array.prototype.slice.call(arguments);w.dev.Info&&!w.dev.LocalOnly&&k("dev","Info",e),w.dev.Info&&w.dev.LocalOnly&&(e.unshift(`dev info (${window.performance.now()}):`),L(I,e))}},this.log=function(){if(w.dev.Log){const e=Array.prototype.slice.call(arguments);w.dev.Log&&!w.dev.LocalOnly&&k("dev","Log",e),w.dev.Log&&w.dev.LocalOnly&&(e.unshift(`dev log (${window.performance.now()}):`),L(O,e))}},this.debug=function(){if(w.dev.Debug){const e=Array.prototype.slice.call(arguments);w.dev.Debug&&!w.dev.LocalOnly&&k("dev","Debug",e),w.dev.Debug&&w.dev.LocalOnly&&(e.unshift(`dev debug (${window.performance.now()}):`),L(A,e))}},this.verbose=function(){if(w.dev.Verbose){const e=Array.prototype.slice.call(arguments);w.dev.Verbose&&!w.dev.LocalOnly&&k("dev","Verbose",e),w.dev.Verbose&&w.dev.LocalOnly&&(e.unshift(`dev verbose (${window.performance.now()}):`),L(A,e))}},this.deprecated=this.error,this.system={},this.system.error=function(){const e=Array.prototype.slice.call(arguments);e.push(S()),w.system.Error&&!w.system.LocalOnly&&k("system","Error",e),e.unshift(`system error (${window.performance.now()}):`),L(C,e)},this.system.warn=function(){if(w.system.Warn){const e=Array.prototype.slice.call(arguments);e.push(S()),w.system.Warn&&!w.system.LocalOnly&&k("system","Warn",e),w.system.Warn&&w.system.LocalOnly&&(e.unshift(`system warn (${window.performance.now()}):`),L(E,e))}},this.system.info=function(){if(w.system.Info){const e=Array.prototype.slice.call(arguments);w.system.Info&&!w.system.LocalOnly&&k("system","Info",e),w.system.Info&&w.system.LocalOnly&&(e.unshift(`system info (${window.performance.now()}):`),L(I,e))}},this.system.log=function(){if(w.system.Log){const e=Array.prototype.slice.call(arguments);w.system.Log&&!w.system.LocalOnly&&k("system","Log",e),w.system.Log&&w.system.LocalOnly&&(e.unshift(`system log (${window.performance.now()}):`),L(O,e))}},this.system.debug=function(){if(w.system.Debug){const e=Array.prototype.slice.call(arguments);w.system.Debug&&!w.system.LocalOnly&&k("system","Debug",e),w.system.Debug&&w.system.LocalOnly&&(e.unshift(`system debug (${window.performance.now()}):`),L(A,e))}},this.system.verbose=function(){if(w.system.Verbose){var e=Array.prototype.slice.call(arguments);w.system.Verbose&&!w.system.LocalOnly&&k("system","Verbose",e),w.system.Verbose&&w.system.LocalOnly&&((e=Array.prototype.slice.call(arguments)).unshift(`system log (${window.performance.now()}):`),L(A,e))}},this.system.deprecated=this.system.error,this.perf={},this.perf.error=function(){const e=Array.prototype.slice.call(arguments);e.push(S()),w.perf.Error&&!w.perf.LocalOnly&&k("perf","Error",e),e.unshift(`perf error (${window.performance.now()}):`),L(C,e)},this.perf.warn=function(){if(w.perf.Warn){const e=Array.prototype.slice.call(arguments);e.push(S()),w.perf.Warn&&!w.perf.LocalOnly&&k("perf","Warn",e),w.perf.Warn&&w.perf.LocalOnly&&(e.unshift(`perf warn (${window.performance.now()}):`),L(E,e))}},this.perf.info=function(){if(w.perf.Info){const e=Array.prototype.slice.call(arguments);w.perf.Info&&!w.perf.LocalOnly&&k("perf","Info",e),w.perf.Info&&w.perf.LocalOnly&&(e.unshift(`perf info (${window.performance.now()}):`),L(I,e))}},this.perf.log=function(){if(w.perf.Log){const e=Array.prototype.slice.call(arguments);w.perf.Log&&!w.perf.LocalOnly&&k("perf","Log",e),w.perf.Log&&w.perf.LocalOnly&&(e.unshift(`perf log (${window.performance.now()}):`),L(O,e))}},this.perf.debug=function(){if(w.perf.Debug){const e=Array.prototype.slice.call(arguments);w.perf.Debug&&!w.perf.LocalOnly&&k("perf","Debug",e),w.perf.Debug&&w.perf.LocalOnly&&(e.unshift(`perf debug (${window.performance.now()}):`),L(A,e))}},this.perf.verbose=function(){if(w.perf.Verbose){const e=Array.prototype.slice.call(arguments);w.perf.Verbose&&!w.perf.LocalOnly&&k("perf","Verbose",e),w.perf.Verbose&&w.perf.LocalOnly&&(e.unshift(`perf verbose (${window.performance.now()}):`),L(A,e))}},this.perf.deprecated=this.perf.error,this.unregisterClient=function(e=null,t=Function.prototype){d.system.debug("logger.service.unregister",v,e,c),R();const n=e||{clientName:v,viewId:c};i.RouterClient.query("logger.service.unregister",n,t)},this.isLogMessage=function(e){return"logger.service.logMessages"===e},this.status="offline",this.setRouterClient=e=>{this.RouterClient=e},this.start=function(){let e;this.startupTime=performance.now(),i.RouterClient||(console.log("No instance of the RouterClient found for this instance of the Logger. Dynamically requiring it."),i.RouterClient=n(39319).default);const t=()=>{e=i.RouterClient.subscribe("Finsemble.Service.State.loggerService",((t,n)=>{"ready"===n.data.state&&(i.status="online",d.system.debug("Logger onReady",v),i.RouterClient.calibrateTimeWithRouterService((e=>{p=e,l||(i.startupTime=performance.now()-i.startupTime,N(),l=!0)})),i.RouterClient.unsubscribe(e))}))};"routerService"===window.name?i.RouterClient.query("logger.service.register",{},(e=>{e?setTimeout(t,750):t()})):i.RouterClient.onReady(t),r.System.isBrowserView()&&window.addEventListener("beforeunload",(()=>{i.unregisterClient()}))}},t.Logger="undefined"!=typeof window?new t.LoggerConstructor:new i.LocalLogger,t.default=t.Logger},40568:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RouterClientConstructor=void 0;const i=r(n(82369)),o=r(n(13712)),s=r(n(73699)),a=n(51742),u=n(72551),c=n(6192),l=n(75729),f=n(50586),d=[];let h=u.Logger;function p(e,t={}){if(null===e||"object"!=typeof e)return e;if(e.constructor==Date||e.constructor==RegExp||e.constructor==Function||e.constructor==String||e.constructor==Number||e.constructor==Boolean)return new e.constructor(e);t=t||new e.constructor;for(const n in e)t[n]=void 0===t[n]?p(e[n],null):t[n];return t}t.RouterClientConstructor=function(){let e,t;const n={},r={},u={},y={},g={},m={},v={},w={},_={},b={};let S,C=null,E=!1;const I=[];function O(){this.header={origin:S,type:"initialHandshake"}}function A(e,t){this.header={origin:S,type:"timeCalibration"},this.clientBaseTime=e,this.serviceBaseTime=t}function T(e){this.header={origin:S,type:"addListener",channel:e}}function L(e,t,n){this.header={origin:S,type:"transmit",channel:e},this.data=t,this.options=n}function R(e){this.header={origin:S,type:"removeListener",channel:e}}function k(e){this.header={origin:S,type:"addResponder",channel:e}}function N(e,t,n){this.header={origin:S,type:"query",queryID:e,channel:t},this.data=n}function M(e,t,n){this.header={origin:S,type:"queryResponse",queryID:e,error:t},this.data=n}function P(e){this.header={origin:S,type:"removeResponder",channel:e}}function D(e,t){this.header={origin:S,type:"subscribe",subscribeID:e,topic:t}}function W(e,t){this.header={origin:S,type:"unsubscribe",subscribeID:e,topic:t}}function x(e,t){this.header={origin:S,type:"publish",topic:e},this.data=t}function j(e,t,n,r){this.header={origin:S,type:"notify",subscribeID:e,topic:t,error:n},this.data=r}function F(e,t,n){this.header={origin:S,type:"addPubSubResponder",topic:e,handleOnServer:n},this.data=t}function B(e){this.header={origin:S,type:"removePubSubResponder",topic:e}}function z(e){C?C.send(e):(h.system.info("RouterClient: Queuing message since router initialization not complete",e),d.push(e))}function $(){return this.header.origin===this.header.lastClient}function q(e,t){h.system.info("RouterClient: outgoing query response","CHANNEL",this.header.channel,"RESPONSE DATA",t,"QUERY ID",this.header.queryID),z(new M(this.header.queryID,e,t))}function U(e,t){const n=e[t.header.channel];void 0===n?h.system.warn(`RouterClient: no query responder define on channel ${t.header.channel} incoming from ${t.header.origin}`,t):t.header.error?(h.system.warn("RouterClient: queryResponder error",t),n(t.header.error,null),delete e[t.header.channel]):(t.originatedHere=$,t.sendQueryResponse=q.bind(t),h.system.info("RouterClient: incoming query","CHANNEL",t.header.channel,"FROM",t.header.origin,"QUERY MESSAGE",t),n(null,t))}function H(e,t){if(e)h.system.warn("RouterClient: income publish rejected by pubsub responder",e,t);else{y[this.header.topic]=t;const n=m[this.header.topic];if(void 0!==n)for(let r=0;r<n.length;r++)h.system.info("RouterClient: sending pubsub notify","TOPIC",this.header.topic,"NOTIFY DATA",t),z(new j(n[r],this.header.topic,e,t))}}function V(e,t){var n,r,i;(function(e){let t=!1;return void 0===e&&(t=!0),t})(t)||z(new j(this.header.subscribeID,this.header.topic,e,t)),e?h.system.warn("RouterClient: incoming subscription rejected by pubsub responder","TOPIC",this.header.topic,"MESSAGE",this):(n=m,r=this.header.topic,i=this.header.subscribeID,r in n?n[r].push(i):n[r]=[i],h.system.info("RouterClient: incoming subscription added","TOPIC",this.header.topic,"MESSAGE",this))}function G(){!function(e,t,n){let r=!1;if(t in e){const i=m[t];for(let o=0;o<i.length;o++)if(n===i[o]){i.splice(o,1),0===i.length&&delete e[t],r=!0,h.system.info("RouterClient: PubSub removeListener","TOPIC",t,"FROM",n);break}}r||h.system.warn(`RouterClient: tried to remove non-existent listener on ${t} from ${JSON.stringify(n)}`)}(m,this.header.topic,this.header.subscribeID)}function Y(i){switch(h.system.verbose("Incoming Message Type",i.header.type,i),i.header.type){case"transmit":!function(e,t){const n=e[t.header.channel]||[],r=[];if(Array.isArray(n)&&0!==n.length){t.originatedHere=$,n.forEach((e=>{r.push(e)}));for(let e=0;e<r.length;e++)h.isLogMessage(t.header.channel)||h.system.info("RouterClient: incoming transmit","CHANNEL",t.header.channel,"FROM",t.header.origin,"MESSAGE",t),r[e](null,t)}else h.system.warn(`RouterClient: no listener for incoming transmit on channel ${t.header.channel} from ${t.header.origin}`,t)}(n,i);break;case"query":U(r,i);break;case"queryResponse":!function(e,t){const n=e[t.header.queryID];void 0===n?h.system.warn("RouterClient: no handler for incoming query response","QUERY ID",t.header.queryID):(function(e,t){const n=e[t];void 0!==n&&clearTimeout(n)}(b,t.header.queryID),t.header.error?(h.system.debug("RouterClient: incoming queryResponse error",t.header,"QUERY ID",t.header.queryID),n(t.header.error,t)):(h.system.info("RouterClient: incoming query response","RESPONSE MESSAGE",t,"QUERY ID",t.header.queryID),n(null,t)),delete e[t.header.queryID])}(_,i);break;case"notify":!function(e,t){const n=e[t.header.subscribeID];void 0===n?h.system.warn("RouterClient: no subscription handler defined for incoming notify for subscriberID",t.header.subscribeID,t):t.header.error?(h.system.info("RouterClient: incoming PubSub notify error for subscriberID","SUBSCRIBER ID",t.header.subscribeID,"NOTIFY MESSAGE",t),n(t.header.error,t)):(t.originatedHere=$,h.system.info("RouterClient: incoming PubSub notify","SUBSCRIBER ID",t.header.subscribeID,"NOTIFY MESSAGE",t),n(null,t))}(v,i);break;case"publish":!function(e){let t=u[e.header.topic];if(void 0===t)for(const n in g)if(g[n].test(e.header.topic)){t=u[n];break}void 0===t?h.system.warn("RouterClient: no pubsub responder defined for incoming publish","TOPIC",e.header.topic,"PUBLISH MESSAGE",e):(e.sendNotifyToAllSubscribers=H,t.publishCallback?(h.system.info("RouterClient: incoming PubSub publish callback invoked","TOPIC",e.header.topic,"PUBLISH MESSAGE",e),t.publishCallback(null,e)):(h.system.info("RouterClient: incoming PubSub publish","TOPIC",e.header.topic,"PUBLISH MESSAGE",e),e.sendNotifyToAllSubscribers(null,e.data)))}(i);break;case"subscribe":!function(e){h.system.info("RouterClient: PubSub subscribe","TOPIC",e.header.topic);let t=u[e.header.topic];if(void 0===t)for(const n in g)if(g[n].test(e.header.topic)){t=u[n];let r=y[e.header.topic];void 0===r&&(r=y[n]),y[e.header.topic]=r;break}void 0===t?h.system.warn("RouterClient: no pubsub responder defined for incoming subscribe",e):e.header.error?h.system.warn(`RouterClient: pubsub error received from router service: ${JSON.stringify(e.header.error)}`):(e.sendNotifyToSubscriber=V,t.subscribeCallback?(e.data=y[e.header.topic],t.subscribeCallback(null,e)):e.sendNotifyToSubscriber(null,y[e.header.topic]))}(i);break;case"unsubscribe":!function(e){let t=u[e.header.topic];if(void 0===t)for(const n in g)if(g[n].test(e.header.topic)){t=u[n];break}void 0===t?h.system.warn("RouterClient: no pubsub responder defined for incoming unsubscribe","TOPIC",e.header.topic,"UNSUBSCRIBE MESSAGE",e):(e.removeSubscriber=G,t.unsubscribeCallback?(h.system.info("RouterClient: incoming unsubscribe callback","TOPIC",e.header.topic,"UNSUBSCRIBE MESSAGE",e),t.unsubscribeCallback(null,e)):(h.system.info("RouterClient: incoming unsubscribe","TOPIC",e.header.topic,"UNSUBSCRIBE MESSAGE",e),e.removeSubscriber()))}(i);break;case"timeCalibration":const o=()=>{t?t(i):setTimeout((()=>{o()}),10)};o();break;case"initialHandshakeResponse":e()}}function K(e,t){t.header.lastClient=S,t.header.incomingTransportInfo=e,Y(t)}this.startupTime=0,this.notificationURL="";const J=(t,n,r)=>{let o,a;h.system.debug(`Name of transport to establish: ${n}`),this.notificationURL=t.notificationURL;let u,c,l,f,p=!1,y=0;const g=t=>{a=0,h.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient:transport ready","TRANSPORT OBJECT",t),C=t,e=f,l(),o=setInterval(l,200)};u=e=>{h.system.error("RouterClientError",e)};const m=()=>{h.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient:getClientTransport","ROUTER PARAMS:",t),i.default.getTransport(t,n,K,S,"RouterService").then(g).catch(u)};c=()=>{if(clearInterval(o),y++,y<=3)h.system.error("WINDOW LIFECYCLE:STARTUP:RouterClient: failure to connect to router service. Retrying...",y,t),m();else{const e="A cross domain transport has failed to connect. Cross domain components may not work. Please contact your administrator.";h.system.error(e,t),s.default.alert("dev","ONCE-SINCE-STARTUP","FSBL-Internal-Transport-Failure",e,{url:this.notificationURL})}},l=()=>{h.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient: sendHandshake",a),z(new O),a++>50&&c()},f=()=>{if(!p){if(h.system.debug(`WINDOW LIFECYCLE:STARTUP:RouterClient connected: Starting ${S} with transport ${C.identifier()}`),p=!0,clearInterval(o),d)for(let e=0;e<d.length;e++){h.system.debug("RouterClient: firing queued msg");const t=d[e];C.send(t)}r&&r()}},m()};function Q(){return`${S}.${f.v4()}`}function Z(e,t){let n=!1;return void 0!==e[t]&&(delete e[t],n=!0),n}this.calibrateTimeWithRouterService=function(e){let n,r=0,i=1/0;t=function(t){r++,r>5?function(t){let r=0;for(let e=1;e<5;e++){const o=t.clientBaseTime[e-1],s=t.clientBaseTime[e]-o,a=t.serviceBaseTime[e-1]-(o+s/2);s<i&&(i=s,n=a),r+=a,h.system.debug("calibrationCalculation Intermediate Values","lastRRT",s,"lastOffset",a,"fastestOffset",n,"fastestRRT",i)}r/=4,h.system.debug("RouterClient calibrationCalculation","Average Offset",r,"Chosen FastestOffset",n,t),e(n)}(t):(t.clientBaseTime.push(c.Globals.performance.timing.navigationStart+c.Globals.performance.now()),z(new A(t.clientBaseTime,t.serviceBaseTime)))},t(new A([],[]))},this.onReady=e=>new Promise((t=>{o.default.args(e,"function");const n=()=>{e&&e(),t()};E?n():I.push(n)})),this.addListener=function(e,t){h.system.info("RouterClient.addListener","CHANNEL",e),o.default.args(e,"string",t,"function"),function(e,t,n){let r=!1;const i=e[t];return void 0===i||0===i.length?(e[t]=[n],r=!0):i.push(n),r}(n,e,t)&&z(new T(e))},this.transmit=function(e,t,n={suppressWarnings:!1}){h.isLogMessage(e)||h.system.info("RouterClient.transmit","TO CHANNEL",e,"EVENT",t),o.default.args(e,"string",t,"any"),z(new L(e,t,n))},this.removeListener=function(e,t){h.system.info("RouterClient.removeListener","CHANNEL",e,"EVENT HANDLER",t),o.default.args(e,"string",t,"function"),function(e,t,n){let r=!1;const i=e[t];if(void 0!==i){const e=i.indexOf(n);e>-1?(i.splice(e,1),0===i.length&&(r=!0)):h.system.warn(`no listener defined for channel: ${t}`)}return r}(n,e,t)&&z(new R(e))},this.addResponder=(e,t)=>{if(h.system.info("RouterClient.addResponder","CHANNEL",e),o.default.args(e,"string",t,"function"),function(e,t,n){let r=!1;return void 0===e[t]&&(e[t]=n,r=!0),r}(r,e,t))z(new k(e));else{const n=`RouterClient.addResponder: Responder already locally defined for channel ${e}`;h.system.warn(n),t(n,null)}},this.query=(e,t,n,r)=>{const i=`${Q()}.${e}`,s=window.performance.timing.navigationStart+window.performance.now(),a=window.performance.timing.navigationStart,u=window.performance.now();return h.system.info("RouterClient.query","RESPONDER CHANNEL",e,"QUERY EVENT",t,"PARAMS",n,"QUERY ID",i,{timestamp:s,navstart:a,timenow:u}),r||(r=n,n={timeout:2e4}),o.default.args(e,"string",t,"any=",n,"object=",r,"function"),n=n||{},o.default.args2("params.timeout",n.timeout,"number"),new Promise((function(o){_[i]=(c,l)=>{o({err:c,response:l}),"function"==typeof r?r(c,l):h.system.warn("No response event handler passed to RouterClient.query","RESPONDER CHANNEL",e,"QUERY EVENT",t,"PARAMS",n,"QUERY ID",i,{timestamp:s,navstart:a,timenow:u})},c.Globals.runningInFSBLUnitTest||function(e,t,n,r){r>0&&(e[t]=setTimeout((()=>{h.system.warn(`RouterClient: timeout waiting on query response on channel ${n} for queryID ${t} on timer ${e[t]} timeout=${r}`)}),r))}(b,i,e,n.timeout),z(new N(i,e,t))}))},this.removeResponder=e=>{h.system.info("RouterClient.removeResponder","RESPONDER CHANNEL",e),o.default.args(e,"string"),Z(r,e)&&z(new P(e))},this.addPubSubResponder=(e,t,n,r)=>{let i,s;h.system.info("RouterClient.addPubSubResponder","TOPIC",e,"INITIAL STATE",t,"PARAMS",n),o.default.args(e,"any",t,"object=",n,"object="),n=n||{},o.default.args2("params.subscribeCallback",n.subscribeCallback,"function=","params.publishCallback",n.publishCallback,"function=")&&o.default.args2("params.unsubscribeCallback",n.unsubscribeCallback,"function="),void 0===n.subscribeCallback&&void 0===n.publishCallback&&void 0===n.unsubscribeCallback?(t=t||{},z(new F(e.toString(),t,!0)),s="success"):!function(e,t,n,r){let i=!1;return void 0===u[e.toString()]&&(e instanceof RegExp&&(g[e.toString()]=e,h.system.info(`RouterClient: PubSub RegEx added for topic ${e.toString()}`)),u[e.toString()]={subscribeCallback:t,publishCallback:n,unsubscribeCallback:r},i=!0),i}(e,n.subscribeCallback,n.publishCallback,n.unsubscribeCallback)?(i=`RouterClient.addPubSubResponder: Responder already locally defined for topic ${e}`,h.system.error(i)):(t=t||{},y[e.toString()]=p(t),z(new F(e.toString(),t,!1)),s="success"),r&&r(i,s)},this.removePubSubResponder=e=>{h.system.info("RouterClient.removePubSubResponder","TOPIC",e),o.default.args(e,"any"),Z(u,e)?(delete y[e.toString()],delete g[e.toString()],z(new B(e))):h.system.warn(`RouterClient.removePubSubResponder failed: Could not find responder for topic ${e}`)},this.subscribe=(e,t)=>{h.system.info("RouterClient.subscribe","TOPIC",e),o.default.args(e,"string",t,"function");const n=Q();return function(e,t,n,r){e[t]=n,w[t]=r}(v,n,t,e),z(new D(n,e)),{subscribeID:n,topic:e}},this.publish=(e,t)=>{h.system.info("RouterClient.publish","TOPIC",e,"EVENT",t),o.default.args(e,"string",t,"any"),z(new x(e,t))},this.unsubscribe=e=>{h.system.info("RouterClient.unsubscribe","SUBSCRIBE ID",e),o.default.args(e,"object")&&o.default.args2("subscribeIDStruct.subscribeID",e.subscribeID,"string"),!function(e,t){let n=!1;return void 0!==e[t]&&(delete e[t],n=!0),n}(v,e.subscribeID)?h.system.warn(`RouterClient.unsubscribe: Could not find subscribeID for topic ${e.topic}`):z(new W(e.subscribeID,e.topic))},this.trustedMessage=function(e){let t=!0;return h.system.debug("RouterClient.trustedMessage header",e.header),"SharedWorker"===e.header.originIncomingTransportInfo.transportID&&(t=!0),t},this.disconnectAll=function(){h.system.info("RouterClient.disconnectAll");for(const e in n)h.system.debug(`RouterClient.disconnectAll is removing listener on ${e}`),z(new R(e)),delete n[e];for(const e in r)h.system.debug(`RouterClient.disconnectAll is removing responder on ${e}`),z(new P(e)),delete r[e];for(const e in u)h.system.debug(`RouterClient.disconnectAll is removing pubsub responder on ${e}`),z(new B(e)),delete u[e.toString()],delete y[e.toString()],delete g[e.toString()];for(const e in v){const t=w[e];h.system.debug(`RouterClient.disconnectAll is removing subscriber on ${t}`),z(new W(e,t)),delete v[e],delete w[e]}},this.start=e=>new Promise((async t=>{if(this.started){const e="RouterClient.start() called twice. Ignoring second call.";return h.warn(e),t(e)}this.started=!0,h=new l.LocalLogger,"loggerService"===a.System.Window.getCurrent().name&&(h=new l.LocalLogger),S=`RouterClient.${e.windowName}.${f.v4()}`;const n=`"RouterClient Check: connecting new client for ${S}`;h.system.debug(n),console.debug(n),J(e,e.transportName,(()=>{!function(){for(h.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient Ready"),E=!0;I.length>0;)h.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient parentReady invoked"),I.shift()()}(),t(null)}))})),this.stop=()=>{this.disconnectAll(),i.default.close(),this.started=!1}}},39319:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RouterConnectionInstance=t.RouterConnectionSingleton=void 0;const r=n(40568),i=n(72551),o=n(4971);t.RouterConnectionSingleton=o.singleton("RouterClient",r.RouterClientConstructor),i.Logger.setRouterClient(t.RouterConnectionSingleton);var s=n(40568);Object.defineProperty(t,"RouterConnectionInstance",{enumerable:!0,get:function(){return s.RouterClientConstructor}}),t.default=t.RouterConnectionSingleton},63862:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.StorageClient=void 0;const i=r(n(42169)),o=r(n(13712)),s=r(n(72551)),a=n(72669),u=n(24232),c=i.default(1);class l extends a._BaseClient{constructor(){super(...arguments),this.clientReady=!1,this.delete=this.remove}setUser(e,t){this.clientReady||s.default.system.error("storageClient invoked before ready"),o.default.args(e.user,"string",t,"function="),this.routerClient.query("Storage.setUser",{user:e.user},((n,r)=>{(n?s.default.system.error:s.default.system.info)("APPLICATION LIFECYCLE:StorageClient.setUser",e,n,r),t&&t(n,r.data)}))}setStore(e,t){this.clientReady||s.default.system.error("storageClient invoked before ready"),o.default.args(e.topic,"string",e.dataStore,"string=",t,"function="),s.default.system.log("APPLICATION LIFECYCLE:StorageClient.setStore",e,t),this.routerClient.query("Storage.setStore",e,((e,n)=>{(e?s.default.system.error:s.default.system.info)("Storage.setStore",e,n),t&&t(e,n.data)}))}save(e,t){if(this.clientReady||s.default.system.error("storageClient invoked before ready"),"string"!=typeof e.key||"string"!=typeof e.topic)throw new Error("Values for key and topic must be strings.");return new Promise(((n,r)=>{o.default.args(e.topic,"string",e.key,"string",e.value,"any",t,"function="),this.routerClient.query("Storage.save",e,((e,i)=>{(e?s.default.system.error:s.default.system.info)("Storage.save",e,i),t&&t(e,i.data),e?r({err:e,data:null}):n({err:e,data:i.data})}))}))}save1(e){return c((()=>this.save(e)))}get(e,t){if(this.clientReady||s.default.system.error("storageClient invoked before ready"),"string"!=typeof e.key||"string"!=typeof e.topic)throw new Error("Values for key and topic must be strings.");return new Promise(((n,r)=>{o.default.args(e.topic,"string",e.key,"string",t,"function="),this.routerClient.query("Storage.get",e,((e,i)=>{if(e)return s.default.system.error("Storage.get",e,i),t&&t(e,i?i.data:null),r(e,i?i.data:null);s.default.system.info("Storage.get",e,i),t&&t(e,i.data),n(i.data)}))}))}get1(e,t){return c((()=>this.get(e,t)))}async updateStorage(e){const{topic:t,key:n,updateFn:r}=e,i=await this.get({topic:t,key:n});return await this.save({topic:t,key:n,value:r(i)})}updateStorage1(e){return c((()=>this.updateStorage(e)))}keys(e,t){this.clientReady||s.default.system.error("storageClient invoked before ready"),o.default.args(e.topic,"string",t,"function="),s.default.system.debug("StorageClient.keys",e,t),this.routerClient.query("Storage.keys",e,((e,n)=>{(e?s.default.system.error:s.default.system.info)("Storage.keys",e,n),t&&t(e,n.data)}))}keys1(e){return c((()=>u.promisify(this.keys.bind(this))(e)))}getMultiple(e,t){this.clientReady||s.default.system.error("storageClient invoked before ready"),s.default.system.info("StorageClient.getMultiple",e,t),this.routerClient.query("Storage.getMultiple",e,((n,r)=>{(n?s.default.system.error:s.default.system.info)("StorageClient.getMultiple:",e,r),t&&t(n,r)}))}remove(e,t){return this.clientReady||s.default.system.error("storageClient invoked before ready"),new Promise(((n,r)=>{o.default.args(e.topic,"string",e.key,"string",t,"function="),this.routerClient.query("Storage.delete",e,((e,i)=>{(e?s.default.system.error:s.default.system.info)("StorageClient.delete",e,i),t&&t(e,i.data),e?r({err:e,data:null}):n({err:e,data:i.data})}))}))}remove1(e){return c((()=>this.remove(e)))}clearCache(e){s.default.system.log("StorageClient.clearCache",e),this.routerClient.query("Storage.clearCache",null,((t,n)=>{(t?s.default.system.error:s.default.system.info)("StorageClient.clearCache",t,n),e&&e(t,n.data)}))}}t.StorageClient=l;var f=new l({onReady(e){e&&e(),f.clientReady=!0},name:"storageClient"});t.default=f},95376:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=n(57664),u=s(n(63862)),c=s(n(68718)),l=o(n(76420)),f=n(51742),d=n(72669),h=s(n(72551)),p=s(n(13712)),y=n(75688),g=n(33998),m=s(n(39319)),v=n(78379),w=s(n(70010)),_=n(24232),b=n(80089);let S;function C(e,t){return e.classList?e.classList.contains(t):!!e.className.match(new RegExp(`(\\s|^)${t}(\\s|$)`))}class E extends d._BaseClient{constructor(e){super(e),this.showAtMousePosition=function(){this.routerClient.transmit("DockingService.showAtMousePosition",this.getWindowIdentifier())},p.default.args(e,"object=")&&e&&p.default.args2("params.onReady",e.onReady,"function="),this.options={},this.windowHash="",this.title=null,this.toolbarBottom=40,this.containers=[],this.componentState={},this.windowState="normal",this.hasHeader=!1,this.enableWindowsAeroSnap=!1,this.bindFunctions(),this.minimizeWithDockedWindows=this.minimize}bindFunctions(){this.onWindowRestored=this.onWindowRestored.bind(this),this.onWindowMaximized=this.onWindowMaximized.bind(this),this.onWindowBlurred=this.onWindowBlurred.bind(this),this.onWindowFocused=this.onWindowFocused.bind(this),this.onMinimizedRestored=this.onMinimizedRestored.bind(this),this.onWindowMinimized=this.onWindowMinimized.bind(this),this.close=this.close.bind(this),this.getInitialOptions=this.getInitialOptions.bind(this),this.cacheInitialBounds=this.cacheInitialBounds.bind(this),this._setHeaderHeight=this._setHeaderHeight.bind(this)}onWindowRestored(){this.updateHeaderState("Maximize",{hide:!1})}onWindowMaximized(){this.updateHeaderState("Maximize",{hide:!0})}onWindowBlurred(){this.setActive(!1)}onWindowFocused(){this.setActive(!0)}onMinimizedRestored(){this.routerClient.transmit("DockingService.windowRestored",S.name),S.removeEventListener("restored",this.onMinimizedRestored)}onWindowMinimized(){this.routerClient.query("DockingService.windowMinimized",{windowName:S.name}),S.addEventListener("restored",this.onMinimizedRestored)}getWindowGroups(){return this.windowGroups}groupUpdateHandler(e,t){e?FSBL.Clients.Logger.error(e):t.data&&t.data.groupData&&(this.windowGroups=Object.values(t.data.groupData).filter((e=>e.windowNames.includes(this.getWindowNameForDocking()))))}close(e,t=(()=>{})){e||(e={removeFromWorkspace:!0,closeWindow:!0});const{parentWindow:n}=S;if(e.userInitiated&&n)return n.close(e,t);S.close(e,t)}getWindowHash(){return this.windowHash}getWindowTitle(){return this.title}retrieveMonitorDimensions(e=Function.prototype){l.getMonitor(null,(t=>{S.updateOptions({options:{monitorDimensions:t.monitorRect}}),e&&e(t.monitorRect)}))}listenForHashChanges(){f.System.hasBrowserView()||(S.updateOptions({url:window.top.location.href},(()=>{})),function(e){const{pushState:t}=e;e.pushState=function(n){"function"==typeof e.onpushstate&&e.onpushstate({state:n}),t.apply(e,arguments),S.updateOptions({url:window.top.location.href},(()=>{}))};const{replaceState:n}=e;e.replaceState=function(t){"function"==typeof e.onreplacestate&&e.onreplacestate({state:t}),n.apply(e,arguments),S.updateOptions({url:window.top.location.toString()})}}(window.history),window.addEventListener("hashchange",(()=>{S.updateOptions({url:window.top.location.toString()},(()=>{}))})))}getInitialOptions(e){this.isInAService?(this.options={},h.default.system.debug("WindowClient:getting options empty",this.options),e()):S.getOptions(((t,n)=>{t&&(n={}),S.windowOptions=n,this.options=n,h.default.system.debug("WindowClient:getting options",this.options),e()}))}cacheInitialBounds(e){if(f.System.hasBrowserView())return e();this.cacheBounds((()=>{try{if(!S.windowOptions.customData.foreign.components["Window Manager"].persistWindowState)return e();S.updateOptions({options:{url:window.top.location.toString()}})}catch(e){h.default.system.warn('customData.foreign.components["Window Manager" is undefined')}e()}))}setInitialWindowBounds(e){h.default.system.warn("`FSBL.Clients.WindowClient.setInitialWindowBounds is deprecated and will be removed in a future version of finsemble. Use 'getInitialOptions' and 'cacheInitialBounds' instead."),a.parallel([this.getInitialOptions,this.cacheInitialBounds],e)}getWindowBounds(){return{top:S.windowOptions.defaultTop,left:S.windowOptions.defaultLeft,width:S.windowOptions.defaultWidth,height:S.windowOptions.defaultHeight}}saveWindowBounds(e,t){if(h.default.system.debug("WINDOW LIFECYCLE:SavingBounds:",e,"setActiveWorkspaceDirty",t),void 0===t&&(t=!1),p.default.args(e,"object")&&p.default.args2("bounds.top",e.top,"number"),e){S.updateOptions({options:{top:Math.round(e.top),defaultTop:Math.round(e.top),left:Math.round(e.left),defaultLeft:Math.round(e.left),width:Math.round(e.width),defaultWidth:Math.round(e.width),height:Math.round(e.height),defaultHeight:Math.round(e.height)}});try{S.windowOptions.customData.foreign.components["Window Manager"].persistWindowState}catch(e){}}}minimize(e){this.cacheBounds((()=>{S.minimize(null,(t=>{t&&h.default.system.error("WindowClient:minimize",t),e&&e(t)}))}))}setAlwaysOnTop(e,t){S.setAlwaysOnTop({alwaysOnTop:e},t)}restore(e=(()=>{})){S.restore(null,(t=>{t&&h.default.system.error("WindowClient:restore",t),e(t)}))}cacheBounds(e){this.getBounds(((t,n)=>{if(t)return e(),console.warn("Get bounds error.",t,"Window may not be registered with the window service");S.updateOptions({options:{cachedLeft:n.left,defaultLeft:n.left,cachedTop:n.top,defaultTop:n.top,cachedWidth:n.width,defaultWidth:n.width,cachedHeight:n.height,defaultHeight:n.height}}),e&&e(n)}))}maximize(e){S.maximize(),e()}removeFinWindowEventListeners(){S.removeEventListener("maximized",this.onWindowMaximized),S.removeEventListener("restored",this.onWindowRestored),S.removeEventListener("blurred",this.onWindowBlurred),S.removeEventListener("focused",this.onWindowFocused),S.removeEventListener("close-requested",this.close),S.removeEventListener("minimized",this.onWindowMinimized)}injectDOM(e){if(h.default.system.debug("injectDOM",e),document.getElementById("FSBLHeader"))return;window.scrollTo(0,0);const t=document.createElement("div");t.innerHTML=`<div id="FSBLHeader"${e?` style=height:${e}`:""}></div>`,t.firstChild&&document.body.insertBefore(t.firstChild,document.body.firstChild)}getComponentState(e,t){if(e||(e={}),e.fields&&!Array.isArray(e.fields)&&(e.fields=[e.fields]),p.default.args(e,"object",t,"function"),S)return S.getComponentState(e,t);h.default.system.warn("Attempt to use getComponentState before component is ready or in a service"),e.windowName||(e.windowName=window.name);const n=this.getContainerHash(e.windowName);u.default.get({topic:v.WORKSPACE.CACHE_STORAGE_TOPIC,key:n},((n,r)=>{if(n)return h.default.system.error("Error retrieving window client's component state."),void t(n);const i=r;if(r&&e.field)this.componentState=i||{},t(n,i[e.field]);else{if(e.fields){const n={};for(let t=0;t<e.fields.length;t++)i[e.fields[t]]&&(n[e.fields[t]]=i[e.fields[t]]);return t(null,n)}if(r)return t(null,i);h.default.system.info("WindowClient:getComponentState:error, response, params",n,r,e),t("Not found",r)}}))}async setComponentState(e,t=(()=>{})){return p.default.args(e,"object",t,"function=")&&p.default.args2("params.field",e.field,"string"),S?S.setComponentState(e,t):this.isInAService?(t("Cannot call setComponentState in a service."),Promise.resolve()):(t("Cannot call setComponentState. The window may not be ready"),Promise.reject("The window is not yet ready to save state."))}async removeComponentState(e,t=(()=>{})){return p.default.args(e,"object",t,"function=")&&p.default.args2("params.field",e.field,"string"),(S||await y.FinsembleWindow.getInstance({name:e.windowName||window.name})).removeComponentState(e,t)}getWindowNameForDocking(){const e=S.parentWindow;return e?e.name:S.name}getContainerHash(e){return l.camelCase(this.windowHash,e)}formGroup(){S.formGroup()}registerWithDockingManager(e,t){S.parentWindow&&(h.default.system.debug("registerWithDockingManager ignore registration request if has a parent"),t&&t());const n=S.name,{uuid:r}=S;this.startedRegistrationWithDocking=!0,this.routerClient.query("DockingService.registerWindow",{name:n,uuid:r,options:e||{},windowType:"WebWindow"},(()=>{this.startedRegistrationWithDocking=!1,this.deregisterPlease&&(this.deregisterWithDockingManager(),this.deregisterPlease=!1),h.default.system.debug("WINDOW LIFECYCLE: Docking Registration complete."),t&&t()}))}deregisterWithDockingManager(e){this.startedRegistrationWithDocking&&(this.deregisterPlease=!0);const t=S.name;this.routerClient.transmit("DockingService.deregisterWindow",{name:t,userInitiated:e})}bumpFixedElements(e){if("complete"!==document.readyState)return setTimeout((()=>{this.bumpFixedElements(e)}),100);if(!e)return;let{absolute:t,fixed:n,bumpBy:r}=e;if(!t&&!n)return;const i=document.getElementById("FSBLHeader");if(!i||0===i.children.length||!i.children[0].clientHeight)return setTimeout((()=>{this.bumpFixedElements(e)}),100);"auto"===r?r="0px":-1===new String(r).indexOf("px")&&(r=`${r}px`);const o=document.body.getElementsByTagName("*"),s=o.length;for(let e=0;e<s;e++){if("FSBLHeader"===o[e].id||o[e].classList.contains("fsbl-header"))continue;const i=window.getComputedStyle(o[e],null),s=["0","0px",0],a=i.getPropertyValue("top");t&&o[e].parentNode===document.body&&"absolute"==i.getPropertyValue("position")&&("all"==t?o[e].style.top=`calc(${a} + ${r})`:"0Positioned"==t&&s.includes(a)&&(o[e].style.top=r)),n&&"fixed"==i.getPropertyValue("position")&&("all"==n?o[e].style.top=`calc(${a} + ${r})`:"0Positioned"==n&&s.includes(a)&&(o[e].style.top=r))}}bringWindowToFront(){S.bringToFront({forceFocus:!0},(e=>{e?h.default.system.error(`WindowClient.bringWindowToFront: failure:${e}`):h.default.system.info("WindowClient.bringWindowToFront: success")}))}injectStylesheetOverride(){const e=document.createElement("style");e.type="text/css",e.appendChild(document.createTextNode(S.windowOptions.customData.cssOverride)),document.body.appendChild(e)}checkIfChildApp(){if(S.windowOptions&&S.windowOptions.customData&&S.windowOptions.customData.parentUUID&&S.windowOptions.customData.parentUUID!==f.System.Application.getCurrent().uuid){const e=f.System.Application.wrap(S.windowOptions.customData.parentUUID);e.addEventListener("crashed",this.close.bind(null,!1)),e.addEventListener("initialized",this.close.bind(null,!1)),e.addEventListener("out-of-memory",this.close.bind(null,!1))}}preventUnintendedDropEvents(){function e(e){e.preventDefault()}window.addEventListener("dragover",e,!1),window.addEventListener("drop",e,!1)}rejectWindowsKeyResizes(){let e=!1;const t=async t=>{this.enableWindowsAeroSnap?"Meta"===t.key&&m.default.transmit("Finsemble.WindowService.WindowsKey","up"):"Meta"===t.key&&e&&(e=!1,f.System.Window.getCurrent().updateOptions({resizable:!0}))},n=t=>{this.enableWindowsAeroSnap?"Meta"===t.key&&m.default.transmit("Finsemble.WindowService.WindowsKey","down"):"Meta"===t.key&&(e=!0,f.System.Window.getCurrent().updateOptions({resizable:!1}))};FSBL&&c.default.onReady((()=>{window.addEventListener("keyup",t),window.addEventListener("keydown",n)}))}modifyReload(){FSBL&&c.default.onReady((()=>{c.default.addBrowserHotkey(["ctrl","r"],S.reload)}))}addListeners(e=Function.prototype){this.listenForHashChanges(),this.preventUnintendedDropEvents(),this.rejectWindowsKeyResizes(),this.modifyReload(),S.addListener("setParent",(()=>{h.default.system.info("WindowClient.setParent deregisterWithDockingManager"),this.deregisterWithDockingManager()})),S.addEventListener("maximized",this.onWindowMaximized),S.addEventListener("minimized",this.onWindowMinimized),S.addEventListener("restored",this.onWindowRestored),S.addEventListener("blurred",this.onWindowBlurred),S.addEventListener("focused",this.onWindowFocused),e()}updateHeaderState(e,t){this.commandChannel&&this.commandChannel(e,t)}headerCommandChannel(e){this.commandChannel=e}ejectFromGroup(){S.ejectFromGroup()}setWindowTitle(e){h.default.system.deprecated("This method is deprecated and will be removed in a future release. Please simply set the application's `document.title` element to change the title. Or, set `components['Window Manager'].title` in the app's manifest."),this.setWindowTitlePrivate(e)}setWindowTitlePrivate(e){p.default.args(e,"string"),this.title=e,this.updateHeaderState("Main",{windowTitle:e}),S.setTitle(e)}getSpawnData(){if(!this.options.customData)return{};const{spawnData:e}=this.options.customData;return void 0===e?{}:e}getCurrentWindow(){return f.System.Window.getCurrent()}async getDesktopBoundingBox(e){let t=e;"string"==typeof e&&(t=document.querySelector(e));const n=t.getBoundingClientRect(),r=await S.getBounds(),i=r.data;let o,s;r.err?(o=this.options.defaultTop,s=this.options.defaultLeft):(o=i.top,s=i.left);const a={top:o+n.top,left:s+n.left,width:n.width,height:n.height,right:0,bottom:0};return a.right=a.left+a.width,a.bottom=a.top+a.height,a}isPointInBox(e,t){return t.bottom||(t.bottom=t.top+t.height),t.right||(t.right=t.left+t.width),e.x>t.left&&e.x<t.right&&e.y<t.bottom&&e.y>t.top}isMouseOverDOMElement(e,t){this.getDesktopBoundingBox(e).then((e=>{f.System.getMousePosition(((n,r)=>{t(this.isPointInBox(r,e))}))}))}getWindowIdentifier(){var e=null;return this.options&&this.options.customData&&this.options.customData.component&&(e=this.options.customData.component.type),{windowName:S?S.name:window.name,uuid:S?S.uuid:null,componentType:e}}setActive(e){var t,n;e?(n="desktop-active",(t=document.documentElement).classList?t.classList.add(n):C(t,n)||(t.className=`${t.className} ${n}`)):function(e,t){if(e.classList)e.classList.remove(t);else if(C(e,t)){const n=new RegExp(`(\\s|^)${t}(\\s|$)`);e.className=e.className.replace(n," ")}}(document.documentElement,"desktop-active")}getBounds(e){S.getBounds(((t,n)=>{e(t,n)}))}setShape(e,t=Function.prototype){S.setShape(e,t)}startTilingOrTabbing(e,t=Function.prototype){FSBL.Clients.RouterClient.transmit("DockingService.startTilingOrTabbing",e),t()}startMovingWindow(e){f.System.Window.getCurrent().startMovingWindow(e)}stopMovingWindow(){f.System.Window.getCurrent().stopMovingWindow()}cancelTilingOrTabbing(e,t=Function.prototype){console.debug("CancelTilingOrTabbing"),m.default.transmit("DockingService.cancelTilingOrTabbing",e),t()}sendIdentifierForTilingOrTabbing(e,t=Function.prototype){FSBL.Clients.RouterClient.transmit("DockingService.identifierForTilingOrTabbing",e),t()}stopTilingOrTabbing(e,t=Function.prototype){const n=()=>{m.default.query("DockingService.stopTilingOrTabbing",e,(()=>{t()})),m.default.transmit("DockingService.stopTilingOrTabbing",e)};return e.mousePosition?(n(),e.allowDropOnSelf?void 0:t()):f.System.getMousePosition(((r,i)=>{if(e.mousePosition=i,n(),!e.allowDropOnSelf)return t()}))}getStackedWindow(e,t){if(h.default.system.debug("WindowClient.getStackedWindow",e),t=t||e,(e=e||{}).windowIdentifiers=e.windowIdentifiers||[],!S.parentWindow&&e.create){const n=e=>{const{parentName:r}=e.data;S.setParent({windowName:r},((e,n)=>{t?.(e,n)})),S.removeListener("parent-set",n)};S.addListener("parent-set",n),FSBL.Clients.LauncherClient.spawn("StackedWindow",{windowType:"StackedWindow",data:{windowIdentifiers:e.windowIdentifiers},options:{newStack:!0}},((e,n)=>{h.default.system.debug("WindowClient.getStackedWindow-success",e,n),e&&t?.(e,null)}))}else S.getParent(t)}getMonitorInfo(e,t){l.getMyWindowIdentifier((n=>{e.windowIdentifier||(e.windowIdentifier=n),this.routerClient.query("Launcher.getMonitorInfo",e,((e,n)=>{t&&t(e,n.data)}))}))}fitToDOM(e,t){let n=document.documentElement.offsetHeight,r=this.options.width;"function"==typeof e&&(t=e,e=null),e&&e.padding&&(e.padding.height&&(n+=e.padding.height),e.padding.width&&(r+=e.padding.width)),e&&e.maxHeight&&n>e.maxHeight&&(n=e.maxHeight),h.default.system.debug("WindowClient.FitToDOM:newHeight",n,e),this.getMonitorInfo({},((e,i)=>{i&&(n>=i.availableRect.height&&(n=i.availableRect.height),r>=i.availableRect.width&&(r=i.availableRect.width)),h.default.system.debug("WindowClient.FitToDOM:fixBounds",n,r),S.getBounds(((e,i)=>{i.width!=r||i.height!=n?(i.width=r,i.height=n,S.setBounds({bounds:i},t)):"function"==typeof t&&t()}))}))}_setHeaderHeight(e){let t=document.getElementsByClassName("fsbl-header")[0];if(!t)return setTimeout((()=>{this._setHeaderHeight(e)}),100);let n=window.getComputedStyle(t,null).getPropertyValue("height");document.body.style.marginTop=n,e.bumpElements&&"auto"===e.bumpElements.bumpBy&&(e.bumpElements.bumpBy=n),this.bumpFixedElements(e.bumpElements)}async start(e=Function.prototype){if(p.default.args(e,"function"),_.iAmAServiceWindow())return this.isInAService=!0,e();setInterval((()=>{S&&document?.title&&this.title!==document.title&&(!FSBL.System.isBrowserView&&FSBL.System.hasBrowserView||this.setWindowTitlePrivate(document.title))}),200);const t=this;await w.default.getValue("finsemble");let n=null,r=!1,i=!1,o=!1;this.componentState={},(e=>{y.FinsembleWindow.getInstance({name:this.finWindow?.name,uuid:this.finWindow?.uuid},((t,n)=>{if(h.default.system.debug(`FinsembleWindow.getInstance ${this.finWindow?.name}`),"Cannot Wrap Service Manager or Services"==t)return this.isInAService=!0,this.windowHash=l.camelCase("activeWorkspace",window.name),e();!t&&n||h.default.system.error("wrap failure",t),this.finsembleWindow=n,({finsembleWindow:S}=this),this.windowHash=l.camelCase("activeWorkspace",S.name),this.addListeners(),this.routerClient.subscribe("Finsemble.WorkspaceService.groupUpdate",((e,t)=>this.groupUpdateHandler(e,t))),e()}))})((()=>{this.retrieveMonitorDimensions(),this.getInitialOptions((()=>{if(!S||!S.windowOptions)return this.isInAService||h.default.system.error("Something went wrong attempting to get the current window."),e();({customData:n}=S.windowOptions),h.default.system.debug("getInitialOptions",n),n&&(r=b(n,"window.compound",!1),n.cssOverride&&(h.default.system.debug("Window has cssOverride. See local window to inspect object"),i=!0),o=!r&&b(n,["foreign","components","Window Manager","FSBLHeader"],!1)),a.parallel([function(e){i&&t.injectStylesheetOverride(),e()},function(e){w.default.getValue("finsemble",((n,r)=>{n&&h.default.system.error("Error reading windowService config from finsemble");const i=r.services.windowService.config.enableWindowsAeroSnap;t.enableWindowsAeroSnap=g.ConfigUtilInstance.getDefault(r,"config.servicesConfig.docking.enableWindowsAeroSnap",i),e()}))},function(e){if(f.System.isBrowserView())e();else{if(!n||!n.component||_.iAmAServiceWindow())return e();{let r=g.ConfigUtilInstance.getDefault(n,"customData.foreign.services.windowService.manageWindowMovement",!1);r||(r=g.ConfigUtilInstance.getDefault(n,"customData.foreign.services.dockingService.manageWindowMovement",!1));const i=g.ConfigUtilInstance.getDefault(n,"customData.foreign.components.Window Manager.FSBLHeader",!1),o=g.ConfigUtilInstance.getDefault(n,"customData.window.dockable",!1);r=r||i||o;let s=_.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowAutoArrange",oldValue:"isArrangable"},null);if(null===s&&(s=_.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowAutoArrange",oldValue:"isArrangeable"},r)),!r&&!s)return e();if(n.window.allowAutoArrange=s,n.window.snapping=_.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowSnapping",oldValue:"ignoreSnappingRequests"},r),n&&n.foreign&&n.foreign.services){const e=void 0!==n.foreign.services.windowService?"windowService":"dockingService";void 0!==n.foreign.services[e].ignoreSnappingRequests&&(n.window.snapping=!n.foreign.services[e].ignoreSnappingRequests)}if(g.ConfigUtilInstance.getDefault(n,"customData.window.ephemeral",!1)&&!n.window.snapping&&(n.window.snapping=!1),n.window.tiling=_.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowTiling",oldValue:"ignoreTilingAndTabbingRequests"},r),n.window.tabbing=_.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowTabbing",oldValue:"ignoreTilingAndTabbingRequests"},r),n&&n.foreign&&n.foreign.services){const e=void 0!==n.foreign.services.windowService?"windowService":"dockingService";void 0!==n.foreign.services[e].ignoreTilingAndTabbingRequests&&(n.window.tiling=!n.window.tiling,n.window.tabbing=!n.window.tabbing)}n.window.canGroup=_.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowGrouping",oldValue:"canGroup"},r),n.window.canMinimize=_.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowMinimize",oldValue:"canMinimize"},void 0),void 0===n.window.canMinimize&&(n.window.canMinimize=n.component.canMinimize,void 0===n.window.canMinimize&&(n.window.canMinimize=r)),void 0===n.window.canMaximize&&(n.window.canMaximize=n.component.canMaximize,void 0===n.window.canMaximize&&(n.window.canMaximize=r)),n.window.overwriteStartDocked=g.ConfigUtilInstance.getDefault(n,"customData.foreign.services.workspaceService.global",!1),t.registerWithDockingManager(n.window,(()=>{t.cacheInitialBounds(e)}))}}}],((t,n)=>e(t,n)))}))}))}}var I=new E({startupDependencies:{clients:["storageClient"]},onReady(e){I.start(e)},name:"windowClient"});t.default=I},6192:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Globals=void 0,t.Globals="undefined"==typeof window?n.g:window},4971:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.singleton=void 0,t.singleton=(e,t)=>{const r=Symbol.for(`com.finsemble.singleton.${e}`);return Object.getOwnPropertySymbols(n.g).indexOf(r)>-1||(n.g[r]=new t),n.g[r]}},78379:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.MOVE_REASON=t.LAUNCHER_SERVICE=t.HEARTBEAT_TIMEOUT_CHANNEL=t.COMPONENT_STATE_STORAGE_TOPIC=t.WINDOW_SERVICE_REQUESTS=t.WORKSPACE=t.WINDOW=t.INTERRUPTIBLE_EVENTS=t.EVENT_INTERRUPT_CHANNEL=t.DOCKING=t.SERVICE_STOP_CHANNEL=t.SERVICE_START_CHANNEL=t.WINDOWSTATE=t.SERVICES_STATE_CHANNEL=t.CLIENT_SERVER_MAPPING=t.SERVICE_QUERY_READY_CHANNEL=t.SERVICE_CLOSED_CHANNEL=t.SERVICE_CLOSING_CHANNEL=t.SERVICE_READY_CHANNEL=t.SERVICE_INITIALIZING_CHANNEL=t.APPLICATION_STATE_CHANNEL=t.WRAPPERS=void 0,t.WRAPPERS={EVENTS:["title-changed","bringToFront","setBounds","alwaysOnTop","setOpacity"]},t.APPLICATION_STATE_CHANNEL="Finsemble.Application.State",t.SERVICE_INITIALIZING_CHANNEL="Finsemble.ServiceManager.serviceInitializing",t.SERVICE_READY_CHANNEL="Finsemble.ServiceManager.serviceReady",t.SERVICE_CLOSING_CHANNEL="Finsemble.ServiceManager.serviceClosing",t.SERVICE_CLOSED_CHANNEL="Finsemble.ServiceManager.serviceClosed",t.SERVICE_QUERY_READY_CHANNEL=e=>`Finsemble.ServiceManager.queryReady.${e}`,t.CLIENT_SERVER_MAPPING=e=>({authenticationClient:"authenticationService",configClient:"configService",distributedStoreClient:"dataStoreService",hotkeysClient:"hotkeysService",linkerClient:"linkerService",logger:"loggerService",searchClient:"searchService",storageClient:"storageService",windowClient:"windowService",workspaceClient:"workspaceService"}[e]),t.SERVICES_STATE_CHANNEL="Finsemble.State.Services",(n=t.WINDOWSTATE||(t.WINDOWSTATE={}))[n.NORMAL=0]="NORMAL",n[n.MINIMIZED_WAS_NORMAL=1]="MINIMIZED_WAS_NORMAL",n[n.MAXIMIZED=2]="MAXIMIZED",n[n.MINIMIZED_WAS_MAXIMIZED=3]="MINIMIZED_WAS_MAXIMIZED",n[n.TRANSITIONING=4]="TRANSITIONING",t.SERVICE_START_CHANNEL="Finsemble.Service.Start",t.SERVICE_STOP_CHANNEL="Finsemble.Service.Stop",t.DOCKING={GROUP_UPDATE:"DockingService.groupUpdate",WORKSPACE_GROUP_UPDATE:"Finsemble.WorkspaceService.groupUpdate",REQUEST_PUBLISH:"DockingService.requestGroupDataPublish"},t.EVENT_INTERRUPT_CHANNEL="Finsemble.Event.Interrupt",t.INTERRUPTIBLE_EVENTS=["close-requested","closed","close-complete","_container-close-handlers"],t.WINDOW={DELAYABLE_EVENTS:["close-requested","closed","close-complete","_container-close-handlers"],CANCELABLE_EVENTS:["close-requested"]},t.WORKSPACE={DELAYABLE_EVENTS:["load-requested","close-requested","save-requested"],CANCELABLE_EVENTS:["close-requested"],CLEAN_SHUTDOWN:"Finsemble.Workspace.cleanShutdown",UPDATE_PUBSUB:"Finsemble.WorkspaceService.update",STORAGE_TOPIC:"finsemble.workspace",CACHE_STORAGE_TOPIC:"finsemble.workspace.cache",ALL_WORKSPACES:"finsemble.allWorkspaces",ACTIVE_WORKSPACE:"activeWorkspace",LAST_USED_WORKSPACE_TOPIC:"finsemble",LAST_USED_WORKSPACE_NAME:"finsemble.lastUsedWorkspace.name",LAST_USED_WORKSPACE:"finsemble.lastUsedWorkspace",INITIAL_WORKSPACE_PREFERENCE:"finsemble.initialWorkspace",PUBLISH_REASONS:{INIT:"workspace:initialization",LOAD_DATA_RETRIEVED:"workspace:load:dataRetrieved",LOAD_FINISHED:"workspace:load:finished",WINDOW_REMOVED:"window:remove",WINDOW_ADDED:"window:add",LOAD_STARTED:"workspace:load:start",WORKSPACE_REMOVED:"Workspace:remove",WORKSPACE_RENAMED:"rename",SWITCHTO_TERMINATED:"workspace:switchTo:terminated",NEW_WORKSPACE:"new workspace",SAVE_AS:"APPLICATION LIFECYCLE:WORKSPACE LIFECYCLE:SaveAs:Workspace:Save As"},API_CHANNELS:{NEW_WORKSPACE:"Finsemble.Workspace.NewWorkspace",SAVE:"Finsemble.Workspace.Save",RENAME:"Finsemble.Workspace.Rename",SAVE_AS:"Finsemble.Workspace.SaveAs",SWITCH_TO:"Finsemble.Workspace.SwitchTo",IMPORT:"Finsemble.Workspace.Import",EXPORT:"Finsemble.Workspace.Export",REMOVE:"Finsemble.Workspace.Remove",SAVE_GLOBAL_DATA:"Finsemble.Workspace.SaveGlobalData",SAVE_VIEW_DATA:"Finsemble.Workspace.SaveViewData",GET_GLOBAL_DATA:"Finsemble.Workspace.GetGlobalData",GET_VIEW_DATA:"Finsemble.Workspace.GetViewData",GET_WORKSPACES:"Finsemble.Workspace.GetWorkspaces",GET_WORKSPACE_NAMES:"Finsemble.Workspace.GetWorkspaceNames",SET_WORKSPACE_ORDER:"Finsemble.Workspace.SetWorkspaceOrder",GET_ACTIVE_WORKSPACE:"Finsemble.Workspace.GetActiveWorkspace",GET_ACTIVE_WORKSPACE_DIRTY:"Finsemble.Workspace.GetActiveWorkspaceDirty",GET_TEMPLATES:"Finsemble.Workspace.GetTemplates",IMPORT_TEMPLATE:"Finsemble.Workspace.ImportTemplate",EXPORT_TEMPLATE:"Finsemble.Workspace.ExportTemplate",REMOVE_TEMPLATE:"Finsemble.Workspace.RemoveTemplate",SET_WINDOW_STATE:"Finsemble.Workspace.SetWindowData",GET_WINDOW_STATE:"Finsemble.Workspace.GetWindowData",ADD_WINDOW:"WorkspaceService.addWindow",REMOVE_WINDOW:"WorkspaceService.removeWindow"},DEFAULT_WINDOW_PROPS:["name","componentType","windowType","alwaysOnTop","autoShow","minWidth","minHeight","maxWidth","maxHeight","resizable","maximizable","minimizable","opacity","windowState","left","top","width","height","right","bottom","defaultLeft","defaultTop","defaultWidth","defaultHeight","defaultRight","defaultBottom","monitorInfo","icon","cachedBounds","showTaskbarIcon","isEvergreen","compositeComponentData"],ADDITIONAL_WINDOW_PROPS:{WebWindow:["url","fullscreen","frame","backgroundColor","transparent","waitForPageLoad","affinity","appUUID"],NativeWindow:["path","alias","arguments","argumentsAsQueryString","isWPF"],StackedWindow:["childWindowIdentifiers","visibleWindowIdentifier","bounds"]}},t.WINDOW_SERVICE_REQUESTS={REMOTE_FOCUS:"WindowService.remoteFocus",SET_ALWAYS_ON_TOP:"WindowService-Request-setAlwaysOnTop",IS_ALWAYS_ON_TOP:"WindowService-Request-isAlwaysOnTop"},t.COMPONENT_STATE_STORAGE_TOPIC="finsemble.componentStateStorage",t.HEARTBEAT_TIMEOUT_CHANNEL="Finsemble.WindowService.HeartbeatTimeout",t.LAUNCHER_SERVICE={WINDOW_CLOSED:"LauncherService.WindowClosed"},t.MOVE_REASON={AERO_KEY:"aero_key",SYSTEM_RESTORED:"system_restored"}},13854:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FSBLDependencyManagerSingleton=t.FSBLDependencyManager=void 0;const i=n(5939),o=r(n(39319)),s=n(78379),a=r(n(5020)),u=r(n(72551));class c extends i.EventEmitter{constructor(e){super(),this.callback=e.callback,this.dependencies=e.dependencies,this.startupTimer=null,this.setStartupTimer=this.setStartupTimer.bind(this),this.clearStartupTimer=this.clearStartupTimer.bind(this)}clearStartupTimer(){this.startupTimer&&clearTimeout(this.startupTimer),delete this.startupTimer}setStartupTimer(){const e=this;this.startupTimer=+setTimeout((()=>{e.emit("timeout")}),1e4)}}function l(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}class f{constructor(){this.servicesAreAllOnline={},this.clientsAreAllOnline={},this.onlineClients=[],this.dependencies={},this.startupTimers={},this.startupTimerFired=!1,this.bindCorrectContext()}waitFor(e,t){const n=l();e.clients||(e.clients=[]),e.clients.length&&(e.clients=e.clients.map((e=>e.charAt(0).toLowerCase()+e.slice(1))));const r=new c({dependencies:e,callback:t});return r.setStartupTimer(),r.on("timeout",(()=>{this.onDependencyTimeout(r)})),this.dependencies[n]=r,this.checkDependencies(),r}onDependencyTimeout(e){const t=this.getOfflineClients();let n="APPLICATION LIFECYCLE:STARTUP:Dependency not online after 10 seconds.";t.length&&(n=`${n} Waiting for these clients: ${t.join(", ")}.`),e.emit("err",n)}checkDependencies(){for(const e in this.dependencies){const t=this.dependencies[e],{dependencies:n,callback:r}=t;(!n.clients.length||this.clientsAreAllOnline[e]||(this.clientsAreAllOnline[e]=this.checkClients(n.clients),this.clientsAreAllOnline[e]))&&(delete this.dependencies[e],t.clearStartupTimer(),r&&r())}}getOfflineClients(){let e=[];for(const t in this.dependencies){const{dependencies:n}=this.dependencies[t];e=e.concat(n.clients.filter((e=>!this.onlineClients.includes(e))))}return e.filter(((t,n)=>e.indexOf(t)===n))}checkClients(e){return e.every((e=>this.onlineClients.includes(e)))}setClientOnline(e){this.onlineClients.includes(e)||(this.onlineClients.push(e),this.checkDependencies())}getOnlineClients(){return this.onlineClients}bindCorrectContext(){this.checkDependencies=this.checkDependencies.bind(this),this.checkClients=this.checkClients.bind(this),this.getOfflineClients=this.getOfflineClients.bind(this),this.onDependencyTimeout=this.onDependencyTimeout.bind(this),this.waitFor=this.waitFor.bind(this)}}class d{constructor(){this.offlineServices=[],this.dependencies={},this.checkDependencies=this.checkDependencies.bind(this)}waitFor(e,t){u.default.system.debug("DependencyManager:waitFor",e),e.services||(e.services=[]);const n=l();this.dependencies[n]={dependencies:e,callback:t}}checkDependencies(){if(console.debug("checkDependencies",this.dependencies),Object.keys(this.dependencies))for(const e in this.dependencies){const{dependencies:t,callback:n}=this.dependencies[e];(u.default.system.debug("DependencyManager:checkDependency",t.services,this.offlineServices),!t.services.length||this.checkServices(t.services))&&(console.debug("checkDependencies callback"),delete this.dependencies[e],n&&n())}}checkServices(e){return e.every((e=>this.offlineServices.includes(e)))}setServiceOffline(e){u.default.system.debug("setServiceOffline",e),console.debug("setServiceOffline",e),this.offlineServices.push(e),this.checkDependencies()}}class h extends i.EventEmitter{constructor(){super(),this.startup=new f,this.shutdown=new d,this.RouterClient=o.default,this.AuthorizationCompleted=!1,this.bindCorrectContext(),this.onAuthorizationCompleted(this.startup.checkDependencies),o.default.onReady(this.listenForServices)}bindCorrectContext(){this.listenForServices=this.listenForServices.bind(this),this.onAuthorizationCompleted=this.onAuthorizationCompleted.bind(this)}setClientOnline(e){this.startup.setClientOnline(e)}onServiceStateChange(e){Object.keys(e).forEach((t=>{const{state:n}=e[t];"closed"===n&&this.shutdown.setServiceOffline(t)}))}listenForServices(){u.default.system.debug("DependencyManager:listenForServices before wait"),a.default.waitForBootStage("kernel","stageEntered",(()=>{u.default.system.debug("DependencyManager:listenForServices after wait"),this.RouterClient.subscribe(s.SERVICES_STATE_CHANNEL,((e,t)=>{u.default.system.debug("DependencyManager:listenForServices SERVICES_STATE_CHANNEL",t.data),this.onServiceStateChange(t.data)})),this.RouterClient.addListener(s.SERVICE_CLOSED_CHANNEL,((e,t)=>{u.default.system.debug("DependencyManager:listenForServices SERVICE_CLOSED_CHANNEL",t.data);const n={};n[t.data.name]={state:"closed"},this.onServiceStateChange(n)})),this.RouterClient.subscribe(s.APPLICATION_STATE_CHANNEL,((e,t)=>{switch(t.data.state){case"authenticated":case"ready":break;case"closing":this.shutdown.checkDependencies()}}))}))}onAuthorizationCompleted(e){this.AuthorizationCompleted?e():this.addListener("AuthorizationCompleted",e)}}t.FSBLDependencyManager=h,t.FSBLDependencyManagerSingleton=new h,t.default=t.FSBLDependencyManagerSingleton},24232:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.checkDeprecatedConfigs=t.isEqualIgnoringArrayOrder=t.sleep=t.checkIfBoundsAreEqual=t.removeKeys=t.toRecord=t.isStackedWindow=t.wrapWithTimeout=t.timeoutPromise=t.getRandomWindowName=t.getProp=t.composeRL=t.instrumentPromise=t.promisify=t.identity=t.isNumber=t.chunkArray=t.Timeout=t.mockLogger=t.capitalizeFirst=t.clone=t.isServiceInWindow=t.iAmAServiceWindow=t.guuid=void 0;const i=n(50586),o=r(n(80089)),s=r(n(75892)),a=r(n(47184)),u=r(n(65162)),c=n(33998),l=r(n(72551)),f=window;function d(e,t){if(Array.isArray(e))return e.slice();try{return JSON.parse(JSON.stringify(e))}catch(e){return t("clone error",e),e}}function h(e,t){return new Promise(((n,r)=>{const i=setTimeout((()=>{clearTimeout(i),r(t)}),e)}))}function p(e,t,n){return`${e}.${t}.${n}`}function y(e,t,n){const r=`${p(e.baseString,e.newPath,e.newValue)}`;l.default.system.deprecated(`${p(e.baseString,t,n)} has been deprecated in favor of ${r}`)}t.guuid=function(){return i.v4()},t.iAmAServiceWindow=function(){return!(!f.finsembleServices||!f.finsembleServices.length)},t.isServiceInWindow=function(e){return f.finsembleServices&&f.finsembleServices.find((t=>t.name===e))},t.clone=d,t.capitalizeFirst=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},t.mockLogger=new class{constructor({debug:e}={debug:!0}){e?(this.system=console,this.system.debug=console.log):this.system={warn:Function.prototype,debug:Function.prototype,log:Function.prototype,info:Function.prototype,error:console.error}}isLogMessage(){return!0}start(){}},t.Timeout=class{constructor(e,t){this.fired=!1,this.id=setTimeout((()=>{e(),this.fired=!0}),t),this.clear=this.clear.bind(this),this.didFire=this.didFire.bind(this)}clear(){this.fired||clearTimeout(this.id)}didFire(){return this.fired}},t.chunkArray=function(e,t){if(e<=0)throw new Error("Can't chunk array by number less than 0");return t.reduce(((n,r,i)=>{if(i%e==0){const r=[];for(let n=i;n<i+e;n++)n<t.length&&r.push(t[n]);n.push(r)}return n}),[])},t.isNumber=function(e){return!(!e||Number.isNaN(Number(e)))&&Number(e)},t.identity=function(e){return e},t.promisify=function(e,t){return function(){const n=Array.prototype.slice.call(arguments);return new Promise(((r,i)=>{n.push(((e,t)=>e?i(e):r(t))),e.apply(t,n)}))}},t.instrumentPromise=async(e,t,n)=>{const r=`${t} end`;return e(`${t} start`),n.then((()=>e(r)))},t.composeRL=(...e)=>e.reduce(((e,t)=>(...n)=>e(t(...n)))),t.getProp=function e(t,n,r){const i=Array.isArray(n)?n:n.split(".").filter((e=>e.length));return i.length?e(t[i.shift()],i,r):void 0===t?r:t},t.getRandomWindowName=function(e="RouterClient"){return`${e}-${i.v4()}`},t.timeoutPromise=h,t.wrapWithTimeout=function(e,t,n){return Promise.race([e,h(t,n)])},t.isStackedWindow=function(e){return e&&"StackedWindow"===(o.default(e,"windowIdentifier.windowType")||e.windowType)},t.toRecord=function(e,t){const n="string"==typeof e?t=>t[e]:e;return t.reduce(((e,t)=>(e[n(t)]=t,e)),{})},t.removeKeys=function(e,t){if(!e)return e;const n=Object.keys(e).filter((e=>!t.includes(e)));return s.default(e,n)},t.checkIfBoundsAreEqual=function(e,t){if(!e||!t)return!1;const n=["left","right","top","bottom","width","height"],r=s.default(e,n),i=s.default(t,n);return!!a.default(r,i)},t.sleep=function(e,t=!1){return new Promise(((n,r)=>{t?setTimeout((()=>{try{r("timeout expired")}catch{}}),e):setTimeout(n,e)}))},t.isEqualIgnoringArrayOrder=function(e,t){const n=d(e,Function.prototype),r=d(t,Function.prototype);return u.default(n,r,((e,t)=>{if(Array.isArray(e)&&Array.isArray(t))return u.default(e.sort(),t.sort())}))},t.checkDeprecatedConfigs=function(e,t,n){const{baseString:r,oldPath:i,newPath:o,oldValue:s,newValue:a}=t;let u=c.ConfigUtilInstance.getDefault(e,p(r,o,a),null);return null===u&&(u=c.ConfigUtilInstance.getDefault(e,p(r,o,s),null),u?y(t,o,s):(u=c.ConfigUtilInstance.getDefault(e,p(r,i,a),null),u?y(t,i,a):(u=c.ConfigUtilInstance.getDefault(e,p(r,i,s),null),u?y(t,i,s):u=n))),u}},59459:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=s(n(39319)),u=o(n(78379));t.default=class{constructor(e,t){this.allowDelay=!1,this.delayed=!1,this.allowCancel=!1,this.canceled=!1,this.completed=!1,this.event=e.event,this.source=e.source,this.sourceType=e.sourceType,this.listenerGuid=e.listenerGuid,u[this.sourceType.toUpperCase()]&&u[this.sourceType.toUpperCase()].DELAYABLE_EVENTS.includes(this.event)&&(this.allowDelay=!0),u[this.sourceType.toUpperCase()]&&u[this.sourceType.toUpperCase()].CANCELABLE_EVENTS.includes(this.event)&&(this.allowCancel=!0),this.handler=e.handler,this.queryMessage=t,this.guid=t.data.guid,this.internalHandler()}async internalHandler(){this.data=this.queryMessage.data.data,this.handler&&await this.handler(this),this.delayed||this.canceled||this.completed||this.done()}cancel(){this.allowCancel&&(this.canceled=!0,this.done())}wait(){this.allowDelay?(this.delayed=!0,this.queryMessage.sendQueryResponse(null,{delayed:!0})):this.done()}done(e){this.completed=!0,this.delayed?a.default.transmit(`Finsemble.Listener.Done.${this.guid}.${this.listenerGuid}`,{canceled:this.canceled,data:e}):this.queryMessage.sendQueryResponse(null,{canceled:this.canceled,data:e})}}},57815:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(39319)),o=r(n(72551)),s=r(n(59459));t.default=class{constructor(e){this.eventList=[],this.eventHandlerMap={},this.eventGuidMap={},this.name=e.name,this.sourceType=e.sourceType,window.addEventListener("beforeunload",(()=>{this.cleanup()}))}addListener(e,t){return this.addEventListener(e,t)}removeListener(e,t){return this.removeEventListener(e,t)}addEventListener(e,t){if(!t)return console.error("no handler",e);if(o.default.system.debug("addEventListener:",e),this.eventHandlerMap[e]||(this.eventHandlerMap[e]=[],this.eventGuidMap[e]=[]),!this.eventHandlerMap[e].includes(t)){const n=`${window.name}_public_${Date.now()}_${Math.random()}`;this.eventHandlerMap[e].push(t),this.eventGuidMap[e].push(n),i.default.transmit(`Finsemble.RegisterInterruptibleEvent.${this.name}`,{event:e,listenerGuid:n}),i.default.addResponder(`Finsemble.Interrupt.${n}`,((r,i)=>{new s.default({source:this.name,sourceType:this.sourceType,listenerGuid:n,handler:t,event:e},i)}))}}removeEventListener(e,t){if(o.default.system.debug("removeEventListener:",e),!this.eventHandlerMap[e])return o.default.system.warn("not found");let n=this.eventHandlerMap[e].indexOf(t);if(-1!==n){const t=this.eventGuidMap[e][n];this.eventHandlerMap[e].splice(n,1),this.eventGuidMap[e].splice(n,1),i.default.transmit(`Finsemble.UnregisterInterruptibleEvent.${window.name}`,{event:e,guid:t}),i.default.removeResponder(`Finsemble.Interrupt.${t}`)}}cleanup(){for(var e of Object.keys(this.eventHandlerMap))for(var t of this.eventHandlerMap[e])this.removeEventListener(e,t)}}},50631:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{}},52283:(e,t)=>{"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.FinsembleNotificationOptions=t.ActionTypes=void 0,(r=t.ActionTypes||(t.ActionTypes={})).DISMISS="DISMISS",r.SNOOZE="SNOOZE",r.SPAWN="SPAWN",r.QUERY="QUERY",r.PUBLISH="PUBLISH",r.TRANSMIT="TRANSMIT",(n=t.FinsembleNotificationOptions||(t.FinsembleNotificationOptions={})).MARK_AS_UNREAD="MARK_AS_UNREAD",n.MARK_AS_READ="MARK_AS_READ",n.SNOOZE="SNOOZE",n.DISMISS="DISMISS",n.SETTINGS="SETTINGS",n.DETAILS="DETAILS"},47887:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(e,t){this.source=e,this.issuedAt=t}}},15993:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{}},39243:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{}},82369:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(72551)),o=n(51742),s={activeTransports:{},liveTransport:null,addTransport(e,t){this.activeTransports[e]=t,i.default.system.log(`RouterTransport ${e} added to activeTransports`)},getActiveTransports(e){const t=[];function n(e){-1===t.indexOf(e)&&t.push(e)}return o.System.InterApplicationBus&&n("IPCBus"),n("FinsembleTransport"),SharedWorker&&n("SharedWorker"),n(e.sameDomainTransport),n(e.crossDomainTransport),i.default.system.log("getActiveTransports",t),t},getTransport:(e,t,n,r,i)=>new Promise(((o,a)=>{const u=s.activeTransports[t];u?s.liveTransport=new u(e,n,r,i,(e=>{o(e)})):a(`unknown router transport name: ${t}`)})),close(){s.liveTransport&&(s.liveTransport.close(),s.liveTransport=null)}},a=function(e,t,n,r,o){let s;const a=this;this.send=function(e,t){1===arguments.length?(t=arguments[0],e=null):(e=arguments[0],t=arguments[1]),i.default.system.verbose("SharedWorkerTransport Outgoing Transport",t);try{s.port.postMessage([e,t])}catch(e){i.default.system.error(`SharedWorkerTransport: post message failed: ${JSON.stringify(e)}`,"Probable cause is sending illegal data type (e.g. function).")}},this.identifier=function(){return"SharedWorker"};const u=e.transportSettings.SharedWorker&&e.transportSettings.SharedWorker.workerPath?e.transportSettings.SharedWorker.workerPath:`${e.routerDomainRoot}/common/routerSharedWorker.js`;i.default.system.log(`SharedWorker Transport Initializing for ${n} using ${u}`),console.log(`SharedWorker Transport Initializing for ${n} using ${u}`),s=new SharedWorker(u,{name:"Finsemble",credentials:"include"}),s.port.onmessage=function(e){const n=e.data[0],r=e.data[1],o={transportID:a.identifier(),port:n};i.default.system.verbose("SharedWorkerTransport Incoming Transport",o,"Message",r),t(o,r)},s.onerror=function(e){i.default.system.error(`SharedWorkerTransport Transport Error${JSON.stringify(e)}`)},s.port.start(),"RouterService"===n&&s.port.postMessage({data:"connect",source:"RouterService"}),this.close=()=>{s.port.close()},o(this)},u=function(e,t,n,r,s){const{uuid:a}=o.System.Application.getCurrent(),u=this;this.send=function(e,t){let n;1===arguments.length?(n=r,t=arguments[0]):(n=e.name,t=arguments[1]),i.default.system.verbose("IPCTransport Outgoing Transport",a,n,"Message",t),o.System.InterApplicationBus.publish(n,t,(()=>{}),(()=>{}))},this.identifier=function(){return"IPCBus"},i.default.system.log(`IPCBus Transport Initializing for ${n}`),console.log(`IPCBus Transport Initializing for ${n}`);const c=o.System.InterApplicationBus.subscribe("*",n,(function(e,n){const r={transportID:u.identifier(),senderUuid:n,name:e.header.origin};i.default.system.verbose("IPCTransport Incoming Transport",r,"Message",e),t(r,e)}),(()=>{}),(function(e){i.default.system.error(`IPCBus Subscribe Failure: ${e}`)}));this.close=()=>{o.System.InterApplicationBus.unsubscribe(c)},s(this)},c=function(e,t,n,r,o){const s=`${e?.transportSettings?.FinsembleTransport?.serverAddress??e?.transportSettings?.serverAddress??"ws://127.0.0.1:3376"}/router`,a=this;let u;function c(){i.default.system.error(`FinsembleTransport Connection Timeout for ${n}`),o(a)}function l(){i.default.system.log(`FinsembleTransport Transport Initializing for ${n} using ${s}`),console.log(`FinsembleTransport Transport Initializing for ${n} using ${s}`),s.startsWith("ws:")||s.startsWith("wss:")||console.error(`Illegal WebSocket address "${s}" (Missing ws:// or wss:// ?)`),u=new WebSocket(s);const e=setTimeout(c,3e3);u.addEventListener("open",(()=>{clearTimeout(e),i.default.system.log("FinsembleTransport Connected to Server"),console.log("FinsembleTransport Connected to Server"),u.addEventListener("message",(e=>{const r=JSON.parse(e.data);("RouterService"===n&&"ROUTER_SERVICE"==r.dest||n===r.message.client)&&function(e){const n={transportID:a.identifier(),client:e.clientMessage.header.origin};i.default.system.verbose("FinsembleTransport Incoming Transport",n,"Message",e),t(n,e.clientMessage)}(r.message)})),o(a)}))}this.send=function(e,t){let n,r;1===arguments.length?(n="ROUTER_SERVICE",r={clientMessage:t=arguments[0]}):(n="ROUTER_CLIENT",t=arguments[1],r={client:e.client,clientMessage:t}),i.default.system.verbose("FinsembleTransport Outgoing Transport",n,"NewMessage",r),u.readyState===WebSocket.OPEN&&u.send(JSON.stringify({dest:n,message:r})),u.readyState===WebSocket.CONNECTING&&u.addEventListener("open",(()=>{u.send(JSON.stringify({dest:n,message:r}))})),u.readyState===WebSocket.CLOSED&&(l(),u.addEventListener("open",(()=>{u.send(JSON.stringify({dest:n,message:r}))}))),u.readyState===WebSocket.CLOSING&&(u.onclose=()=>{l(),u.addEventListener("open",(()=>{u.send(JSON.stringify({dest:n,message:r}))}))})},this.identifier=function(){return"FinsembleTransport"},this.close=()=>{u.close()},l()};s.addTransport("SharedWorker",a),s.addTransport("IPCBus",u),s.addTransport("FinsembleTransport",c),t.default=s},51742:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.System=void 0;const r=n(16925);class i{constructor(e,t,n){return new fin.desktop.Window(e,t)}static get getCurrent(){return fin.desktop.Window.getCurrent}static get wrap(){return fin.desktop.Window.wrap}}class o{constructor(e,t,n){t&&t()}static getCurrent(){const{windowName:e}=r.Startup.getInstance().getStartupData();return{name:e,uuid:`${e}-uuid`,getOptions:e=>{e&&e({})},addEventListener:()=>{},updateOptions:()=>{},close:()=>{},startMovingWindow:()=>{},stopMovingWindow:()=>{},isShowing:()=>{},bringToFront:()=>{},show:()=>{},hide:()=>{},setTaskbarIcon:()=>{}}}static wrap(){return{}}}class s{constructor(e,t,n){return new fin.desktop.Application(e,t)}static get getCurrent(){return fin.desktop.Application.getCurrent}static get wrap(){return fin.desktop.Application.wrap}}class a{constructor(e){new fin.desktop.Notification(e)}}class u{constructor(){return new fin.desktop.System.Clipboard}static get writeText(){return fin.desktop.System.Clipboard.writeText}static get writeHTML(){return fin.desktop.System.Clipboard.writeHTML}static get writeRTF(){return fin.desktop.System.Clipboard.writeRTF}static get readText(){return fin.desktop.System.Clipboard.readText}static get readHTML(){return fin.desktop.System.Clipboard.readHTML}static get readRTF(){return fin.desktop.System.Clipboard.readRTF}}class c{static isFreestanding(){return"undefined"==typeof fin}static get Application(){return s}static get Window(){return c.isFreestanding()?o:i}static get Notification(){return a}static get Clipboard(){return u}static async getMousePosition(e=Function.prototype){return new Promise(((t,n)=>{fin.desktop.System.getMousePosition((n=>{(n.left||0===n.left)&&(n.x=n.left),(n.top||0===n.top)&&(n.y=n.top),e(null,n),t(n)}),(t=>{e(t,null),n(t)}))}))}static getSDServerInfo(e=Function.prototype){return new Promise((t=>{fin.desktop.System.getSDServerInfo((n=>{t(n),e(n)}))}))}static getMonitorInfo(e=Function.prototype){return new Promise((t=>{fin.desktop.System.getMonitorInfo((n=>{t(n),e(n)}))}))}static container(){return"undefined"==typeof fin?"freestanding":fin.container?fin.container:"FEA"}static isBrowserView(){return!c.isFreestanding()&&fin.isBrowserView()}static getViewId(){return fin.getViewId()}static hasBrowserView(){return!c.isFreestanding()&&fin.hasBrowserView()}static get fin(){return fin||{}}static ready(e){return new Promise((t=>{fin.desktop.main((()=>{e&&e(),t()}))}))}static getHostSpecs(e=Function.prototype){return new Promise((t=>{fin.desktop.System.getHostSpecs((n=>{t(n),e(n)}))}))}static get InterApplicationBus(){return fin.desktop.InterApplicationBus}static get launchExternalProcess(){return fin.desktop.System.launchExternalProcess}static get terminateExternalProcess(){return fin.desktop.System.terminateExternalProcess}static get getAllApplications(){return fin.desktop.System.getAllApplications}static get exit(){return fin.desktop.System.exit}static get clearCache(){return fin.desktop.System.clearCache}static get showDeveloperTools(){return fin.desktop.System.showDeveloperTools}static get getRuntimeInfo(){return fin.desktop.System.getRuntimeInfo}static get addEventListener(){return c.isFreestanding()?window.addEventListener:fin.desktop.System.addEventListener}static get addSelectClientCertificateListener(){return fin.desktop.System.addSelectClientCertificateListener}static get addCertificateErrorListener(){return fin.desktop.System.addCertificateErrorListener}static get getVersion(){return fin.desktop.System.getVersion}static get getUpdateAvailable(){return fin.desktop.System.getUpdateAvailable}static get openUrlWithBrowser(){return fin.desktop.System.openUrlWithBrowser}static get getAllWindows(){return fin.desktop.System.getAllWindows}static get getProcessList(){return fin.desktop.System.getProcessList}static get getProtocolString(){return fin.desktop.System.getProtocolString}static get hideSplashScreen(){return fin.desktop.System.hideSplashScreen}static startupApplicationHandshake(){fin.desktop.System.startupApplicationHandshake&&fin.desktop.System.startupApplicationHandshake()}static closeApplication(e,t=Function.prototype){return new Promise((n=>{let r,i=!1;const o=()=>{i||(console.log("Attempting to terminate",e.uuid),e.terminate((()=>{t(),n()}),(()=>{i||(i=!0,clearInterval(r),console.log("force closing ",e.uuid),e.terminate())})))};r=setInterval(o,2e3),console.log("closing ",e.uuid),e.close(!1,(()=>{console.log("app.close: successfully closed",e.uuid),i=!0,clearInterval(r),t(),n()}),o)}))}}t.System=c},5020:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(39319)),o=r(n(72551)),s=n(56188),a=n(33509),u=n(95269),c=new class{publishBootStatus(e,t,n){console.log("publishStartingStatus",e,n),o.default.system.debug("publishBootStatus",e,t,n),i.default.publish(u.statusChannel(e),{name:e,type:t,state:n})}waitForBootStage(e,t,n=Function.prototype){return new Promise(((r,u)=>{o.default.system.debug("SystemManagerClient.waitForBootStage entry",e,t);const c=s.ALL_BOOT_STAGES.indexOf(e);"microkernel"===e&&"stageEntered"===t&&o.default.system.error("Cannot wait on `stageEntered` for microkernel because router isn't up yet. So will instead wait for microkernal stage complete.");const l=i.default.subscribe(a.STAGE_CHANNEL,((a,f)=>{if(o.default.system.debug("SystemManagerClient.waitForBootStage new stage",f.data.stage,l),a)o.default.system.error("SystemManagerClient.waitForBootStage subscribe error",a),n(a),u(a);else if(-1===c)a="illegal stage argument",o.default.system.debug("SystemManagerClient.waitForBootStage subscribe error",a,e),n(a),u(a);else{const a=s.ALL_BOOT_STAGES.indexOf(f.data.stage);o.default.system.debug("SystemManagerClient.waitForBootStage new stage",f.data,l),"stageEntered"===t&&a+1>=c?(o.default.system.debug("SystemManagerClient.waitForBootStage stageEntered",e,l,n.name),n(),r(),i.default.unsubscribe(l)):"stageCompleted"===t&&a>=c?(o.default.system.debug("SystemManagerClient.waitForBootStage completed",e,l),n(),r(),i.default.unsubscribe(l)):o.default.system.debug(`SystemManagerClient.waitForBootStage else currentStageIndex=${a} stageIndex=${c} `,a,c,e,l)}}))}))}waitForStartup(e,t=Function.prototype){return new Promise(((n,r)=>{o.default.system.debug(`SystemManagerClient.waitForStartup.${e}`,e);const s=i.default.subscribe(u.statusChannel(e),((a,u)=>{o.default.system.debug("SystemManagerClient.waitForStartup subscribe",e,a,u),a?(o.default.system.error("SystemManagerClient.waitForStartup subscribe error",a),t(a),r()):u.data.name===e&&"completed"===u.data.state&&(o.default.system.debug("SystemManagerClient.waitForStartup completed",e),t(),n(),i.default.unsubscribe(s))}))}))}publishCheckpointState(e,t,n){console.log("publishCheckpoint",e,t,n,u.checkpointChannel(e,t)),o.default.system.debug("publishCheckpoint",e,t,n,u.checkpointChannel(e,t)),i.default.publish(u.checkpointChannel(e,t),{windowName:e,checkpointName:t,state:n})}showSystemLog(){o.default.system.debug("SystemManagerClient.showSystemLog"),i.default.transmit(a.SHOW_SYSLOG_CHANNEL,!0)}systemLog(e,t){o.default.system.debug("SystemManagerClient.systemLog",e,t),i.default.transmit(a.SYSLOG_CHANNEL,{params:e,logMessage:t})}};t.default=c},76420:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.windowNameFromRouterHeader=t.getWindowType=t.isWindows=t.adjustBoundsToBeOnMonitor=t.isOnAMonitor=t.getNewBoundsWhenMovedToMonitor=t.openSharedData=t.injectJS=t.guuid=t.camelCase=t.getMyWindowIdentifier=t.getMonitorByDescriptor=t.windowOnMonitor=t.getMonitorFromCommand=t.getMonitor=t.getWhichMonitor=t.findMonitor=t.getWindowDescriptor=t.getFinWindow=t.getMonitorFromWindow=t.getMonitorFromXY=t.getAllMonitors=t.crossDomain=t.isPercentage=t.castToPromise=t.getContainerVersion=t.clone=t.Monitors=void 0;const i=r(n(36589)),o=n(51742),s=r(n(93802)),a=r(n(72551));function u(e,t={}){if(null===e||"object"!=typeof e)return e;if(e.constructor==Date||e.constructor==RegExp||e.constructor==Function||e.constructor==String||e.constructor==Number||e.constructor==Boolean)return new e.constructor(e);t=t||new e.constructor;for(const n in e)t[n]=void 0===t[n]?u(e[n],null):t[n];return t}function c(e,n){const r=Number.isFinite(e.x)?e.x:e.defaultLeft,i=Number.isFinite(e.y)?e.y:e.defaultTop,o=r+e.defaultWidth,s=i+e.defaultHeight;return new Promise(((e,c)=>{t.Monitors.getMonitorFromScaledXY(r,i,(l=>{if(!l)return a.default.system.debug("getMonitorFromWindow - top-left is off screen, trying bottom right"),void t.Monitors.getMonitorFromScaledXY(o,s,(o=>{if(!o)return a.default.system.debug("getMonitorFromWindow - bottom-right is off screen, getting primary"),void t.Monitors.getAllMonitors((t=>{t[0]?(n&&n(t[0]),e(t[0])):(c(new Error("Cannot find monitor for window.")),n&&n(null))}));o=u(o);const{monitorRect:s}=o;(s.left<r||s.right<i)&&(o.straddling=!0),n&&n(o),e(o)}));l=u(l);const{monitorRect:f}=l;(f.right>o||f.bottom>s)&&(l.straddling=!0),n&&n(l),e(l)}))}))}function l(e,t){return new Promise(((n,r)=>{const i=o.System.Window.getCurrent();i.getOptions((s=>{if(e&&e.windowName){e.uuid||(e.uuid=s.uuid);const i=o.System.Window.wrap(e.uuid,e.windowName);i.getInfo((()=>{t&&t(i),n(i)}),(()=>{t&&t(null),r(`Window ${e.windowName} not found. UUID: ${e.uuid}`),console.debug(`util.getFinWindow: Window ${e.windowName} not found`)}))}else if(e&&e.componentType)if(void 0!==window.LauncherService){const i=window.LauncherService.componentFinder(e);i?(n(i),t&&t(i)):(r(`util.getFinWindow: Component ${e.componentType} not found.`),t&&t(null))}else r("getFinWindow by componentType is currently only operable within LaunchService"),t&&t(null);else t&&t(i),n(i)}))}))}function f(e,t){return new Promise(((n,r)=>{l(e).then((e=>{e.getOptions((e=>{t&&t(e),n(e)}))})).catch((e=>{console.warn(e),t&&t(null),r(e)}))}))}function d(e,t,n){for(let r=0;r<e.length;r++){const i=e[r];if(i[t]===n)return i}return null}function h(e,n){let r;arguments.length>2&&(e={commandMonitor:arguments[0],monitors:arguments[1],launchingMonitorPosition:arguments[2]},n=null);let{commandMonitor:i,monitors:o,launchingMonitorPosition:s}=e;const a=i&&""!==i||0===i;if("primary"===i)r=d(o,"whichMonitor","primary");else if("next"===i){let e=s+1;e>=o.length&&(e=0),r=o[e]}else if("previous"===i){let e=s-1;e<0&&(e=o.length-1),r=o[e]}else if("mine"===i){var u=!0;activeWindows.getWindow(e.windowIdentifier.windowName)._getBounds(((e,i)=>{e?(r=o[0],n(r)):t.Monitors.getMonitorFromScaledXY(i.left,i.top,(e=>{n(e)}))}))}else a?(i>=o.length&&(i=o.length-1),r=o.filter((e=>e.position===i))[0]):s&&(r=o[s]);if(r||(r=o[0]),!u){if(!n)return r;n(r)}}function p(e,t){return new Promise(((n,r)=>{f(e,(e=>{e?c(e,(e=>{t&&t(e),n(e)})):r("util.getMonitor: Can't locate windowDescriptor.")}))}))}t.Monitors=new s.default(Function.prototype,Function.prototype,{System:o.System}),t.clone=u,t.getContainerVersion=function(e=Function.prototype){return new Promise((t=>{o.System.getVersion((n=>{const r=n.split(".").map(Number),i={major:r[0],chromium:r[1],minor:r[2],patch:r[3]};e(i),t({versionObject:i})}))}))},t.castToPromise=function(e){return function(...t){return new Promise(((n,r)=>{const i=e.apply(null,Array.from(t));try{return i.then(n,r)}catch(e){e instanceof TypeError?n(i):r(e)}}))}},t.isPercentage=function(e){return"string"==typeof e&&-1!==e.indexOf("%")},t.crossDomain=function(e){const t=document.createElement("a");t.href=e;const n=window.location.hostname===t.hostname,r=window.location.protocol===t.protocol,i=(void 0!==window.location.port?window.location.port:80)===(void 0!==t.port?t.port:80),o=!(n&&i&&r);return a.default.system.debug(`Launcher crossDomain=${o} (${n}:${r}:${i})`),o},t.getAllMonitors=t.Monitors.getAllMonitors,t.getMonitorFromXY=t.Monitors.getMonitorFromScaledXY,t.getMonitorFromWindow=c,t.getFinWindow=l,t.getWindowDescriptor=f,t.findMonitor=d,t.getWhichMonitor=h,t.getMonitor=p,t.getMonitorFromCommand=function(e,n,r){return new Promise((i=>{p(n,(n=>{t.Monitors.getAllMonitors((t=>{h({commandMonitor:e,monitors:t,launchingMonitorPosition:n.position},(e=>{r&&r(e),i(e)}))}))}))}))},t.windowOnMonitor=function(e,t){return e.left>=t.left&&e.left<t.right||e.right<=t.right&&e.right>t.left},t.getMonitorByDescriptor=function(e,t){return new Promise((n=>{c(e,(e=>{t&&t(e),n(e)}))}))},t.getMyWindowIdentifier=function(e){const t=o.System.Window.getCurrent();return new Promise((n=>{t.getOptions((r=>{let i=null;const{customData:o}=r;o&&o.component&&(i=o.component.type);const s={windowName:t.name,uuid:t.uuid,componentType:i};e&&e(s),n(s)}))}))},t.camelCase=function(...e){let t="";for(let n=0;n<e.length;n++)t=`${t} ${e[n]}`;return t.replace(/\s(.)/g,(e=>e.toUpperCase())).replace(/\s/g,"").replace(/^(.)/,(e=>e.toLowerCase()))},t.guuid=function(){return i.default()},t.injectJS=function(e,t){const n=document.createElement("script");n.onload=t,n.type="text/javascript",n.async=!0,n.src=e;const r=document.getElementsByTagName("head")[0],i=r.getElementsByTagName("script")[0];r.insertBefore(n,i)},t.openSharedData=function(e,t){const n=FSBL.Clients.LauncherClient,r=FSBL.Clients.LinkerClient;e.multipleOpenerHandler||(e.multipleOpenerHandler=function(e){let t,n=0;for(const r of Object.keys(e))e[r].length>n&&(t=r,n=e[r].length);return[t]});const i=[],o={};n.getComponentsThatCanReceiveDataTypes({dataTypes:Object.keys(e.data)},((s,u)=>{for(const e of Object.keys(u))if(u[e].componentTypes.length)for(const t of u[e].componentTypes)o[t]?o[t].push(e):o[t]=[e];else{const t=`No Components Available to Handle the type: ${e}`;i.push(t),a.default.system.error(t)}let c=Object.keys(o);if(c.length){c.length>1&&(c=e.multipleOpenerHandler(o));const s=Object.keys(r.channels);if(s.length)if(r.getLinkedComponents({componentTypes:c,windowIdentifier:r.windowIdentifier()}).length||e.publishOnly)r.publish({dataType:"Finsemble.DragAndDropClient",data:e.data},(()=>{})),t&&t(i.length?i:null,"Data published");else{for(const t of c)n.spawn(t,{data:{sharedData:e.data,linker:{channels:s}},addToWorkspace:!0});t&&t(i.length?i:null,"Linked Window(s) spawned with data")}else if(!e.publishOnly){for(const t of c)n.spawn(t,{data:{sharedData:e.data},addToWorkspace:!0});t&&t(i.length?i:null,"New Window(s) spawned with data")}}else t&&t(i.length?i:null,null)}))},t.getNewBoundsWhenMovedToMonitor=function(e,t,n="availableRect"){const r=e[n]||e.availableRect||e.monitorRect,i=u(t);return t.top<r.top?i.top=r.top:t.top>r.bottom-t.height&&(i.top=r.bottom-t.height),t.left<r.left?i.left=r.left:t.left>r.right-t.width&&(i.left=r.right-t.width),i.bottom=i.top+i.height,i.right=i.left+i.width,i.right>r.right&&(i.right=r.right),i.top<r.top&&(i.top=r.top),i.left<r.left&&(i.left=r.left),i.bottom>r.bottom&&(i.bottom=r.bottom),i.height=i.bottom-i.top,i.width=i.right-i.left,{newBounds:i,distanceMoved:Math.sqrt((t.left-i.left)**2+(t.top-i.top)**2),monitor:e}},t.isOnAMonitor=function(e){return this.Monitors.allMonitors.some((t=>{const{monitorRect:n}=t;return e.left>=n.left&&e.left<=n.right&&e.right>=n.left&&e.right<=n.right&&e.top>=n.top&&e.top<=n.bottom&&e.bottom>=n.top&&e.bottom<=n.bottom}))},t.adjustBoundsToBeOnMonitor=function(e,t="availableRect"){if(this.isOnAMonitor(e))return a.default.system.info("Launcher.adjustWindowDescriptorBoundsToBeOnMonitor: on monitor."),e;const n=this.Monitors.allMonitors.map((n=>{let r=n.rawMonitor?n.rawMonitor:n;return this.getNewBoundsWhenMovedToMonitor(r,e,t)})).sort(((e,t)=>e.distanceMoved-t.distanceMoved))[0];return a.default.system.info("Launcher.adjustWindowDescriptorBoundsToBeOnMonitor: not on monitor. bounds",e,"monitor name",n.monitor.name,"newBounds",n.newBounds),n.newBounds},t.isWindows=async function(e=Function.prototype){const t=(await o.System.getHostSpecs()).name.toUpperCase().includes("WINDOWS");return e(t),t},t.getWindowType=function(e){const t="WebWindow";if(e.windowType&&!["assimilation","assimilated","native","application","NativeWindow","FinsembleNativeWindow","CompoundWindow","WebWindow","WebApplication","StackedWindow"].includes(e.windowType))return a.default.system.error(`Invalid windowType: ${e.windowType}, defaulting to windowType: WebWindow`),t;let n=e.windowType||t;switch(e.windowType){case"assimilation":case"assimilated":n="NativeWindow";break;case"native":n="FinsembleNativeWindow";break;case"application":n="WebApplication";break;case"Web":n="WebWindow";break;case"StackedWindow":n="StackedWindow"}return e.native&&(n="NativeWindow"),e.compound&&(n="CompoundWindow"),n},t.windowNameFromRouterHeader=e=>{let t,n=/\.(.*)\./s;try{t=e.origin.match(n)[1]}catch(n){t=e.origin.split(".")[1]}return t}},10428:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FinsembleView=void 0,t.FinsembleView=class{constructor(e){this.win=e.win,this.id=e.id}async remove(e=Function.prototype){await this.win.removeBrowserView(this,e)}async setBounds(e,t=Function.prototype){await this.win.setViewBounds({view:this,bounds:e},t)}async bringToFront(e=Function.prototype){await this.win.bringViewToFront(this,e)}}},75688:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FinsembleWindow=void 0;const a=s(n(39319)),u=s(n(72551)),c=o(n(76420)),l=s(n(57815)),f=o(n(78379)),d=n(24232),h=n(51742),p=s(n(99748)),y=n(10428);window._FSBLCache||(window._FSBLCache={storeClientReady:!1,windows:{},gettingWindow:[],windowAttempts:{}});class g extends l.default{constructor(e){super({name:e.name,sourceType:"Window"}),this.types={},this.wrapState=e.wrapState||"initializing",this.componentState={},this.windowState=g.WINDOWSTATE.NORMAL,this.type=null,this.windowType=null,this.bounds={},this.guid=`${Date.now()}_${Math.random()}`,this.WINDOWSTATE=f.WINDOWSTATE,this.windowOptions={},this.doConstruction(e),this.TITLE_CHANGED_CHANNEL=`Finsemble.${this.name}.titleChanged`,this.componentKey=c.camelCase("activeWorkspace",this.name,this.name),this.windowKey=c.camelCase("activeWorkspace",this.name),g.bindFunctions(this)}standardizeEventName(e){switch(e){case"bounds-set":case"stoppedMoving":return"bounds-change-end";case"startedMoving":return"bounds-change-start";case"bringToFront":return"broughtToFront";case"setParent":return"parent-set";case"clearParent":return"parent-unset";default:return e}}addEventListener(e,t){return e=this.standardizeEventName(e),super.addEventListener(e,t)}removeEventListener(e,t){if("closed"!==e||!window.finsembleWindow||this.name!==finsembleWindow.name)return e=this.standardizeEventName(e),super.removeEventListener(e,t)}windowServiceChannelName(e){return`WindowService-Request-${e}`}eventChannelName(e){return`WindowService-Event-${this.name||this.windowName}-${e}`}doConstruction(e){if(e.setWindowType||e.windowType||(e.windowType="WebWindow"),e.windowType)return e.setWindowType=e.windowType,delete e.windowType,new g(e);if(e)for(const t in e)this[t]=e[t];this.name||(this.name=e.windowName),this.windowType=this.setWindowType}static registerType(e,t){const n=g;n.types||(n.types={}),n.types[e]=t}static bindFunctions(e){e.setParent=e.setParent.bind(e),e.getParent=e.getParent.bind(e),e.eventChannelName=e.eventChannelName.bind(e),e.windowServiceChannelName=e.windowServiceChannelName.bind(e),e.handleWrapRemoveRequest=e.handleWrapRemoveRequest.bind(e),e.reload=e.reload.bind(e)}static getInstance(e,t=Function.prototype){const n=h.System.Window.getCurrent().name;return e&&e.windowName&&(e.name=e.windowName),(e=p.default(e))&&e.name?(e.windowName=e.name,new Promise((async function(r,i){if(window._FSBLCache.windows[e.name]){u.default.system.debug("WRAP LIFECYCLE:",e.name,"Window found in the cache, returning without going to the Launcher");const n=window._FSBLCache.windows[e.name];return r({wrap:n}),t(null,n)}if(e.uuid&&e.name){if(e.windowIdentifier||(e.windowIdentifier={uuid:e.uuid,name:e.name,windowName:e.name,windowType:e.windowType}),!1!==e.waitForReady)try{await g._windowReady(e.windowName),e.wrapState="ready"}catch(e){return i(e),t(e,null)}if(u.default.system.debug("WRAP LIFECYCLE:",e.name,"All information for wrap passed in, creating wrap locally"),window._FSBLCache.windows[e.name]){u.default.system.debug("WRAP LIFECYCLE:",e.name,"Window found in the cache, returning without going to the Launcher");const n=window._FSBLCache.windows[e.name];return r({wrap:n}),t(null,n)}const{wrap:n}=await g._createWrap(e);return r({wrap:n}),t(null,n)}if(!1!==e.waitForReady)try{await g._windowReady(e.windowName),e.wrapState="ready"}catch(e){return i(e),t(e,null)}a.default.query("WindowService-Request-getWindowIdentifier",{windowName:e.name,requester:n},(async(n,o)=>{if(n)return u.default.system.error(n),i(n),t(n,null);if(window._FSBLCache.windows[e.name]){const n=window._FSBLCache.windows[e.name];return u.default.system.debug("WRAP LIFECYCLE:",e.name,"Information received from launcher, but wrap exists in cache. Returning cached wrap."),r({wrap:n}),t(null,n)}const{identifier:s}=o.data;s.windowName&&(s.name=s.windowName),u.default.system.debug("WRAP LIFECYCLE:",e.name,"Information received from launcher. Creating wrap."),e.retrievedIdentifier=s;const{wrap:a}=await g._createWrap(e);o.data.descriptor&&(a.descriptor=o.data.descriptor),r({wrap:a}),t(null,a)}))}))):t("name is required")}static _createWrap(e){return new Promise((function(t){const n=e.retrievedIdentifier||e.windowIdentifier;let r=null;void 0===window._FSBLCache.windowAttempts[e.name]&&(window._FSBLCache.windowAttempts[e.name]=0),(e.setWindowType||n.windowType)&&"WebApplication"!==n.windowType||(n.windowType="WebWindow");let i={...n};i=Object.assign(i,e),i.setWindowType=i.windowType,delete i.windowType,u.default.system.debug("WRAP LIFECYCLE: Placing wrap into the local cache.",n.windowName);const o=g;window._FSBLCache.windows[n.windowName]=new o(i),r=window._FSBLCache.windows[n.windowName],r.windowType=n.windowType,r.identifier=n,r.addEventListener("closed",r.handleWrapRemoveRequest),r.addEventListener("maximized",(()=>{r.windowState=g.WINDOWSTATE.MAXIMIZED})),r.addEventListener("minimized",(()=>{r.windowState=g.WINDOWSTATE.MINIMIZED})),r.addEventListener("restored",(()=>{r.windowState=g.WINDOWSTATE.NORMAL}));const s=a.default.subscribe(`Finsemble.Component.State.${n.windowName}`,((e,t)=>{if(e)u.default.system.error("Finsemble component state change error",e);else{const{state:e}=t.data;r.wrapState=e,a.default.unsubscribe(s)}}));r.parentSubscribeID=a.default.subscribe(`Finsemble.parentChange.${n.windowName}`,((e,n)=>{if(e)u.default.system.error("FinsembleWindow parent change notification error",e),t({wrap:r});else{const e=n.data||{};"Added"===e.type?(u.default.system.debug("FinsembleWindow Parent Notification: window.addedToStack listener",e),r.setParent(e.stackedWindowIdentifier,(()=>{t({wrap:r})}))):"Exists"===e.type?(u.default.system.debug("FinsembleWindow Parent Notification: Parent already exists, checking if added to wrap",e),r.setParentOnWrap(e.stackedWindowIdentifier,(()=>{t({wrap:r})}))):"Removed"===e.type?(u.default.system.debug("FinsembleWindow Parent Notification: window.removedFromStack listener",e),r.clearParent(),t({wrap:r})):e.type?(u.default.system.error("FinsembleWindow Parent Notification: unknown type",e),t({wrap:r})):t({wrap:r})}}))}))}static _getRemoveWrapChannel(e){return`${h.System.Window.getCurrent().name}.removeWrap.${e}`}async handleWrapRemoveRequest(e){e&&e.wait(),u.default.system.debug("WRAP Destructor. Removing cached window",this.name,"in ",window.name),this.removeListeners&&this.removeListeners(),this.cleanupRouter(),this.cleanup(),this.name!==window.name&&this.name&&(delete window._FSBLCache.windows[this.name],delete window._FSBLCache.windowAttempts[this.name]),e&&e.done()}cleanupRouter(){const e=g._getRemoveWrapChannel(this.name);a.default.removeResponder(e),this.TITLE_CHANGED_SUBSCRIPTION&&a.default.unsubscribe(this.TITLE_CHANGED_SUBSCRIPTION),a.default.unsubscribe(this.parentSubscribeID)}onReady(e){if("ready"===this.wrapState)return e();this.addEventListener("ready",e)}queryWindowService(e,t,n=Function.prototype){if("close"===e||"setParent"===e||"ready"===this.wrapState)return new Promise((async(r,i)=>{"function"==typeof t&&(n=t,t={}),(t=t||{}).windowIdentifier=this.identifier,u.default.setting().system.Debug&&(t.callstack=u.default.callStack()),u.default.system.debug("FinsembleWindow.queryWindowService",this.windowServiceChannelName(e),t);let o=null;a.default.query(this.windowServiceChannelName(e),t,((t,s)=>{t?(u.default.system.debug(`WindowService.${e}: failed`,t),console.debug(`WindowService.${e}: failed`,t),"getComponentState"!==e&&"Not found"!==t&&i(t)):(o=s.data,u.default.system.debug(`${this.windowServiceChannelName(e)} successful`,o),console.debug(`${this.windowServiceChannelName(e)} successful`,o)),r(o),n(t,o)}))}));this.onReady((()=>{this.wrapState="ready",this.queryWindowService(e,t,n)}))}minimize(e=null,t=Function.prototype){this.queryWindowService("minimize",e,t)}maximize(e=null,t=Function.prototype){this.getBounds(((n,r)=>{n?u.default.system.warn("Error getting bounds, cached bounds will not be set"):this.updateOptions({options:{cachedLeft:r.left,defaultLeft:r.left,cachedTop:r.top,defaultTop:r.top,cachedWidth:r.width,defaultWidth:r.width,cachedHeight:r.height,defaultHeight:r.height}}),this.queryWindowService("maximize",e,t)}))}restore(e=null,t=Function.prototype){this.queryWindowService("restore",e,t)}blur(e=null,t=Function.prototype){this.queryWindowService("blur",e,t)}focus(e=null,t=Function.prototype){this.queryWindowService("focus",e,t)}bringToFront(e=null,t=Function.prototype){this.queryWindowService("bringToFront",e,t)}setAlwaysOnTop(e={alwaysOnTop:!0},t=Function.prototype){this.queryWindowService("setAlwaysOnTop",e,t)}isAlwaysOnTop(e={},t){this.queryWindowService("isAlwaysOnTop",{},t)}isShowing(e={},t){this.queryWindowService("isShowing",e,t)}setIgnoreMouseEvents(e,t,n=Function.prototype){const r={ignore:new Boolean(e).valueOf(),options:new Boolean(t).valueOf()?t:{forward:!1}};this.queryWindowService("setIgnoreMouseEvents",r,n)}setShape(e,t=Function.prototype){this.queryWindowService("setShape",e,t)}async addBrowserView(e,t=Function.prototype){const n=await this.queryWindowService("addBrowserView",e,t);return new y.FinsembleView({id:n,win:this})}async removeBrowserView(e,t=Function.prototype){await this.queryWindowService("removeBrowserView",{viewId:e.id},t)}async bringViewToFront(e,t=Function.prototype){await this.queryWindowService("bringViewToFront",{viewId:e.id},t)}async setViewBounds(e,t=Function.prototype){await this.queryWindowService("setViewBounds",{viewId:e.view.id,bounds:e.bounds},t)}setBounds(e={bounds:{}},t=Function.prototype){"function"==typeof e||e.bounds||(e={bounds:e}),this.queryWindowService("setBounds",e,t)}getBounds(e={},t=Function.prototype){return new Promise((n=>{this.queryWindowService("getBounds",e,((e,r)=>{n({err:e,data:r}),t(e,r)}))}))}updateOptions(e,t=Function.prototype){this.queryWindowService("updateOptions",e,t)}hide(e={},t=Function.prototype){this.queryWindowService("hide",e,t)}reload(e={},t=Function.prototype){this.queryWindowService("reload",e,t)}show(e={},t=Function.prototype){this.queryWindowService("show",e,t)}showAt(e={},t=Function.prototype){this.queryWindowService("showAt",e,t)}close(e={},t=Function.prototype){u.default.system.debug("WRAP CLOSE. Public close initiated for",this.name,e),this.queryWindowService("close",e,(()=>{u.default.system.debug("WRAP CLOSE. Public close initiated for",this.name),t()}))}animate(e={},t=Function.prototype){this.queryWindowService("animate",e,t)}registerWithDocking(e={},t){this.onReady((()=>{a.default.query("DockingService.registerWindow",{type:this.type,windowType:this.windowType,windowMsg:e,name:this.windowName},t)}))}showNativeOpenDialog(e={},t){this.queryWindowService("showNativeOpenDialog",e,t)}unRegisterWithDocking(){a.default.transmit("DockingService.deregisterWindow",{name:this.windowName})}initializeWindow({manageWindowMovement:e,identifier:t},n=Function.prototype){const r=()=>{a.default.publish(`Finsemble.${this.windowName}.componentReady`,{name:this.windowName}),n()};e?this.registerWithDocking(t,r):r()}wrapReady(){a.default.publish(`Finsemble.${this.windowName}.wrapReady`,{name:this.windowName,state:"open"})}setOpacity(e,t=Function.prototype){this.queryWindowService("setOpacity",e,t)}startTabTileMonitoring(e={}){u.default.system.debug("FinsembleWindow.startTabTileMonitoring",e),a.default.transmit("TabTile.startTabTile",{params:e})}stopTabTileMonitoring(e={},t=Function.prototype){u.default.system.debug("FinsembleWindow.stopTabTileMonitoring",e),a.default.query("TabTile.stopTabTile",{params:e},(function(e,n){e?u.default.system.warn("TabTile.stopTabTile: query failed",e):u.default.system.debug("TabTile.stopTabTile results",n.data);const r=n.data;t?t(e,r,this.defaultStopTrackingAction):this.defaultTabTileAction(r)}))}defaultTabTileAction(e){const t=this;switch(u.default.system.debug("FinsembleWindow.defaultTabTileAction",e),e.stoppedLocation){case"OutsideWindow":case"TabSection":break;case"InsideWindow":e.tileGroupId?t.Group.addWindow(this.identifier,e.tileGroupId,e.dropCoordinates):t.Group.createGroup((function(n){t.Group.addWindow(this.identifier,n,e.dropCoordinates,{startingWindowIdentifier:e.droppedOnWindowIdentifier})}));break;default:u.default.system.error("stopTracking returned an unknown stoppedLocation result",e)}}mergeBounds(e){e.right=e.left+e.width;const t={left:e.left,right:e.right,width:e.width,top:e.top,bottom:e.top+e.height,height:e.height},n={defaultLeft:e.left,defaultWidth:e.width,defaultTop:e.top,defaultHeight:e.height};Object.assign(this.windowOptions,t),Object.assign(this.windowOptions,n),this.windowOptions.bounds=t}startMove(e={}){u.default.system.debug("FinsembleWindow.startMove",e),e.windowIdentifier=this.identifier,a.default.transmit(this.eventChannelName("startedMoving"),{})}stopMove(e={}){u.default.system.debug("FinsembleWindow.stopMove",e),e.windowIdentifier=this.identifier,a.default.transmit(this.eventChannelName("stoppedMoving"),{})}getMonitor(e){a.default.query("DockingService.getMonitorForWindow",{windowIdentifier:this.identifier},((t,n)=>n?e(n.data):e()))}getComponentState(e,t){this.queryWindowService("getComponentState",e,t)}getWindowState(e,t){this.queryWindowService("getWindowState",e,t)}setComponentState(e,t=(()=>{})){this.queryWindowService("setComponentState",e,t)}removeComponentState(e,t=(()=>{})){this.queryWindowService("removeComponentState",e,t)}setWindowState(e,t=(()=>{})){this.queryWindowService("setWindowState",e,t)}saveCompleteWindowState(e={},t=Function.prototype){this.queryWindowService("saveCompleteWindowState",e,t)}cancelTabTileMonitoring(e={}){u.default.system.debug("FinsembleWindow.cancelTabTileMonitoring",e),a.default.transmit("TabTile.cancelTabTile",{params:e})}getParent(e){this.settingParent?g.getInstance(this.settingParent,((t,n)=>{e(null,n)})):this.parentWindow?e(null,this.parentWindow):e(null,null)}setParent(e,t){if(this.settingParent)return this.getParent(t);this.settingParent=e,this.parentWindow&&this.parentWindow.name===e.windowName?(u.default.system.debug("FinsembleWindow.setParent already set",e),this.settingParent=!1,t(null,this.parentWindow)):this.queryWindowService("setParent",e,(()=>{u.default.system.debug("FinsembleWindow.setParent",e),g.getInstance(e,((n,r)=>{n?u.default.system.error("FinsembleWindow.setParent error",n):(u.default.system.debug("FinsembleWindow.setParent wrap success",e),this.parentWindow=r,this.parentWindow.windowType.includes("StackedWindow")||u.default.system.error("FinsembleWindow.setParent error",this.parentWindow.name,e.windowName)),a.default.transmit(f.DOCKING.REQUEST_PUBLISH,null),this.settingParent=!1;const i=()=>{this.removeEventListener("parent-set",i),t(n,r)};this.addEventListener("parent-set",i)}))}))}setParentOnWrap(e,t=Function.prototype){this.parentWindow&&this.parentWindow.name===e.windowName?(u.default.system.debug("FinsembleWindow.setParentOnWrap already set",e),t(null,this.parentWindow)):this.queryWindowService("setParent",e,(()=>{u.default.system.debug("FinsembleWindow.setParentOnWrap",e),g.getInstance(e,((n,r)=>{n?u.default.system.error("FinsembleWindow.setParentOnWrap error",n):(u.default.system.debug("FinsembleWindow.setParentOnWrap success getting wrap",e),this.parentWindow=r,!1===this.parentWindow.windowType.includes("StackedWindow")&&u.default.system.error("FinsembleWindow.setParentOnWrap error",this.parentWindow.name,e.windowName)),t(n,r)}))}))}clearParent(){u.default.system.debug("FinsembleWindow.clearParent",this.parentWindow),this.parentWindow=null}setTitle(e){u.default.system.debug("Title change",e),a.default.publish(this.TITLE_CHANGED_CHANNEL,e)}getOptions(e=Function.prototype){this.queryWindowService("getOptions",{},e)}_privateManagementPreface(e,t){return"function"==typeof t&&u.default.system.error("StackedWindowWrapper.wrapPreface bad params",t),(t=t||{}).stackedWindowIdentifier={windowName:this.identifier?.windowName,windowType:this.identifier?.windowType},u.default.system.debug(`StackedWindow.${e} _privateManagementPreface`,t),t}addWindow(e,t=Function.prototype){return e=this._privateManagementPreface("addWindow",e),new Promise((n=>{a.default.query("StackedWindow.addWindow",e,((e,r)=>{u.default.system.debug("StackedWindow.addWindow callback",e,r),t(e,r.data),n({err:e,data:r.data})}))}))}removeWindow(e,t=Function.prototype){return e=this._privateManagementPreface("removeWindow",e),new Promise((n=>{a.default.query("StackedWindow.removeWindow",e,((e,r)=>{u.default.system.debug("StackedWindow.removeWindow callback",e,r),t(e,r.data),n({err:e,data:r.data})}))}))}deleteWindow(e,t=Function.prototype){return e=this._privateManagementPreface("deleteWindow",e),new Promise((n=>{a.default.query("StackedWindow.deleteWindow",e,((e,r)=>{u.default.system.debug("StackedWindow.deleteWindow callback",e,r),t(e,r.data),n({err:e,data:r.data})}))}))}setVisibleWindow(e,t=Function.prototype){return e=this._privateManagementPreface("setVisibleWindow",e),new Promise((n=>{a.default.query("StackedWindow.setVisibleWindow",e,((e,r)=>{u.default.system.debug("StackedWindow.setVisibleWindow callback",e,r),t(e,r.data),n({err:e,data:r.data})}))}))}reorder(e,t=Function.prototype){return e=this._privateManagementPreface("reorder",e),new Promise((n=>{a.default.query("StackedWindow.reorder",e,((e,r)=>{u.default.system.debug("StackedWindow.reorder callback",e,r),t(e,r.data),n({err:e,data:r.data})}))}))}formGroup(){const e=this.parentWindow?this.parentWindow.name:this.name;a.default.transmit("DockingService.formGroup",{windowName:e})}ejectFromGroup(){const e=this.parentWindow?this.parentWindow.name:this.name;a.default.query("DockingService.leaveGroup",{name:e},(()=>{}))}}t.FinsembleWindow=g,g.WINDOWSTATE={NORMAL:0,MINIMIZED:1,MAXIMIZED:2,HIDDEN:3},g.wrap=g.getInstance,g.isStartupApplication=async function(e){let t;const n=await new Promise(((e,t)=>{h.System.Application.getCurrent().getManifest(e,t)})).catch((()=>{t=!1}));return n&&(t=n&&n.startup_app&&n.startup_app.name===e),t},g._windowReady=function(e){let t;u.default.system.debug(`windowServiceReady: ${e} starting`);const n=`Finsemble.Component.State.${e}`;return new Promise((async(r,i)=>{await g.isStartupApplication(e)||d.isServiceInWindow(e)?i("Cannot Wrap Service Manager or Services"):(u.default.system.debug(`windowServiceReady: ${e} waiting`),t=a.default.subscribe(n,((n,i)=>{const{state:o}=i.data;switch(u.default.system.debug(`windowServiceReady: ${e} state change: ${o}`),o){case"ready":case"reloading":case"closing":u.default.system.debug(`windowServiceReady: ${e} ${o}`),a.default.unsubscribe(t),r()}})))}))}},96755:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseService=void 0;const a=n(57664),u=n(13854),c=s(n(39319)),l=s(n(72551)),f=s(n(5020)),d=n(51742),h=o(n(78379)),p=n(6192),y=n(10589),{SERVICE_INITIALIZING_CHANNEL:g,SERVICE_READY_CHANNEL:m,SERVICE_QUERY_READY_CHANNEL:v,SERVICE_CLOSING_CHANNEL:w,SERVICE_CLOSED_CHANNEL:_,SERVICE_STOP_CHANNEL:b}=h,S={startupDependencies:{services:[],clients:[]},shutdownDependencies:{services:[]},addOFWrapper:!1,name:window.name};t.BaseService=class{constructor(e=S){!function(e){e.startupDependencies?(e.startupDependencies.services||(e.startupDependencies.services=S.startupDependencies.services),e.startupDependencies.clients||(e.startupDependencies.clients=S.startupDependencies.clients)):e.startupDependencies=S.startupDependencies,e.shutdownDependencies?e.shutdownDependencies.services||(e.shutdownDependencies.services=S.shutdownDependencies.services):e.shutdownDependencies=S.shutdownDependencies}(e),this.name=e.name?e.name:window.name,this.startupDependencies=e.startupDependencies,this.shutdownDependencies=e.shutdownDependencies,this.Logger=l.default,this.RouterClient=c.default,this.onBaseServiceReadyCB=null,this.setOnConnectionCompleteCB=null,this.listeners={},this.start=()=>{},this.started=!1,this.status="initializing",this.setOnline=this.setOnline.bind(this),this.onBaseServiceReady=this.onBaseServiceReady.bind(this),this.handleShutdown=this.handleShutdown.bind(this),this.waitForDependencies(),p.Globals.finsembleServices?p.Globals.finsembleServices.push(this):p.Globals.finsembleServices=[this]}async initialize(e){e()}waitForDependencies(){const e=this;if(this.started)return;this.started=!0;const t=this;function n(e){l.default.system.debug("BaseService.start.setParentUUID"),d.System.Window.getCurrent().getOptions((n=>{t.customData=n.customData,t.parentUuid=n.customData.parentUuid,e()}))}async function r(){await(new y.FSBLService).startApp(),c.default.addResponder(v(e.name),((t,n)=>{(e.status="ready")?n?.sendQueryResponse(null):n?.sendQueryResponse("service not ready")})),c.default.transmit(g,{name:t.name}),window.addEventListener("beforeunload",t.RouterClient.disconnectAll),l.default.system.debug("APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.onRouterReady")}function i(e){const n=t.customData.debugServiceDelay||0;if(l.default.system.debug(`Custom Data: ${t.name} custom data`,t.customData),Number.isInteger(n))n>0&&l.default.system.debug(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.debugDelay: ${t.name} startup will delayed by ${n} milliseconds for debugging`);else{const e=`debugDelay has an illegal value ("${n}") for ${t.name}. Value must be an integer.`;l.default.system.error(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start: ${e}`),f.default.systemLog({error:!0},e)}setTimeout(e,n)}function o(e){l.default.system.debug(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.readyToGo ${t.name}`),console.log("Startup Dependencies for",t.name,t.startupDependencies),console.log("Shutdown Dependencies for",t.name,t.shutdownDependencies),u.FSBLDependencyManagerSingleton.shutdown.waitFor(t.shutdownDependencies,t.handleShutdown),l.default.system.debug(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.readyToGo after wait ${t.name}`),c.default.transmit(`${d.System.Window.getCurrent().name}.onSpawned`,{name:d.System.Window.getCurrent().name},{suppressWarnings:!0}),u.FSBLDependencyManagerSingleton.startup.waitFor(t.startupDependencies,e).on("err",(e=>{l.default.system.error(e)}))}function s(e){const n=d.System.Window.getCurrent();n.isShowing((r=>{r&&!1!==t.customData.showDevConsoleOnVisible?d.System.showDeveloperTools(n.uuid,n.name,null,e):(l.default.system.debug("APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.delayStartup done"),e())}))}return l.default.system.debug(`${this.name} starting`),new Promise((e=>{a.series([r,n,s,i,o],(()=>{e(),this.onDependenciesReady()}))}))}setOnline(){"ready"!==this.status&&(this.RouterClient.addListener(`${b}.${this.name}`,(()=>{u.FSBLDependencyManagerSingleton.shutdown.checkDependencies()})),this.status="ready",c.default.transmit(m,{serviceName:this.name},{suppressWarnings:!0}),l.default.system.log("APPLICATION LIFECYCLE:STARTUP:SERVICE ONLINE",this.name),f.default.publishBootStatus(this.name,"services","completed"))}onDependenciesReady(){l.default.system.debug("APPLICATION LIFECYCLE:STARTUP:BaseService onDependenciesReady",this.name),this.status="initializing",this.onBaseServiceReadyCB?this.onBaseServiceReadyCB(this.setOnline):this.initialize?this.initialize(this.setOnline):setTimeout((()=>{"ready"!==this.status&&"routerService"!==this.name&&(console.error("No onBaseServiceReadyCB on initialize function defined on your service. Ensure that service.setOnline is called"),l.default.system.error("No onBaseServiceReadyCB on initialize function defined on your service. Ensure that service.setOnline is called"))}),3e3)}onBaseServiceReady(e){"initializing"===this.status?this.onBaseServiceReadyCB=()=>{e(this.setOnline)}:e(this.setOnline)}addEventListener(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}onShutdown(e){this.addEventListener("onShutdown",e)}handleShutdown(){l.default.system.debug("BaseService.handleShutdown");const e=this;this.listeners.onShutdown?(c.default.transmit(w,{waitForMe:!0,name:this.name}),a.each(this.listeners.onShutdown,(function(e,t){a.asyncify(e)(null,t)}),(function(t){t&&l.default.system.error(t),e.shutdownComplete()}))):(c.default.transmit(w,{waitForMe:!1,name:this.name}),e.shutdownComplete())}shutdownComplete(){l.default.system.info(`"APPLICATION LIFECYCLE:SHUTDOWN:SERVICE SHUTDOWN: ${this.name}`),c.default.transmit(_,{name:this.name,uuid:d.System.Application.getCurrent().uuid})}},window.addEventListener("error",(e=>{const t=e.error?e.error.stack.substring(e.error.stack.search("at ")):"";return l.default.error(e.message,`File: ${e.filename}`,`Line: ${e.lineno}`,`Column: ${e.colno}`,`Error Stack: \n ${t}`),!1})),window.addEventListener("unhandledrejection",(e=>{"Cannot Wrap Service Manager or Services"==e.reason?l.default.warn("A service tried To wrap itself. This is a side effect of using Clients in services."):l.default.error("Unhandled rejection","reason",e.reason)}))},16640:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(50631)),o=n(52283),s=r(n(15993)),a=n(84155),u=n(30705),c="defaultDismissButtonText";class l{static normaliseConfig(e){return{service:l.getServiceDefaults(e),types:l.getTypes(e)}}static getTypes(e){return Object.assign({},e&&e.hasOwnProperty("types")?e.types:null)}static getServiceDefaults(e){const t=Object.assign({maxNotificationsToRetain:1e3,maxNotificationRetentionPeriodSeconds:!1},e);return t.hasOwnProperty("types")&&delete t.types,t.hasOwnProperty("presentationComponents")&&delete t.presentationComponents,t}static applyDefaults(e,t){let n;if(t.type&&e&&e.types&&e.types[t.type]?n=e.types[t.type]:e&&e.types&&e.types.default&&(n=e.types.default),Array.isArray(t.actions)||(t.actions=[]),Array.isArray(t.actionsHistory)||(t.actionsHistory=[]),Array.isArray(t.stateHistory)||(t.stateHistory=[]),n){let r=a.Map(t).toObject();if(n.hasOwnProperty("defaults")&&(r=l.setDefaultsFromConfig(t,n.defaults)),n.hasOwnProperty("showDismissAction")&&n.showDismissAction){let t="Dismiss";n.hasOwnProperty(c)?t=n.defaultDismissButtonText:e.hasOwnProperty("service")&&e.service.hasOwnProperty(c)&&(t=e.service.defaultDismissButtonText),r=l.addDismissActionToNotification(r,t)}return r}return t}static addDismissActionToNotification(e,t){if(!l.hasDismissAction(e)){const n=new i.default;n.type=o.ActionTypes.DISMISS,n.buttonText=t,e.actions?.push(n)}return e}static hasDismissAction(e){let t=!1;return e.actions?.reduce(((e,t)=>e.concat(t)),[]).forEach((e=>{"dismiss"===e.type.toLowerCase()&&(t=!0)})),t}static setDefaultsFromConfig(e,t){for(const[n,r]of Object.entries(t))!e[n]&&void 0===e[n]||Array.isArray(e[n])&&0===e[n].length?e[n]=r:e[n]&&"object"==typeof e[n]&&"object"==typeof r&&(e[n]=l.setDefaultsFromConfig(e[n],r));return e}static filterMatches(e,t){const n=e&&e.include&&e.include.length>0,r=e&&e.exclude&&e.exclude.length>0;if(!n&&!r)return!0;let i=!n;return n&&e.include.forEach((e=>{u.matchObject(t,e)&&(i=!0)})),r&&e.exclude.forEach((e=>{u.matchObject(t,e)&&(i=!1)})),i}static addPerformedAction(e,t){let n;n=a.Map.isMap(e)?e:a.Map(e);const r=new s.default;r.id=t.id,r.type=t.type,r.datePerformed=(new Date).toISOString();const i=n.get("actionsHistory").slice(0);return i.push(r),n=n.set("actionsHistory",i),a.Map.isMap(e)?n:n.toObject()}static setNotificationHistory(e,t,n){const r=a.Map(e);let i,o;return t.has(e.id)?(i=t.get(e.id),o=i.stateHistory,i.stateHistory=[]):(o=r.get("stateHistory"),i=n,i.stateHistory=[]),o.push(i),r.set("stateHistory",o).toObject()}static getItemsToPurge(e,t){const n=[];let r=!1===t.maxNotificationRetentionPeriodSeconds,i=0;const o=e.entries();do{const s=o.next();if(s.done)break;if(t.maxNotificationRetentionPeriodSeconds){const e=s.value[1].actionsHistory;if(e&&e.length){const o=Date.parse(e[e.length-1].datePerformed);if(Date.now()-1e3*t.maxNotificationRetentionPeriodSeconds>o){i++,n.push(s.value[1]);continue}r=!0}}e.size-i>t.maxNotificationsToRetain&&(i++,n.push(s.value[1]))}while(!r||e.size-i>t.maxNotificationsToRetain);return n}static matchesMuteFilters(e,t){let n=!1;return t.forEach((t=>{!n&&t.source&&t.type?n=t.source===e.source&&t.type===e.type:(!n&&t.source===e.source||t.type===e.type)&&(n=!0)})),n}}t.default=l},32272:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.STORAGE_KEY_NOTIFICATION_PREFIX=void 0;const i=r(n(63862)),o="finsemble.notifications",s="last.issued",a="snooze.timers",u="list.contents";t.STORAGE_KEY_NOTIFICATION_PREFIX="id.";class c{static async persistNotification(e,n,r=!1){await c.storeListIds(e),n&&await c.storeValue(t.STORAGE_KEY_NOTIFICATION_PREFIX+n.id,n)}static async fetchNotifications(){return new Promise((async e=>{const t=new Map,n=await c.getValue(u),r=[];n&&n.forEach((e=>{r.push(c.getNotification(e))})),(await Promise.all(r)).forEach(((e,r)=>{e?t.set(e.id,e):c.logger.error(`Notification ${n[r]} not found`)})),e(t)}))}static storeLastIssued(e){return c.storeValue(s,e)}static async fetchLastIssued(){return new Promise((async e=>{let t=await c.getValue(s);t||(t=new Map),e(t)}))}static storeSnoozeTimers(e){return c.storeValue(a,e)}static async fetchSnoozeTimers(){return new Promise((async e=>{let t=await c.getValue(a);t||(t=new Map),e(t)}))}static async storeListIds(e){const t=[...e.keys()];await i.default.save({topic:o,key:u,value:t})}static async getNotification(e){return await c.getValue(t.STORAGE_KEY_NOTIFICATION_PREFIX+e)}static async deleteValue(e){await i.default.remove({topic:o,key:e})}static async storeValue(e,t){await i.default.save({topic:o,key:e,value:t})}static async getValue(e){return await i.default.get({topic:o,key:e})}}t.default=c},41567:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=n(52283),u=s(n(39243)),c=s(n(47887)),l=s(n(50631)),f=s(n(16640)),d=o(n(32272)),h=n(50586),p=n(84155),y=n(96755),g=s(n(72551)),m=s(n(70010)),v=s(n(9562)),w=s(n(63862)),_=s(n(9562)),b=n(76420);g.default.start(),g.default.system.log("notification Service starting up"),w.default.initialize(),v.default.initialize(),m.default.initialize();const S="NO_SOURCE_DEFINED",C="finsemble.servicesConfig.notifications.userPreferences",E="finsemble.servicesConfig.notifications",I="notification.",O="subscribe",A={DISABLE_DOT_ON_TOOLBAR_ICON:"disableDotOnToolbarIcon",SHOW_DOT_ON_TOOLBAR_ICON_MUTED_NOTIFICATIONS:"showDotOnToolbarIconForMutedNotifications",INFORMATIONAL_NOTIFICATION_TOAST_PERIOD_SECONDS:"informationalNotificationToastPeriodSeconds",DEFAULT_SNOOZE_PERIOD_SECONDS:"defaultSnoozePeriodSeconds",NEW_NOTIFICATION_HALO_PERIOD_SECONDS:"newNotificationHaloPeriodSeconds",TOAST_TIMEOUT_ON_ACTIONABLE_NOTIFICATIONS:"toastTimeoutOnActionableNotifications"},T=e=>e instanceof Map?e:new Map(Object.entries(e));class L extends y.BaseService{constructor(e){super({name:e,addOFWrapper:!1,startupDependencies:{clients:["storageClient","ConfigClient"]},shutdownDependencies:{services:["windowService"]}}),this.config={service:{},types:{}},this.initialize=async e=>{this.createRouterEndpoints(),m.default.addListener({field:E},this.applyConfigChange),m.default.getValue({field:E},this.applyConfigChange),m.default.addListener({field:`${C}.mute`},this.applyMuteFilterChange),m.default.getValue({field:`${C}.mute`},this.applyMuteFilterChange),await this.fetchStateFromStorage(),this.wakeSnoozeFromLoad(),this.Logger.system.log("notification Service ready"),e()},this.applyConfigChange=(e,t)=>{e&&this.Logger.system.error(`Unable to get config err: ${e}`),this.config=f.default.normaliseConfig(t)},this.applyMuteFilterChange=(e,t)=>{e&&this.Logger.system.error(`Unable to get config err: ${e}`),t&&(t.value&&(t=t.value),this.muteFilters=t)},d.default.logger=this.Logger,this.serviceStartTime=new Date,this.proxyToWebApiFilter=!1,this.subscriptions=new Map,this.storageAbstraction={snoozeTimers:new Map,notifications:new Map,lastIssued:new Map},this.muteFilters=[],this.bindCorrectContext(),this.onBaseServiceReady(this.initialize.bind(this)),this.setPreferenceChangeListener(),this.start()}createRouterEndpoints(){this.setupNotify(),this.setupLastIssued(),this.setupSubscribe(),this.setupAction(),this.setupFetchHistory(),this.setupMute(),this.setupUnsubscribe(),this.setupUIPubSub(),this.setupMarkUnread(),this.setupDelete(),this.setupMarkRead(),this.setupSources(),this.setupMuteFilters(),this.setupPreferences()}bindCorrectContext(){this.createRouterEndpoints=this.createRouterEndpoints.bind(this),this.subscribe=this.subscribe.bind(this),this.notify=this.notify.bind(this),this.broadcastNotification=this.broadcastNotification.bind(this),this.getLastIssued=this.getLastIssued.bind(this),this.performAction=this.performAction.bind(this),this.fetchHistory=this.fetchHistory.bind(this),this.unsubscribe=this.unsubscribe.bind(this),this.mute=this.mute.bind(this),this.unmute=this.unmute.bind(this),this.markNotificationAs=this.markNotificationAs.bind(this),this.deleteNotifications=this.deleteNotifications.bind(this),this.applyConfigChange=this.applyConfigChange.bind(this),this.getSources=this.getSources.bind(this),this.getMuteFilters=this.getMuteFilters.bind(this),this.getNotificationsPreferences=this.getNotificationsPreferences.bind(this)}getMuteFilters(){return this.muteFilters}async getNotificationsPreferences(){const{data:e}=await m.default.getValues([`${E}.${A.DISABLE_DOT_ON_TOOLBAR_ICON}`,`${E}.${A.INFORMATIONAL_NOTIFICATION_TOAST_PERIOD_SECONDS}`,`${E}.${A.DEFAULT_SNOOZE_PERIOD_SECONDS}`,`${E}.${A.NEW_NOTIFICATION_HALO_PERIOD_SECONDS}`,`${E}.${A.SHOW_DOT_ON_TOOLBAR_ICON_MUTED_NOTIFICATIONS}`,`${E}.${A.TOAST_TIMEOUT_ON_ACTIONABLE_NOTIFICATIONS}`,`${C}.${A.DISABLE_DOT_ON_TOOLBAR_ICON}`,`${C}.${A.INFORMATIONAL_NOTIFICATION_TOAST_PERIOD_SECONDS}`,`${C}.${A.DEFAULT_SNOOZE_PERIOD_SECONDS}`,`${C}.${A.NEW_NOTIFICATION_HALO_PERIOD_SECONDS}`,`${C}.${A.SHOW_DOT_ON_TOOLBAR_ICON_MUTED_NOTIFICATIONS}`,`${C}.${A.TOAST_TIMEOUT_ON_ACTIONABLE_NOTIFICATIONS}`]);return await Promise.all(Object.values(A).map((async t=>({[t]:await this.computePreference(e,t)})))).then((e=>e.reduce(((e,t)=>(Object.entries(t).forEach((([t,n])=>{e[`${t}`]=n})),e)),{})))}async computePreference(e,t){return null!==e[`${C}.${t}`]&&void 0!==e[`${C}.${t}`]||(e[`${C}.${t}`]=e[`${E}.${t}`],await this.setPreference(t,e[`${E}.${t}`])),e[`${C}.${t}`]}getSources(){let e=Array.from(this.storageAbstraction.lastIssued.keys());const t=e.indexOf(S);return t>=0&&e.splice(t,1),e}async fetchStateFromStorage(){this.storageAbstraction.notifications=T(await d.default.fetchNotifications()),this.storageAbstraction.lastIssued=T(await d.default.fetchLastIssued()),this.storageAbstraction.snoozeTimers=T(await d.default.fetchSnoozeTimers())}query(e,t,n,r){return new Promise((async(i,o)=>{try{null==n&&(n=I),this.Logger.system.info(`sending message on ${n+e} channel`,t);const s=await this.RouterClient.query(n+e,t,(()=>{}));s.err?(this.Logger.system.error("Error: ",s.err),o(s.err)):(this.Logger.system.log(`${e} raw response: `,s),r&&r(null,s?.response?.data.data),i(s?.response?.data.data))}catch(e){this.Logger.system.error("Error: ",e),r&&r(e),o(e)}}))}broadcastNotification(e){this.Logger.system.log("Broadcasting Notification: ",e.id),this.subscriptions.forEach((t=>{f.default.filterMatches(t.filter,e)&&(this.expectReceipt(t,e),this.query(t.channel,e,null,((n,r)=>{this.setReceivedReceipt(t,e,n,r)})).then())})),this.config.service.proxyToWebApiFilter&&f.default.filterMatches(this.config.service.proxyToWebApiFilter,e)&&this.webApiNotify(e)}webApiNotify(e){const t=[];e.title&&t.push(e.title),e.title&&t.push(e.headerText);const n={body:(r=e).details,icon:r.contentLogo?r.contentLogo:r.headerLogo};var r;new Notification(t.join(" - "),n)}deleteFromStorage(e){const t=e;this.storageAbstraction.snoozeTimers.has(t)&&this.storageAbstraction.snoozeTimers.delete(t),this.storageAbstraction.notifications.has(t)&&this.storageAbstraction.notifications.delete(t)}deleteNotifications(e){e.map((e=>{this.deleteFromStorage(e.id),e.isDeleted=!0,this.notify([e])}))}addNotification(e){this.storageAbstraction.notifications.has(e.id)&&this.storageAbstraction.notifications.delete(e.id),this.storageAbstraction.notifications.set(e.id,e)}performAction(e){this.Logger.system.info("Request to perform Actions",e);const{notifications:t,action:n}=e,r={message:"success",errors:new Array};return t.forEach((e=>{try{this.delegateAction(e,n)}catch(e){r.message="fail",r.errors.push(e.message)}})),r}notify(e){e.forEach((async e=>{let t=this.receiveNotification(e);this.saveLastIssuedAt(t.source,t.issuedAt),t=f.default.setNotificationHistory(t,this.storageAbstraction.notifications,e);const n=await this.storeNotifications(t);t.isDeleted||this.broadcastNotification(t),n.forEach((e=>{d.default.deleteValue(d.STORAGE_KEY_NOTIFICATION_PREFIX+e.id),this.broadcastNotification(e)})),this.RouterClient.transmit("FinsembleNotificationsPreferencesChannel","notificationReceived")}))}subscribe(e){const t=this.getChannel();return e.id=this.getUuid(),this.Logger.system.info("Successfully processed subscription: ",e),e.channel=t,this.addToSubscription(e),{id:e.id,channel:t}}saveLastIssuedAt(e,t){if(e||(e=S),this.storageAbstraction.lastIssued.has(e)){if(new Date(t)>new Date(this.storageAbstraction.lastIssued.get(e).issuedAt)){this.storageAbstraction.lastIssued.set(e,new c.default(e,t));try{d.default.storeLastIssued(this.storageAbstraction.lastIssued).then()}catch(e){this.Logger.system.error("Failed to save lastIssued data",e)}}}else{this.storageAbstraction.lastIssued.set(e,new c.default(e,t));try{d.default.storeLastIssued(this.storageAbstraction.lastIssued).then()}catch(e){this.Logger.system.error("Failed to save lastIssued data",e)}}}getChannel(){return`subscribe.${this.getUuid()}`}snooze(e,t,n){this.removeFromSnoozeQueue(e);let r=this.config.service.defaultSnoozePeriodSeconds;!r||r<0?(this.Logger.system.warn("Invalid snooze timeout in configuration - defaulting to 180 seconds"),r=180):r=r;const i=n||(t.milliseconds?t.milliseconds:1e3*r),o=new u.default;o.notificationId=e.id,o.snoozeInterval=i,o.timeoutId=setTimeout((()=>{this.wake(e.id)}),i),this.Logger.system.log(`Timing Snoozing Date ${Date.now()}`),this.Logger.system.log(`Timing Snoozing Seconds ${i}`),o.wakeEpochMilliseconds=Date.now()+i,this.Logger.system.log(`Timing Snoozing for ${o.wakeEpochMilliseconds}`),this.storageAbstraction.snoozeTimers.set(e.id,o);try{d.default.storeSnoozeTimers(this.storageAbstraction.snoozeTimers).then()}catch(e){this.Logger.system.error("Failed to store snooze timers",e)}return e.isSnoozed=!0,e}wake(e){let t=this.storageAbstraction.notifications.get(e);const n=new l.default;n.id=this.getUuid(),n.type="FINSEMBLE:WAKE",t=f.default.addPerformedAction(t,n),t.isSnoozed=!1,t.isRead&&(t.isRead=!1),this.removeFromSnoozeQueue(t),this.notify([t])}dismiss(e){return e.isRead=!0,e}spawn(e,t){return v.default.spawn(t.component,t.spawnParams).then(),e}validateForwardParams(e){if(!e.channel)throw new Error(`No channel set when trying to perform '${e.type}'`)}unsubscribe(e){this.Logger.system.log(`Removing notification subscription: ${e}`),this.subscriptions.has(e)&&this.subscriptions.delete(e)}delegateAction(e,t){switch(e=f.default.addPerformedAction(e,t),this.removeFromSnoozeQueue(e),this.Logger.system.info(`Action type: ${t.type}`),t.type.toUpperCase()){case a.ActionTypes.SNOOZE:e=this.snooze(e,t),this.notify([e]);break;case a.ActionTypes.SPAWN:e=this.spawn(e,t);break;case a.ActionTypes.QUERY:e=this.forwardAsQuery(e,t);break;case a.ActionTypes.TRANSMIT:e=this.forwardAsTransmit(e,t);break;case a.ActionTypes.PUBLISH:e=this.forwardAsPublish(e,t);break;case a.ActionTypes.DISMISS:e=this.dismiss(e),this.notify([e]);break;default:return void this.Logger.system.error(`Unable to perform action '${t.type}' on notification`)}this.Logger.system.info("Updated notification state",e),[a.ActionTypes.SNOOZE,a.ActionTypes.DISMISS].includes(t.type.toUpperCase())||void 0!==t.markAsRead&&!0!==t.markAsRead||(e.isRead=!0,this.notify([e]))}markNotificationAs({notifications:e,isRead:t=!1}){this.Logger.system.info("Received state markAs",e);const n=e.map((e=>{this.removeFromSnoozeQueue(e);let n=p.Map(e);n=n.set("isRead",t);const r=new l.default;return r.id=this.getUuid(),r.type="FINSEMBLE:"+(t?"READ":"UNREAD"),n=f.default.addPerformedAction(n,r),t&&e.isSnoozed&&(n=n.set("isSnoozed",!1)),n.toObject()}));return this.notify(n),n}receiveNotification(e){if(this.Logger.system.info("Received state",e),Object.keys(e).includes("options")&&e.options){const{options:t}=e;e.details=t.body,e.headerLogo=t.icon,t.format&&t.format.includes("com.symphony")?(e.source="Symphony",e.title="Message from "+e.title):e.source=t.finsembleSource||"Unknown Source"}e=f.default.applyDefaults(this.config,e);let t=p.Map(e);if(t.get("id")||(t=t.set("id",this.getUuid())),t.get("issuedAt")||(t=t.set("issuedAt",(new Date).toISOString())),!t.get("receivedAt")){const n=new l.default;n.id=this.getUuid(),n.type="FINSEMBLE:RECEIVED",f.default.matchesMuteFilters(e,this.muteFilters)&&(t=t.set("isMuted",!0),this.Logger.system.log(`Mute notificationID:${e.id}, '${e.title}', source:'${e.source}', type: \n\t\t\t\t'${e.type}'`)),t=f.default.addPerformedAction(t,n),t=t.set("receivedAt",(new Date).toISOString())}return this.Logger.system.info("Applied state",t),t.toObject()}async storeNotifications(e){let t=[];return e.isDeleted||this.addNotification(e),t=f.default.getItemsToPurge(this.storageAbstraction.notifications,{maxNotificationRetentionPeriodSeconds:this.config.service.maxNotificationRetentionPeriodSeconds,maxNotificationsToRetain:this.config.service.maxNotificationsToRetain}),t.forEach((e=>{this.deleteFromStorage(e.id),e.isDeleted=!0})),e.isDeleted&&t.push(e),await d.default.persistNotification(this.storageAbstraction.notifications,e),await d.default.storeSnoozeTimers(this.storageAbstraction.snoozeTimers),t}addResponder(e,t,n){null==n&&(n=I),this.Logger.system.info(`Adding responder for endpoint: ${n+e}`),this.RouterClient.addResponder(n+e,(async(n,r)=>{if(this.Logger.system.info(`Message received on ${e}: `,r),n)this.Logger.system.error(`Failed to setup ${e} responder`,n);else try{this.Logger.system.info(`Processing message on channel ${e}: `,r);const n=await t(r?.data);this.Logger.system.info(`Message response on ${e}: `,n),r?.sendQueryResponse(null,{status:"success",data:n})}catch(n){this.Logger.system.error("Failed to process query",n),r?.sendQueryResponse(n)}}))}setPreferenceChangeListener(){this.RouterClient.addListener("FinsembleUserPreferencesChannel",(async(e,t)=>{const n=t.data.notificationPreferences;n&&Object.keys(n).map((e=>{this.setPreference(e,n[e])}))}))}setPreference(e,t){this.Logger.system.info("Updating notifications user preferences",e),m.default.setPreference({field:`${C}.${e}`,value:t},(t=>{t&&this.Logger.system.error("Could not save mute preference",e)}))}setupNotify(){this.addResponder("notify",this.notify)}setupLastIssued(){this.addResponder("last_issued",this.getLastIssued)}setupFetchHistory(){this.addResponder("fetch_history",this.fetchHistory)}setupMute(){this.addResponder("mute",this.mute),this.addResponder("unmute",this.unmute)}setupSubscribe(){this.addResponder(O,this.subscribe)}setupUnsubscribe(){this.addResponder("unsubscribe",this.unsubscribe)}setupMarkUnread(){this.addResponder("mark_unread",this.markNotificationAs)}setupMarkRead(){this.addResponder("mark_read",this.markNotificationAs)}setupDelete(){this.addResponder("delete",this.deleteNotifications)}setupAction(){this.addResponder("perform_action",this.performAction)}setupSources(){this.addResponder("sources",this.getSources)}setupMuteFilters(){this.addResponder("mute_filters",this.getMuteFilters)}setupPreferences(){this.addResponder("preferences",this.getNotificationsPreferences)}async setupUIPubSub(){const e=await w.default.get({topic:"finsemble.notifications",key:"last.position"}),t=e?.position?e.position:null;let n={showDrawer:!1,showCenter:!1,poppedOut:!!e?.poppedOut&&e.poppedOut,position:t,toasterMonitor:"0",overFlowMenu:{notification:!1,overflowCount:!1,clickCoordinates:!1}};this.RouterClient.addPubSubResponder("notification-ui",n,{publishCallback:async(e,t)=>{const r=await this.centerExists();e||(!r&&t.data.showCenter&&t.data.showCenter!=n.showCenter&&v.default.showWindow({windowName:"notifications-center",componentType:this.config.service.notificationsCenterComponentType||"NotificationsCenter"},{spawnIfNotFound:!0,relativeWindow:{windowName:b.windowNameFromRouterHeader(t.header)}}).then(),n=t.data,t.sendNotifyToAllSubscribers(null,t.data))}})}async centerExists(){const e=this.config.service.notificationsCenterComponentType||"NotificationsCenter";return new Promise((async t=>{const n=await _.default.getActiveDescriptors();for(const r in n.data)if(n.data.hasOwnProperty(r)&&n?.data[r]?.componentType===e){t(!0);break}t(!1)}))}expectReceipt(e,t){}setReceivedReceipt(e,t,n,r){this.Logger.system.info(`Got a receipt on: ${e.channel}`)}addToSubscription(e){this.subscriptions.set(e.id,e)}forwardAsQuery(e,t){this.validateForwardParams(t);try{this.query(t.channel,{notification:e,actionPayload:t.payload},"").then()}catch(n){this.Logger.system.error(`Error performing action on channel channel: '${t.channel}'`),e.isRead=!1}return e}transmit(e,t,n){null==n&&(n=I),this.Logger.info(`Transmitting on channel: ${n+e}`),this.RouterClient.transmit(n+e,t)}forwardAsTransmit(e,t){return this.validateForwardParams(t),this.transmit(t.channel,{notification:e,actionPayload:t.payload},""),e}publish(e,t,n){null==n&&(n=I),this.Logger.info(n),this.Logger.info(`Publishing on channel: ${n+e}`),this.RouterClient.publish(n+e,t)}forwardAsPublish(e,t){return this.validateForwardParams(t),this.publish(t.channel,{notification:e,actionPayload:t.payload},""),e}getLastIssued(e){this.Logger.system.info(`Finding last issued for source: '${e}'`);let t="";return e&&this.storageAbstraction.lastIssued.has(e)?t=this.storageAbstraction.lastIssued.get(e)?.issuedAt:this.storageAbstraction.lastIssued.forEach((e=>{if(t){const n=new Date(t);new Date(e.issuedAt)>n&&(t=e.issuedAt)}else t=e.issuedAt})),t}fetchHistory(e){let t,n,r,i;this.Logger.system.info("Fetch history request with params",e);let{options:o}=e;const{filter:s}=e,a=[];o&&"string"==typeof o?(this.Logger.system.deprecated(`FetchHistory: string parameter use has been deprecated. Use object form {sentAfter: "${o}"} instead`),t=o,this.Logger.system.info("Since date",t)):o&&"object"==typeof o&&(({sentAfter:t,sentBefore:n,pageSize:r,pageNumber:i}=o),r&&!i&&(i=1)),t&&(t="startup"==t?this.serviceStartTime:new Date(t)),n&&(n="startup"==n?this.serviceStartTime:new Date(n));let u=0;return Array.from(this.storageAbstraction.notifications).reverse().forEach((([e,o])=>{if(r&&a.length>=r)return;const c=new Date(o.receivedAt);t&&(this.Logger.system.info("Notification date",o.receivedAt),c<=t)||n&&c>=n||s&&!f.default.filterMatches(s,o)||(i&&u<(i-1)*r?u++:a.push(this.storageAbstraction.notifications.get(e)))})),a}unmute(e){this.Logger.system.info("Unmute request with params",e);const{filter:t}=e,n=this.muteFilters.slice();Array.isArray(t)?t.map((e=>{this.removeFromMuteFilters(n,e)})):this.removeFromMuteFilters(n,t),m.default.setPreference({field:`${C}.mute`,value:n},(t=>{t&&this.Logger.system.error("Could not save mute preference",e)}))}mute(e){this.Logger.system.info("Mute request with params",e);const{filter:t}=e,n=this.muteFilters.slice();Array.isArray(t)?t.map((e=>{this.addToMuteFilters(n,e)})):this.addToMuteFilters(n,t),m.default.setPreference({field:`${C}.mute`,value:n},(t=>{t&&this.Logger.system.error("Could not save mute preference",e)}))}addToMuteFilters(e,t){let n=!1;this.muteFilters.forEach((e=>{e.source===t.source&&e.type===t.type&&(n=!0)})),n||e.push(t)}removeFromMuteFilters(e,t){this.filterMutate(e,(e=>e.source!==t.source||e.type!==t.type))}filterMutate(e,t){for(let n=e.length-1;n>=0;n-=1)t(e[n])||e.splice(n,1)}getUuid(){return h.v4()}removeFromSnoozeQueue(e){if(e.id&&this.storageAbstraction.snoozeTimers.has(e.id)){clearTimeout(this.storageAbstraction.snoozeTimers.get(e.id).timeoutId),this.storageAbstraction.snoozeTimers.delete(e.id);try{d.default.storeSnoozeTimers(this.storageAbstraction.snoozeTimers).then()}catch(e){this.Logger.system.error("Failed to store snooze timers",e)}}}wakeSnoozeFromLoad(){const e=[],t=[];this.storageAbstraction.snoozeTimers.forEach(((n,r)=>{let i=this.storageAbstraction.notifications.get(r);i&&(Date.now()>=n.wakeEpochMilliseconds?t.push(i):e.push(i))})),e.forEach((e=>{const t=this.storageAbstraction.snoozeTimers.get(e.id);this.Logger.system.log(`Timing Timestamp ${t?.wakeEpochMilliseconds}`),this.Logger.system.log(`Timing Now Timestamp ${Date.now()}`),this.Logger.system.log("Timing: "+(t.wakeEpochMilliseconds-Date.now())),this.snooze(e,new l.default,Math.max(1e4,t.wakeEpochMilliseconds-Date.now()))})),t.forEach((e=>{setTimeout((()=>{this.wake(e.id)}),1e4)}))}}const R=new L("notificationService");t.default=R},33509:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CHECKPOINT_CHANNEL_BASE=t.STAGE_CHANNEL=t.STATUS_CHANNEL_BASE=t.SHOW_SYSLOG_CHANNEL=t.SYSLOG_CHANNEL=t.CRITICAL_BOOT_STAGES=t.ALL_BOOT_STAGES=void 0,t.ALL_BOOT_STAGES=["microkernel","kernel","authentication","preuser","earlyuser","user"],t.CRITICAL_BOOT_STAGES=["microkernel","kernel","authentication"],t.SYSLOG_CHANNEL="systemManager.systemlog",t.SHOW_SYSLOG_CHANNEL="systemManager.showSystemlog",t.STATUS_CHANNEL_BASE="systemManager.boot.status",t.STAGE_CHANNEL="systemManager.boot.stage",t.CHECKPOINT_CHANNEL_BASE="systemManager.checkpoint"},56188:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BootReadyItem=t.BootConfigElement=t.ALL_BOOT_STAGES=void 0,t.ALL_BOOT_STAGES=["microkernel","kernel","authentication","preuser","earlyuser","user"],t.BootConfigElement=class{},t.BootReadyItem=class{constructor(e,t,n){this.name=e,this.type=t,this.config=n}}},95269:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkpointChannel=t.statusChannel=t.killOldApplications=void 0;const r=n(51742),i=n(33509);t.killOldApplications=function(e){return new Promise((async t=>{r.System.getAllApplications((async n=>{if(n)for(let t=0;t<n.length;t++){const i=n[t];if(i.uuid?.endsWith(`-${e}`)){const e=r.System.Application.wrap(i.uuid);await r.System.closeApplication(e)}}console.log("killOldApplications: finished closing old apps"),t()}))}))},t.statusChannel=function(e){return`${i.STATUS_CHANNEL_BASE}.${e}`},t.checkpointChannel=function(e,t){return`${i.CHECKPOINT_CHANNEL_BASE}.${e}.${t}`}},88801:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},77661:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},80498:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},74215:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},19600:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},89520:(e,t)=>{"use strict";var n,r,i;Object.defineProperty(t,"__esModule",{value:!0}),t.ChannelError=t.ResolveError=t.OpenError=void 0,(i=t.OpenError||(t.OpenError={})).AppNotFound="AppNotFound",i.ErrorOnLaunch="ErrorOnLaunch",i.AppTimeout="AppTimeout",i.ResolverUnavailable="ResolverUnavailable",(r=t.ResolveError||(t.ResolveError={})).NoAppsFound="NoAppsFound",r.ResolverUnavailable="ResolverUnavailable",r.ResolverTimeout="ResolverTimeout",(n=t.ChannelError||(t.ChannelError={})).NoChannelFound="NoChannelFound",n.AccessDenied="AccessDenied",n.CreationFailed="CreationFailed"},55182:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},35644:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},66129:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},51854:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},36611:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.versionIsAtLeast=t.compareVersionNumbers=t.getInfo=t.leaveCurrentChannel=t.getCurrentChannel=t.getOrCreateChannel=t.joinChannel=t.getSystemChannels=t.addContextListener=t.addIntentListener=t.raiseIntentForContext=t.raiseIntent=t.broadcast=t.findIntentsByContext=t.findIntent=t.open=t.fdc3Ready=void 0;const n=new Error("FDC3 DesktopAgent not available at `window.fdc3`."),r=new Error("Timed out waiting for `fdc3Ready` event."),i=new Error("`fdc3Ready` event fired, but `window.fdc3` not set to DesktopAgent.");function o(e){return window.fdc3?e():Promise.reject(n)}function s(e){if(!window.fdc3)throw n;return e()}t.fdc3Ready=async(e=5e3)=>new Promise(((t,n)=>{if(window.fdc3)t();else{const o=setTimeout((()=>window.fdc3?t():n(r)),e);window.addEventListener("fdc3Ready",(()=>{clearTimeout(o),window.fdc3?t():n(i)}),{once:!0})}})),t.open=function(e,t){return o((()=>window.fdc3.open(e,t)))},t.findIntent=function(e,t){return o((()=>window.fdc3.findIntent(e,t)))},t.findIntentsByContext=function(e){return o((()=>window.fdc3.findIntentsByContext(e)))},t.broadcast=function(e){s((()=>window.fdc3.broadcast(e)))},t.raiseIntent=function(e,t,n){return o((()=>window.fdc3.raiseIntent(e,t,n)))},t.raiseIntentForContext=function(e,t){return o((()=>window.fdc3.raiseIntentForContext(e,t)))},t.addIntentListener=function(e,t){return s((()=>window.fdc3.addIntentListener(e,t)))},t.addContextListener=function(e,t){return s("function"!=typeof e?()=>window.fdc3.addContextListener(e,t):()=>window.fdc3.addContextListener(e))},t.getSystemChannels=function(){return o((()=>window.fdc3.getSystemChannels()))},t.joinChannel=function(e){return o((()=>window.fdc3.joinChannel(e)))},t.getOrCreateChannel=function(e){return o((()=>window.fdc3.getOrCreateChannel(e)))},t.getCurrentChannel=function(){return o((()=>window.fdc3.getCurrentChannel()))},t.leaveCurrentChannel=function(){return o((()=>window.fdc3.leaveCurrentChannel()))},t.getInfo=function(){return s((()=>window.fdc3.getInfo()))},t.compareVersionNumbers=(e,t)=>{try{let n=e.split(".").map(Number),r=t.split(".").map(Number);for(let e=0;e<Math.max(n.length,r.length);e++){if(e===n.length||n[e]<r[e])return-1;if(e===r.length||n[e]>r[e])return 1}return 0}catch(e){return console.error("Failed to compare version strings",e),null}},t.versionIsAtLeast=(e,n)=>{let r=t.compareVersionNumbers(e.fdc3Version,n);return null===r?null:r>=0}},55972:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},91767:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ContextTypes=void 0,(n=t.ContextTypes||(t.ContextTypes={})).Contact="fdc3.contact",n.ContactList="fdc3.contactList",n.Country="fdc3.country",n.Instrument="fdc3.instrument",n.Organization="fdc3.organization",n.Portfolio="fdc3.portfolio",n.Position="fdc3.position"},91966:(e,t)=>{"use strict";function n(e,t,n=""){if(n)throw Error(`Invalid value for key "${n}". Expected type ${JSON.stringify(e)} but got ${JSON.stringify(t)}`);throw Error(`Invalid value ${JSON.stringify(t)} for type ${JSON.stringify(e)}`)}function r(e){if(void 0===e.jsonToJS){const t={};e.props.forEach((e=>t[e.json]={key:e.js,typ:e.typ})),e.jsonToJS=t}return e.jsonToJS}function i(e){if(void 0===e.jsToJSON){const t={};e.props.forEach((e=>t[e.js]={key:e.json,typ:e.typ})),e.jsToJSON=t}return e.jsToJSON}function o(e,t,r,i=""){if("any"===t)return e;if(null===t)return null===e?e:n(t,e);if(!1===t)return n(t,e);for(;"object"==typeof t&&void 0!==t.ref;)t=h[t.ref];return Array.isArray(t)?function(e,t){return-1!==e.indexOf(t)?t:n(e,t)}(t,e):"object"==typeof t?t.hasOwnProperty("unionMembers")?function(e,t){const i=e.length;for(let n=0;n<i;n++){const i=e[n];try{return o(t,i,r)}catch(e){}}return n(e,t)}(t.unionMembers,e):t.hasOwnProperty("arrayItems")?function(e,t){return Array.isArray(t)?t.map((t=>o(t,e,r))):n("array",t)}(t.arrayItems,e):t.hasOwnProperty("props")?function(e,t,i){if(null===i||"object"!=typeof i||Array.isArray(i))return n("object",i);const s={};return Object.getOwnPropertyNames(e).forEach((t=>{const n=e[t],a=Object.prototype.hasOwnProperty.call(i,t)?i[t]:void 0;s[n.key]=o(a,n.typ,r,n.key)})),Object.getOwnPropertyNames(i).forEach((n=>{Object.prototype.hasOwnProperty.call(e,n)||(s[n]=o(i[n],t,r,n))})),s}(r(t),t.additional,e):n(t,e):t===Date&&"number"!=typeof e?function(e){if(null===e)return null;const t=new Date(e);return isNaN(t.valueOf())?n("Date",e):t}(e):function(e,t){return typeof e==typeof t?t:n(e,t,i)}(t,e)}function s(e,t){return o(e,t,r)}function a(e,t){return o(e,t,i)}function u(e){return{arrayItems:e}}function c(...e){return{unionMembers:e}}function l(e,t){return{props:e,additional:t}}function f(e){return{props:[],additional:e}}function d(e){return{ref:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Convert=void 0,t.Convert=class{static toContext(e){return s(JSON.parse(e),d("Context"))}static contextToJson(e){return JSON.stringify(a(e,d("Context")),null,2)}static toContact(e){return s(JSON.parse(e),d("Contact"))}static contactToJson(e){return JSON.stringify(a(e,d("Contact")),null,2)}static toContactList(e){return s(JSON.parse(e),d("ContactList"))}static contactListToJson(e){return JSON.stringify(a(e,d("ContactList")),null,2)}static toInstrument(e){return s(JSON.parse(e),d("Instrument"))}static instrumentToJson(e){return JSON.stringify(a(e,d("Instrument")),null,2)}static toInstrumentList(e){return s(JSON.parse(e),d("InstrumentList"))}static instrumentListToJson(e){return JSON.stringify(a(e,d("InstrumentList")),null,2)}static toCountry(e){return s(JSON.parse(e),d("Country"))}static countryToJson(e){return JSON.stringify(a(e,d("Country")),null,2)}static toOrganization(e){return s(JSON.parse(e),d("Organization"))}static organizationToJson(e){return JSON.stringify(a(e,d("Organization")),null,2)}static toPortfolio(e){return s(JSON.parse(e),d("Portfolio"))}static portfolioToJson(e){return JSON.stringify(a(e,d("Portfolio")),null,2)}static toPosition(e){return s(JSON.parse(e),d("Position"))}static positionToJson(e){return JSON.stringify(a(e,d("Position")),null,2)}};const h={Context:l([{json:"id",js:"id",typ:c(void 0,f(""))},{json:"name",js:"name",typ:c(void 0,"")},{json:"type",js:"type",typ:""}],"any"),ContactList:l([{json:"contacts",js:"contacts",typ:u(d("Contact"))},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:c(void 0,f(""))},{json:"name",js:"name",typ:c(void 0,"")}],"any"),Contact:l([{json:"id",js:"id",typ:d("ContactID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:c(void 0,"")}],"any"),ContactID:l([{json:"email",js:"email",typ:c(void 0,"")},{json:"FDS_ID",js:"FDS_ID",typ:c(void 0,"")}],""),InstrumentList:l([{json:"instruments",js:"instruments",typ:u(d("Instrument"))},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:c(void 0,f(""))},{json:"name",js:"name",typ:c(void 0,"")}],"any"),Instrument:l([{json:"id",js:"id",typ:d("InstrumentID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:c(void 0,"")}],"any"),InstrumentID:l([{json:"BBG",js:"BBG",typ:c(void 0,"")},{json:"CUSIP",js:"CUSIP",typ:c(void 0,"")},{json:"FDS_ID",js:"FDS_ID",typ:c(void 0,"")},{json:"FIGI",js:"FIGI",typ:c(void 0,"")},{json:"ISIN",js:"ISIN",typ:c(void 0,"")},{json:"PERMID",js:"PERMID",typ:c(void 0,"")},{json:"RIC",js:"RIC",typ:c(void 0,"")},{json:"SEDOL",js:"SEDOL",typ:c(void 0,"")},{json:"ticker",js:"ticker",typ:c(void 0,"")}],""),Country:l([{json:"id",js:"id",typ:d("CountryID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:c(void 0,"")}],"any"),CountryID:l([{json:"ISOALPHA2",js:"ISOALPHA2",typ:c(void 0,"")},{json:"ISOALPHA3",js:"ISOALPHA3",typ:c(void 0,"")}],""),Organization:l([{json:"id",js:"id",typ:d("OrganizationID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:c(void 0,"")}],"any"),OrganizationID:l([{json:"FDS_ID",js:"FDS_ID",typ:c(void 0,"")},{json:"LEI",js:"LEI",typ:c(void 0,"")},{json:"PERMID",js:"PERMID",typ:c(void 0,"")}],""),Portfolio:l([{json:"positions",js:"positions",typ:u(d("Position"))},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:c(void 0,f(""))},{json:"name",js:"name",typ:c(void 0,"")}],"any"),Position:l([{json:"holding",js:"holding",typ:3.14},{json:"instrument",js:"instrument",typ:d("Instrument")},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:c(void 0,f(""))},{json:"name",js:"name",typ:c(void 0,"")}],"any")}},98832:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(88801),t),i(n(77661),t),i(n(80498),t),i(n(55972),t),i(n(74215),t),i(n(19600),t),i(n(89520),t),i(n(35644),t),i(n(66129),t),i(n(51854),t),i(n(55182),t),i(n(36611),t),i(n(91767),t),i(n(91966),t),i(n(77178),t)},77178:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Intents=void 0,(n=t.Intents||(t.Intents={})).StartCall="StartCall",n.StartChat="StartChat",n.ViewChart="ViewChart",n.ViewContact="ViewContact",n.ViewQuote="ViewQuote",n.ViewNews="ViewNews",n.ViewInstrument="ViewInstrument",n.ViewAnalysis="ViewAnalysis"},60306:e=>{"use strict";e.exports=JSON.parse('{"name":"@finsemble/finsemble-core","main":"dist/index.js","types":"types/index.d.ts","version":"6.1.4","description":"Finsemble is an application framework providing infrastructure, services, and components for quickly building HTML5 multi-window financial desktop applications.","scripts":{"do-audit":" improved-yarn-audit --min-severity high","build":"gulp build --production","build-docs":"gulp --gulpfile gulpfile-docs.js build-docs","clean":"gulp clean","dev":"gulp build --watch","dev:fresh":"gulp build --clean --watch","docs":"set DEBUG=gulp-jsdoc3&&gulp --gulpfile=./gulpfile-docs.js docs-server","lint":"eslint --ext .js,.jsx,.ts,.tsx ./src/**","lint-fix":"eslint --fix --ext .js,.jsx,.ts,.tsx ./src/**","lint-stats":"eslint --format node_modules/eslint-stats/byErrorAndWarning.js --ext .js,.jsx,.ts,.tsx ./src/**","monodev":"yarn dev","obfuscate":"gulp build --production --obfuscate","prod":"gulp build --production","test":"ts-mocha","test-coverage":"nyc ts-mocha && nyc merge .nyc_output ../../.nyc_output/core.json","types":"gulp types"},"author":"Cosaic","license":"SEE LICENSE IN LICENSE","dependencies":{"@babel/core":"7.14.6","@babel/preset-env":"7.14.7","@babel/preset-react":"7.14.5"},"devDependencies":{"@istanbuljs/nyc-config-typescript":"1.0.1","@reduxjs/toolkit":"1.6.1","@types/chai":"4.2.21","@types/deepmerge":"2.2.0","@types/lodash":"4.14.171","@types/mocha":"9.0.0","@types/node":"12.12.7","@typescript-eslint/eslint-plugin":"4.28.3","@typescript-eslint/parser":"4.28.4","ajv":"6.12.2","async":"3.2.0","babel-loader":"8.2.2","browser-sync":"2.27.4","case-sensitive-paths-webpack-plugin":"2.4.0","chai":"4.2.0","chalk":"4.1.1","copy-webpack-plugin":"6.4.1","css-loader":"3.5.3","deepmerge":"1.3.2","del":"6.0.0","esm":"~3.2.25","fast-check":"2.17.0","file-loader":"6.2.0","file-saver":"2.0.5","fs-extra":"2.1.2","fuse.js":"6.4.6","git-rev-sync":"3.0.1","gulp":"4.0.0","gulp-javascript-obfuscator":"^1.1.6","gulp-jsdoc3":"3.0.0","gulp-plumber":"1.2.1","gulp-rename":"1.2.3","gulp-string-replace":"1.1.2","gulp-watch":"5.0.1","immutable":"4.0.0-rc.14","improved-yarn-audit":"^2.3.2","jsdoc":"3.6.6","jszip":"3.6.0","lodash":"4.17.21","mocha":"^8.0.1","mock-socket":"9.0.3","nyc":"15.1.0","p-limit":"3.1.0","p-queue":"7.1.0","pretty-hrtime":"1.0.3","prop-types":"15.7.2","react":"17.0.2","react-dom":"17.0.2","react-redux":"7.2.4","react-virtualized":"9.22.3","redux-devtools":"3.7.0","redux-devtools-chart-monitor":"1.7.2","redux-devtools-log-monitor":"2.1.0","redux-loop":"6.1.0","require-directory":"2.1.1","resize-observer-polyfill":"1.5.1","rimraf":"3.0.2","sass-loader":"12.1.0","searchjs":"1.1.0","shelljs":"0.8.4","sinon":"11.1.1","sinon-chai":"3.7.0","source-map-loader":"3.0.0","style-loader":"3.2.1","superagent":"6.1.0","taffydb":"2.7.3","to-string-loader":"1.1.6","ts-loader":"9.2.3","ts-mocha":"8.0.0","typedoc":"0.17.8","typescript":"4.3.5","url-loader":"4.1.0","uuid":"3.0.1","vinyl-sourcemaps-apply":"0.2.1","webpack":"5.45.1","webpack-glob-entries":"1.0.1","worker-farm":"1.7.0"},"resolutions":{"ts-mocha/ts-node":"^10.1.0","xmlhttprequest-ssl":"1.6.3","underscore":"1.12.1","ua-parser-js":"0.7.24","javascript-obfuscator":"2.15.5"}}')},87063:e=>{"use strict";e.exports=JSON.parse('{"F":{"0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","backspace":"Backspace","bs":"Backspace","bksp":"Backspace","tab":"Tab","escape":"Escape","esc":"Escape","clear":"Clear","enter":"Enter","return":"Enter","shift":"Shift","shft":"Shift","lshift":"Shift","lshft":"Shift","left shift":"Shift","leftshift":"Shift","rshift":"Shift","rshft":"Shift","right shift":"Shift","rightshift":"Shift","control":"Control","ctrl":"Control","commandorcontrol":"CommandOrControl","alt":"Alt","alternate":"Alt","pause":"Pause","caps lock":"Capslock","capslock":"Capslock","spacebar":"Space","space":"Space","space bar":"Space","page up":"PageUp","pgup":"PageUp","pg up":"PageUp","page down":"PageDown","pgdn":"PageDown","pg dn":"PageDown","pgdown":"PageDown","end":"End","home":"Home","left arrow":"Left","left":"Left","up arrow":"Up","up":"Up","right arrow":"Right","right":"Right","down arrow":"Down","down":"Down","select":"Select","slct":"Select","print":"PrintScreen","prnt":"PrintScreen","execute":"Execute","print screen":"PrintScreen","printscreen":"PrintScreen","print scrn":"PrintScreen","printscrn":"PrintScreen","prnt scrn":"PrintScreen","prntscrn":"PrintScreen","prt scrn":"PrintScreen","prtscrn":"PrintScreen","prt scn":"PrintScreen","prtscn":"PrintScreen","prt scr":"PrintScreen","prtscr":"PrintScreen","prt sc":"PrintScreen","prtsc":"PrintScreen","pr sc":"PrintScreen","prsc":"PrintScreen","insert":"Insert","ins":"Insert","delete":"Delete","del":"Delete","a":"A","b":"B","c":"C","d":"D","e":"E","f":"F","g":"G","h":"H","i":"I","j":"J","k":"K","l":"L","m":"M","n":"N","o":"O","p":"P","q":"Q","r":"R","s":"S","t":"T","u":"U","v":"V","w":"W","x":"X","y":"Y","z":"Z","windows":"Super","left windows":"Super","right windows":"Super","numpad 0":"num0","numpad 1":"num1","numpad 2":"num2","numpad 3":"num3","numpad 4":"num4","numpad 5":"num5","numpad 6":"num6","numpad 7":"num7","numpad 8":"num8","numpad 9":"num9","f1":"F1","fn1":"F1","function 1":"F1","f2":"F2","fn2":"F2","function 2":"F2","f3":"F3","fn3":"F3","function 3":"F3","f4":"F4","fn4":"F4","function 4":"F4","f5":"F5","fn5":"F5","function 5":"F5","f6":"F6","fn6":"F6","function 6":"F6","f7":"F7","fn7":"F7","function 7":"F7","f8":"F8","fn8":"F8","function 8":"F8","f9":"F9","fn9":"F9","function 9":"F9","f10":"F10","fn10":"F10","function 10":"F10","f11":"F11","fn11":"F11","function 11":"F11","f12":"F12","fn12":"F12","function 12":"F12","f13":"F13","fn":"F13","function 13":"F13","f14":"F14","fn14":"F14","function 14":"F14","f15":"F15","fn15":"F15","function 15":"F15","f16":"F16","fn16":"F16","function 16":"F16","num lock":"Numlock","numlock":"Numlock","number lock":"Numlock","numeric lock":"Numlock","scroll lock":"Scrolllock","sclk":"Scrolllock","scrlk":"Scrolllock","slk":"Scrolllock","*":"*","+":"+","-":"-","/":"/",";":";","=":"=",",":",","_":"-",".":".","`":"`","[":"[","]":"]","\'":"\'"}}')}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n(41567)})();
2
+ (()=>{var e={57664:(e,t,n)=>{"use strict";function r(e,...t){return(...n)=>e(...t,...n)}function i(e){return function(...t){var n=t.pop();return e.call(this,t,n)}}n.r(t),n.d(t,{default:()=>pt,apply:()=>r,applyEach:()=>L,applyEachSeries:()=>N,asyncify:()=>l,auto:()=>D,autoInject:()=>z,cargo:()=>H,cargoQueue:()=>V,compose:()=>K,concat:()=>Z,concatLimit:()=>Q,concatSeries:()=>X,constant:()=>ee,detect:()=>ne,detectLimit:()=>re,detectSeries:()=>ie,dir:()=>se,doUntil:()=>ue,doWhilst:()=>ae,each:()=>le,eachLimit:()=>fe,eachOf:()=>A,eachOfLimit:()=>E,eachOfSeries:()=>R,eachSeries:()=>de,ensureAsync:()=>he,every:()=>pe,everyLimit:()=>ye,everySeries:()=>ge,filter:()=>_e,filterLimit:()=>be,filterSeries:()=>Se,forever:()=>Ce,groupBy:()=>Ie,groupByLimit:()=>Ee,groupBySeries:()=>Oe,log:()=>Ae,map:()=>T,mapLimit:()=>J,mapSeries:()=>k,mapValues:()=>Le,mapValuesLimit:()=>Te,mapValuesSeries:()=>Re,memoize:()=>ke,nextTick:()=>Ne,parallel:()=>Pe,parallelLimit:()=>De,priorityQueue:()=>Be,queue:()=>We,race:()=>ze,reduce:()=>G,reduceRight:()=>$e,reflect:()=>qe,reflectAll:()=>Ue,reject:()=>Ve,rejectLimit:()=>Ge,rejectSeries:()=>Ye,retry:()=>Je,retryable:()=>Ze,seq:()=>Y,series:()=>Xe,setImmediate:()=>c,some:()=>et,someLimit:()=>tt,someSeries:()=>nt,sortBy:()=>rt,timeout:()=>it,times:()=>st,timesLimit:()=>ot,timesSeries:()=>at,transform:()=>ut,tryEach:()=>ct,unmemoize:()=>lt,until:()=>dt,waterfall:()=>ht,whilst:()=>ft,all:()=>pe,allLimit:()=>ye,allSeries:()=>ge,any:()=>et,anyLimit:()=>tt,anySeries:()=>nt,find:()=>ne,findLimit:()=>re,findSeries:()=>ie,flatMap:()=>Z,flatMapLimit:()=>Q,flatMapSeries:()=>X,forEach:()=>le,forEachSeries:()=>de,forEachLimit:()=>fe,forEachOf:()=>A,forEachOfSeries:()=>R,forEachOfLimit:()=>E,inject:()=>G,foldl:()=>G,foldr:()=>$e,select:()=>_e,selectLimit:()=>be,selectSeries:()=>Se,wrapSync:()=>l,during:()=>ft,doDuring:()=>ae});var o="function"==typeof setImmediate&&setImmediate,s="object"==typeof process&&"function"==typeof process.nextTick;function a(e){setTimeout(e,0)}function u(e){return(t,...n)=>e((()=>t(...n)))}var c=u(o?setImmediate:s?process.nextTick:a);function l(e){return h(e)?function(...t){const n=t.pop();return f(e.apply(this,t),n)}:i((function(t,n){var r;try{r=e.apply(this,t)}catch(e){return n(e)}if(r&&"function"==typeof r.then)return f(r,n);n(null,r)}))}function f(e,t){return e.then((e=>{d(t,null,e)}),(e=>{d(t,e&&e.message?e:new Error(e))}))}function d(e,t,n){try{e(t,n)}catch(e){c((e=>{throw e}),e)}}function h(e){return"AsyncFunction"===e[Symbol.toStringTag]}function p(e){if("function"!=typeof e)throw new Error("expected a function");return h(e)?l(e):e}function y(e,t=e.length){if(!t)throw new Error("arity is undefined");return function(...n){return"function"==typeof n[t-1]?e.apply(this,n):new Promise(((r,i)=>{n[t-1]=(e,...t)=>{if(e)return i(e);r(t.length>1?t:t[0])},e.apply(this,n)}))}}function g(e){return function(t,...n){return y((function(r){var i=this;return e(t,((e,t)=>{p(e).apply(i,n.concat(t))}),r)}))}}function m(e,t,n,r){t=t||[];var i=[],o=0,s=p(n);return e(t,((e,t,n)=>{var r=o++;s(e,((e,t)=>{i[r]=t,n(e)}))}),(e=>{r(e,i)}))}function v(e){return e&&"number"==typeof e.length&&e.length>=0&&e.length%1==0}const w={};function _(e){function t(...t){if(null!==e){var n=e;e=null,n.apply(this,t)}}return Object.assign(t,e),t}function b(e){return function(...t){if(null===e)throw new Error("Callback was already called.");var n=e;e=null,n.apply(this,t)}}function S(e,t,n,r){let i=!1,o=!1,s=!1,a=0,u=0;function c(){a>=t||s||i||(s=!0,e.next().then((({value:e,done:t})=>{if(!o&&!i){if(s=!1,t)return i=!0,void(a<=0&&r(null));a++,n(e,u,l),u++,c()}})).catch(f))}function l(e,t){if(a-=1,!o)return e?f(e):!1===e?(i=!0,void(o=!0)):t===w||i&&a<=0?(i=!0,r(null)):void c()}function f(e){o||(s=!1,i=!0,r(e))}c()}var C=e=>(t,n,r)=>{if(r=_(r),e<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return r(null);if("AsyncGenerator"===t[Symbol.toStringTag])return S(t,e,n,r);if(function(e){return"function"==typeof e[Symbol.asyncIterator]}(t))return S(t[Symbol.asyncIterator](),e,n,r);var i=function(e){if(v(e))return function(e){var t=-1,n=e.length;return function(){return++t<n?{value:e[t],key:t}:null}}(e);var t,n,r,i,o=function(e){return e[Symbol.iterator]&&e[Symbol.iterator]()}(e);return o?function(e){var t=-1;return function(){var n=e.next();return n.done?null:(t++,{value:n.value,key:t})}}(o):(n=(t=e)?Object.keys(t):[],r=-1,i=n.length,function(){var e=n[++r];return r<i?{value:t[e],key:e}:null})}(t),o=!1,s=!1,a=0,u=!1;function c(e,t){if(!s)if(a-=1,e)o=!0,r(e);else if(!1===e)o=!0,s=!0;else{if(t===w||o&&a<=0)return o=!0,r(null);u||l()}}function l(){for(u=!0;a<e&&!o;){var t=i();if(null===t)return o=!0,void(a<=0&&r(null));a+=1,n(t.value,t.key,b(c))}u=!1}l()},E=y((function(e,t,n,r){return C(t)(e,p(n),r)}),4);function I(e,t,n){n=_(n);var r=0,i=0,{length:o}=e,s=!1;function a(e,t){!1===e&&(s=!0),!0!==s&&(e?n(e):++i!==o&&t!==w||n(null))}for(0===o&&n(null);r<o;r++)t(e[r],r,b(a))}function O(e,t,n){return E(e,1/0,t,n)}var A=y((function(e,t,n){return(v(e)?I:O)(e,p(t),n)}),3),T=y((function(e,t,n){return m(A,e,t,n)}),3),L=g(T),R=y((function(e,t,n){return E(e,1,t,n)}),3),k=y((function(e,t,n){return m(R,e,t,n)}),3),N=g(k);const M=Symbol("promiseCallback");function P(){let e,t;function n(n,...r){if(n)return t(n);e(r.length>1?r:r[0])}return n[M]=new Promise(((n,r)=>{e=n,t=r})),n}function D(e,t,n){"number"!=typeof t&&(n=t,t=null),n=_(n||P());var r=Object.keys(e).length;if(!r)return n(null);t||(t=r);var i={},o=0,s=!1,a=!1,u=Object.create(null),c=[],l=[],f={};function d(e,t){c.push((()=>function(e,t){if(!a){var r=b(((t,...r)=>{if(o--,!1!==t)if(r.length<2&&([r]=r),t){var c={};if(Object.keys(i).forEach((e=>{c[e]=i[e]})),c[e]=r,a=!0,u=Object.create(null),s)return;n(t,c)}else i[e]=r,(u[e]||[]).forEach((e=>e())),h();else s=!0}));o++;var c=p(t[t.length-1]);t.length>1?c(i,r):c(r)}}(e,t)))}function h(){if(!s){if(0===c.length&&0===o)return n(null,i);for(;c.length&&o<t;)c.shift()()}}function y(t){var n=[];return Object.keys(e).forEach((r=>{const i=e[r];Array.isArray(i)&&i.indexOf(t)>=0&&n.push(r)})),n}return Object.keys(e).forEach((t=>{var n=e[t];if(!Array.isArray(n))return d(t,[n]),void l.push(t);var r=n.slice(0,n.length-1),i=r.length;if(0===i)return d(t,n),void l.push(t);f[t]=i,r.forEach((o=>{if(!e[o])throw new Error("async.auto task `"+t+"` has a non-existent dependency `"+o+"` in "+r.join(", "));var s,a;(a=u[s=o])||(a=u[s]=[]),a.push((()=>{0==--i&&d(t,n)}))}))})),function(){for(var e=0;l.length;)e++,y(l.pop()).forEach((e=>{0==--f[e]&&l.push(e)}));if(e!==r)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}(),h(),n[M]}var W=/^(?:async\s+)?(?:function)?\s*\w*\s*\(\s*([^)]+)\s*\)(?:\s*{)/,x=/^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/,j=/,/,F=/(=.+)?(\s*)$/,B=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm;function z(e,t){var n={};return Object.keys(e).forEach((t=>{var r,i=e[t],o=h(i),s=!o&&1===i.length||o&&0===i.length;if(Array.isArray(i))r=[...i],i=r.pop(),n[t]=r.concat(r.length>0?a:i);else if(s)n[t]=i;else{if(r=function(e){const t=e.toString().replace(B,"");let n=t.match(W);if(n||(n=t.match(x)),!n)throw new Error("could not parse args in autoInject\nSource:\n"+t);let[,r]=n;return r.replace(/\s/g,"").split(j).map((e=>e.replace(F,"").trim()))}(i),0===i.length&&!o&&0===r.length)throw new Error("autoInject task functions require explicit parameters.");o||r.pop(),n[t]=r.concat(a)}function a(e,t){var n=r.map((t=>e[t]));n.push(t),p(i)(...n)}})),D(n,t)}class ${constructor(){this.head=this.tail=null,this.length=0}removeLink(e){return e.prev?e.prev.next=e.next:this.head=e.next,e.next?e.next.prev=e.prev:this.tail=e.prev,e.prev=e.next=null,this.length-=1,e}empty(){for(;this.head;)this.shift();return this}insertAfter(e,t){t.prev=e,t.next=e.next,e.next?e.next.prev=t:this.tail=t,e.next=t,this.length+=1}insertBefore(e,t){t.prev=e.prev,t.next=e,e.prev?e.prev.next=t:this.head=t,e.prev=t,this.length+=1}unshift(e){this.head?this.insertBefore(this.head,e):q(this,e)}push(e){this.tail?this.insertAfter(this.tail,e):q(this,e)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var e=this.head;e;)yield e.data,e=e.next}remove(e){for(var t=this.head;t;){var{next:n}=t;e(t)&&this.removeLink(t),t=n}return this}}function q(e,t){e.length=1,e.head=e.tail=t}function U(e,t,n){if(null==t)t=1;else if(0===t)throw new RangeError("Concurrency must not be zero");var r=p(e),i=0,o=[];const s={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function a(e,t){return e?t?void(s[e]=s[e].filter((e=>e!==t))):s[e]=[]:Object.keys(s).forEach((e=>s[e]=[]))}function u(e,...t){s[e].forEach((e=>e(...t)))}var l=!1;function f(e,t,n,r){if(null!=r&&"function"!=typeof r)throw new Error("task callback must be a function");var i,o;function s(e,...t){return e?n?o(e):i():t.length<=1?i(t[0]):void i(t)}m.started=!0;var a={data:e,callback:n?s:r||s};if(t?m._tasks.unshift(a):m._tasks.push(a),l||(l=!0,c((()=>{l=!1,m.process()}))),n||!r)return new Promise(((e,t)=>{i=e,o=t}))}function d(e){return function(t,...n){i-=1;for(var r=0,s=e.length;r<s;r++){var a=e[r],c=o.indexOf(a);0===c?o.shift():c>0&&o.splice(c,1),a.callback(t,...n),null!=t&&u("error",t,a.data)}i<=m.concurrency-m.buffer&&u("unsaturated"),m.idle()&&u("drain"),m.process()}}function h(e){return!(0!==e.length||!m.idle()||(c((()=>u("drain"))),0))}const y=e=>t=>{if(!t)return new Promise(((t,n)=>{!function(e,r){const i=(...r)=>{a(e,i),((e,r)=>{if(e)return n(e);t(r)})(...r)};s[e].push(i)}(e)}));a(e),function(e,t){s[e].push(t)}(e,t)};var g=!1,m={_tasks:new $,*[Symbol.iterator](){yield*m._tasks[Symbol.iterator]()},concurrency:t,payload:n,buffer:t/4,started:!1,paused:!1,push(e,t){if(Array.isArray(e)){if(h(e))return;return e.map((e=>f(e,!1,!1,t)))}return f(e,!1,!1,t)},pushAsync(e,t){if(Array.isArray(e)){if(h(e))return;return e.map((e=>f(e,!1,!0,t)))}return f(e,!1,!0,t)},kill(){a(),m._tasks.empty()},unshift(e,t){if(Array.isArray(e)){if(h(e))return;return e.map((e=>f(e,!0,!1,t)))}return f(e,!0,!1,t)},unshiftAsync(e,t){if(Array.isArray(e)){if(h(e))return;return e.map((e=>f(e,!0,!0,t)))}return f(e,!0,!0,t)},remove(e){m._tasks.remove(e)},process(){if(!g){for(g=!0;!m.paused&&i<m.concurrency&&m._tasks.length;){var e=[],t=[],n=m._tasks.length;m.payload&&(n=Math.min(n,m.payload));for(var s=0;s<n;s++){var a=m._tasks.shift();e.push(a),o.push(a),t.push(a.data)}i+=1,0===m._tasks.length&&u("empty"),i===m.concurrency&&u("saturated");var c=b(d(e));r(t,c)}g=!1}},length:()=>m._tasks.length,running:()=>i,workersList:()=>o,idle:()=>m._tasks.length+i===0,pause(){m.paused=!0},resume(){!1!==m.paused&&(m.paused=!1,c(m.process))}};return Object.defineProperties(m,{saturated:{writable:!1,value:y("saturated")},unsaturated:{writable:!1,value:y("unsaturated")},empty:{writable:!1,value:y("empty")},drain:{writable:!1,value:y("drain")},error:{writable:!1,value:y("error")}}),m}function H(e,t){return U(e,1,t)}function V(e,t,n){return U(e,t,n)}var G=y((function(e,t,n,r){r=_(r);var i=p(n);return R(e,((e,n,r)=>{i(t,e,((e,n)=>{t=n,r(e)}))}),(e=>r(e,t)))}),4);function Y(...e){var t=e.map(p);return function(...e){var n=this,r=e[e.length-1];return"function"==typeof r?e.pop():r=P(),G(t,e,((e,t,r)=>{t.apply(n,e.concat(((e,...t)=>{r(e,t)})))}),((e,t)=>r(e,...t))),r[M]}}function K(...e){return Y(...e.reverse())}var J=y((function(e,t,n,r){return m(C(t),e,n,r)}),4),Q=y((function(e,t,n,r){var i=p(n);return J(e,t,((e,t)=>{i(e,((e,...n)=>e?t(e):t(e,n)))}),((e,t)=>{for(var n=[],i=0;i<t.length;i++)t[i]&&(n=n.concat(...t[i]));return r(e,n)}))}),4),Z=y((function(e,t,n){return Q(e,1/0,t,n)}),3),X=y((function(e,t,n){return Q(e,1,t,n)}),3);function ee(...e){return function(...t){return t.pop()(null,...e)}}function te(e,t){return(n,r,i,o)=>{var s,a=!1;const u=p(i);n(r,((n,r,i)=>{u(n,((r,o)=>r||!1===r?i(r):e(o)&&!s?(a=!0,s=t(!0,n),i(null,w)):void i()))}),(e=>{if(e)return o(e);o(null,a?s:t(!1))}))}}var ne=y((function(e,t,n){return te((e=>e),((e,t)=>t))(A,e,t,n)}),3),re=y((function(e,t,n,r){return te((e=>e),((e,t)=>t))(C(t),e,n,r)}),4),ie=y((function(e,t,n){return te((e=>e),((e,t)=>t))(C(1),e,t,n)}),3);function oe(e){return(t,...n)=>p(t)(...n,((t,...n)=>{"object"==typeof console&&(t?console.error&&console.error(t):console[e]&&n.forEach((t=>console[e](t))))}))}var se=oe("dir"),ae=y((function(e,t,n){n=b(n);var r,i=p(e),o=p(t);function s(e,...t){if(e)return n(e);!1!==e&&(r=t,o(...t,a))}function a(e,t){return e?n(e):!1!==e?t?void i(s):n(null,...r):void 0}return a(null,!0)}),3);function ue(e,t,n){const r=p(t);return ae(e,((...e)=>{const t=e.pop();r(...e,((e,n)=>t(e,!n)))}),n)}function ce(e){return(t,n,r)=>e(t,r)}var le=y((function(e,t,n){return A(e,ce(p(t)),n)}),3),fe=y((function(e,t,n,r){return C(t)(e,ce(p(n)),r)}),4),de=y((function(e,t,n){return fe(e,1,t,n)}),3);function he(e){return h(e)?e:function(...t){var n=t.pop(),r=!0;t.push(((...e)=>{r?c((()=>n(...e))):n(...e)})),e.apply(this,t),r=!1}}var pe=y((function(e,t,n){return te((e=>!e),(e=>!e))(A,e,t,n)}),3),ye=y((function(e,t,n,r){return te((e=>!e),(e=>!e))(C(t),e,n,r)}),4),ge=y((function(e,t,n){return te((e=>!e),(e=>!e))(R,e,t,n)}),3);function me(e,t,n,r){var i=new Array(t.length);e(t,((e,t,r)=>{n(e,((e,n)=>{i[t]=!!n,r(e)}))}),(e=>{if(e)return r(e);for(var n=[],o=0;o<t.length;o++)i[o]&&n.push(t[o]);r(null,n)}))}function ve(e,t,n,r){var i=[];e(t,((e,t,r)=>{n(e,((n,o)=>{if(n)return r(n);o&&i.push({index:t,value:e}),r(n)}))}),(e=>{if(e)return r(e);r(null,i.sort(((e,t)=>e.index-t.index)).map((e=>e.value)))}))}function we(e,t,n,r){return(v(t)?me:ve)(e,t,p(n),r)}var _e=y((function(e,t,n){return we(A,e,t,n)}),3),be=y((function(e,t,n,r){return we(C(t),e,n,r)}),4),Se=y((function(e,t,n){return we(R,e,t,n)}),3),Ce=y((function(e,t){var n=b(t),r=p(he(e));return function e(t){if(t)return n(t);!1!==t&&r(e)}()}),2),Ee=y((function(e,t,n,r){var i=p(n);return J(e,t,((e,t)=>{i(e,((n,r)=>n?t(n):t(n,{key:r,val:e})))}),((e,t)=>{for(var n={},{hasOwnProperty:i}=Object.prototype,o=0;o<t.length;o++)if(t[o]){var{key:s}=t[o],{val:a}=t[o];i.call(n,s)?n[s].push(a):n[s]=[a]}return r(e,n)}))}),4);function Ie(e,t,n){return Ee(e,1/0,t,n)}function Oe(e,t,n){return Ee(e,1,t,n)}var Ae=oe("log"),Te=y((function(e,t,n,r){r=_(r);var i={},o=p(n);return C(t)(e,((e,t,n)=>{o(e,t,((e,r)=>{if(e)return n(e);i[t]=r,n(e)}))}),(e=>r(e,i)))}),4);function Le(e,t,n){return Te(e,1/0,t,n)}function Re(e,t,n){return Te(e,1,t,n)}function ke(e,t=(e=>e)){var n=Object.create(null),r=Object.create(null),o=p(e),s=i(((e,i)=>{var s=t(...e);s in n?c((()=>i(null,...n[s]))):s in r?r[s].push(i):(r[s]=[i],o(...e,((e,...t)=>{e||(n[s]=t);var i=r[s];delete r[s];for(var o=0,a=i.length;o<a;o++)i[o](e,...t)})))}));return s.memo=n,s.unmemoized=e,s}var Ne=u(s?process.nextTick:o?setImmediate:a),Me=y(((e,t,n)=>{var r=v(t)?[]:{};e(t,((e,t,n)=>{p(e)(((e,...i)=>{i.length<2&&([i]=i),r[t]=i,n(e)}))}),(e=>n(e,r)))}),3);function Pe(e,t){return Me(A,e,t)}function De(e,t,n){return Me(C(t),e,n)}function We(e,t){var n=p(e);return U(((e,t)=>{n(e[0],t)}),t,1)}class xe{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(e){let t;for(;e>0&&Fe(this.heap[e],this.heap[t=je(e)]);){let n=this.heap[e];this.heap[e]=this.heap[t],this.heap[t]=n,e=t}}percDown(e){let t;for(;(t=1+(e<<1))<this.heap.length&&(t+1<this.heap.length&&Fe(this.heap[t+1],this.heap[t])&&(t+=1),!Fe(this.heap[e],this.heap[t]));){let n=this.heap[e];this.heap[e]=this.heap[t],this.heap[t]=n,e=t}}push(e){e.pushCount=++this.pushCount,this.heap.push(e),this.percUp(this.heap.length-1)}unshift(e){return this.heap.push(e)}shift(){let[e]=this.heap;return this.heap[0]=this.heap[this.heap.length-1],this.heap.pop(),this.percDown(0),e}toArray(){return[...this]}*[Symbol.iterator](){for(let e=0;e<this.heap.length;e++)yield this.heap[e].data}remove(e){let t=0;for(let n=0;n<this.heap.length;n++)e(this.heap[n])||(this.heap[t]=this.heap[n],t++);this.heap.splice(t);for(let e=je(this.heap.length-1);e>=0;e--)this.percDown(e);return this}}function je(e){return(e+1>>1)-1}function Fe(e,t){return e.priority!==t.priority?e.priority<t.priority:e.pushCount<t.pushCount}function Be(e,t){var n=We(e,t);return n._tasks=new xe,n.push=function(e,t=0,r=(()=>{})){if("function"!=typeof r)throw new Error("task callback must be a function");if(n.started=!0,Array.isArray(e)||(e=[e]),0===e.length&&n.idle())return c((()=>n.drain()));for(var i=0,o=e.length;i<o;i++){var s={data:e[i],priority:t,callback:r};n._tasks.push(s)}c(n.process)},delete n.unshift,n}var ze=y((function(e,t){if(t=_(t),!Array.isArray(e))return t(new TypeError("First argument to race must be an array of functions"));if(!e.length)return t();for(var n=0,r=e.length;n<r;n++)p(e[n])(t)}),2);function $e(e,t,n,r){var i=[...e].reverse();return G(i,t,n,r)}function qe(e){var t=p(e);return i((function(e,n){return e.push(((e,...t)=>{let r={};if(e&&(r.error=e),t.length>0){var i=t;t.length<=1&&([i]=t),r.value=i}n(null,r)})),t.apply(this,e)}))}function Ue(e){var t;return Array.isArray(e)?t=e.map(qe):(t={},Object.keys(e).forEach((n=>{t[n]=qe.call(this,e[n])}))),t}function He(e,t,n,r){const i=p(n);return we(e,t,((e,t)=>{i(e,((e,n)=>{t(e,!n)}))}),r)}var Ve=y((function(e,t,n){return He(A,e,t,n)}),3),Ge=y((function(e,t,n,r){return He(C(t),e,n,r)}),4),Ye=y((function(e,t,n){return He(R,e,t,n)}),3);function Ke(e){return function(){return e}}function Je(e,t,n){var r={times:5,intervalFunc:Ke(0)};if(arguments.length<3&&"function"==typeof e?(n=t||P(),t=e):(Qe(r,e),n=n||P()),"function"!=typeof t)throw new Error("Invalid arguments for async.retry");var i=p(t),o=1;function s(){i(((e,...t)=>{!1!==e&&(e&&o++<r.times&&("function"!=typeof r.errorFilter||r.errorFilter(e))?setTimeout(s,r.intervalFunc(o-1)):n(e,...t))}))}return s(),n[M]}function Qe(e,t){if("object"==typeof t)e.times=+t.times||5,e.intervalFunc="function"==typeof t.interval?t.interval:Ke(+t.interval||0),e.errorFilter=t.errorFilter;else{if("number"!=typeof t&&"string"!=typeof t)throw new Error("Invalid arguments for async.retry");e.times=+t||5}}function Ze(e,t){t||(t=e,e=null);let n=e&&e.arity||t.length;h(t)&&(n+=1);var r=p(t);return i(((t,i)=>{function o(e){r(...t,e)}return(t.length<n-1||null==i)&&(t.push(i),i=P()),e?Je(e,o,i):Je(o,i),i[M]}))}function Xe(e,t){return Me(R,e,t)}var et=y((function(e,t,n){return te(Boolean,(e=>e))(A,e,t,n)}),3),tt=y((function(e,t,n,r){return te(Boolean,(e=>e))(C(t),e,n,r)}),4),nt=y((function(e,t,n){return te(Boolean,(e=>e))(R,e,t,n)}),3),rt=y((function(e,t,n){var r=p(t);return T(e,((e,t)=>{r(e,((n,r)=>{if(n)return t(n);t(n,{value:e,criteria:r})}))}),((e,t)=>{if(e)return n(e);n(null,t.sort(i).map((e=>e.value)))}));function i(e,t){var n=e.criteria,r=t.criteria;return n<r?-1:n>r?1:0}}),3);function it(e,t,n){var r=p(e);return i(((i,o)=>{var s,a=!1;i.push(((...e)=>{a||(o(...e),clearTimeout(s))})),s=setTimeout((function(){var t=e.name||"anonymous",r=new Error('Callback function "'+t+'" timed out.');r.code="ETIMEDOUT",n&&(r.info=n),a=!0,o(r)}),t),r(...i)}))}function ot(e,t,n,r){var i=p(n);return J(function(e){for(var t=Array(e);e--;)t[e]=e;return t}(e),t,i,r)}function st(e,t,n){return ot(e,1/0,t,n)}function at(e,t,n){return ot(e,1,t,n)}function ut(e,t,n,r){arguments.length<=3&&"function"==typeof t&&(r=n,n=t,t=Array.isArray(e)?[]:{}),r=_(r||P());var i=p(n);return A(e,((e,n,r)=>{i(t,e,n,r)}),(e=>r(e,t))),r[M]}var ct=y((function(e,t){var n,r=null;return de(e,((e,t)=>{p(e)(((e,...i)=>{if(!1===e)return t(e);i.length<2?[n]=i:n=i,r=e,t(e?null:{})}))}),(()=>t(r,n)))}));function lt(e){return(...t)=>(e.unmemoized||e)(...t)}var ft=y((function(e,t,n){n=b(n);var r=p(t),i=p(e),o=[];function s(e,...t){if(e)return n(e);o=t,!1!==e&&i(a)}function a(e,t){return e?n(e):!1!==e?t?void r(s):n(null,...o):void 0}return i(a)}),3);function dt(e,t,n){const r=p(e);return ft((e=>r(((t,n)=>e(t,!n)))),t,n)}var ht=y((function(e,t){if(t=_(t),!Array.isArray(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();var n=0;function r(t){p(e[n++])(...t,b(i))}function i(i,...o){if(!1!==i)return i||n===e.length?t(i,...o):void r(o)}r([])}));const pt={apply:r,applyEach:L,applyEachSeries:N,asyncify:l,auto:D,autoInject:z,cargo:H,cargoQueue:V,compose:K,concat:Z,concatLimit:Q,concatSeries:X,constant:ee,detect:ne,detectLimit:re,detectSeries:ie,dir:se,doUntil:ue,doWhilst:ae,each:le,eachLimit:fe,eachOf:A,eachOfLimit:E,eachOfSeries:R,eachSeries:de,ensureAsync:he,every:pe,everyLimit:ye,everySeries:ge,filter:_e,filterLimit:be,filterSeries:Se,forever:Ce,groupBy:Ie,groupByLimit:Ee,groupBySeries:Oe,log:Ae,map:T,mapLimit:J,mapSeries:k,mapValues:Le,mapValuesLimit:Te,mapValuesSeries:Re,memoize:ke,nextTick:Ne,parallel:Pe,parallelLimit:De,priorityQueue:Be,queue:We,race:ze,reduce:G,reduceRight:$e,reflect:qe,reflectAll:Ue,reject:Ve,rejectLimit:Ge,rejectSeries:Ye,retry:Je,retryable:Ze,seq:Y,series:Xe,setImmediate:c,some:et,someLimit:tt,someSeries:nt,sortBy:rt,timeout:it,times:st,timesLimit:ot,timesSeries:at,transform:ut,tryEach:ct,unmemoize:lt,until:dt,waterfall:ht,whilst:ft,all:pe,allLimit:ye,allSeries:ge,any:et,anyLimit:tt,anySeries:nt,find:ne,findLimit:re,findSeries:ie,flatMap:Z,flatMapLimit:Q,flatMapSeries:X,forEach:le,forEachSeries:de,forEachLimit:fe,forEachOf:A,forEachOfSeries:R,forEachOfLimit:E,inject:G,foldl:G,foldr:$e,select:_e,selectLimit:be,selectSeries:Se,wrapSync:l,during:ft,doDuring:ae}},33998:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigUtilInstance=void 0;var r=s(n(72551)),i=n(51742),o=s(n(53059));function s(e){return e&&e.__esModule?e:{default:e}}const a=new function(){const e=this;this.resolveConfigVariables=function(e,t){let n=0,i=0,o=!0;function s(e){const t=e.split(/[/\\:?=&\s]/);for(let n=0;n<t.length;n++)if("$"===t[n][0]){const i=t[n].substring(1);let s=a(i);if(void 0!==s){const a=e.replace(t[n],s);r.default.system.verbose("forceObjectsToLogger","ConfigUtil.resolveConfigVariables:resolveString configString",t[n],i,s,"old value=",e,"value=",a),o=!0,e=a}}return e}function a(t){let n=e[t];return void 0===n&&(e.custom?(n=e.custom[t],void 0===n&&r.default.system.warn("ConfigUtil.resolveString",`Missing [${t}] variable from finsemble.custom configuration object`)):r.default.system.error("ConfigUtil.resolveString",`Missing "custom" node from finsemble configuration - unable to get variable resoution for variable: ${t}`)),n}function u(e,t,n){r.default.system.verbose("forceObjectsToLogger","resolveArray","pass",t,"recursionLevel",n,"configArray:",e);for(let r=0;r<e.length;r++){const i=e[r];"string"==typeof i&&i.indexOf("$")>-1?e[r]=s(i):i instanceof Array?u(i,t,n+1):"object"==typeof i&&c(i,t,n+1)}}function c(e,t,n){e=e||{},r.default.system.verbose("forceObjectsToLogger","ConfigUtil.resolveConfigVariables:resolveObject","pass",t,"recursionLevel",n,"configObject:",e),Object.keys(e).forEach((r=>{const i=e[r];"string"==typeof i&&i.indexOf("$")>-1?e[r]=s(i):i instanceof Array?u(i,t,n+1):"object"==typeof i&&c(i,t,n+1)}))}for(;o&&i++<100;)o=!1,c(t,++n,1);i>=100&&r.default.system.error("forceObjectsToLogger","resolveConfigVariables exceeded maximum passes so continuing -- probably a recursive macro definitions. Look in this config for unresolved macro variables",e)},this.getExpandedRawManifest=function(t,n){function o(t,s,a){r.default.system.debug("forceObjectsToLogger","ConfigUtil.getExpandedRawManifest:getRawManifest",s,a),s.getManifest((n=>{r.default.system.debug("forceObjectsToLogger","ConfigUtil.getExpandedRawManifest:getExpandedRawManifest: manifest retrieved. Pre-variable resolution",n),e.resolveConfigVariables(n.finsemble,n.finsemble),r.default.system.debug("forceObjectsToLogger","ConfigUtil.getExpandedRawManifest:getExpandedRawManifest:Complete. post-variable resolution",n),t(n)}),(e=>{e&&(r.default.system.error("ConfigUtil.getExpandedRawManifest:application.getManifest:err",e),n&&n()),s.getParentUuid((e=>{const n=i.System.Application.wrap(e);r.default.system.debug("forceObjectsToLogger","uuid",e,"parentApplication",n),a<10?o(t,n,++a):t("could not find manifest in parent applications")}))}))}r.default.system.debug("ConfigUtil.getExpandedRawManifest starting"),i.System.ready((()=>{const e=i.System.Application.getCurrent();o(t,e,1)}))},this.readConfigFile=function(e,t){r.default.system.debug(`fetching ${e}`),fetch(e,{credentials:"include",cache:"no-cache"}).then((e=>e.json())).catch((n=>{t(`Failure importing ${e}: ${n}`,null)})).then((e=>{t(null,e)}))},this.getInitialManifest=function(t){i.System.ready((()=>{i.System.Application.getCurrent().getManifest((n=>{n.finsemble=n.finsemble||{},e.resolveConfigVariables(n.finsemble,n.finsemble),n.finsemble.applicationRoot||r.default.system.error("FATAL ERROR: applicationRoot was not defined in manifest file.");const i=`${n.finsemble.moduleRoot}/configs/core/config.json`;e.readConfigFile(i,((o,s)=>{o?r.default.system.error(`ConfigUtil.getInitialManifest:getCoreConfig:failed importing into finsemble config. $moduleRoot=${n.finsemble.moduleRoot}; Full Path=${i}`,o):(Object.keys(s).forEach((e=>{if("importConfig"===e){n.finsemble.importConfig=n.finsemble.importConfig||[];for(let e=0;e<s.importConfig.length;e++)n.finsemble.importConfig.unshift(s.importConfig[e])}else if("importThirdPartyConfig"===e){n.finsemble.importThirdPartyConfig=n.finsemble.importThirdPartyConfig||[];for(let e=0;e<s.importThirdPartyConfig.length;e++)n.finsemble.importThirdPartyConfig.unshift(s.importThirdPartyConfig[e])}else n.finsemble[e]=s[e]})),e.resolveConfigVariables(n.finsemble,n.finsemble),r.default.system.debug("forceObjectsToLogger","ConfigUtil.getInitialManifest:getCoreConfig:Initial Manifest after variables Resolved",n)),t(n)}))}))}))},this.promptAndSaveJSONToLocalFile=function(e,t){r.default.system.debug("saveJSONToLocalFile",e,t);const n=JSON.stringify(t,null,"\t"),i=`data:application/json;charset=utf-8,${encodeURIComponent(n)}`,o=`${e}.json`,s=document.createElement("a");s.setAttribute("href",i),s.setAttribute("download",o),s.click()},this.configFormatForExport=function(e,t){r.default.system.debug("configFormatForExport starting",e,t);let n=o.default.cloneDeep(t);if("raw"===e);else if("all"===e)delete n.importConfig,delete n.comment;else if("application"===e)delete n.importConfig,delete n.comment,delete n.system,delete n.services;else if("workspace"===e)n={workspace:n};else if("workspaceTemplate"===e){const e={};e[n.name]=n,n={workspaceTemplates:e}}else"services"===e?n=n.services:"components"===e&&(n=n.components);return n},this.getDefault=function(e,t,n){let r=n;if(e){try{const n=t.split(".");let i=e;for(let e=1;e<n.length;e++)i=i[n[e]];r=i}catch(e){r=n}void 0===r&&(r=n)}return r},this.getFile=async function(e,t=Function.prototype){r.default.system.debug(`fetching import ${e}`);let n=null;return await fetch(e,{credentials:"include",cache:"no-cache"}).then((e=>e.json())).catch((n=>{t(`failure importing ${e}: ${n}`,null)})).then((e=>{t(null,e),n=e})),n}};t.ConfigUtilInstance=a},93802:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(5939),i=u(n(72551)),o=u(n(88021)),s=u(n(71879)),a=n(24232);function u(e){return e&&e.__esModule?e:{default:e}}let c;class l extends r.EventEmitter{constructor(e,t,n){if(super(),!n||!n.System)throw new Error("Monitors class requires dependency injection. Ensure that System is being passed in.");({System:c}=n),this.cachedMonitorInfo=null,this.limitedMonitorRefreshQueue=new o.default({concurrency:1}),this.bindAllFunctions(),this.limitedMonitorRefreshQueue.add((()=>this.refreshMonitors(e))),c.addEventListener("monitor-info-changed",(()=>{this.limitedMonitorRefreshQueue.add((()=>this.refreshMonitors(t)))})),c.addEventListener("session-changed",(e=>{e&&("object"!=typeof e||!e.hasOwnProperty("reason")||"unlock"!==e.reason&&"remote-connect"!==e.reason&&"unknown"!==e.reason)||this.limitedMonitorRefreshQueue.add((()=>this.refreshMonitors(t)))}))}bindAllFunctions(){let e=this;for(let t of Object.getOwnPropertyNames(Object.getPrototypeOf(e))){let n=e[t];n instanceof Function&&n!==l&&(e[t]=e[t].bind(e))}}asyncIt(e,t){return t(e),e}rationalizeMonitor(e){e.monitorRect.width=e.monitorRect.right-e.monitorRect.left,e.monitorRect.height=e.monitorRect.bottom-e.monitorRect.top,e.availableRect.width=e.availableRect.right-e.availableRect.left,e.availableRect.height=e.availableRect.bottom-e.availableRect.top}calculateMonitorScale(e,t){return(t.right-t.left)/(e.right-e.left)}monitorInfoIsChanged(e,t){if(!e||!t)return!0;if(e.nonPrimaryMonitors.length!==t.nonPrimaryMonitors.length)return!0;if(!(0,a.checkIfBoundsAreEqual)(e.primaryMonitor.availableRect,t.primaryMonitor.availableRect))return!0;if(!(0,a.checkIfBoundsAreEqual)(e.primaryMonitor.monitorRect,t.primaryMonitor.monitorRect))return!0;e.nonPrimaryMonitors.sort(((e,t)=>e.deviceName>t.deviceName?1:e.deviceName<t.deviceName?-1:0)),t.nonPrimaryMonitors.sort(((e,t)=>e.deviceName>t.deviceName?1:e.deviceName<t.deviceName?-1:0));let n=!1;return e.nonPrimaryMonitors.forEach(((e,r)=>{const i=t.nonPrimaryMonitors[r];(0,a.checkIfBoundsAreEqual)(e.availableRect,i.availableRect)&&(0,a.checkIfBoundsAreEqual)(e.monitorRect,i.monitorRect)||(n=!0)})),n}async refreshMonitors(e=Function.prototype){this.limitedMonitorRefreshQueue.clear();const t=await c.getMonitorInfo();if(!this.monitorInfoIsChanged(this.cachedMonitorInfo,t))return i.default.system.info("Skipped refreshMonitors because monitors do not change."),e(this.allMonitors);this.allMonitors=[];let{primaryMonitor:n}=t;if(Object.entries(n).length){n.whichMonitor="primary",n.position=0,this.allMonitors.push(Object.assign({},n));for(let e=0;e<t.nonPrimaryMonitors.length;e++){let n=t.nonPrimaryMonitors[e];n.whichMonitor=e,n.position=e+1,this.allMonitors.push(n)}for(let e=0;e<this.allMonitors.length;e++){let t=this.allMonitors[e];this.rationalizeMonitor(t)}this.cachedMonitorInfo=(0,s.default)(t),e(this.allMonitors),this.ready=!0,1===this.limitedMonitorRefreshQueue.pending&&this.emit("monitors-changed",{monitors:this.allMonitors})}else i.default.system.info("There is no primary monitor in 'monitorInfo' - the system is still in the process of updating the monitor information. Returning from monitorsAndScaling -> refreshMonitors")}getAllMonitors(e=Function.prototype){return this.ready?this.asyncIt(JSON.parse(JSON.stringify(this.allMonitors)),e):e?void this.refreshMonitors(e):"not ready"}getMonitorFromScaledXY(e,t,n=Function.prototype){return new Promise((r=>{if(!this.ready)return this.refreshMonitors((()=>{this.getMonitorFromScaledXY(e,t,n)})),"not ready";let i=null;for(var o=this.allMonitors,s=0;s<o.length;s++){var a=o[s],{monitorRect:u}=a;if(e>=u.left&&e<u.right&&t>=u.top&&t<u.bottom){i=a;break}}r(i),n(i)}))}getMonitorFromUnscaledXY(e,t,n=Function.prototype){if(!this.ready)return this.refreshMonitors((()=>{this.getMonitorFromUnscaledXY(e,t,n)})),"not ready";for(var r=this.allMonitors,i=0;i<r.length;i++){var o=r[i],s=o.monitor.scaledRect;if(e>=s.left&&e<s.right&&t>=s.top&&t<s.bottom)return this.asyncIt(o,n)}return this.asyncIt(null,n)}async translatePointFromScaled(e,t=Function.prototype){if(!this.ready)return this.refreshMonitors((()=>{this.translatePointFromScaled(e,t)})),"not ready";var n;e.point?({point:n}=e):n=e;var{monitor:r}=e;r||(r=(await this.getMonitorFromScaledXY(n.x,n.y)).data);let i=null;if(r){var o=n.x-r.monitorRect.left,s=n.y-r.monitorRect.top,a=o*r.deviceScaleFactor,u=s*r.deviceScaleFactor;i={x:a+r.monitor.scaledRect.left,y:u+r.monitor.scaledRect.top}}return t(i),Promise.resolve(i)}translatePointToScaled(e,t=Function.prototype){if(!this.ready)return this.refreshMonitors((()=>{this.translatePointToScaled(e,t)})),"not ready";var n;e.point?({point:n}=e):n=e;var r=e.monitor||this.getMonitorFromUnscaledXY(n.x,n.y);if(!r)return this.asyncIt(null,t);var i=n.x-r.monitor.scaledRect.left,o=n.y-r.monitor.scaledRect.top,s=i/r.deviceScaleFactor,a=o/r.deviceScaleFactor,u={x:s+r.monitorRect.left,y:a+r.monitorRect.top};return this.asyncIt(u,t)}async translateRectToScaled(e,t=Function.prototype){let n;if(!this.ready)return this.refreshMonitors((()=>{this.translateRectToScaled(e,t)})),"not ready";var r=this.translatePointToScaled({x:e.left,y:e.top}),i=this.translatePointToScaled({x:e.right,y:e.bottom});return!r&&i&&(n=await this.getMonitorFromScaledXY(i),r=this.translatePointToScaled({monitor:n,point:{x:e.left,y:e.top}})),!i&&r&&(n=await this.getMonitorFromScaledXY(i),i=this.translatePointToScaled({monitor:n,point:{x:e.right,y:e.bottom}})),this.asyncIt({top:r?r.y:null,left:r?r.x:null,bottom:i?i.y:null,right:i?i.x:null,height:r&&i?i.y-r.y:null,width:r&&i?i.x-r.x:null},t)}translateRectFromScaled(e,t=Function.prototype){if(!this.ready)return this.refreshMonitors((()=>{this.translateRectFromScaled(e,t)})),"not ready";var n=this.translatePointFromScaled({x:e.left,y:e.top}),r=this.translatePointFromScaled({x:e.right,y:e.bottom});return!n&&r&&(n=this.translatePointFromScaled({monitor:this.getMonitorFromUnscaledXY(r),point:{x:e.left,y:e.top}})),!r&&n&&(r=this.translatePointFromScaled({monitor:this.getMonitorFromUnscaledXY(n),point:{x:e.right,y:e.bottom}})),this.asyncIt({top:n?n.y:null,left:n?n.x:null,bottom:r?r.y:null,right:r?r.x:null,height:n&&r?r.y-n.y:null,width:n&&r?r.x-n.x:null},t)}}var f=l;t.default=f},21014:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=new function(){let e=3;this.diagLevel=function(){return e},this.setDiagLevel=function(t){e=t},this.validationEnabled=function(){return e>=4}};t.default=n},73699:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(72551)),i=n(33998),o=n(51742),s=a(n(5020));function a(e){return e&&e.__esModule?e:{default:e}}let u=null;var c=new function(){const e={},t={};let a=null;this.getDefaultTemplateURL=function(e){a?setTimeout((()=>{e(a)}),0):(u||(u=n(70010).default),u.getValue({field:"finsemble"},((t,n)=>{a=i.ConfigUtilInstance.getDefault(n,"finsemble.notificationURL",`${n.moduleRoot}/components/system/notification/notification.html`),e(a)})))},this.alert=function(e,t,n,r,i){const o=this;i&&i.url?this.alertInternal(e,t,n,r,i,i.url):this.getDefaultTemplateURL((s=>{o.alertInternal(e,t,n,r,i,s)}))},this.alertInternal=function(n,i,a,u,c,l){let f=!1;const d=`UserNotification.alert.${a}`,h=(c=c||{}).duration||864e5;switch(i){case"ONCE-SINCE-STARTUP":d in e?f=!1:(f=!0,e[d]=!0);break;case"MAX-COUNT":{let e=0;const n=c.maxCount||1;d in t&&(e=t[d]),t[d]=++e,e<=n&&(f=!0);break}default:f=!0}if(r.default.log("UserNotification.alert",n,f,i,a,u,c),f){const e={url:l,message:u,timeout:h};s.default.systemLog({notification:!0},`Notification: ${u}`),new o.System.Notification(e)}}};t.default=c},13712:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,i=(r=n(21014))&&r.__esModule?r:{default:r},o=new function(){function e(e,t,n){const r=function(){try{throw Error("")}catch(e){return e}}(),i=r.stack.split("\n")[5],o=i.indexOf("at "),s=i.slice(o+2,i.length),a=r.stack.split("\n")[6],u=a.indexOf("at "),c=a.slice(u+2,a.length);console.warn(`parameter validation failed: parameter ${e} is of type '${typeof t}' but should be of type '${n}' in${s} called by${c}`)}this.args=function(){let t=!0;if(i.default.validationEnabled()){const n=arguments.length;if((n+1)%2!=0)for(let r=0;r<n;r+=2){let n=!1;const i=arguments[r];let o=arguments[r+1];if("="===o.slice(-1)&&(o=o.slice(0,-1),n=!0),typeof i!==o&&!(n&&void 0===i||void 0!==i&&"any"===o)){e(r/2+1,i,o),t=!1;break}}else console.warn(`validate.args requires even number of parameters: ${JSON.stringify(arguments)}`)}return t},this.args2=function(){let t=!0;if(i.default.validationEnabled()){const n=arguments.length;if((n+1)%3!=0)for(let r=0;r<n;r+=3){let n=!1;const i=arguments[r],o=arguments[r+1];let s=arguments[r+2];if("="===s.slice(-1)&&(s=s.slice(0,-1),n=!0),typeof o!==s&&!(n&&void 0===o||void 0!==o&&"any"===s)){e(i,o,s),t=!1;break}}else console.warn(`validate.args requires even number of parameters: ${JSON.stringify(arguments)}`)}return t}};t.default=o},33034:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,s){if("function"!=typeof r)throw new TypeError("The listener must be a function");var a=new i(r,o||e,s),u=n?n+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],a]:e._events[u].push(a):(e._events[u]=a,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function a(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),a.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},a.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,s=new Array(o);i<o;i++)s[i]=r[i].fn;return s},a.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},a.prototype.emit=function(e,t,r,i,o,s){var a=n?n+e:e;if(!this._events[a])return!1;var u,c,l=this._events[a],f=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),f){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,r),!0;case 4:return l.fn.call(l.context,t,r,i),!0;case 5:return l.fn.call(l.context,t,r,i,o),!0;case 6:return l.fn.call(l.context,t,r,i,o,s),!0}for(c=1,u=new Array(f-1);c<f;c++)u[c-1]=arguments[c];l.fn.apply(l.context,u)}else{var d,h=l.length;for(c=0;c<h;c++)switch(l[c].once&&this.removeListener(e,l[c].fn,void 0,!0),f){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,t);break;case 3:l[c].fn.call(l[c].context,t,r);break;case 4:l[c].fn.call(l[c].context,t,r,i);break;default:if(!u)for(d=1,u=new Array(f-1);d<f;d++)u[d-1]=arguments[d];l[c].fn.apply(l[c].context,u)}}return!0},a.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},a.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},a.prototype.removeListener=function(e,t,r,i){var o=n?n+e:e;if(!this._events[o])return this;if(!t)return s(this,o),this;var a=this._events[o];if(a.fn)a.fn!==t||i&&!a.once||r&&a.context!==r||s(this,o);else{for(var u=0,c=[],l=a.length;u<l;u++)(a[u].fn!==t||i&&!a[u].once||r&&a[u].context!==r)&&c.push(a[u]);c.length?this._events[o]=1===c.length?c[0]:c:s(this,o)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&s(this,t)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,e.exports=a},5939:e=>{"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}y(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&y(e,"error",t,{once:!0})}(e,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function c(e,t,n,r){var i,o,s,c;if(a(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=u(e))>0&&s.length>i&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,c=l,console&&console.warn&&console.warn(c)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=l.bind(r);return i.listener=n,r.wrapFn=i,i}function d(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):p(i,i.length)}function h(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function p(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function y(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){r.once&&e.removeEventListener(t,i),n(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)r(u,this,t);else{var c=u.length,l=p(u,c);for(n=0;n<c;++n)r(l[n],this,t)}return!0},o.prototype.addListener=function(e,t){return c(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return c(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,f(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,f(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,r,i,o,s;if(a(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},o.prototype.listeners=function(e){return d(this,e,!0)},o.prototype.rawListeners=function(e){return d(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},o.prototype.listenerCount=h,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},84155:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>Sr,Collection:()=>C,Iterable:()=>br,List:()=>rn,Map:()=>Mt,OrderedMap:()=>vn,OrderedSet:()=>ir,Range:()=>$n,Record:()=>cr,Repeat:()=>gr,Seq:()=>H,Set:()=>Dn,Stack:()=>En,fromJS:()=>mr,get:()=>rt,getIn:()=>qn,has:()=>nt,hasIn:()=>Hn,hash:()=>fe,is:()=>ae,isAssociative:()=>S,isCollection:()=>m,isImmutable:()=>k,isIndexed:()=>b,isKeyed:()=>w,isList:()=>nn,isMap:()=>ie,isOrdered:()=>M,isOrderedMap:()=>oe,isOrderedSet:()=>kn,isPlainObject:()=>Xe,isRecord:()=>R,isSeq:()=>T,isSet:()=>Rn,isStack:()=>Cn,isValueObject:()=>se,merge:()=>wt,mergeDeep:()=>bt,mergeDeepWith:()=>St,mergeWith:()=>_t,remove:()=>ot,removeIn:()=>ft,set:()=>st,setIn:()=>ct,update:()=>ht,updateIn:()=>at,version:()=>_r});var r=32,i=31,o={};function s(e){e&&(e.value=!0)}function a(){}function u(e){return void 0===e.size&&(e.size=e.__iterate(l)),e.size}function c(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?u(e)+t:t}function l(){return!0}function f(e,t,n){return(0===e&&!y(e)||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function d(e,t){return p(e,t,0)}function h(e,t){return p(e,t,t)}function p(e,t,n){return void 0===e?n:y(e)?t===1/0?t:0|Math.max(0,t+e):void 0===t||t===e?e:0|Math.min(t,e)}function y(e){return e<0||0===e&&1/e==-1/0}var g="@@__IMMUTABLE_ITERABLE__@@";function m(e){return Boolean(e&&e[g])}var v="@@__IMMUTABLE_KEYED__@@";function w(e){return Boolean(e&&e[v])}var _="@@__IMMUTABLE_INDEXED__@@";function b(e){return Boolean(e&&e[_])}function S(e){return w(e)||b(e)}var C=function(e){return m(e)?e:H(e)},E=function(e){function t(e){return w(e)?e:V(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(C),I=function(e){function t(e){return b(e)?e:G(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(C),O=function(e){function t(e){return m(e)&&!S(e)?e:Y(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(C);C.Keyed=E,C.Indexed=I,C.Set=O;var A="@@__IMMUTABLE_SEQ__@@";function T(e){return Boolean(e&&e[A])}var L="@@__IMMUTABLE_RECORD__@@";function R(e){return Boolean(e&&e[L])}function k(e){return m(e)||R(e)}var N="@@__IMMUTABLE_ORDERED__@@";function M(e){return Boolean(e&&e[N])}var P="function"==typeof Symbol&&Symbol.iterator,D=P||"@@iterator",W=function(e){this.next=e};function x(e,t,n,r){var i=0===e?t:1===e?n:[t,n];return r?r.value=i:r={value:i,done:!1},r}function j(){return{value:void 0,done:!0}}function F(e){return!!$(e)}function B(e){return e&&"function"==typeof e.next}function z(e){var t=$(e);return t&&t.call(e)}function $(e){var t=e&&(P&&e[P]||e["@@iterator"]);if("function"==typeof t)return t}W.prototype.toString=function(){return"[Iterator]"},W.KEYS=0,W.VALUES=1,W.ENTRIES=2,W.prototype.inspect=W.prototype.toSource=function(){return this.toString()},W.prototype[D]=function(){return this};var q=Object.prototype.hasOwnProperty;function U(e){return!(!Array.isArray(e)&&"string"!=typeof e)||e&&"object"==typeof e&&Number.isInteger(e.length)&&e.length>=0&&(0===e.length?1===Object.keys(e).length:e.hasOwnProperty(e.length-1))}var H=function(e){function t(e){return null==e?X():k(e)?e.toSeq():function(e){var t=ne(e);if(t)return t;if("object"==typeof e)return new J(e);throw new TypeError("Expected Array or collection object of values, or keyed object: "+e)}(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq {","}")},t.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},t.prototype.__iterate=function(e,t){var n=this._cache;if(n){for(var r=n.length,i=0;i!==r;){var o=n[t?r-++i:i++];if(!1===e(o[1],o[0],this))break}return i}return this.__iterateUncached(e,t)},t.prototype.__iterator=function(e,t){var n=this._cache;if(n){var r=n.length,i=0;return new W((function(){if(i===r)return{value:void 0,done:!0};var o=n[t?r-++i:i++];return x(e,o[0],o[1])}))}return this.__iteratorUncached(e,t)},t}(C),V=function(e){function t(e){return null==e?X().toKeyedSeq():m(e)?w(e)?e.toSeq():e.fromEntrySeq():R(e)?e.toSeq():ee(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toKeyedSeq=function(){return this},t}(H),G=function(e){function t(e){return null==e?X():m(e)?w(e)?e.entrySeq():e.toIndexedSeq():R(e)?e.toSeq().entrySeq():te(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toIndexedSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq [","]")},t}(H),Y=function(e){function t(e){return(m(e)&&!S(e)?e:G(e)).toSetSeq()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toSetSeq=function(){return this},t}(H);H.isSeq=T,H.Keyed=V,H.Set=Y,H.Indexed=G,H.prototype[A]=!0;var K=function(e){function t(e){this._array=e,this.size=e.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this.has(e)?this._array[c(this,e)]:t},t.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length,i=0;i!==r;){var o=t?r-++i:i++;if(!1===e(n[o],o,this))break}return i},t.prototype.__iterator=function(e,t){var n=this._array,r=n.length,i=0;return new W((function(){if(i===r)return{value:void 0,done:!0};var o=t?r-++i:i++;return x(e,o,n[o])}))},t}(G),J=function(e){function t(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},t.prototype.has=function(e){return q.call(this._object,e)},t.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,i=r.length,o=0;o!==i;){var s=r[t?i-++o:o++];if(!1===e(n[s],s,this))break}return o},t.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,i=r.length,o=0;return new W((function(){if(o===i)return{value:void 0,done:!0};var s=r[t?i-++o:o++];return x(e,s,n[s])}))},t}(V);J.prototype[N]=!0;var Q,Z=function(e){function t(e){this._collection=e,this.size=e.length||e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=z(this._collection),r=0;if(B(n))for(var i;!(i=n.next()).done&&!1!==e(i.value,r++,this););return r},t.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=z(this._collection);if(!B(n))return new W(j);var r=0;return new W((function(){var t=n.next();return t.done?t:x(e,r++,t.value)}))},t}(G);function X(){return Q||(Q=new K([]))}function ee(e){var t=Array.isArray(e)?new K(e):F(e)?new Z(e):void 0;if(t)return t.fromEntrySeq();if("object"==typeof e)return new J(e);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+e)}function te(e){var t=ne(e);if(t)return t;throw new TypeError("Expected Array or collection object of values: "+e)}function ne(e){return U(e)?new K(e):F(e)?new Z(e):void 0}var re="@@__IMMUTABLE_MAP__@@";function ie(e){return Boolean(e&&e[re])}function oe(e){return ie(e)&&M(e)}function se(e){return Boolean(e&&"function"==typeof e.equals&&"function"==typeof e.hashCode)}function ae(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!!(se(e)&&se(t)&&e.equals(t))}var ue="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function ce(e){return e>>>1&1073741824|3221225471&e}var le=Object.prototype.valueOf;function fe(e){if(null==e)return de(e);if("function"==typeof e.hashCode)return ce(e.hashCode(e));var t,n,r,i=(t=e).valueOf!==le&&"function"==typeof t.valueOf?t.valueOf(t):t;if(null==i)return de(i);switch(typeof i){case"boolean":return i?1108378657:1108378656;case"number":return function(e){if(e!=e||e===1/0)return 0;var t=0|e;for(t!==e&&(t^=4294967295*e);e>4294967295;)t^=e/=4294967295;return ce(t)}(i);case"string":return i.length>Se?(void 0===(r=Ie[n=i])&&(r=he(n),Ee===Ce&&(Ee=0,Ie={}),Ee++,Ie[n]=r),r):he(i);case"object":case"function":return function(e){var t;if(ve&&void 0!==(t=me.get(e)))return t;if(void 0!==(t=e[be]))return t;if(!ye){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[be]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}if(t=ge(),ve)me.set(e,t);else{if(void 0!==pe&&!1===pe(e))throw new Error("Non-extensible objects are not allowed as keys.");if(ye)Object.defineProperty(e,be,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[be]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[be]=t}}return t}(i);case"symbol":return function(e){var t=we[e];return void 0!==t||(t=ge(),we[e]=t),t}(i);default:if("function"==typeof i.toString)return he(i.toString());throw new Error("Value type "+typeof i+" cannot be hashed.")}}function de(e){return null===e?1108378658:1108378659}function he(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return ce(t)}var pe=Object.isExtensible,ye=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}();function ge(){var e=++_e;return 1073741824&_e&&(_e=0),e}var me,ve="function"==typeof WeakMap;ve&&(me=new WeakMap);var we=Object.create(null),_e=0,be="__immutablehash__";"function"==typeof Symbol&&(be=Symbol(be));var Se=16,Ce=255,Ee=0,Ie={},Oe=function(e){function t(e,t){this._iter=e,this._useKeys=t,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this._iter.get(e,t)},t.prototype.has=function(e){return this._iter.has(e)},t.prototype.valueSeq=function(){return this._iter.valueSeq()},t.prototype.reverse=function(){var e=this,t=Ne(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},t.prototype.map=function(e,t){var n=this,r=ke(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate((function(t,r){return e(t,r,n)}),t)},t.prototype.__iterator=function(e,t){return this._iter.__iterator(e,t)},t}(V);Oe.prototype[N]=!0;var Ae=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.includes=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(e,t){var n=this,r=0;return t&&u(this),this._iter.__iterate((function(i){return e(i,t?n.size-++r:r++,n)}),t)},t.prototype.__iterator=function(e,t){var n=this,r=this._iter.__iterator(1,t),i=0;return t&&u(this),new W((function(){var o=r.next();return o.done?o:x(e,t?n.size-++i:i++,o.value,o)}))},t}(G),Te=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.has=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate((function(t){return e(t,t,n)}),t)},t.prototype.__iterator=function(e,t){var n=this._iter.__iterator(1,t);return new W((function(){var t=n.next();return t.done?t:x(e,t.value,t.value,t)}))},t}(Y),Le=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.entrySeq=function(){return this._iter.toSeq()},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate((function(t){if(t){qe(t);var r=m(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}}),t)},t.prototype.__iterator=function(e,t){var n=this._iter.__iterator(1,t);return new W((function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){qe(r);var i=m(r);return x(e,i?r.get(0):r[0],i?r.get(1):r[1],t)}}}))},t}(V);function Re(e){var t=He(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=Ve,t.__iterateUncached=function(t,n){var r=this;return e.__iterate((function(e,n){return!1!==t(n,e,r)}),n)},t.__iteratorUncached=function(t,n){if(2===t){var r=e.__iterator(t,n);return new W((function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e}))}return e.__iterator(1===t?0:1,n)},t}function ke(e,t,n){var r=He(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,i){var s=e.get(r,o);return s===o?i:t.call(n,s,r,e)},r.__iterateUncached=function(r,i){var o=this;return e.__iterate((function(e,i,s){return!1!==r(t.call(n,e,i,s),i,o)}),i)},r.__iteratorUncached=function(r,i){var o=e.__iterator(2,i);return new W((function(){var i=o.next();if(i.done)return i;var s=i.value,a=s[0];return x(r,a,t.call(n,s[1],a,e),i)}))},r}function Ne(e,t){var n=this,r=He(e);return r._iter=e,r.size=e.size,r.reverse=function(){return e},e.flip&&(r.flip=function(){var t=Re(e);return t.reverse=function(){return e.flip()},t}),r.get=function(n,r){return e.get(t?n:-1-n,r)},r.has=function(n){return e.has(t?n:-1-n)},r.includes=function(t){return e.includes(t)},r.cacheResult=Ve,r.__iterate=function(n,r){var i=this,o=0;return r&&u(e),e.__iterate((function(e,s){return n(e,t?s:r?i.size-++o:o++,i)}),!r)},r.__iterator=function(r,i){var o=0;i&&u(e);var s=e.__iterator(2,!i);return new W((function(){var e=s.next();if(e.done)return e;var a=e.value;return x(r,t?a[0]:i?n.size-++o:o++,a[1],e)}))},r}function Me(e,t,n,r){var i=He(e);return r&&(i.has=function(r){var i=e.get(r,o);return i!==o&&!!t.call(n,i,r,e)},i.get=function(r,i){var s=e.get(r,o);return s!==o&&t.call(n,s,r,e)?s:i}),i.__iterateUncached=function(i,o){var s=this,a=0;return e.__iterate((function(e,o,u){if(t.call(n,e,o,u))return a++,i(e,r?o:a-1,s)}),o),a},i.__iteratorUncached=function(i,o){var s=e.__iterator(2,o),a=0;return new W((function(){for(;;){var o=s.next();if(o.done)return o;var u=o.value,c=u[0],l=u[1];if(t.call(n,l,c,e))return x(i,r?c:a++,l,o)}}))},i}function Pe(e,t,n,r){var i=e.size;if(f(t,n,i))return e;var o=d(t,i),s=h(n,i);if(o!=o||s!=s)return Pe(e.toSeq().cacheResult(),t,n,r);var a,u=s-o;u==u&&(a=u<0?0:u);var l=He(e);return l.size=0===a?a:e.size&&a||void 0,!r&&T(e)&&a>=0&&(l.get=function(t,n){return(t=c(this,t))>=0&&t<a?e.get(t+o,n):n}),l.__iterateUncached=function(t,n){var i=this;if(0===a)return 0;if(n)return this.cacheResult().__iterate(t,n);var s=0,u=!0,c=0;return e.__iterate((function(e,n){if(!u||!(u=s++<o))return c++,!1!==t(e,r?n:c-1,i)&&c!==a})),c},l.__iteratorUncached=function(t,n){if(0!==a&&n)return this.cacheResult().__iterator(t,n);if(0===a)return new W(j);var i=e.__iterator(t,n),s=0,u=0;return new W((function(){for(;s++<o;)i.next();if(++u>a)return{value:void 0,done:!0};var e=i.next();return r||1===t||e.done?e:x(t,u-1,0===t?void 0:e.value[1],e)}))},l}function De(e,t,n,r){var i=He(e);return i.__iterateUncached=function(i,o){var s=this;if(o)return this.cacheResult().__iterate(i,o);var a=!0,u=0;return e.__iterate((function(e,o,c){if(!a||!(a=t.call(n,e,o,c)))return u++,i(e,r?o:u-1,s)})),u},i.__iteratorUncached=function(i,o){var s=this;if(o)return this.cacheResult().__iterator(i,o);var a=e.__iterator(2,o),u=!0,c=0;return new W((function(){var e,o,l;do{if((e=a.next()).done)return r||1===i?e:x(i,c++,0===i?void 0:e.value[1],e);var f=e.value;o=f[0],l=f[1],u&&(u=t.call(n,l,o,s))}while(u);return 2===i?e:x(i,o,l,e)}))},i}function We(e,t){var n=w(e),r=[e].concat(t).map((function(e){return m(e)?n&&(e=E(e)):e=n?ee(e):te(Array.isArray(e)?e:[e]),e})).filter((function(e){return 0!==e.size}));if(0===r.length)return e;if(1===r.length){var i=r[0];if(i===e||n&&w(i)||b(e)&&b(i))return i}var o=new K(r);return n?o=o.toKeyedSeq():b(e)||(o=o.toSetSeq()),(o=o.flatten(!0)).size=r.reduce((function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}}),0),o}function xe(e,t,n){var r=He(e);return r.__iterateUncached=function(i,o){if(o)return this.cacheResult().__iterate(i,o);var s=0,a=!1;return function e(u,c){u.__iterate((function(o,u){return(!t||c<t)&&m(o)?e(o,c+1):(s++,!1===i(o,n?u:s-1,r)&&(a=!0)),!a}),o)}(e,0),s},r.__iteratorUncached=function(r,i){if(i)return this.cacheResult().__iterator(r,i);var o=e.__iterator(r,i),s=[],a=0;return new W((function(){for(;o;){var e=o.next();if(!1===e.done){var u=e.value;if(2===r&&(u=u[1]),t&&!(s.length<t)||!m(u))return n?e:x(r,a++,u,e);s.push(o),o=u.__iterator(r,i)}else o=s.pop()}return{value:void 0,done:!0}}))},r}function je(e,t,n){t||(t=Ge);var r=w(e),i=0,o=e.toSeq().map((function(t,r){return[r,t,i++,n?n(t,r,e):t]})).valueSeq().toArray();return o.sort((function(e,n){return t(e[3],n[3])||e[2]-n[2]})).forEach(r?function(e,t){o[t].length=2}:function(e,t){o[t]=e[1]}),r?V(o):b(e)?G(o):Y(o)}function Fe(e,t,n){if(t||(t=Ge),n){var r=e.toSeq().map((function(t,r){return[t,n(t,r,e)]})).reduce((function(e,n){return Be(t,e[1],n[1])?n:e}));return r&&r[0]}return e.reduce((function(e,n){return Be(t,e,n)?n:e}))}function Be(e,t,n){var r=e(n,t);return 0===r&&n!==t&&(null==n||n!=n)||r>0}function ze(e,t,n,r){var i=He(e),o=new K(n).map((function(e){return e.size}));return i.size=r?o.max():o.min(),i.__iterate=function(e,t){for(var n,r=this.__iterator(1,t),i=0;!(n=r.next()).done&&!1!==e(n.value,i++,this););return i},i.__iteratorUncached=function(e,i){var o=n.map((function(e){return e=C(e),z(i?e.reverse():e)})),s=0,a=!1;return new W((function(){var n;return a||(n=o.map((function(e){return e.next()})),a=r?n.every((function(e){return e.done})):n.some((function(e){return e.done}))),a?{value:void 0,done:!0}:x(e,s++,t.apply(null,n.map((function(e){return e.value}))))}))},i}function $e(e,t){return e===t?e:T(e)?t:e.constructor(t)}function qe(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Ue(e){return w(e)?E:b(e)?I:O}function He(e){return Object.create((w(e)?V:b(e)?G:Y).prototype)}function Ve(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):H.prototype.cacheResult.call(this)}function Ge(e,t){return void 0===e&&void 0===t?0:void 0===e?1:void 0===t?-1:e>t?1:e<t?-1:0}function Ye(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),i=0;i<n;i++)r[i]=e[i+t];return r}function Ke(e,t){if(!e)throw new Error(t)}function Je(e){Ke(e!==1/0,"Cannot perform this action with an infinite size.")}function Qe(e){if(U(e)&&"string"!=typeof e)return e;if(M(e))return e.toArray();throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+e)}Ae.prototype.cacheResult=Oe.prototype.cacheResult=Te.prototype.cacheResult=Le.prototype.cacheResult=Ve;var Ze=Object.prototype.toString;function Xe(e){if(!e||"object"!=typeof e||"[object Object]"!==Ze.call(e))return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;for(var n=t,r=Object.getPrototypeOf(t);null!==r;)n=r,r=Object.getPrototypeOf(n);return n===t}function et(e){return"object"==typeof e&&(k(e)||Array.isArray(e)||Xe(e))}function tt(e){try{return"string"==typeof e?JSON.stringify(e):String(e)}catch(t){return JSON.stringify(e)}}function nt(e,t){return k(e)?e.has(t):et(e)&&q.call(e,t)}function rt(e,t,n){return k(e)?e.get(t,n):nt(e,t)?"function"==typeof e.get?e.get(t):e[t]:n}function it(e){if(Array.isArray(e))return Ye(e);var t={};for(var n in e)q.call(e,n)&&(t[n]=e[n]);return t}function ot(e,t){if(!et(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(k(e)){if(!e.remove)throw new TypeError("Cannot update immutable value without .remove() method: "+e);return e.remove(t)}if(!q.call(e,t))return e;var n=it(e);return Array.isArray(n)?n.splice(t,1):delete n[t],n}function st(e,t,n){if(!et(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(k(e)){if(!e.set)throw new TypeError("Cannot update immutable value without .set() method: "+e);return e.set(t,n)}if(q.call(e,t)&&n===e[t])return e;var r=it(e);return r[t]=n,r}function at(e,t,n,r){r||(r=n,n=void 0);var i=ut(k(e),e,Qe(t),0,n,r);return i===o?n:i}function ut(e,t,n,r,i,s){var a=t===o;if(r===n.length){var u=a?i:t,c=s(u);return c===u?t:c}if(!a&&!et(t))throw new TypeError("Cannot update within non-data-structure value in path ["+n.slice(0,r).map(tt)+"]: "+t);var l=n[r],f=a?o:rt(t,l,o),d=ut(f===o?e:k(f),f,n,r+1,i,s);return d===f?t:d===o?ot(t,l):st(a?e?Ht():{}:t,l,d)}function ct(e,t,n){return at(e,t,o,(function(){return n}))}function lt(e,t){return ct(this,e,t)}function ft(e,t){return at(e,t,(function(){return o}))}function dt(e){return ft(this,e)}function ht(e,t,n,r){return at(e,[t],n,r)}function pt(e,t,n){return 1===arguments.length?e(this):ht(this,e,t,n)}function yt(e,t,n){return at(this,e,t,n)}function gt(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return vt(this,e)}function mt(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if("function"!=typeof e)throw new TypeError("Invalid merger function: "+e);return vt(this,t,e)}function vt(e,t,n){for(var r=[],i=0;i<t.length;i++){var s=E(t[i]);0!==s.size&&r.push(s)}return 0===r.length?e:0!==e.toSeq().size||e.__ownerID||1!==r.length?e.withMutations((function(e){for(var t=n?function(t,r){ht(e,r,o,(function(e){return e===o?t:n(e,t,r)}))}:function(t,n){e.set(n,t)},i=0;i<r.length;i++)r[i].forEach(t)})):e.constructor(r[0])}function wt(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return Et(e,t)}function _t(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return Et(t,n,e)}function bt(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return Ct(e,t)}function St(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return Ct(t,n,e)}function Ct(e,t,n){return Et(e,t,function(e){return function t(n,r,i){return et(n)&&et(r)?Et(n,[r],t):e?e(n,r,i):r}}(n))}function Et(e,t,n){if(!et(e))throw new TypeError("Cannot merge into non-data-structure value: "+e);if(k(e))return"function"==typeof n&&e.mergeWith?e.mergeWith.apply(e,[n].concat(t)):e.merge?e.merge.apply(e,t):e.concat.apply(e,t);for(var r=Array.isArray(e),i=e,o=r?I:E,s=r?function(t){i===e&&(i=it(i)),i.push(t)}:function(t,r){var o=q.call(i,r),s=o&&n?n(i[r],t,r):t;o&&s===i[r]||(i===e&&(i=it(i)),i[r]=s)},a=0;a<t.length;a++)o(t[a]).forEach(s);return i}function It(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return Ct(this,e)}function Ot(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return Ct(this,t,e)}function At(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return at(this,e,Ht(),(function(e){return Et(e,t)}))}function Tt(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return at(this,e,Ht(),(function(e){return Ct(e,t)}))}function Lt(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this}function Rt(){return this.__ownerID?this:this.__ensureOwner(new a)}function kt(){return this.__ensureOwner()}function Nt(){return this.__altered}var Mt=function(e){function t(t){return null==t?Ht():ie(t)&&!M(t)?t:Ht().withMutations((function(n){var r=e(t);Je(r.size),r.forEach((function(e,t){return n.set(t,e)}))}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return Ht().withMutations((function(t){for(var n=0;n<e.length;n+=2){if(n+1>=e.length)throw new Error("Missing value for key: "+e[n]);t.set(e[n],e[n+1])}}))},t.prototype.toString=function(){return this.__toString("Map {","}")},t.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},t.prototype.set=function(e,t){return Vt(this,e,t)},t.prototype.remove=function(e){return Vt(this,e,o)},t.prototype.deleteAll=function(e){var t=C(e);return 0===t.size?this:this.withMutations((function(e){t.forEach((function(t){return e.remove(t)}))}))},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Ht()},t.prototype.sort=function(e){return vn(je(this,e))},t.prototype.sortBy=function(e,t){return vn(je(this,t,e))},t.prototype.map=function(e,t){var n=this;return this.withMutations((function(r){r.forEach((function(i,o){r.set(o,e.call(t,i,o,n))}))}))},t.prototype.__iterator=function(e,t){return new zt(this,e,t)},t.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate((function(t){return r++,e(t[1],t[0],n)}),t),r},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Ut(this.size,this._root,e,this.__hash):0===this.size?Ht():(this.__ownerID=e,this.__altered=!1,this)},t}(E);Mt.isMap=ie;var Pt=Mt.prototype;Pt[re]=!0,Pt.delete=Pt.remove,Pt.removeAll=Pt.deleteAll,Pt.setIn=lt,Pt.removeIn=Pt.deleteIn=dt,Pt.update=pt,Pt.updateIn=yt,Pt.merge=Pt.concat=gt,Pt.mergeWith=mt,Pt.mergeDeep=It,Pt.mergeDeepWith=Ot,Pt.mergeIn=At,Pt.mergeDeepIn=Tt,Pt.withMutations=Lt,Pt.wasAltered=Nt,Pt.asImmutable=kt,Pt["@@transducer/init"]=Pt.asMutable=Rt,Pt["@@transducer/step"]=function(e,t){return e.set(t[0],t[1])},Pt["@@transducer/result"]=function(e){return e.asImmutable()};var Dt=function(e,t){this.ownerID=e,this.entries=t};Dt.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,s=i.length;o<s;o++)if(ae(n,i[o][0]))return i[o][1];return r},Dt.prototype.update=function(e,t,n,r,i,u,c){for(var l=i===o,f=this.entries,d=0,h=f.length;d<h&&!ae(r,f[d][0]);d++);var p=d<h;if(p?f[d][1]===i:l)return this;if(s(c),(l||!p)&&s(u),!l||1!==f.length){if(!p&&!l&&f.length>=Zt)return function(e,t,n,r){e||(e=new a);for(var i=new Ft(e,fe(n),[n,r]),o=0;o<t.length;o++){var s=t[o];i=i.update(e,0,void 0,s[0],s[1])}return i}(e,f,r,i);var y=e&&e===this.ownerID,g=y?f:Ye(f);return p?l?d===h-1?g.pop():g[d]=g.pop():g[d]=[r,i]:g.push([r,i]),y?(this.entries=g,this):new Dt(e,g)}};var Wt=function(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n};Wt.prototype.get=function(e,t,n,r){void 0===t&&(t=fe(n));var o=1<<((0===e?t:t>>>e)&i),s=this.bitmap;return 0==(s&o)?r:this.nodes[Jt(s&o-1)].get(e+5,t,n,r)},Wt.prototype.update=function(e,t,n,s,a,u,c){void 0===n&&(n=fe(s));var l=(0===t?n:n>>>t)&i,f=1<<l,d=this.bitmap,h=0!=(d&f);if(!h&&a===o)return this;var p=Jt(d&f-1),y=this.nodes,g=h?y[p]:void 0,m=Gt(g,e,t+5,n,s,a,u,c);if(m===g)return this;if(!h&&m&&y.length>=Xt)return function(e,t,n,i,o){for(var s=0,a=new Array(r),u=0;0!==n;u++,n>>>=1)a[u]=1&n?t[s++]:void 0;return a[i]=o,new xt(e,s+1,a)}(e,y,d,l,m);if(h&&!m&&2===y.length&&Yt(y[1^p]))return y[1^p];if(h&&m&&1===y.length&&Yt(m))return m;var v=e&&e===this.ownerID,w=h?m?d:d^f:d|f,_=h?m?Qt(y,p,m,v):function(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var i=new Array(r),o=0,s=0;s<r;s++)s===t&&(o=1),i[s]=e[s+o];return i}(y,p,v):function(e,t,n,r){var i=e.length+1;if(r&&t+1===i)return e[t]=n,e;for(var o=new Array(i),s=0,a=0;a<i;a++)a===t?(o[a]=n,s=-1):o[a]=e[a+s];return o}(y,p,m,v);return v?(this.bitmap=w,this.nodes=_,this):new Wt(e,w,_)};var xt=function(e,t,n){this.ownerID=e,this.count=t,this.nodes=n};xt.prototype.get=function(e,t,n,r){void 0===t&&(t=fe(n));var o=(0===e?t:t>>>e)&i,s=this.nodes[o];return s?s.get(e+5,t,n,r):r},xt.prototype.update=function(e,t,n,r,s,a,u){void 0===n&&(n=fe(r));var c=(0===t?n:n>>>t)&i,l=s===o,f=this.nodes,d=f[c];if(l&&!d)return this;var h=Gt(d,e,t+5,n,r,s,a,u);if(h===d)return this;var p=this.count;if(d){if(!h&&--p<en)return function(e,t,n,r){for(var i=0,o=0,s=new Array(n),a=0,u=1,c=t.length;a<c;a++,u<<=1){var l=t[a];void 0!==l&&a!==r&&(i|=u,s[o++]=l)}return new Wt(e,i,s)}(e,f,p,c)}else p++;var y=e&&e===this.ownerID,g=Qt(f,c,h,y);return y?(this.count=p,this.nodes=g,this):new xt(e,p,g)};var jt=function(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n};jt.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,s=i.length;o<s;o++)if(ae(n,i[o][0]))return i[o][1];return r},jt.prototype.update=function(e,t,n,r,i,a,u){void 0===n&&(n=fe(r));var c=i===o;if(n!==this.keyHash)return c?this:(s(u),s(a),Kt(this,e,t,n,[r,i]));for(var l=this.entries,f=0,d=l.length;f<d&&!ae(r,l[f][0]);f++);var h=f<d;if(h?l[f][1]===i:c)return this;if(s(u),(c||!h)&&s(a),c&&2===d)return new Ft(e,this.keyHash,l[1^f]);var p=e&&e===this.ownerID,y=p?l:Ye(l);return h?c?f===d-1?y.pop():y[f]=y.pop():y[f]=[r,i]:y.push([r,i]),p?(this.entries=y,this):new jt(e,this.keyHash,y)};var Ft=function(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n};Ft.prototype.get=function(e,t,n,r){return ae(n,this.entry[0])?this.entry[1]:r},Ft.prototype.update=function(e,t,n,r,i,a,u){var c=i===o,l=ae(r,this.entry[0]);return(l?i===this.entry[1]:c)?this:(s(u),c?void s(a):l?e&&e===this.ownerID?(this.entry[1]=i,this):new Ft(e,this.keyHash,[r,i]):(s(a),Kt(this,e,t,fe(r),[r,i])))},Dt.prototype.iterate=jt.prototype.iterate=function(e,t){for(var n=this.entries,r=0,i=n.length-1;r<=i;r++)if(!1===e(n[t?i-r:r]))return!1},Wt.prototype.iterate=xt.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,i=n.length-1;r<=i;r++){var o=n[t?i-r:r];if(o&&!1===o.iterate(e,t))return!1}},Ft.prototype.iterate=function(e,t){return e(this.entry)};var Bt,zt=function(e){function t(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&qt(e._root)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n=t.node,r=t.index++,i=void 0;if(n.entry){if(0===r)return $t(e,n.entry)}else if(n.entries){if(r<=(i=n.entries.length-1))return $t(e,n.entries[this._reverse?i-r:r])}else if(r<=(i=n.nodes.length-1)){var o=n.nodes[this._reverse?i-r:r];if(o){if(o.entry)return $t(e,o.entry);t=this._stack=qt(o,t)}continue}t=this._stack=this._stack.__prev}return{value:void 0,done:!0}},t}(W);function $t(e,t){return x(e,t[0],t[1])}function qt(e,t){return{node:e,index:0,__prev:t}}function Ut(e,t,n,r){var i=Object.create(Pt);return i.size=e,i._root=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Ht(){return Bt||(Bt=Ut(0))}function Vt(e,t,n){var r,i;if(e._root){var s={value:!1},a={value:!1};if(r=Gt(e._root,e.__ownerID,0,void 0,t,n,s,a),!a.value)return e;i=e.size+(s.value?n===o?-1:1:0)}else{if(n===o)return e;i=1,r=new Dt(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=i,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?Ut(i,r):Ht()}function Gt(e,t,n,r,i,a,u,c){return e?e.update(t,n,r,i,a,u,c):a===o?e:(s(c),s(u),new Ft(t,r,[i,a]))}function Yt(e){return e.constructor===Ft||e.constructor===jt}function Kt(e,t,n,r,o){if(e.keyHash===r)return new jt(t,r,[e.entry,o]);var s,a=(0===n?e.keyHash:e.keyHash>>>n)&i,u=(0===n?r:r>>>n)&i,c=a===u?[Kt(e,t,n+5,r,o)]:(s=new Ft(t,r,o),a<u?[e,s]:[s,e]);return new Wt(t,1<<a|1<<u,c)}function Jt(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,127&(e+=e>>8)+(e>>16)}function Qt(e,t,n,r){var i=r?e:Ye(e);return i[t]=n,i}var Zt=8,Xt=16,en=8,tn="@@__IMMUTABLE_LIST__@@";function nn(e){return Boolean(e&&e[tn])}var rn=function(e){function t(t){var n=fn();if(null==t)return n;if(nn(t))return t;var i=e(t),o=i.size;return 0===o?n:(Je(o),o>0&&o<r?ln(0,o,5,null,new sn(i.toArray())):n.withMutations((function(e){e.setSize(o),i.forEach((function(t,n){return e.set(n,t)}))})))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("List [","]")},t.prototype.get=function(e,t){if((e=c(this,e))>=0&&e<this.size){var n=pn(this,e+=this._origin);return n&&n.array[e&i]}return t},t.prototype.set=function(e,t){return function(e,t,n){if((t=c(e,t))!=t)return e;if(t>=e.size||t<0)return e.withMutations((function(e){t<0?yn(e,t).set(0,n):yn(e,0,t+1).set(t,n)}));t+=e._origin;var r=e._tail,i=e._root,o={value:!1};return t>=gn(e._capacity)?r=dn(r,e.__ownerID,0,t,n,o):i=dn(i,e.__ownerID,e._level,t,n,o),o.value?e.__ownerID?(e._root=i,e._tail=r,e.__hash=void 0,e.__altered=!0,e):ln(e._origin,e._capacity,e._level,i,r):e}(this,e,t)},t.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},t.prototype.insert=function(e,t){return this.splice(e,0,t)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=this.__hash=void 0,this.__altered=!0,this):fn()},t.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations((function(n){yn(n,0,t+e.length);for(var r=0;r<e.length;r++)n.set(t+r,e[r])}))},t.prototype.pop=function(){return yn(this,0,-1)},t.prototype.unshift=function(){var e=arguments;return this.withMutations((function(t){yn(t,-e.length);for(var n=0;n<e.length;n++)t.set(n,e[n])}))},t.prototype.shift=function(){return yn(this,1)},t.prototype.concat=function(){for(var t=arguments,n=[],r=0;r<arguments.length;r++){var i=t[r],o=e("string"!=typeof i&&F(i)?i:[i]);0!==o.size&&n.push(o)}return 0===n.length?this:0!==this.size||this.__ownerID||1!==n.length?this.withMutations((function(e){n.forEach((function(t){return t.forEach((function(t){return e.push(t)}))}))})):this.constructor(n[0])},t.prototype.setSize=function(e){return yn(this,0,e)},t.prototype.map=function(e,t){var n=this;return this.withMutations((function(r){for(var i=0;i<n.size;i++)r.set(i,e.call(t,r.get(i),i,n))}))},t.prototype.slice=function(e,t){var n=this.size;return f(e,t,n)?this:yn(this,d(e,n),h(t,n))},t.prototype.__iterator=function(e,t){var n=t?this.size:0,r=cn(this,t);return new W((function(){var i=r();return i===un?{value:void 0,done:!0}:x(e,t?--n:n++,i)}))},t.prototype.__iterate=function(e,t){for(var n,r=t?this.size:0,i=cn(this,t);(n=i())!==un&&!1!==e(n,t?--r:r++,this););return r},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?ln(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):0===this.size?fn():(this.__ownerID=e,this.__altered=!1,this)},t}(I);rn.isList=nn;var on=rn.prototype;on[tn]=!0,on.delete=on.remove,on.merge=on.concat,on.setIn=lt,on.deleteIn=on.removeIn=dt,on.update=pt,on.updateIn=yt,on.mergeIn=At,on.mergeDeepIn=Tt,on.withMutations=Lt,on.wasAltered=Nt,on.asImmutable=kt,on["@@transducer/init"]=on.asMutable=Rt,on["@@transducer/step"]=function(e,t){return e.push(t)},on["@@transducer/result"]=function(e){return e.asImmutable()};var sn=function(e,t){this.array=e,this.ownerID=t};sn.prototype.removeBefore=function(e,t,n){if(n===t?1<<t:0===this.array.length)return this;var r=n>>>t&i;if(r>=this.array.length)return new sn([],e);var o,s=0===r;if(t>0){var a=this.array[r];if((o=a&&a.removeBefore(e,t-5,n))===a&&s)return this}if(s&&!o)return this;var u=hn(this,e);if(!s)for(var c=0;c<r;c++)u.array[c]=void 0;return o&&(u.array[r]=o),u},sn.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t:0)||0===this.array.length)return this;var r,o=n-1>>>t&i;if(o>=this.array.length)return this;if(t>0){var s=this.array[o];if((r=s&&s.removeAfter(e,t-5,n))===s&&o===this.array.length-1)return this}var a=hn(this,e);return a.array.splice(o+1),r&&(a.array[o]=r),a};var an,un={};function cn(e,t){var n=e._origin,i=e._capacity,o=gn(i),s=e._tail;return function e(a,u,c){return 0===u?function(e,a){var u=a===o?s&&s.array:e&&e.array,c=a>n?0:n-a,l=i-a;return l>r&&(l=r),function(){if(c===l)return un;var e=t?--l:c++;return u&&u[e]}}(a,c):function(o,s,a){var u,c=o&&o.array,l=a>n?0:n-a>>s,f=1+(i-a>>s);return f>r&&(f=r),function(){for(;;){if(u){var n=u();if(n!==un)return n;u=null}if(l===f)return un;var r=t?--f:l++;u=e(c&&c[r],s-5,a+(r<<s))}}}(a,u,c)}(e._root,e._level,0)}function ln(e,t,n,r,i,o,s){var a=Object.create(on);return a.size=t-e,a._origin=e,a._capacity=t,a._level=n,a._root=r,a._tail=i,a.__ownerID=o,a.__hash=s,a.__altered=!1,a}function fn(){return an||(an=ln(0,0,5))}function dn(e,t,n,r,o,a){var u,c=r>>>n&i,l=e&&c<e.array.length;if(!l&&void 0===o)return e;if(n>0){var f=e&&e.array[c],d=dn(f,t,n-5,r,o,a);return d===f?e:((u=hn(e,t)).array[c]=d,u)}return l&&e.array[c]===o?e:(a&&s(a),u=hn(e,t),void 0===o&&c===u.array.length-1?u.array.pop():u.array[c]=o,u)}function hn(e,t){return t&&e&&t===e.ownerID?e:new sn(e?e.array.slice():[],t)}function pn(e,t){if(t>=gn(e._capacity))return e._tail;if(t<1<<e._level+5){for(var n=e._root,r=e._level;n&&r>0;)n=n.array[t>>>r&i],r-=5;return n}}function yn(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new a,o=e._origin,s=e._capacity,u=o+t,c=void 0===n?s:n<0?s+n:o+n;if(u===o&&c===s)return e;if(u>=c)return e.clear();for(var l=e._level,f=e._root,d=0;u+d<0;)f=new sn(f&&f.array.length?[void 0,f]:[],r),d+=1<<(l+=5);d&&(u+=d,o+=d,c+=d,s+=d);for(var h=gn(s),p=gn(c);p>=1<<l+5;)f=new sn(f&&f.array.length?[f]:[],r),l+=5;var y=e._tail,g=p<h?pn(e,c-1):p>h?new sn([],r):y;if(y&&p>h&&u<s&&y.array.length){for(var m=f=hn(f,r),v=l;v>5;v-=5){var w=h>>>v&i;m=m.array[w]=hn(m.array[w],r)}m.array[h>>>5&i]=y}if(c<s&&(g=g&&g.removeAfter(r,0,c)),u>=p)u-=p,c-=p,l=5,f=null,g=g&&g.removeBefore(r,0,u);else if(u>o||p<h){for(d=0;f;){var _=u>>>l&i;if(_!==p>>>l&i)break;_&&(d+=(1<<l)*_),l-=5,f=f.array[_]}f&&u>o&&(f=f.removeBefore(r,l,u-d)),f&&p<h&&(f=f.removeAfter(r,l,p-d)),d&&(u-=d,c-=d)}return e.__ownerID?(e.size=c-u,e._origin=u,e._capacity=c,e._level=l,e._root=f,e._tail=g,e.__hash=void 0,e.__altered=!0,e):ln(u,c,l,f,g)}function gn(e){return e<r?0:e-1>>>5<<5}var mn,vn=function(e){function t(e){return null==e?_n():oe(e)?e:_n().withMutations((function(t){var n=E(e);Je(n.size),n.forEach((function(e,n){return t.set(n,e)}))}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("OrderedMap {","}")},t.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this.__altered=!0,this):_n()},t.prototype.set=function(e,t){return bn(this,e,t)},t.prototype.remove=function(e){return bn(this,e,o)},t.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate((function(t){return t&&e(t[1],t[0],n)}),t)},t.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?wn(t,n,e,this.__hash):0===this.size?_n():(this.__ownerID=e,this.__altered=!1,this._map=t,this._list=n,this)},t}(Mt);function wn(e,t,n,r){var i=Object.create(vn.prototype);return i.size=e?e.size:0,i._map=e,i._list=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function _n(){return mn||(mn=wn(Ht(),fn()))}function bn(e,t,n){var i,s,a=e._map,u=e._list,c=a.get(t),l=void 0!==c;if(n===o){if(!l)return e;u.size>=r&&u.size>=2*a.size?(i=(s=u.filter((function(e,t){return void 0!==e&&c!==t}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(i.__ownerID=s.__ownerID=e.__ownerID)):(i=a.remove(t),s=c===u.size-1?u.pop():u.set(c,void 0))}else if(l){if(n===u.get(c)[1])return e;i=a,s=u.set(c,[t,n])}else i=a.set(t,u.size),s=u.set(u.size,[t,n]);return e.__ownerID?(e.size=i.size,e._map=i,e._list=s,e.__hash=void 0,e.__altered=!0,e):wn(i,s)}vn.isOrderedMap=oe,vn.prototype[N]=!0,vn.prototype.delete=vn.prototype.remove;var Sn="@@__IMMUTABLE_STACK__@@";function Cn(e){return Boolean(e&&e[Sn])}var En=function(e){function t(e){return null==e?Tn():Cn(e)?e:Tn().pushAll(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("Stack [","]")},t.prototype.get=function(e,t){var n=this._head;for(e=c(this,e);n&&e--;)n=n.next;return n?n.value:t},t.prototype.peek=function(){return this._head&&this._head.value},t.prototype.push=function(){var e=arguments;if(0===arguments.length)return this;for(var t=this.size+arguments.length,n=this._head,r=arguments.length-1;r>=0;r--)n={value:e[r],next:n};return this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):An(t,n)},t.prototype.pushAll=function(t){if(0===(t=e(t)).size)return this;if(0===this.size&&Cn(t))return t;Je(t.size);var n=this.size,r=this._head;return t.__iterate((function(e){n++,r={value:e,next:r}}),!0),this.__ownerID?(this.size=n,this._head=r,this.__hash=void 0,this.__altered=!0,this):An(n,r)},t.prototype.pop=function(){return this.slice(1)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Tn()},t.prototype.slice=function(t,n){if(f(t,n,this.size))return this;var r=d(t,this.size);if(h(n,this.size)!==this.size)return e.prototype.slice.call(this,t,n);for(var i=this.size-r,o=this._head;r--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):An(i,o)},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?An(this.size,this._head,e,this.__hash):0===this.size?Tn():(this.__ownerID=e,this.__altered=!1,this)},t.prototype.__iterate=function(e,t){var n=this;if(t)return new K(this.toArray()).__iterate((function(t,r){return e(t,r,n)}),t);for(var r=0,i=this._head;i&&!1!==e(i.value,r++,this);)i=i.next;return r},t.prototype.__iterator=function(e,t){if(t)return new K(this.toArray()).__iterator(e,t);var n=0,r=this._head;return new W((function(){if(r){var t=r.value;return r=r.next,x(e,n++,t)}return{value:void 0,done:!0}}))},t}(I);En.isStack=Cn;var In,On=En.prototype;function An(e,t,n,r){var i=Object.create(On);return i.size=e,i._head=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Tn(){return In||(In=An(0))}On[Sn]=!0,On.shift=On.pop,On.unshift=On.push,On.unshiftAll=On.pushAll,On.withMutations=Lt,On.wasAltered=Nt,On.asImmutable=kt,On["@@transducer/init"]=On.asMutable=Rt,On["@@transducer/step"]=function(e,t){return e.unshift(t)},On["@@transducer/result"]=function(e){return e.asImmutable()};var Ln="@@__IMMUTABLE_SET__@@";function Rn(e){return Boolean(e&&e[Ln])}function kn(e){return Rn(e)&&M(e)}function Nn(e,t){if(e===t)return!0;if(!m(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||w(e)!==w(t)||b(e)!==b(t)||M(e)!==M(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!S(e);if(M(e)){var r=e.entries();return t.every((function(e,t){var i=r.next().value;return i&&ae(i[1],e)&&(n||ae(i[0],t))}))&&r.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var s=e;e=t,t=s}var a=!0,u=t.__iterate((function(t,r){if(n?!e.has(t):i?!ae(t,e.get(r,o)):!ae(e.get(r,o),t))return a=!1,!1}));return a&&e.size===u}function Mn(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}function Pn(e){if(!e||"object"!=typeof e)return e;if(!m(e)){if(!et(e))return e;e=H(e)}if(w(e)){var t={};return e.__iterate((function(e,n){t[n]=Pn(e)})),t}var n=[];return e.__iterate((function(e){n.push(Pn(e))})),n}var Dn=function(e){function t(t){return null==t?Bn():Rn(t)&&!M(t)?t:Bn().withMutations((function(n){var r=e(t);Je(r.size),r.forEach((function(e){return n.add(e)}))}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(E(e).keySeq())},t.intersect=function(e){return(e=C(e).toArray()).length?xn.intersect.apply(t(e.pop()),e):Bn()},t.union=function(e){return(e=C(e).toArray()).length?xn.union.apply(t(e.pop()),e):Bn()},t.prototype.toString=function(){return this.__toString("Set {","}")},t.prototype.has=function(e){return this._map.has(e)},t.prototype.add=function(e){return jn(this,this._map.set(e,e))},t.prototype.remove=function(e){return jn(this,this._map.remove(e))},t.prototype.clear=function(){return jn(this,this._map.clear())},t.prototype.map=function(e,t){var n=this,r=!1,i=jn(this,this._map.mapEntries((function(i){var o=i[1],s=e.call(t,o,o,n);return s!==o&&(r=!0),[s,s]}),t));return r?i:this},t.prototype.union=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return 0===(t=t.filter((function(e){return 0!==e.size}))).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations((function(n){for(var r=0;r<t.length;r++)e(t[r]).forEach((function(e){return n.add(e)}))})):this.constructor(t[0])},t.prototype.intersect=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(0===t.length)return this;t=t.map((function(t){return e(t)}));var r=[];return this.forEach((function(e){t.every((function(t){return t.includes(e)}))||r.push(e)})),this.withMutations((function(e){r.forEach((function(t){e.remove(t)}))}))},t.prototype.subtract=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(0===t.length)return this;t=t.map((function(t){return e(t)}));var r=[];return this.forEach((function(e){t.some((function(t){return t.includes(e)}))&&r.push(e)})),this.withMutations((function(e){r.forEach((function(t){e.remove(t)}))}))},t.prototype.sort=function(e){return ir(je(this,e))},t.prototype.sortBy=function(e,t){return ir(je(this,t,e))},t.prototype.wasAltered=function(){return this._map.wasAltered()},t.prototype.__iterate=function(e,t){var n=this;return this._map.__iterate((function(t){return e(t,t,n)}),t)},t.prototype.__iterator=function(e,t){return this._map.__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):0===this.size?this.__empty():(this.__ownerID=e,this._map=t,this)},t}(O);Dn.isSet=Rn;var Wn,xn=Dn.prototype;function jn(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function Fn(e,t){var n=Object.create(xn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Bn(){return Wn||(Wn=Fn(Ht()))}xn[Ln]=!0,xn.delete=xn.remove,xn.merge=xn.concat=xn.union,xn.withMutations=Lt,xn.asImmutable=kt,xn["@@transducer/init"]=xn.asMutable=Rt,xn["@@transducer/step"]=function(e,t){return e.add(t)},xn["@@transducer/result"]=function(e){return e.asImmutable()},xn.__empty=Bn,xn.__make=Fn;var zn,$n=function(e){function t(e,n,r){if(!(this instanceof t))return new t(e,n,r);if(Ke(0!==r,"Cannot step a Range by 0"),e=e||0,void 0===n&&(n=1/0),r=void 0===r?1:Math.abs(r),n<e&&(r=-r),this._start=e,this._end=n,this._step=r,this.size=Math.max(0,Math.ceil((n-e)/r-1)+1),0===this.size){if(zn)return zn;zn=this}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},t.prototype.get=function(e,t){return this.has(e)?this._start+c(this,e)*this._step:t},t.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},t.prototype.slice=function(e,n){return f(e,n,this.size)?this:(e=d(e,this.size),(n=h(n,this.size))<=e?new t(0,0):new t(this.get(e,this._end),this.get(n,this._end),this._step))},t.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step==0){var n=t/this._step;if(n>=0&&n<this.size)return n}return-1},t.prototype.lastIndexOf=function(e){return this.indexOf(e)},t.prototype.__iterate=function(e,t){for(var n=this.size,r=this._step,i=t?this._start+(n-1)*r:this._start,o=0;o!==n&&!1!==e(i,t?n-++o:o++,this);)i+=t?-r:r;return o},t.prototype.__iterator=function(e,t){var n=this.size,r=this._step,i=t?this._start+(n-1)*r:this._start,o=0;return new W((function(){if(o===n)return{value:void 0,done:!0};var s=i;return i+=t?-r:r,x(e,t?n-++o:o++,s)}))},t.prototype.equals=function(e){return e instanceof t?this._start===e._start&&this._end===e._end&&this._step===e._step:Nn(this,e)},t}(G);function qn(e,t,n){for(var r=Qe(t),i=0;i!==r.length;)if((e=rt(e,r[i++],o))===o)return n;return e}function Un(e,t){return qn(this,e,t)}function Hn(e,t){return qn(e,t,o)!==o}function Vn(){Je(this.size);var e={};return this.__iterate((function(t,n){e[n]=t})),e}C.isIterable=m,C.isKeyed=w,C.isIndexed=b,C.isAssociative=S,C.isOrdered=M,C.Iterator=W,Mn(C,{toArray:function(){Je(this.size);var e=new Array(this.size||0),t=w(this),n=0;return this.__iterate((function(r,i){e[n++]=t?[i,r]:r})),e},toIndexedSeq:function(){return new Ae(this)},toJS:function(){return Pn(this)},toKeyedSeq:function(){return new Oe(this,!0)},toMap:function(){return Mt(this.toKeyedSeq())},toObject:Vn,toOrderedMap:function(){return vn(this.toKeyedSeq())},toOrderedSet:function(){return ir(w(this)?this.valueSeq():this)},toSet:function(){return Dn(w(this)?this.valueSeq():this)},toSetSeq:function(){return new Te(this)},toSeq:function(){return b(this)?this.toIndexedSeq():w(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return En(w(this)?this.valueSeq():this)},toList:function(){return rn(w(this)?this.valueSeq():this)},toString:function(){return"[Collection]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return $e(this,We(this,e))},includes:function(e){return this.some((function(t){return ae(t,e)}))},entries:function(){return this.__iterator(2)},every:function(e,t){Je(this.size);var n=!0;return this.__iterate((function(r,i,o){if(!e.call(t,r,i,o))return n=!1,!1})),n},filter:function(e,t){return $e(this,Me(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return Je(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){Je(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate((function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""})),t},keys:function(){return this.__iterator(0)},map:function(e,t){return $e(this,ke(this,e,t))},reduce:function(e,t,n){return Jn(this,e,t,n,arguments.length<2,!1)},reduceRight:function(e,t,n){return Jn(this,e,t,n,arguments.length<2,!0)},reverse:function(){return $e(this,Ne(this,!0))},slice:function(e,t){return $e(this,Pe(this,e,t,!0))},some:function(e,t){return!this.every(Xn(e),t)},sort:function(e){return $e(this,je(this,e))},values:function(){return this.__iterator(1)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(e,t){return u(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return function(e,t,n){var r=Mt().asMutable();return e.__iterate((function(i,o){r.update(t.call(n,i,o,e),0,(function(e){return e+1}))})),r.asImmutable()}(this,e,t)},equals:function(e){return Nn(this,e)},entrySeq:function(){var e=this;if(e._cache)return new K(e._cache);var t=e.toSeq().map(Zn).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(Xn(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate((function(n,i,o){if(e.call(t,n,i,o))return r=[i,n],!1})),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(e){return this.find(l,null,e)},flatMap:function(e,t){return $e(this,function(e,t,n){var r=Ue(e);return e.toSeq().map((function(i,o){return r(t.call(n,i,o,e))})).flatten(!0)}(this,e,t))},flatten:function(e){return $e(this,xe(this,e,!0))},fromEntrySeq:function(){return new Le(this)},get:function(e,t){return this.find((function(t,n){return ae(n,e)}),void 0,t)},getIn:Un,groupBy:function(e,t){return function(e,t,n){var r=w(e),i=(M(e)?vn():Mt()).asMutable();e.__iterate((function(o,s){i.update(t.call(n,o,s,e),(function(e){return(e=e||[]).push(r?[s,o]:o),e}))}));var o=Ue(e);return i.map((function(t){return $e(e,o(t))})).asImmutable()}(this,e,t)},has:function(e){return this.get(e,o)!==o},hasIn:function(e){return Hn(this,e)},isSubset:function(e){return e="function"==typeof e.includes?e:C(e),this.every((function(t){return e.includes(t)}))},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:C(e)).isSubset(this)},keyOf:function(e){return this.findKey((function(t){return ae(t,e)}))},keySeq:function(){return this.toSeq().map(Qn).toIndexedSeq()},last:function(e){return this.toSeq().reverse().first(e)},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return Fe(this,e)},maxBy:function(e,t){return Fe(this,t,e)},min:function(e){return Fe(this,e?er(e):nr)},minBy:function(e,t){return Fe(this,t?er(t):nr,e)},rest:function(){return this.slice(1)},skip:function(e){return 0===e?this:this.slice(Math.max(0,e))},skipLast:function(e){return 0===e?this:this.slice(0,-Math.max(0,e))},skipWhile:function(e,t){return $e(this,De(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(Xn(e),t)},sortBy:function(e,t){return $e(this,je(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return this.slice(-Math.max(0,e))},takeWhile:function(e,t){return $e(this,function(e,t,n){var r=He(e);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var s=0;return e.__iterate((function(e,i,a){return t.call(n,e,i,a)&&++s&&r(e,i,o)})),s},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var s=e.__iterator(2,i),a=!0;return new W((function(){if(!a)return{value:void 0,done:!0};var e=s.next();if(e.done)return e;var i=e.value,u=i[0],c=i[1];return t.call(n,c,u,o)?2===r?e:x(r,u,c,e):(a=!1,{value:void 0,done:!0})}))},r}(this,e,t))},takeUntil:function(e,t){return this.takeWhile(Xn(e),t)},update:function(e){return e(this)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(e){if(e.size===1/0)return 0;var t=M(e),n=w(e),r=t?1:0;return function(e,t){return t=ue(t,3432918353),t=ue(t<<15|t>>>-15,461845907),t=ue(t<<13|t>>>-13,5),t=ue((t=(t+3864292196|0)^e)^t>>>16,2246822507),ce((t=ue(t^t>>>13,3266489909))^t>>>16)}(e.__iterate(n?t?function(e,t){r=31*r+rr(fe(e),fe(t))|0}:function(e,t){r=r+rr(fe(e),fe(t))|0}:t?function(e){r=31*r+fe(e)|0}:function(e){r=r+fe(e)|0}),r)}(this))}});var Gn=C.prototype;Gn[g]=!0,Gn[D]=Gn.values,Gn.toJSON=Gn.toArray,Gn.__toStringMapper=tt,Gn.inspect=Gn.toSource=function(){return this.toString()},Gn.chain=Gn.flatMap,Gn.contains=Gn.includes,Mn(E,{flip:function(){return $e(this,Re(this))},mapEntries:function(e,t){var n=this,r=0;return $e(this,this.toSeq().map((function(i,o){return e.call(t,[o,i],r++,n)})).fromEntrySeq())},mapKeys:function(e,t){var n=this;return $e(this,this.toSeq().flip().map((function(r,i){return e.call(t,r,i,n)})).flip())}});var Yn=E.prototype;Yn[v]=!0,Yn[D]=Gn.entries,Yn.toJSON=Vn,Yn.__toStringMapper=function(e,t){return tt(t)+": "+tt(e)},Mn(I,{toKeyedSeq:function(){return new Oe(this,!1)},filter:function(e,t){return $e(this,Me(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return $e(this,Ne(this,!1))},slice:function(e,t){return $e(this,Pe(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(t||0,0),0===n||2===n&&!t)return this;e=d(e,e<0?this.count():this.size);var r=this.slice(0,e);return $e(this,1===n?r:r.concat(Ye(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(e){return this.get(0,e)},flatten:function(e){return $e(this,xe(this,e,!1))},get:function(e,t){return(e=c(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find((function(t,n){return n===e}),void 0,t)},has:function(e){return(e=c(this,e))>=0&&(void 0!==this.size?this.size===1/0||e<this.size:-1!==this.indexOf(e))},interpose:function(e){return $e(this,function(e,t){var n=He(e);return n.size=e.size&&2*e.size-1,n.__iterateUncached=function(n,r){var i=this,o=0;return e.__iterate((function(e){return(!o||!1!==n(t,o++,i))&&!1!==n(e,o++,i)}),r),o},n.__iteratorUncached=function(n,r){var i,o=e.__iterator(1,r),s=0;return new W((function(){return(!i||s%2)&&(i=o.next()).done?i:s%2?x(n,s++,t):x(n,s++,i.value,i)}))},n}(this,e))},interleave:function(){var e=[this].concat(Ye(arguments)),t=ze(this.toSeq(),G.of,e),n=t.flatten(!0);return t.size&&(n.size=t.size*e.length),$e(this,n)},keySeq:function(){return $n(0,this.size)},last:function(e){return this.get(-1,e)},skipWhile:function(e,t){return $e(this,De(this,e,t,!1))},zip:function(){var e=[this].concat(Ye(arguments));return $e(this,ze(this,tr,e))},zipAll:function(){var e=[this].concat(Ye(arguments));return $e(this,ze(this,tr,e,!0))},zipWith:function(e){var t=Ye(arguments);return t[0]=this,$e(this,ze(this,e,t))}});var Kn=I.prototype;function Jn(e,t,n,r,i,o){return Je(e.size),e.__iterate((function(e,o,s){i?(i=!1,n=e):n=t.call(r,n,e,o,s)}),o),n}function Qn(e,t){return t}function Zn(e,t){return[t,e]}function Xn(e){return function(){return!e.apply(this,arguments)}}function er(e){return function(){return-e.apply(this,arguments)}}function tr(){return Ye(arguments)}function nr(e,t){return e<t?1:e>t?-1:0}function rr(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}Kn[_]=!0,Kn[N]=!0,Mn(O,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),O.prototype.has=Gn.includes,O.prototype.contains=O.prototype.includes,Mn(V,E.prototype),Mn(G,I.prototype),Mn(Y,O.prototype);var ir=function(e){function t(e){return null==e?ur():kn(e)?e:ur().withMutations((function(t){var n=O(e);Je(n.size),n.forEach((function(e){return t.add(e)}))}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(E(e).keySeq())},t.prototype.toString=function(){return this.__toString("OrderedSet {","}")},t}(Dn);ir.isOrderedSet=kn;var or,sr=ir.prototype;function ar(e,t){var n=Object.create(sr);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function ur(){return or||(or=ar(_n()))}sr[N]=!0,sr.zip=Kn.zip,sr.zipWith=Kn.zipWith,sr.zipAll=Kn.zipAll,sr.__empty=ur,sr.__make=ar;var cr=function(e,t){var n;!function(e){if(R(e))throw new Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(k(e))throw new Error("Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.");if(null===e||"object"!=typeof e)throw new Error("Can not call `Record` with a non-object as default values. Use a plain javascript object instead.")}(e);var r=function(o){var s=this;if(o instanceof r)return o;if(!(this instanceof r))return new r(o);if(!n){n=!0;var a=Object.keys(e),u=i._indices={};i._name=t,i._keys=a,i._defaultValues=e;for(var c=0;c<a.length;c++){var l=a[c];u[l]=c,i[l]?"object"==typeof console&&console.warn&&console.warn("Cannot define "+dr(this)+' with property "'+l+'" since that property name is part of the Record API.'):pr(i,l)}}return this.__ownerID=void 0,this._values=rn().withMutations((function(e){e.setSize(s._keys.length),E(o).forEach((function(t,n){e.set(s._indices[n],t===s._defaultValues[n]?void 0:t)}))})),this},i=r.prototype=Object.create(lr);return i.constructor=r,t&&(r.displayName=t),r};cr.prototype.toString=function(){for(var e,t=dr(this)+" { ",n=this._keys,r=0,i=n.length;r!==i;r++)t+=(r?", ":"")+(e=n[r])+": "+tt(this.get(e));return t+" }"},cr.prototype.equals=function(e){return this===e||e&&hr(this).equals(hr(e))},cr.prototype.hashCode=function(){return hr(this).hashCode()},cr.prototype.has=function(e){return this._indices.hasOwnProperty(e)},cr.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._indices[e],r=this._values.get(n);return void 0===r?this._defaultValues[e]:r},cr.prototype.set=function(e,t){if(this.has(e)){var n=this._values.set(this._indices[e],t===this._defaultValues[e]?void 0:t);if(n!==this._values&&!this.__ownerID)return fr(this,n)}return this},cr.prototype.remove=function(e){return this.set(e)},cr.prototype.clear=function(){var e=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:fr(this,e)},cr.prototype.wasAltered=function(){return this._values.wasAltered()},cr.prototype.toSeq=function(){return hr(this)},cr.prototype.toJS=function(){return Pn(this)},cr.prototype.entries=function(){return this.__iterator(2)},cr.prototype.__iterator=function(e,t){return hr(this).__iterator(e,t)},cr.prototype.__iterate=function(e,t){return hr(this).__iterate(e,t)},cr.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._values.__ensureOwner(e);return e?fr(this,t,e):(this.__ownerID=e,this._values=t,this)},cr.isRecord=R,cr.getDescriptiveName=dr;var lr=cr.prototype;function fr(e,t,n){var r=Object.create(Object.getPrototypeOf(e));return r._values=t,r.__ownerID=n,r}function dr(e){return e.constructor.displayName||e.constructor.name||"Record"}function hr(e){return ee(e._keys.map((function(t){return[t,e.get(t)]})))}function pr(e,t){try{Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){Ke(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}catch(e){}}lr[L]=!0,lr.delete=lr.remove,lr.deleteIn=lr.removeIn=dt,lr.getIn=Un,lr.hasIn=Gn.hasIn,lr.merge=gt,lr.mergeWith=mt,lr.mergeIn=At,lr.mergeDeep=It,lr.mergeDeepWith=Ot,lr.mergeDeepIn=Tt,lr.setIn=lt,lr.update=pt,lr.updateIn=yt,lr.withMutations=Lt,lr.asMutable=Rt,lr.asImmutable=kt,lr[D]=lr.entries,lr.toJSON=lr.toObject=Gn.toObject,lr.inspect=lr.toSource=function(){return this.toString()};var yr,gr=function(e){function t(e,n){if(!(this instanceof t))return new t(e,n);if(this._value=e,this.size=void 0===n?1/0:Math.max(0,n),0===this.size){if(yr)return yr;yr=this}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},t.prototype.get=function(e,t){return this.has(e)?this._value:t},t.prototype.includes=function(e){return ae(this._value,e)},t.prototype.slice=function(e,n){var r=this.size;return f(e,n,r)?this:new t(this._value,h(n,r)-d(e,r))},t.prototype.reverse=function(){return this},t.prototype.indexOf=function(e){return ae(this._value,e)?0:-1},t.prototype.lastIndexOf=function(e){return ae(this._value,e)?this.size:-1},t.prototype.__iterate=function(e,t){for(var n=this.size,r=0;r!==n&&!1!==e(this._value,t?n-++r:r++,this););return r},t.prototype.__iterator=function(e,t){var n=this,r=this.size,i=0;return new W((function(){return i===r?{value:void 0,done:!0}:x(e,t?r-++i:i++,n._value)}))},t.prototype.equals=function(e){return e instanceof t?ae(this._value,e._value):Nn(e)},t}(G);function mr(e,t){return vr([],t||wr,e,"",t&&t.length>2?[]:void 0,{"":e})}function vr(e,t,n,r,i,o){var s=Array.isArray(n)?G:Xe(n)?V:null;if(s){if(~e.indexOf(n))throw new TypeError("Cannot convert circular structure to Immutable");e.push(n),i&&""!==r&&i.push(r);var a=t.call(o,r,s(n).map((function(r,o){return vr(e,t,r,o,i,n)})),i&&i.slice());return e.pop(),i&&i.pop(),a}return n}function wr(e,t){return w(t)?t.toMap():t.toList()}var _r="4.0.0-rc.14",br=C;const Sr={version:_r,Collection:C,Iterable:C,Seq:H,Map:Mt,OrderedMap:vn,List:rn,Stack:En,Set:Dn,OrderedSet:ir,Record:cr,Range:$n,Repeat:gr,is:ae,fromJS:mr,hash:fe,isImmutable:k,isCollection:m,isKeyed:w,isIndexed:b,isAssociative:S,isOrdered:M,isValueObject:se,isPlainObject:Xe,isSeq:T,isList:nn,isMap:ie,isOrderedMap:oe,isStack:Cn,isSet:Rn,isOrderedSet:kn,isRecord:R,get:rt,getIn:qn,has:nt,hasIn:Hn,merge:wt,mergeDeep:bt,mergeWith:_t,mergeDeepWith:St,remove:ot,removeIn:ft,set:st,setIn:ct,update:ht,updateIn:at}},24081:(e,t,n)=>{var r=n(21059)(n(158),"DataView");e.exports=r},15999:(e,t,n)=>{var r=n(13387),i=n(69252),o=n(31125),s=n(9021),a=n(68131);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,e.exports=u},26811:(e,t,n)=>{var r=n(72215),i=n(56105),o=n(30484),s=n(8046),a=n(30603);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,e.exports=u},60945:(e,t,n)=>{var r=n(21059)(n(158),"Map");e.exports=r},25835:(e,t,n)=>{var r=n(73633),i=n(39382),o=n(28850),s=n(70756),a=n(2769);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,e.exports=u},27540:(e,t,n)=>{var r=n(21059)(n(158),"Promise");e.exports=r},80476:(e,t,n)=>{var r=n(21059)(n(158),"Set");e.exports=r},74868:(e,t,n)=>{var r=n(25835),i=n(57554),o=n(18800);function s(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}s.prototype.add=s.prototype.push=i,s.prototype.has=o,e.exports=s},34987:(e,t,n)=>{var r=n(26811),i=n(73832),o=n(31676),s=n(33577),a=n(43343),u=n(20488);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=s,c.prototype.has=a,c.prototype.set=u,e.exports=c},44937:(e,t,n)=>{var r=n(158).Symbol;e.exports=r},48596:(e,t,n)=>{var r=n(158).Uint8Array;e.exports=r},18307:(e,t,n)=>{var r=n(21059)(n(158),"WeakMap");e.exports=r},90929:e=>{e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},73034:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},5680:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}},92554:(e,t,n)=>{var r=n(65086),i=n(67016),o=n(93706),s=n(77638),a=n(49699),u=n(70094),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),l=!n&&i(e),f=!n&&!l&&s(e),d=!n&&!l&&!f&&u(e),h=n||l||f||d,p=h?r(e.length,String):[],y=p.length;for(var g in e)!t&&!c.call(e,g)||h&&("length"==g||f&&("offset"==g||"parent"==g)||d&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||a(g,y))||p.push(g);return p}},57041:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},52824:e=>{e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},99280:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},96122:(e,t,n)=>{var r=n(88039),i=n(1316),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var s=e[t];o.call(e,t)&&i(s,n)&&(void 0!==n||t in e)||r(e,t,n)}},33993:(e,t,n)=>{var r=n(1316);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},73977:(e,t,n)=>{var r=n(34386),i=n(23150);e.exports=function(e,t){return e&&r(t,i(t),e)}},5081:(e,t,n)=>{var r=n(34386),i=n(61530);e.exports=function(e,t){return e&&r(t,i(t),e)}},88039:(e,t,n)=>{var r=n(88689);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},49548:(e,t,n)=>{var r=n(34987),i=n(73034),o=n(96122),s=n(73977),a=n(5081),u=n(728),c=n(86923),l=n(21375),f=n(1584),d=n(47461),h=n(31441),p=n(35551),y=n(75539),g=n(83394),m=n(45010),v=n(93706),w=n(77638),_=n(55948),b=n(23619),S=n(78255),C=n(23150),E=n(61530),I="[object Arguments]",O="[object Function]",A="[object Object]",T={};T[I]=T["[object Array]"]=T["[object ArrayBuffer]"]=T["[object DataView]"]=T["[object Boolean]"]=T["[object Date]"]=T["[object Float32Array]"]=T["[object Float64Array]"]=T["[object Int8Array]"]=T["[object Int16Array]"]=T["[object Int32Array]"]=T["[object Map]"]=T["[object Number]"]=T[A]=T["[object RegExp]"]=T["[object Set]"]=T["[object String]"]=T["[object Symbol]"]=T["[object Uint8Array]"]=T["[object Uint8ClampedArray]"]=T["[object Uint16Array]"]=T["[object Uint32Array]"]=!0,T["[object Error]"]=T[O]=T["[object WeakMap]"]=!1,e.exports=function e(t,n,L,R,k,N){var M,P=1&n,D=2&n,W=4&n;if(L&&(M=k?L(t,R,k,N):L(t)),void 0!==M)return M;if(!b(t))return t;var x=v(t);if(x){if(M=y(t),!P)return c(t,M)}else{var j=p(t),F=j==O||"[object GeneratorFunction]"==j;if(w(t))return u(t,P);if(j==A||j==I||F&&!k){if(M=D||F?{}:m(t),!P)return D?f(t,a(M,t)):l(t,s(M,t))}else{if(!T[j])return k?t:{};M=g(t,j,P)}}N||(N=new r);var B=N.get(t);if(B)return B;N.set(t,M),S(t)?t.forEach((function(r){M.add(e(r,n,L,r,t,N))})):_(t)&&t.forEach((function(r,i){M.set(i,e(r,n,L,i,t,N))}));var z=x?void 0:(W?D?h:d:D?E:C)(t);return i(z||t,(function(r,i){z&&(r=t[i=r]),o(M,i,e(r,n,L,i,t,N))})),M}},33776:(e,t,n)=>{var r=n(23619),i=Object.create,o=function(){function e(){}return function(t){if(!r(t))return{};if(i)return i(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=o},22153:(e,t,n)=>{var r=n(52824),i=n(76648);e.exports=function e(t,n,o,s,a){var u=-1,c=t.length;for(o||(o=i),a||(a=[]);++u<c;){var l=t[u];n>0&&o(l)?n>1?e(l,n-1,o,s,a):r(a,l):s||(a[a.length]=l)}return a}},51845:(e,t,n)=>{var r=n(49160),i=n(46384);e.exports=function(e,t){for(var n=0,o=(t=r(t,e)).length;null!=e&&n<o;)e=e[i(t[n++])];return n&&n==o?e:void 0}},45328:(e,t,n)=>{var r=n(52824),i=n(93706);e.exports=function(e,t,n){var o=t(e);return i(e)?o:r(o,n(e))}},20194:(e,t,n)=>{var r=n(44937),i=n(15401),o=n(92445),s=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?i(e):o(e)}},56640:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},64634:(e,t,n)=>{var r=n(20194),i=n(81653);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},95372:(e,t,n)=>{var r=n(55365),i=n(81653);e.exports=function e(t,n,o,s,a){return t===n||(null==t||null==n||!i(t)&&!i(n)?t!=t&&n!=n:r(t,n,o,s,e,a))}},55365:(e,t,n)=>{var r=n(34987),i=n(95428),o=n(1108),s=n(71711),a=n(35551),u=n(93706),c=n(77638),l=n(70094),f="[object Arguments]",d="[object Array]",h="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,y,g,m){var v=u(e),w=u(t),_=v?d:a(e),b=w?d:a(t),S=(_=_==f?h:_)==h,C=(b=b==f?h:b)==h,E=_==b;if(E&&c(e)){if(!c(t))return!1;v=!0,S=!1}if(E&&!S)return m||(m=new r),v||l(e)?i(e,t,n,y,g,m):o(e,t,_,n,y,g,m);if(!(1&n)){var I=S&&p.call(e,"__wrapped__"),O=C&&p.call(t,"__wrapped__");if(I||O){var A=I?e.value():e,T=O?t.value():t;return m||(m=new r),g(A,T,n,y,m)}}return!!E&&(m||(m=new r),s(e,t,n,y,g,m))}},2471:(e,t,n)=>{var r=n(35551),i=n(81653);e.exports=function(e){return i(e)&&"[object Map]"==r(e)}},4249:(e,t,n)=>{var r=n(39277),i=n(83481),o=n(23619),s=n(91223),a=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,f=c.hasOwnProperty,d=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?d:a).test(s(e))}},42388:(e,t,n)=>{var r=n(35551),i=n(81653);e.exports=function(e){return i(e)&&"[object Set]"==r(e)}},88595:(e,t,n)=>{var r=n(20194),i=n(62008),o=n(81653),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!s[r(e)]}},76324:(e,t,n)=>{var r=n(3067),i=n(32501),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},21506:(e,t,n)=>{var r=n(23619),i=n(3067),o=n(90807),s=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=i(e),n=[];for(var a in e)("constructor"!=a||!t&&s.call(e,a))&&n.push(a);return n}},11241:(e,t,n)=>{var r=n(10722),i=n(47975);e.exports=function(e,t){return r(e,t,(function(t,n){return i(e,n)}))}},10722:(e,t,n)=>{var r=n(51845),i=n(68400),o=n(49160);e.exports=function(e,t,n){for(var s=-1,a=t.length,u={};++s<a;){var c=t[s],l=r(e,c);n(l,c)&&i(u,o(c,e),l)}return u}},68400:(e,t,n)=>{var r=n(96122),i=n(49160),o=n(49699),s=n(23619),a=n(46384);e.exports=function(e,t,n,u){if(!s(e))return e;for(var c=-1,l=(t=i(t,e)).length,f=l-1,d=e;null!=d&&++c<l;){var h=a(t[c]),p=n;if("__proto__"===h||"constructor"===h||"prototype"===h)return e;if(c!=f){var y=d[h];void 0===(p=u?u(y,h,d):void 0)&&(p=s(y)?y:o(t[c+1])?[]:{})}r(d,h,p),d=d[h]}return e}},86920:(e,t,n)=>{var r=n(80446),i=n(88689),o=n(41549),s=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:o;e.exports=s},65086:e=>{e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},80430:(e,t,n)=>{var r=n(44937),i=n(57041),o=n(93706),s=n(81878),a=r?r.prototype:void 0,u=a?a.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(s(t))return u?u.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},12383:(e,t,n)=>{var r=n(38725),i=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(i,""):e}},2723:e=>{e.exports=function(e){return function(t){return e(t)}}},67446:e=>{e.exports=function(e,t){return e.has(t)}},49160:(e,t,n)=>{var r=n(93706),i=n(63140),o=n(39230),s=n(33270);e.exports=function(e,t){return r(e)?e:i(e,t)?[e]:o(s(e))}},53310:(e,t,n)=>{var r=n(48596);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},728:(e,t,n)=>{e=n.nmd(e);var r=n(158),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,s=o&&o.exports===i?r.Buffer:void 0,a=s?s.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=a?a(n):new e.constructor(n);return e.copy(r),r}},14352:(e,t,n)=>{var r=n(53310);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},44694:e=>{var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},29169:(e,t,n)=>{var r=n(44937),i=r?r.prototype:void 0,o=i?i.valueOf:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},69752:(e,t,n)=>{var r=n(53310);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},86923:e=>{e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},34386:(e,t,n)=>{var r=n(96122),i=n(88039);e.exports=function(e,t,n,o){var s=!n;n||(n={});for(var a=-1,u=t.length;++a<u;){var c=t[a],l=o?o(n[c],e[c],c,n,e):void 0;void 0===l&&(l=e[c]),s?i(n,c,l):r(n,c,l)}return n}},21375:(e,t,n)=>{var r=n(34386),i=n(45278);e.exports=function(e,t){return r(e,i(e),t)}},1584:(e,t,n)=>{var r=n(34386),i=n(27508);e.exports=function(e,t){return r(e,i(e),t)}},38728:(e,t,n)=>{var r=n(158)["__core-js_shared__"];e.exports=r},88689:(e,t,n)=>{var r=n(21059),i=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},95428:(e,t,n)=>{var r=n(74868),i=n(99280),o=n(67446);e.exports=function(e,t,n,s,a,u){var c=1&n,l=e.length,f=t.length;if(l!=f&&!(c&&f>l))return!1;var d=u.get(e),h=u.get(t);if(d&&h)return d==t&&h==e;var p=-1,y=!0,g=2&n?new r:void 0;for(u.set(e,t),u.set(t,e);++p<l;){var m=e[p],v=t[p];if(s)var w=c?s(v,m,p,t,e,u):s(m,v,p,e,t,u);if(void 0!==w){if(w)continue;y=!1;break}if(g){if(!i(t,(function(e,t){if(!o(g,t)&&(m===e||a(m,e,n,s,u)))return g.push(t)}))){y=!1;break}}else if(m!==v&&!a(m,v,n,s,u)){y=!1;break}}return u.delete(e),u.delete(t),y}},1108:(e,t,n)=>{var r=n(44937),i=n(48596),o=n(1316),s=n(95428),a=n(11382),u=n(76680),c=r?r.prototype:void 0,l=c?c.valueOf:void 0;e.exports=function(e,t,n,r,c,f,d){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var h=a;case"[object Set]":var p=1&r;if(h||(h=u),e.size!=t.size&&!p)return!1;var y=d.get(e);if(y)return y==t;r|=2,d.set(e,t);var g=s(h(e),h(t),r,c,f,d);return d.delete(e),g;case"[object Symbol]":if(l)return l.call(e)==l.call(t)}return!1}},71711:(e,t,n)=>{var r=n(47461),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,s,a){var u=1&n,c=r(e),l=c.length;if(l!=r(t).length&&!u)return!1;for(var f=l;f--;){var d=c[f];if(!(u?d in t:i.call(t,d)))return!1}var h=a.get(e),p=a.get(t);if(h&&p)return h==t&&p==e;var y=!0;a.set(e,t),a.set(t,e);for(var g=u;++f<l;){var m=e[d=c[f]],v=t[d];if(o)var w=u?o(v,m,d,t,e,a):o(m,v,d,e,t,a);if(!(void 0===w?m===v||s(m,v,n,o,a):w)){y=!1;break}g||(g="constructor"==d)}if(y&&!g){var _=e.constructor,b=t.constructor;_==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof b&&b instanceof b||(y=!1)}return a.delete(e),a.delete(t),y}},39169:(e,t,n)=>{var r=n(30597),i=n(53039),o=n(47209);e.exports=function(e){return o(i(e,void 0,r),e+"")}},14528:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},47461:(e,t,n)=>{var r=n(45328),i=n(45278),o=n(23150);e.exports=function(e){return r(e,o,i)}},31441:(e,t,n)=>{var r=n(45328),i=n(27508),o=n(61530);e.exports=function(e){return r(e,o,i)}},5662:(e,t,n)=>{var r=n(10205);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},21059:(e,t,n)=>{var r=n(4249),i=n(4759);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},97959:(e,t,n)=>{var r=n(78579)(Object.getPrototypeOf,Object);e.exports=r},15401:(e,t,n)=>{var r=n(44937),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,a),n=e[a];try{e[a]=void 0;var r=!0}catch(e){}var i=s.call(e);return r&&(t?e[a]=n:delete e[a]),i}},45278:(e,t,n)=>{var r=n(5680),i=n(59174),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(e){return null==e?[]:(e=Object(e),r(s(e),(function(t){return o.call(e,t)})))}:i;e.exports=a},27508:(e,t,n)=>{var r=n(52824),i=n(97959),o=n(45278),s=n(59174),a=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,o(e)),e=i(e);return t}:s;e.exports=a},35551:(e,t,n)=>{var r=n(24081),i=n(60945),o=n(27540),s=n(80476),a=n(18307),u=n(20194),c=n(91223),l="[object Map]",f="[object Promise]",d="[object Set]",h="[object WeakMap]",p="[object DataView]",y=c(r),g=c(i),m=c(o),v=c(s),w=c(a),_=u;(r&&_(new r(new ArrayBuffer(1)))!=p||i&&_(new i)!=l||o&&_(o.resolve())!=f||s&&_(new s)!=d||a&&_(new a)!=h)&&(_=function(e){var t=u(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case y:return p;case g:return l;case m:return f;case v:return d;case w:return h}return t}),e.exports=_},4759:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},96919:(e,t,n)=>{var r=n(49160),i=n(67016),o=n(93706),s=n(49699),a=n(62008),u=n(46384);e.exports=function(e,t,n){for(var c=-1,l=(t=r(t,e)).length,f=!1;++c<l;){var d=u(t[c]);if(!(f=null!=e&&n(e,d)))break;e=e[d]}return f||++c!=l?f:!!(l=null==e?0:e.length)&&a(l)&&s(d,l)&&(o(e)||i(e))}},13387:(e,t,n)=>{var r=n(45155);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},69252:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},31125:(e,t,n)=>{var r=n(45155),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},9021:(e,t,n)=>{var r=n(45155),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},68131:(e,t,n)=>{var r=n(45155);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},75539:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var n=e.length,r=new e.constructor(n);return n&&"string"==typeof e[0]&&t.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},83394:(e,t,n)=>{var r=n(53310),i=n(14352),o=n(44694),s=n(29169),a=n(69752);e.exports=function(e,t,n){var u=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new u(+e);case"[object DataView]":return i(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return a(e,n);case"[object Map]":return new u;case"[object Number]":case"[object String]":return new u(e);case"[object RegExp]":return o(e);case"[object Set]":return new u;case"[object Symbol]":return s(e)}}},45010:(e,t,n)=>{var r=n(33776),i=n(97959),o=n(3067);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:r(i(e))}},76648:(e,t,n)=>{var r=n(44937),i=n(67016),o=n(93706),s=r?r.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||i(e)||!!(s&&e&&e[s])}},49699:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},63140:(e,t,n)=>{var r=n(93706),i=n(81878),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||s.test(e)||!o.test(e)||null!=t&&e in Object(t)}},10205:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},83481:(e,t,n)=>{var r,i=n(38728),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!o&&o in e}},3067:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},72215:e=>{e.exports=function(){this.__data__=[],this.size=0}},56105:(e,t,n)=>{var r=n(33993),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0||(n==t.length-1?t.pop():i.call(t,n,1),--this.size,0))}},30484:(e,t,n)=>{var r=n(33993);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},8046:(e,t,n)=>{var r=n(33993);e.exports=function(e){return r(this.__data__,e)>-1}},30603:(e,t,n)=>{var r=n(33993);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},73633:(e,t,n)=>{var r=n(15999),i=n(26811),o=n(60945);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},39382:(e,t,n)=>{var r=n(5662);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},28850:(e,t,n)=>{var r=n(5662);e.exports=function(e){return r(this,e).get(e)}},70756:(e,t,n)=>{var r=n(5662);e.exports=function(e){return r(this,e).has(e)}},2769:(e,t,n)=>{var r=n(5662);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},11382:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},32202:(e,t,n)=>{var r=n(54883);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},45155:(e,t,n)=>{var r=n(21059)(Object,"create");e.exports=r},32501:(e,t,n)=>{var r=n(78579)(Object.keys,Object);e.exports=r},90807:e=>{e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},41771:(e,t,n)=>{e=n.nmd(e);var r=n(14528),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,s=o&&o.exports===i&&r.process,a=function(){try{return o&&o.require&&o.require("util").types||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=a},92445:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},78579:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},53039:(e,t,n)=>{var r=n(90929),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,s=-1,a=i(o.length-t,0),u=Array(a);++s<a;)u[s]=o[t+s];s=-1;for(var c=Array(t+1);++s<t;)c[s]=o[s];return c[t]=n(u),r(e,this,c)}}},158:(e,t,n)=>{var r=n(14528),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},57554:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},18800:e=>{e.exports=function(e){return this.__data__.has(e)}},76680:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},47209:(e,t,n)=>{var r=n(86920),i=n(10832)(r);e.exports=i},10832:e=>{var t=Date.now;e.exports=function(e){var n=0,r=0;return function(){var i=t(),o=16-(i-r);if(r=i,o>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},73832:(e,t,n)=>{var r=n(26811);e.exports=function(){this.__data__=new r,this.size=0}},31676:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},33577:e=>{e.exports=function(e){return this.__data__.get(e)}},43343:e=>{e.exports=function(e){return this.__data__.has(e)}},20488:(e,t,n)=>{var r=n(26811),i=n(60945),o=n(25835);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var s=n.__data__;if(!i||s.length<199)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(s)}return n.set(e,t),this.size=n.size,this}},39230:(e,t,n)=>{var r=n(32202),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,s=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,(function(e,n,r,i){t.push(r?i.replace(o,"$1"):n||e)})),t}));e.exports=s},46384:(e,t,n)=>{var r=n(81878);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},91223:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},38725:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},71879:(e,t,n)=>{var r=n(49548);e.exports=function(e){return r(e,4)}},99748:(e,t,n)=>{var r=n(49548);e.exports=function(e){return r(e,5)}},80446:e=>{e.exports=function(e){return function(){return e}}},76897:(e,t,n)=>{var r=n(23619),i=n(98253),o=n(95053),s=Math.max,a=Math.min;e.exports=function(e,t,n){var u,c,l,f,d,h,p=0,y=!1,g=!1,m=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=u,r=c;return u=c=void 0,p=t,f=e.apply(r,n)}function w(e){return p=e,d=setTimeout(b,t),y?v(e):f}function _(e){var n=e-h;return void 0===h||n>=t||n<0||g&&e-p>=l}function b(){var e=i();if(_(e))return S(e);d=setTimeout(b,function(e){var n=t-(e-h);return g?a(n,l-(e-p)):n}(e))}function S(e){return d=void 0,m&&u?v(e):(u=c=void 0,f)}function C(){var e=i(),n=_(e);if(u=arguments,c=this,h=e,n){if(void 0===d)return w(h);if(g)return clearTimeout(d),d=setTimeout(b,t),v(h)}return void 0===d&&(d=setTimeout(b,t)),f}return t=o(t)||0,r(n)&&(y=!!n.leading,l=(g="maxWait"in n)?s(o(n.maxWait)||0,t):l,m="trailing"in n?!!n.trailing:m),C.cancel=function(){void 0!==d&&clearTimeout(d),p=0,u=h=c=d=void 0},C.flush=function(){return void 0===d?f:S(i())},C}},1316:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},30597:(e,t,n)=>{var r=n(22153);e.exports=function(e){return null!=e&&e.length?r(e,1):[]}},80089:(e,t,n)=>{var r=n(51845);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},47975:(e,t,n)=>{var r=n(56640),i=n(96919);e.exports=function(e,t){return null!=e&&i(e,t,r)}},41549:e=>{e.exports=function(e){return e}},67016:(e,t,n)=>{var r=n(64634),i=n(81653),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(e){return i(e)&&s.call(e,"callee")&&!a.call(e,"callee")};e.exports=u},93706:e=>{var t=Array.isArray;e.exports=t},51528:(e,t,n)=>{var r=n(39277),i=n(62008);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},77638:(e,t,n)=>{e=n.nmd(e);var r=n(158),i=n(30647),o=t&&!t.nodeType&&t,s=o&&e&&!e.nodeType&&e,a=s&&s.exports===o?r.Buffer:void 0,u=(a?a.isBuffer:void 0)||i;e.exports=u},47184:(e,t,n)=>{var r=n(95372);e.exports=function(e,t){return r(e,t)}},65162:(e,t,n)=>{var r=n(95372);e.exports=function(e,t,n){var i=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===i?r(e,t,void 0,n):!!i}},39277:(e,t,n)=>{var r=n(20194),i=n(23619);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},62008:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},55948:(e,t,n)=>{var r=n(2471),i=n(2723),o=n(41771),s=o&&o.isMap,a=s?i(s):r;e.exports=a},23619:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},81653:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},78255:(e,t,n)=>{var r=n(42388),i=n(2723),o=n(41771),s=o&&o.isSet,a=s?i(s):r;e.exports=a},81878:(e,t,n)=>{var r=n(20194),i=n(81653);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},70094:(e,t,n)=>{var r=n(88595),i=n(2723),o=n(41771),s=o&&o.isTypedArray,a=s?i(s):r;e.exports=a},23150:(e,t,n)=>{var r=n(92554),i=n(76324),o=n(51528);e.exports=function(e){return o(e)?r(e):i(e)}},61530:(e,t,n)=>{var r=n(92554),i=n(21506),o=n(51528);e.exports=function(e){return o(e)?r(e,!0):i(e)}},53059:function(e,t,n){var r;e=n.nmd(e),function(){var i,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",u=32,c=128,l=1/0,f=9007199254740991,d=NaN,h=4294967295,p=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],y="[object Arguments]",g="[object Array]",m="[object Boolean]",v="[object Date]",w="[object Error]",_="[object Function]",b="[object GeneratorFunction]",S="[object Map]",C="[object Number]",E="[object Object]",I="[object Promise]",O="[object RegExp]",A="[object Set]",T="[object String]",L="[object Symbol]",R="[object WeakMap]",k="[object ArrayBuffer]",N="[object DataView]",M="[object Float32Array]",P="[object Float64Array]",D="[object Int8Array]",W="[object Int16Array]",x="[object Int32Array]",j="[object Uint8Array]",F="[object Uint8ClampedArray]",B="[object Uint16Array]",z="[object Uint32Array]",$=/\b__p \+= '';/g,q=/\b(__p \+=) '' \+/g,U=/(__e\(.*?\)|\b__t\)) \+\n'';/g,H=/&(?:amp|lt|gt|quot|#39);/g,V=/[&<>"']/g,G=RegExp(H.source),Y=RegExp(V.source),K=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,ie=/\s/,oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,se=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ce=/[()=,{}\[\]\/\s]/,le=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,de=/\w*$/,he=/^[-+]0x[0-9a-f]+$/i,pe=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,me=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,we=/($^)/,_e=/['\n\r\u2028\u2029\\]/g,be="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Se="a-z\\xdf-\\xf6\\xf8-\\xff",Ce="A-Z\\xc0-\\xd6\\xd8-\\xde",Ee="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ie="["+Ee+"]",Oe="["+be+"]",Ae="\\d+",Te="["+Se+"]",Le="[^\\ud800-\\udfff"+Ee+Ae+"\\u2700-\\u27bf"+Se+Ce+"]",Re="\\ud83c[\\udffb-\\udfff]",ke="[^\\ud800-\\udfff]",Ne="(?:\\ud83c[\\udde6-\\uddff]){2}",Me="[\\ud800-\\udbff][\\udc00-\\udfff]",Pe="["+Ce+"]",De="(?:"+Te+"|"+Le+")",We="(?:"+Pe+"|"+Le+")",xe="(?:['’](?:d|ll|m|re|s|t|ve))?",je="(?:['’](?:D|LL|M|RE|S|T|VE))?",Fe="(?:"+Oe+"|"+Re+")?",Be="[\\ufe0e\\ufe0f]?",ze=Be+Fe+"(?:\\u200d(?:"+[ke,Ne,Me].join("|")+")"+Be+Fe+")*",$e="(?:"+["[\\u2700-\\u27bf]",Ne,Me].join("|")+")"+ze,qe="(?:"+[ke+Oe+"?",Oe,Ne,Me,"[\\ud800-\\udfff]"].join("|")+")",Ue=RegExp("['’]","g"),He=RegExp(Oe,"g"),Ve=RegExp(Re+"(?="+Re+")|"+qe+ze,"g"),Ge=RegExp([Pe+"?"+Te+"+"+xe+"(?="+[Ie,Pe,"$"].join("|")+")",We+"+"+je+"(?="+[Ie,Pe+De,"$"].join("|")+")",Pe+"?"+De+"+"+xe,Pe+"+"+je,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ae,$e].join("|"),"g"),Ye=RegExp("[\\u200d\\ud800-\\udfff"+be+"\\ufe0e\\ufe0f]"),Ke=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Je=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Qe=-1,Ze={};Ze[M]=Ze[P]=Ze[D]=Ze[W]=Ze[x]=Ze[j]=Ze[F]=Ze[B]=Ze[z]=!0,Ze[y]=Ze[g]=Ze[k]=Ze[m]=Ze[N]=Ze[v]=Ze[w]=Ze[_]=Ze[S]=Ze[C]=Ze[E]=Ze[O]=Ze[A]=Ze[T]=Ze[R]=!1;var Xe={};Xe[y]=Xe[g]=Xe[k]=Xe[N]=Xe[m]=Xe[v]=Xe[M]=Xe[P]=Xe[D]=Xe[W]=Xe[x]=Xe[S]=Xe[C]=Xe[E]=Xe[O]=Xe[A]=Xe[T]=Xe[L]=Xe[j]=Xe[F]=Xe[B]=Xe[z]=!0,Xe[w]=Xe[_]=Xe[R]=!1;var et={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tt=parseFloat,nt=parseInt,rt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,it="object"==typeof self&&self&&self.Object===Object&&self,ot=rt||it||Function("return this")(),st=t&&!t.nodeType&&t,at=st&&e&&!e.nodeType&&e,ut=at&&at.exports===st,ct=ut&&rt.process,lt=function(){try{return at&&at.require&&at.require("util").types||ct&&ct.binding&&ct.binding("util")}catch(e){}}(),ft=lt&&lt.isArrayBuffer,dt=lt&&lt.isDate,ht=lt&&lt.isMap,pt=lt&&lt.isRegExp,yt=lt&&lt.isSet,gt=lt&&lt.isTypedArray;function mt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function vt(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(r,s,n(s),e)}return r}function wt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function _t(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function bt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function St(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}function Ct(e,t){return!(null==e||!e.length)&&Mt(e,t,0)>-1}function Et(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function It(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Ot(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function At(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function Tt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function Lt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Rt=xt("length");function kt(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function Nt(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Mt(e,t,n){return t==t?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):Nt(e,Dt,n)}function Pt(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function Dt(e){return e!=e}function Wt(e,t){var n=null==e?0:e.length;return n?Bt(e,t)/n:d}function xt(e){return function(t){return null==t?i:t[e]}}function jt(e){return function(t){return null==e?i:e[t]}}function Ft(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function Bt(e,t){for(var n,r=-1,o=e.length;++r<o;){var s=t(e[r]);s!==i&&(n=n===i?s:n+s)}return n}function zt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function $t(e){return e?e.slice(0,an(e)+1).replace(re,""):e}function qt(e){return function(t){return e(t)}}function Ut(e,t){return It(t,(function(t){return e[t]}))}function Ht(e,t){return e.has(t)}function Vt(e,t){for(var n=-1,r=e.length;++n<r&&Mt(t,e[n],0)>-1;);return n}function Gt(e,t){for(var n=e.length;n--&&Mt(t,e[n],0)>-1;);return n}function Yt(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Kt=jt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Jt=jt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function Qt(e){return"\\"+et[e]}function Zt(e){return Ye.test(e)}function Xt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function en(e,t){return function(n){return e(t(n))}}function tn(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n];s!==t&&s!==a||(e[n]=a,o[i++]=n)}return o}function nn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function rn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function on(e){return Zt(e)?function(e){for(var t=Ve.lastIndex=0;Ve.test(e);)++t;return t}(e):Rt(e)}function sn(e){return Zt(e)?function(e){return e.match(Ve)||[]}(e):function(e){return e.split("")}(e)}function an(e){for(var t=e.length;t--&&ie.test(e.charAt(t)););return t}var un=jt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),cn=function e(t){var n,r=(t=null==t?ot:cn.defaults(ot.Object(),t,cn.pick(ot,Je))).Array,ie=t.Date,be=t.Error,Se=t.Function,Ce=t.Math,Ee=t.Object,Ie=t.RegExp,Oe=t.String,Ae=t.TypeError,Te=r.prototype,Le=Se.prototype,Re=Ee.prototype,ke=t["__core-js_shared__"],Ne=Le.toString,Me=Re.hasOwnProperty,Pe=0,De=(n=/[^.]+$/.exec(ke&&ke.keys&&ke.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",We=Re.toString,xe=Ne.call(Ee),je=ot._,Fe=Ie("^"+Ne.call(Me).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Be=ut?t.Buffer:i,ze=t.Symbol,$e=t.Uint8Array,qe=Be?Be.allocUnsafe:i,Ve=en(Ee.getPrototypeOf,Ee),Ye=Ee.create,et=Re.propertyIsEnumerable,rt=Te.splice,it=ze?ze.isConcatSpreadable:i,st=ze?ze.iterator:i,at=ze?ze.toStringTag:i,ct=function(){try{var e=co(Ee,"defineProperty");return e({},"",{}),e}catch(e){}}(),lt=t.clearTimeout!==ot.clearTimeout&&t.clearTimeout,Rt=ie&&ie.now!==ot.Date.now&&ie.now,jt=t.setTimeout!==ot.setTimeout&&t.setTimeout,ln=Ce.ceil,fn=Ce.floor,dn=Ee.getOwnPropertySymbols,hn=Be?Be.isBuffer:i,pn=t.isFinite,yn=Te.join,gn=en(Ee.keys,Ee),mn=Ce.max,vn=Ce.min,wn=ie.now,_n=t.parseInt,bn=Ce.random,Sn=Te.reverse,Cn=co(t,"DataView"),En=co(t,"Map"),In=co(t,"Promise"),On=co(t,"Set"),An=co(t,"WeakMap"),Tn=co(Ee,"create"),Ln=An&&new An,Rn={},kn=Fo(Cn),Nn=Fo(En),Mn=Fo(In),Pn=Fo(On),Dn=Fo(An),Wn=ze?ze.prototype:i,xn=Wn?Wn.valueOf:i,jn=Wn?Wn.toString:i;function Fn(e){if(na(e)&&!Hs(e)&&!(e instanceof qn)){if(e instanceof $n)return e;if(Me.call(e,"__wrapped__"))return Bo(e)}return new $n(e)}var Bn=function(){function e(){}return function(t){if(!ta(t))return{};if(Ye)return Ye(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function zn(){}function $n(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function qn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function Un(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Hn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Vn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Vn;++t<n;)this.add(e[t])}function Yn(e){var t=this.__data__=new Hn(e);this.size=t.size}function Kn(e,t){var n=Hs(e),r=!n&&Us(e),i=!n&&!r&&Ks(e),o=!n&&!r&&!i&&la(e),s=n||r||i||o,a=s?zt(e.length,Oe):[],u=a.length;for(var c in e)!t&&!Me.call(e,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||mo(c,u))||a.push(c);return a}function Jn(e){var t=e.length;return t?e[Vr(0,t-1)]:i}function Qn(e,t){return Po(Ai(e),sr(t,0,e.length))}function Zn(e){return Po(Ai(e))}function Xn(e,t,n){(n!==i&&!zs(e[t],n)||n===i&&!(t in e))&&ir(e,t,n)}function er(e,t,n){var r=e[t];Me.call(e,t)&&zs(r,n)&&(n!==i||t in e)||ir(e,t,n)}function tr(e,t){for(var n=e.length;n--;)if(zs(e[n][0],t))return n;return-1}function nr(e,t,n,r){return fr(e,(function(e,i,o){t(r,e,n(e),o)})),r}function rr(e,t){return e&&Ti(t,Na(t),e)}function ir(e,t,n){"__proto__"==t&&ct?ct(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function or(e,t){for(var n=-1,o=t.length,s=r(o),a=null==e;++n<o;)s[n]=a?i:Aa(e,t[n]);return s}function sr(e,t,n){return e==e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function ar(e,t,n,r,o,s){var a,u=1&t,c=2&t,l=4&t;if(n&&(a=o?n(e,r,o,s):n(e)),a!==i)return a;if(!ta(e))return e;var f=Hs(e);if(f){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Me.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!u)return Ai(e,a)}else{var d=ho(e),h=d==_||d==b;if(Ks(e))return bi(e,u);if(d==E||d==y||h&&!o){if(a=c||h?{}:yo(e),!u)return c?function(e,t){return Ti(e,fo(e),t)}(e,function(e,t){return e&&Ti(t,Ma(t),e)}(a,e)):function(e,t){return Ti(e,lo(e),t)}(e,rr(a,e))}else{if(!Xe[d])return o?e:{};a=function(e,t,n){var r,i=e.constructor;switch(t){case k:return Si(e);case m:case v:return new i(+e);case N:return function(e,t){var n=t?Si(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case M:case P:case D:case W:case x:case j:case F:case B:case z:return Ci(e,n);case S:return new i;case C:case T:return new i(e);case O:return function(e){var t=new e.constructor(e.source,de.exec(e));return t.lastIndex=e.lastIndex,t}(e);case A:return new i;case L:return r=e,xn?Ee(xn.call(r)):{}}}(e,d,u)}}s||(s=new Yn);var p=s.get(e);if(p)return p;s.set(e,a),aa(e)?e.forEach((function(r){a.add(ar(r,t,n,r,e,s))})):ra(e)&&e.forEach((function(r,i){a.set(i,ar(r,t,n,i,e,s))}));var g=f?i:(l?c?no:to:c?Ma:Na)(e);return wt(g||e,(function(r,i){g&&(r=e[i=r]),er(a,i,ar(r,t,n,i,e,s))})),a}function ur(e,t,n){var r=n.length;if(null==e)return!r;for(e=Ee(e);r--;){var o=n[r],s=t[o],a=e[o];if(a===i&&!(o in e)||!s(a))return!1}return!0}function cr(e,t,n){if("function"!=typeof e)throw new Ae(o);return Ro((function(){e.apply(i,n)}),t)}function lr(e,t,n,r){var i=-1,o=Ct,s=!0,a=e.length,u=[],c=t.length;if(!a)return u;n&&(t=It(t,qt(n))),r?(o=Et,s=!1):t.length>=200&&(o=Ht,s=!1,t=new Gn(t));e:for(;++i<a;){var l=e[i],f=null==n?l:n(l);if(l=r||0!==l?l:0,s&&f==f){for(var d=c;d--;)if(t[d]===f)continue e;u.push(l)}else o(t,f,r)||u.push(l)}return u}Fn.templateSettings={escape:K,evaluate:J,interpolate:Q,variable:"",imports:{_:Fn}},Fn.prototype=zn.prototype,Fn.prototype.constructor=Fn,$n.prototype=Bn(zn.prototype),$n.prototype.constructor=$n,qn.prototype=Bn(zn.prototype),qn.prototype.constructor=qn,Un.prototype.clear=function(){this.__data__=Tn?Tn(null):{},this.size=0},Un.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Un.prototype.get=function(e){var t=this.__data__;if(Tn){var n=t[e];return n===s?i:n}return Me.call(t,e)?t[e]:i},Un.prototype.has=function(e){var t=this.__data__;return Tn?t[e]!==i:Me.call(t,e)},Un.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Tn&&t===i?s:t,this},Hn.prototype.clear=function(){this.__data__=[],this.size=0},Hn.prototype.delete=function(e){var t=this.__data__,n=tr(t,e);return!(n<0||(n==t.length-1?t.pop():rt.call(t,n,1),--this.size,0))},Hn.prototype.get=function(e){var t=this.__data__,n=tr(t,e);return n<0?i:t[n][1]},Hn.prototype.has=function(e){return tr(this.__data__,e)>-1},Hn.prototype.set=function(e,t){var n=this.__data__,r=tr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Vn.prototype.clear=function(){this.size=0,this.__data__={hash:new Un,map:new(En||Hn),string:new Un}},Vn.prototype.delete=function(e){var t=ao(this,e).delete(e);return this.size-=t?1:0,t},Vn.prototype.get=function(e){return ao(this,e).get(e)},Vn.prototype.has=function(e){return ao(this,e).has(e)},Vn.prototype.set=function(e,t){var n=ao(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Gn.prototype.add=Gn.prototype.push=function(e){return this.__data__.set(e,s),this},Gn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.clear=function(){this.__data__=new Hn,this.size=0},Yn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Yn.prototype.get=function(e){return this.__data__.get(e)},Yn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Hn){var r=n.__data__;if(!En||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Vn(r)}return n.set(e,t),this.size=n.size,this};var fr=ki(wr),dr=ki(_r,!0);function hr(e,t){var n=!0;return fr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function pr(e,t,n){for(var r=-1,o=e.length;++r<o;){var s=e[r],a=t(s);if(null!=a&&(u===i?a==a&&!ca(a):n(a,u)))var u=a,c=s}return c}function yr(e,t){var n=[];return fr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function gr(e,t,n,r,i){var o=-1,s=e.length;for(n||(n=go),i||(i=[]);++o<s;){var a=e[o];t>0&&n(a)?t>1?gr(a,t-1,n,r,i):Ot(i,a):r||(i[i.length]=a)}return i}var mr=Ni(),vr=Ni(!0);function wr(e,t){return e&&mr(e,t,Na)}function _r(e,t){return e&&vr(e,t,Na)}function br(e,t){return St(t,(function(t){return Zs(e[t])}))}function Sr(e,t){for(var n=0,r=(t=mi(t,e)).length;null!=e&&n<r;)e=e[jo(t[n++])];return n&&n==r?e:i}function Cr(e,t,n){var r=t(e);return Hs(e)?r:Ot(r,n(e))}function Er(e){return null==e?e===i?"[object Undefined]":"[object Null]":at&&at in Ee(e)?function(e){var t=Me.call(e,at),n=e[at];try{e[at]=i;var r=!0}catch(e){}var o=We.call(e);return r&&(t?e[at]=n:delete e[at]),o}(e):function(e){return We.call(e)}(e)}function Ir(e,t){return e>t}function Or(e,t){return null!=e&&Me.call(e,t)}function Ar(e,t){return null!=e&&t in Ee(e)}function Tr(e,t,n){for(var o=n?Et:Ct,s=e[0].length,a=e.length,u=a,c=r(a),l=1/0,f=[];u--;){var d=e[u];u&&t&&(d=It(d,qt(t))),l=vn(d.length,l),c[u]=!n&&(t||s>=120&&d.length>=120)?new Gn(u&&d):i}d=e[0];var h=-1,p=c[0];e:for(;++h<s&&f.length<l;){var y=d[h],g=t?t(y):y;if(y=n||0!==y?y:0,!(p?Ht(p,g):o(f,g,n))){for(u=a;--u;){var m=c[u];if(!(m?Ht(m,g):o(e[u],g,n)))continue e}p&&p.push(g),f.push(y)}}return f}function Lr(e,t,n){var r=null==(e=Oo(e,t=mi(t,e)))?e:e[jo(Qo(t))];return null==r?i:mt(r,e,n)}function Rr(e){return na(e)&&Er(e)==y}function kr(e,t,n,r,o){return e===t||(null==e||null==t||!na(e)&&!na(t)?e!=e&&t!=t:function(e,t,n,r,o,s){var a=Hs(e),u=Hs(t),c=a?g:ho(e),l=u?g:ho(t),f=(c=c==y?E:c)==E,d=(l=l==y?E:l)==E,h=c==l;if(h&&Ks(e)){if(!Ks(t))return!1;a=!0,f=!1}if(h&&!f)return s||(s=new Yn),a||la(e)?Xi(e,t,n,r,o,s):function(e,t,n,r,i,o,s){switch(n){case N:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case k:return!(e.byteLength!=t.byteLength||!o(new $e(e),new $e(t)));case m:case v:case C:return zs(+e,+t);case w:return e.name==t.name&&e.message==t.message;case O:case T:return e==t+"";case S:var a=Xt;case A:var u=1&r;if(a||(a=nn),e.size!=t.size&&!u)return!1;var c=s.get(e);if(c)return c==t;r|=2,s.set(e,t);var l=Xi(a(e),a(t),r,i,o,s);return s.delete(e),l;case L:if(xn)return xn.call(e)==xn.call(t)}return!1}(e,t,c,n,r,o,s);if(!(1&n)){var p=f&&Me.call(e,"__wrapped__"),_=d&&Me.call(t,"__wrapped__");if(p||_){var b=p?e.value():e,I=_?t.value():t;return s||(s=new Yn),o(b,I,n,r,s)}}return!!h&&(s||(s=new Yn),function(e,t,n,r,o,s){var a=1&n,u=to(e),c=u.length;if(c!=to(t).length&&!a)return!1;for(var l=c;l--;){var f=u[l];if(!(a?f in t:Me.call(t,f)))return!1}var d=s.get(e),h=s.get(t);if(d&&h)return d==t&&h==e;var p=!0;s.set(e,t),s.set(t,e);for(var y=a;++l<c;){var g=e[f=u[l]],m=t[f];if(r)var v=a?r(m,g,f,t,e,s):r(g,m,f,e,t,s);if(!(v===i?g===m||o(g,m,n,r,s):v)){p=!1;break}y||(y="constructor"==f)}if(p&&!y){var w=e.constructor,_=t.constructor;w==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof _&&_ instanceof _||(p=!1)}return s.delete(e),s.delete(t),p}(e,t,n,r,o,s))}(e,t,n,r,kr,o))}function Nr(e,t,n,r){var o=n.length,s=o,a=!r;if(null==e)return!s;for(e=Ee(e);o--;){var u=n[o];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<s;){var c=(u=n[o])[0],l=e[c],f=u[1];if(a&&u[2]){if(l===i&&!(c in e))return!1}else{var d=new Yn;if(r)var h=r(l,f,c,e,t,d);if(!(h===i?kr(f,l,3,r,d):h))return!1}}return!0}function Mr(e){return!(!ta(e)||(t=e,De&&De in t))&&(Zs(e)?Fe:ye).test(Fo(e));var t}function Pr(e){return"function"==typeof e?e:null==e?iu:"object"==typeof e?Hs(e)?Fr(e[0],e[1]):jr(e):hu(e)}function Dr(e){if(!So(e))return gn(e);var t=[];for(var n in Ee(e))Me.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Wr(e,t){return e<t}function xr(e,t){var n=-1,i=Gs(e)?r(e.length):[];return fr(e,(function(e,r,o){i[++n]=t(e,r,o)})),i}function jr(e){var t=uo(e);return 1==t.length&&t[0][2]?Eo(t[0][0],t[0][1]):function(n){return n===e||Nr(n,e,t)}}function Fr(e,t){return wo(e)&&Co(t)?Eo(jo(e),t):function(n){var r=Aa(n,e);return r===i&&r===t?Ta(n,e):kr(t,r,3)}}function Br(e,t,n,r,o){e!==t&&mr(t,(function(s,a){if(o||(o=new Yn),ta(s))!function(e,t,n,r,o,s,a){var u=To(e,n),c=To(t,n),l=a.get(c);if(l)Xn(e,n,l);else{var f=s?s(u,c,n+"",e,t,a):i,d=f===i;if(d){var h=Hs(c),p=!h&&Ks(c),y=!h&&!p&&la(c);f=c,h||p||y?Hs(u)?f=u:Ys(u)?f=Ai(u):p?(d=!1,f=bi(c,!0)):y?(d=!1,f=Ci(c,!0)):f=[]:oa(c)||Us(c)?(f=u,Us(u)?f=va(u):ta(u)&&!Zs(u)||(f=yo(c))):d=!1}d&&(a.set(c,f),o(f,c,r,s,a),a.delete(c)),Xn(e,n,f)}}(e,t,a,n,Br,r,o);else{var u=r?r(To(e,a),s,a+"",e,t,o):i;u===i&&(u=s),Xn(e,a,u)}}),Ma)}function zr(e,t){var n=e.length;if(n)return mo(t+=t<0?n:0,n)?e[t]:i}function $r(e,t,n){t=t.length?It(t,(function(e){return Hs(e)?function(t){return Sr(t,1===e.length?e[0]:e)}:e})):[iu];var r=-1;return t=It(t,qt(so())),function(e,t){var r=e.length;for(e.sort((function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,s=i.length,a=n.length;++r<s;){var u=Ei(i[r],o[r]);if(u)return r>=a?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}));r--;)e[r]=e[r].value;return e}(xr(e,(function(e,n,i){return{criteria:It(t,(function(t){return t(e)})),index:++r,value:e}})))}function qr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var s=t[r],a=Sr(e,s);n(a,s)&&Qr(o,mi(s,e),a)}return o}function Ur(e,t,n,r){var i=r?Pt:Mt,o=-1,s=t.length,a=e;for(e===t&&(t=Ai(t)),n&&(a=It(e,qt(n)));++o<s;)for(var u=0,c=t[o],l=n?n(c):c;(u=i(a,l,u,r))>-1;)a!==e&&rt.call(a,u,1),rt.call(e,u,1);return e}function Hr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;mo(i)?rt.call(e,i,1):ci(e,i)}}return e}function Vr(e,t){return e+fn(bn()*(t-e+1))}function Gr(e,t){var n="";if(!e||t<1||t>f)return n;do{t%2&&(n+=e),(t=fn(t/2))&&(e+=e)}while(t);return n}function Yr(e,t){return ko(Io(e,t,iu),e+"")}function Kr(e){return Jn(za(e))}function Jr(e,t){var n=za(e);return Po(n,sr(t,0,n.length))}function Qr(e,t,n,r){if(!ta(e))return e;for(var o=-1,s=(t=mi(t,e)).length,a=s-1,u=e;null!=u&&++o<s;){var c=jo(t[o]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=a){var f=u[c];(l=r?r(f,c,u):i)===i&&(l=ta(f)?f:mo(t[o+1])?[]:{})}er(u,c,l),u=u[c]}return e}var Zr=Ln?function(e,t){return Ln.set(e,t),e}:iu,Xr=ct?function(e,t){return ct(e,"toString",{configurable:!0,enumerable:!1,value:tu(t),writable:!0})}:iu;function ei(e){return Po(za(e))}function ti(e,t,n){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var s=r(o);++i<o;)s[i]=e[i+t];return s}function ni(e,t){var n;return fr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function ri(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,s=e[o];null!==s&&!ca(s)&&(n?s<=t:s<t)?r=o+1:i=o}return i}return ii(e,t,iu,n)}function ii(e,t,n,r){var o=0,s=null==e?0:e.length;if(0===s)return 0;for(var a=(t=n(t))!=t,u=null===t,c=ca(t),l=t===i;o<s;){var f=fn((o+s)/2),d=n(e[f]),h=d!==i,p=null===d,y=d==d,g=ca(d);if(a)var m=r||y;else m=l?y&&(r||h):u?y&&h&&(r||!p):c?y&&h&&!p&&(r||!g):!p&&!g&&(r?d<=t:d<t);m?o=f+1:s=f}return vn(s,4294967294)}function oi(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n],a=t?t(s):s;if(!n||!zs(a,u)){var u=a;o[i++]=0===s?0:s}}return o}function si(e){return"number"==typeof e?e:ca(e)?d:+e}function ai(e){if("string"==typeof e)return e;if(Hs(e))return It(e,ai)+"";if(ca(e))return jn?jn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ui(e,t,n){var r=-1,i=Ct,o=e.length,s=!0,a=[],u=a;if(n)s=!1,i=Et;else if(o>=200){var c=t?null:Gi(e);if(c)return nn(c);s=!1,i=Ht,u=new Gn}else u=t?[]:a;e:for(;++r<o;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,s&&f==f){for(var d=u.length;d--;)if(u[d]===f)continue e;t&&u.push(f),a.push(l)}else i(u,f,n)||(u!==a&&u.push(f),a.push(l))}return a}function ci(e,t){return null==(e=Oo(e,t=mi(t,e)))||delete e[jo(Qo(t))]}function li(e,t,n,r){return Qr(e,t,n(Sr(e,t)),r)}function fi(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ti(e,r?0:o,r?o+1:i):ti(e,r?o+1:0,r?i:o)}function di(e,t){var n=e;return n instanceof qn&&(n=n.value()),At(t,(function(e,t){return t.func.apply(t.thisArg,Ot([e],t.args))}),n)}function hi(e,t,n){var i=e.length;if(i<2)return i?ui(e[0]):[];for(var o=-1,s=r(i);++o<i;)for(var a=e[o],u=-1;++u<i;)u!=o&&(s[o]=lr(s[o]||a,e[u],t,n));return ui(gr(s,1),t,n)}function pi(e,t,n){for(var r=-1,o=e.length,s=t.length,a={};++r<o;){var u=r<s?t[r]:i;n(a,e[r],u)}return a}function yi(e){return Ys(e)?e:[]}function gi(e){return"function"==typeof e?e:iu}function mi(e,t){return Hs(e)?e:wo(e,t)?[e]:xo(wa(e))}var vi=Yr;function wi(e,t,n){var r=e.length;return n=n===i?r:n,!t&&n>=r?e:ti(e,t,n)}var _i=lt||function(e){return ot.clearTimeout(e)};function bi(e,t){if(t)return e.slice();var n=e.length,r=qe?qe(n):new e.constructor(n);return e.copy(r),r}function Si(e){var t=new e.constructor(e.byteLength);return new $e(t).set(new $e(e)),t}function Ci(e,t){var n=t?Si(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ei(e,t){if(e!==t){var n=e!==i,r=null===e,o=e==e,s=ca(e),a=t!==i,u=null===t,c=t==t,l=ca(t);if(!u&&!l&&!s&&e>t||s&&a&&c&&!u&&!l||r&&a&&c||!n&&c||!o)return 1;if(!r&&!s&&!l&&e<t||l&&n&&o&&!r&&!s||u&&n&&o||!a&&o||!c)return-1}return 0}function Ii(e,t,n,i){for(var o=-1,s=e.length,a=n.length,u=-1,c=t.length,l=mn(s-a,0),f=r(c+l),d=!i;++u<c;)f[u]=t[u];for(;++o<a;)(d||o<s)&&(f[n[o]]=e[o]);for(;l--;)f[u++]=e[o++];return f}function Oi(e,t,n,i){for(var o=-1,s=e.length,a=-1,u=n.length,c=-1,l=t.length,f=mn(s-u,0),d=r(f+l),h=!i;++o<f;)d[o]=e[o];for(var p=o;++c<l;)d[p+c]=t[c];for(;++a<u;)(h||o<s)&&(d[p+n[a]]=e[o++]);return d}function Ai(e,t){var n=-1,i=e.length;for(t||(t=r(i));++n<i;)t[n]=e[n];return t}function Ti(e,t,n,r){var o=!n;n||(n={});for(var s=-1,a=t.length;++s<a;){var u=t[s],c=r?r(n[u],e[u],u,n,e):i;c===i&&(c=e[u]),o?ir(n,u,c):er(n,u,c)}return n}function Li(e,t){return function(n,r){var i=Hs(n)?vt:nr,o=t?t():{};return i(n,e,so(r,2),o)}}function Ri(e){return Yr((function(t,n){var r=-1,o=n.length,s=o>1?n[o-1]:i,a=o>2?n[2]:i;for(s=e.length>3&&"function"==typeof s?(o--,s):i,a&&vo(n[0],n[1],a)&&(s=o<3?i:s,o=1),t=Ee(t);++r<o;){var u=n[r];u&&e(t,u,r,s)}return t}))}function ki(e,t){return function(n,r){if(null==n)return n;if(!Gs(n))return e(n,r);for(var i=n.length,o=t?i:-1,s=Ee(n);(t?o--:++o<i)&&!1!==r(s[o],o,s););return n}}function Ni(e){return function(t,n,r){for(var i=-1,o=Ee(t),s=r(t),a=s.length;a--;){var u=s[e?a:++i];if(!1===n(o[u],u,o))break}return t}}function Mi(e){return function(t){var n=Zt(t=wa(t))?sn(t):i,r=n?n[0]:t.charAt(0),o=n?wi(n,1).join(""):t.slice(1);return r[e]()+o}}function Pi(e){return function(t){return At(Za(Ua(t).replace(Ue,"")),e,"")}}function Di(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Bn(e.prototype),r=e.apply(n,t);return ta(r)?r:n}}function Wi(e){return function(t,n,r){var o=Ee(t);if(!Gs(t)){var s=so(n,3);t=Na(t),n=function(e){return s(o[e],e,o)}}var a=e(t,n,r);return a>-1?o[s?t[a]:a]:i}}function xi(e){return eo((function(t){var n=t.length,r=n,s=$n.prototype.thru;for(e&&t.reverse();r--;){var a=t[r];if("function"!=typeof a)throw new Ae(o);if(s&&!u&&"wrapper"==io(a))var u=new $n([],!0)}for(r=u?r:n;++r<n;){var c=io(a=t[r]),l="wrapper"==c?ro(a):i;u=l&&_o(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[io(l[0])].apply(u,l[3]):1==a.length&&_o(a)?u[c]():u.thru(a)}return function(){var e=arguments,r=e[0];if(u&&1==e.length&&Hs(r))return u.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++i<n;)o=t[i].call(this,o);return o}}))}function ji(e,t,n,o,s,a,u,l,f,d){var h=t&c,p=1&t,y=2&t,g=24&t,m=512&t,v=y?i:Di(e);return function i(){for(var c=arguments.length,w=r(c),_=c;_--;)w[_]=arguments[_];if(g)var b=oo(i),S=Yt(w,b);if(o&&(w=Ii(w,o,s,g)),a&&(w=Oi(w,a,u,g)),c-=S,g&&c<d){var C=tn(w,b);return Hi(e,t,ji,i.placeholder,n,w,C,l,f,d-c)}var E=p?n:this,I=y?E[e]:e;return c=w.length,l?w=Ao(w,l):m&&c>1&&w.reverse(),h&&f<c&&(w.length=f),this&&this!==ot&&this instanceof i&&(I=v||Di(I)),I.apply(E,w)}}function Fi(e,t){return function(n,r){return function(e,t,n,r){return wr(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r),{})}}function Bi(e,t){return function(n,r){var o;if(n===i&&r===i)return t;if(n!==i&&(o=n),r!==i){if(o===i)return r;"string"==typeof n||"string"==typeof r?(n=ai(n),r=ai(r)):(n=si(n),r=si(r)),o=e(n,r)}return o}}function zi(e){return eo((function(t){return t=It(t,qt(so())),Yr((function(n){var r=this;return e(t,(function(e){return mt(e,r,n)}))}))}))}function $i(e,t){var n=(t=t===i?" ":ai(t)).length;if(n<2)return n?Gr(t,e):t;var r=Gr(t,ln(e/on(t)));return Zt(t)?wi(sn(r),0,e).join(""):r.slice(0,e)}function qi(e){return function(t,n,o){return o&&"number"!=typeof o&&vo(t,n,o)&&(n=o=i),t=pa(t),n===i?(n=t,t=0):n=pa(n),function(e,t,n,i){for(var o=-1,s=mn(ln((t-e)/(n||1)),0),a=r(s);s--;)a[i?s:++o]=e,e+=n;return a}(t,n,o=o===i?t<n?1:-1:pa(o),e)}}function Ui(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ma(t),n=ma(n)),e(t,n)}}function Hi(e,t,n,r,o,s,a,c,l,f){var d=8&t;t|=d?u:64,4&(t&=~(d?64:u))||(t&=-4);var h=[e,t,o,d?s:i,d?a:i,d?i:s,d?i:a,c,l,f],p=n.apply(i,h);return _o(e)&&Lo(p,h),p.placeholder=r,No(p,e,t)}function Vi(e){var t=Ce[e];return function(e,n){if(e=ma(e),(n=null==n?0:vn(ya(n),292))&&pn(e)){var r=(wa(e)+"e").split("e");return+((r=(wa(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Gi=On&&1/nn(new On([,-0]))[1]==l?function(e){return new On(e)}:cu;function Yi(e){return function(t){var n=ho(t);return n==S?Xt(t):n==A?rn(t):function(e,t){return It(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Ki(e,t,n,s,l,f,d,h){var p=2&t;if(!p&&"function"!=typeof e)throw new Ae(o);var y=s?s.length:0;if(y||(t&=-97,s=l=i),d=d===i?d:mn(ya(d),0),h=h===i?h:ya(h),y-=l?l.length:0,64&t){var g=s,m=l;s=l=i}var v=p?i:ro(e),w=[e,t,n,s,l,g,m,f,d,h];if(v&&function(e,t){var n=e[1],r=t[1],i=n|r,o=i<131,s=r==c&&8==n||r==c&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!o&&!s)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var u=t[3];if(u){var l=e[3];e[3]=l?Ii(l,u,t[4]):u,e[4]=l?tn(e[3],a):t[4]}(u=t[5])&&(l=e[5],e[5]=l?Oi(l,u,t[6]):u,e[6]=l?tn(e[5],a):t[6]),(u=t[7])&&(e[7]=u),r&c&&(e[8]=null==e[8]?t[8]:vn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(w,v),e=w[0],t=w[1],n=w[2],s=w[3],l=w[4],!(h=w[9]=w[9]===i?p?0:e.length:mn(w[9]-y,0))&&24&t&&(t&=-25),t&&1!=t)_=8==t||16==t?function(e,t,n){var o=Di(e);return function s(){for(var a=arguments.length,u=r(a),c=a,l=oo(s);c--;)u[c]=arguments[c];var f=a<3&&u[0]!==l&&u[a-1]!==l?[]:tn(u,l);return(a-=f.length)<n?Hi(e,t,ji,s.placeholder,i,u,f,i,i,n-a):mt(this&&this!==ot&&this instanceof s?o:e,this,u)}}(e,t,h):t!=u&&33!=t||l.length?ji.apply(i,w):function(e,t,n,i){var o=1&t,s=Di(e);return function t(){for(var a=-1,u=arguments.length,c=-1,l=i.length,f=r(l+u),d=this&&this!==ot&&this instanceof t?s:e;++c<l;)f[c]=i[c];for(;u--;)f[c++]=arguments[++a];return mt(d,o?n:this,f)}}(e,t,n,s);else var _=function(e,t,n){var r=1&t,i=Di(e);return function t(){return(this&&this!==ot&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,n);return No((v?Zr:Lo)(_,w),e,t)}function Ji(e,t,n,r){return e===i||zs(e,Re[n])&&!Me.call(r,n)?t:e}function Qi(e,t,n,r,o,s){return ta(e)&&ta(t)&&(s.set(t,e),Br(e,t,i,Qi,s),s.delete(t)),e}function Zi(e){return oa(e)?i:e}function Xi(e,t,n,r,o,s){var a=1&n,u=e.length,c=t.length;if(u!=c&&!(a&&c>u))return!1;var l=s.get(e),f=s.get(t);if(l&&f)return l==t&&f==e;var d=-1,h=!0,p=2&n?new Gn:i;for(s.set(e,t),s.set(t,e);++d<u;){var y=e[d],g=t[d];if(r)var m=a?r(g,y,d,t,e,s):r(y,g,d,e,t,s);if(m!==i){if(m)continue;h=!1;break}if(p){if(!Lt(t,(function(e,t){if(!Ht(p,t)&&(y===e||o(y,e,n,r,s)))return p.push(t)}))){h=!1;break}}else if(y!==g&&!o(y,g,n,r,s)){h=!1;break}}return s.delete(e),s.delete(t),h}function eo(e){return ko(Io(e,i,Vo),e+"")}function to(e){return Cr(e,Na,lo)}function no(e){return Cr(e,Ma,fo)}var ro=Ln?function(e){return Ln.get(e)}:cu;function io(e){for(var t=e.name+"",n=Rn[t],r=Me.call(Rn,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function oo(e){return(Me.call(Fn,"placeholder")?Fn:e).placeholder}function so(){var e=Fn.iteratee||ou;return e=e===ou?Pr:e,arguments.length?e(arguments[0],arguments[1]):e}function ao(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function uo(e){for(var t=Na(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Co(i)]}return t}function co(e,t){var n=function(e,t){return null==e?i:e[t]}(e,t);return Mr(n)?n:i}var lo=dn?function(e){return null==e?[]:(e=Ee(e),St(dn(e),(function(t){return et.call(e,t)})))}:gu,fo=dn?function(e){for(var t=[];e;)Ot(t,lo(e)),e=Ve(e);return t}:gu,ho=Er;function po(e,t,n){for(var r=-1,i=(t=mi(t,e)).length,o=!1;++r<i;){var s=jo(t[r]);if(!(o=null!=e&&n(e,s)))break;e=e[s]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&ea(i)&&mo(s,i)&&(Hs(e)||Us(e))}function yo(e){return"function"!=typeof e.constructor||So(e)?{}:Bn(Ve(e))}function go(e){return Hs(e)||Us(e)||!!(it&&e&&e[it])}function mo(e,t){var n=typeof e;return!!(t=null==t?f:t)&&("number"==n||"symbol"!=n&&me.test(e))&&e>-1&&e%1==0&&e<t}function vo(e,t,n){if(!ta(n))return!1;var r=typeof t;return!!("number"==r?Gs(n)&&mo(t,n.length):"string"==r&&t in n)&&zs(n[t],e)}function wo(e,t){if(Hs(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ca(e))||X.test(e)||!Z.test(e)||null!=t&&e in Ee(t)}function _o(e){var t=io(e),n=Fn[t];if("function"!=typeof n||!(t in qn.prototype))return!1;if(e===n)return!0;var r=ro(n);return!!r&&e===r[0]}(Cn&&ho(new Cn(new ArrayBuffer(1)))!=N||En&&ho(new En)!=S||In&&ho(In.resolve())!=I||On&&ho(new On)!=A||An&&ho(new An)!=R)&&(ho=function(e){var t=Er(e),n=t==E?e.constructor:i,r=n?Fo(n):"";if(r)switch(r){case kn:return N;case Nn:return S;case Mn:return I;case Pn:return A;case Dn:return R}return t});var bo=ke?Zs:mu;function So(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Re)}function Co(e){return e==e&&!ta(e)}function Eo(e,t){return function(n){return null!=n&&n[e]===t&&(t!==i||e in Ee(n))}}function Io(e,t,n){return t=mn(t===i?e.length-1:t,0),function(){for(var i=arguments,o=-1,s=mn(i.length-t,0),a=r(s);++o<s;)a[o]=i[t+o];o=-1;for(var u=r(t+1);++o<t;)u[o]=i[o];return u[t]=n(a),mt(e,this,u)}}function Oo(e,t){return t.length<2?e:Sr(e,ti(t,0,-1))}function Ao(e,t){for(var n=e.length,r=vn(t.length,n),o=Ai(e);r--;){var s=t[r];e[r]=mo(s,n)?o[s]:i}return e}function To(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Lo=Mo(Zr),Ro=jt||function(e,t){return ot.setTimeout(e,t)},ko=Mo(Xr);function No(e,t,n){var r=t+"";return ko(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(oe,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return wt(p,(function(n){var r="_."+n[0];t&n[1]&&!Ct(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(se);return t?t[1].split(ae):[]}(r),n)))}function Mo(e){var t=0,n=0;return function(){var r=wn(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Po(e,t){var n=-1,r=e.length,o=r-1;for(t=t===i?r:t;++n<t;){var s=Vr(n,o),a=e[s];e[s]=e[n],e[n]=a}return e.length=t,e}var Do,Wo,xo=(Do=Ds((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,n,r,i){t.push(r?i.replace(le,"$1"):n||e)})),t}),(function(e){return 500===Wo.size&&Wo.clear(),e})),Wo=Do.cache,Do);function jo(e){if("string"==typeof e||ca(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Fo(e){if(null!=e){try{return Ne.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Bo(e){if(e instanceof qn)return e.clone();var t=new $n(e.__wrapped__,e.__chain__);return t.__actions__=Ai(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var zo=Yr((function(e,t){return Ys(e)?lr(e,gr(t,1,Ys,!0)):[]})),$o=Yr((function(e,t){var n=Qo(t);return Ys(n)&&(n=i),Ys(e)?lr(e,gr(t,1,Ys,!0),so(n,2)):[]})),qo=Yr((function(e,t){var n=Qo(t);return Ys(n)&&(n=i),Ys(e)?lr(e,gr(t,1,Ys,!0),i,n):[]}));function Uo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ya(n);return i<0&&(i=mn(r+i,0)),Nt(e,so(t,3),i)}function Ho(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return n!==i&&(o=ya(n),o=n<0?mn(r+o,0):vn(o,r-1)),Nt(e,so(t,3),o,!0)}function Vo(e){return null!=e&&e.length?gr(e,1):[]}function Go(e){return e&&e.length?e[0]:i}var Yo=Yr((function(e){var t=It(e,yi);return t.length&&t[0]===e[0]?Tr(t):[]})),Ko=Yr((function(e){var t=Qo(e),n=It(e,yi);return t===Qo(n)?t=i:n.pop(),n.length&&n[0]===e[0]?Tr(n,so(t,2)):[]})),Jo=Yr((function(e){var t=Qo(e),n=It(e,yi);return(t="function"==typeof t?t:i)&&n.pop(),n.length&&n[0]===e[0]?Tr(n,i,t):[]}));function Qo(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Zo=Yr(Xo);function Xo(e,t){return e&&e.length&&t&&t.length?Ur(e,t):e}var es=eo((function(e,t){var n=null==e?0:e.length,r=or(e,t);return Hr(e,It(t,(function(e){return mo(e,n)?+e:e})).sort(Ei)),r}));function ts(e){return null==e?e:Sn.call(e)}var ns=Yr((function(e){return ui(gr(e,1,Ys,!0))})),rs=Yr((function(e){var t=Qo(e);return Ys(t)&&(t=i),ui(gr(e,1,Ys,!0),so(t,2))})),is=Yr((function(e){var t=Qo(e);return t="function"==typeof t?t:i,ui(gr(e,1,Ys,!0),i,t)}));function os(e){if(!e||!e.length)return[];var t=0;return e=St(e,(function(e){if(Ys(e))return t=mn(e.length,t),!0})),zt(t,(function(t){return It(e,xt(t))}))}function ss(e,t){if(!e||!e.length)return[];var n=os(e);return null==t?n:It(n,(function(e){return mt(t,i,e)}))}var as=Yr((function(e,t){return Ys(e)?lr(e,t):[]})),us=Yr((function(e){return hi(St(e,Ys))})),cs=Yr((function(e){var t=Qo(e);return Ys(t)&&(t=i),hi(St(e,Ys),so(t,2))})),ls=Yr((function(e){var t=Qo(e);return t="function"==typeof t?t:i,hi(St(e,Ys),i,t)})),fs=Yr(os),ds=Yr((function(e){var t=e.length,n=t>1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,ss(e,n)}));function hs(e){var t=Fn(e);return t.__chain__=!0,t}function ps(e,t){return t(e)}var ys=eo((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return or(t,e)};return!(t>1||this.__actions__.length)&&r instanceof qn&&mo(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ps,args:[o],thisArg:i}),new $n(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)})),gs=Li((function(e,t,n){Me.call(e,n)?++e[n]:ir(e,n,1)})),ms=Wi(Uo),vs=Wi(Ho);function ws(e,t){return(Hs(e)?wt:fr)(e,so(t,3))}function _s(e,t){return(Hs(e)?_t:dr)(e,so(t,3))}var bs=Li((function(e,t,n){Me.call(e,n)?e[n].push(t):ir(e,n,[t])})),Ss=Yr((function(e,t,n){var i=-1,o="function"==typeof t,s=Gs(e)?r(e.length):[];return fr(e,(function(e){s[++i]=o?mt(t,e,n):Lr(e,t,n)})),s})),Cs=Li((function(e,t,n){ir(e,n,t)}));function Es(e,t){return(Hs(e)?It:xr)(e,so(t,3))}var Is=Li((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),Os=Yr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&vo(e,t[0],t[1])?t=[]:n>2&&vo(t[0],t[1],t[2])&&(t=[t[0]]),$r(e,gr(t,1),[])})),As=Rt||function(){return ot.Date.now()};function Ts(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Ki(e,c,i,i,i,i,t)}function Ls(e,t){var n;if("function"!=typeof t)throw new Ae(o);return e=ya(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Rs=Yr((function(e,t,n){var r=1;if(n.length){var i=tn(n,oo(Rs));r|=u}return Ki(e,r,t,n,i)})),ks=Yr((function(e,t,n){var r=3;if(n.length){var i=tn(n,oo(ks));r|=u}return Ki(t,r,e,n,i)}));function Ns(e,t,n){var r,s,a,u,c,l,f=0,d=!1,h=!1,p=!0;if("function"!=typeof e)throw new Ae(o);function y(t){var n=r,o=s;return r=s=i,f=t,u=e.apply(o,n)}function g(e){return f=e,c=Ro(v,t),d?y(e):u}function m(e){var n=e-l;return l===i||n>=t||n<0||h&&e-f>=a}function v(){var e=As();if(m(e))return w(e);c=Ro(v,function(e){var n=t-(e-l);return h?vn(n,a-(e-f)):n}(e))}function w(e){return c=i,p&&r?y(e):(r=s=i,u)}function _(){var e=As(),n=m(e);if(r=arguments,s=this,l=e,n){if(c===i)return g(l);if(h)return _i(c),c=Ro(v,t),y(l)}return c===i&&(c=Ro(v,t)),u}return t=ma(t)||0,ta(n)&&(d=!!n.leading,a=(h="maxWait"in n)?mn(ma(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p),_.cancel=function(){c!==i&&_i(c),f=0,r=l=s=c=i},_.flush=function(){return c===i?u:w(As())},_}var Ms=Yr((function(e,t){return cr(e,1,t)})),Ps=Yr((function(e,t,n){return cr(e,ma(t)||0,n)}));function Ds(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ae(o);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(Ds.Cache||Vn),n}function Ws(e){if("function"!=typeof e)throw new Ae(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ds.Cache=Vn;var xs=vi((function(e,t){var n=(t=1==t.length&&Hs(t[0])?It(t[0],qt(so())):It(gr(t,1),qt(so()))).length;return Yr((function(r){for(var i=-1,o=vn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return mt(e,this,r)}))})),js=Yr((function(e,t){var n=tn(t,oo(js));return Ki(e,u,i,t,n)})),Fs=Yr((function(e,t){var n=tn(t,oo(Fs));return Ki(e,64,i,t,n)})),Bs=eo((function(e,t){return Ki(e,256,i,i,i,t)}));function zs(e,t){return e===t||e!=e&&t!=t}var $s=Ui(Ir),qs=Ui((function(e,t){return e>=t})),Us=Rr(function(){return arguments}())?Rr:function(e){return na(e)&&Me.call(e,"callee")&&!et.call(e,"callee")},Hs=r.isArray,Vs=ft?qt(ft):function(e){return na(e)&&Er(e)==k};function Gs(e){return null!=e&&ea(e.length)&&!Zs(e)}function Ys(e){return na(e)&&Gs(e)}var Ks=hn||mu,Js=dt?qt(dt):function(e){return na(e)&&Er(e)==v};function Qs(e){if(!na(e))return!1;var t=Er(e);return t==w||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!oa(e)}function Zs(e){if(!ta(e))return!1;var t=Er(e);return t==_||t==b||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Xs(e){return"number"==typeof e&&e==ya(e)}function ea(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function ta(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function na(e){return null!=e&&"object"==typeof e}var ra=ht?qt(ht):function(e){return na(e)&&ho(e)==S};function ia(e){return"number"==typeof e||na(e)&&Er(e)==C}function oa(e){if(!na(e)||Er(e)!=E)return!1;var t=Ve(e);if(null===t)return!0;var n=Me.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Ne.call(n)==xe}var sa=pt?qt(pt):function(e){return na(e)&&Er(e)==O},aa=yt?qt(yt):function(e){return na(e)&&ho(e)==A};function ua(e){return"string"==typeof e||!Hs(e)&&na(e)&&Er(e)==T}function ca(e){return"symbol"==typeof e||na(e)&&Er(e)==L}var la=gt?qt(gt):function(e){return na(e)&&ea(e.length)&&!!Ze[Er(e)]},fa=Ui(Wr),da=Ui((function(e,t){return e<=t}));function ha(e){if(!e)return[];if(Gs(e))return ua(e)?sn(e):Ai(e);if(st&&e[st])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[st]());var t=ho(e);return(t==S?Xt:t==A?nn:za)(e)}function pa(e){return e?(e=ma(e))===l||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ya(e){var t=pa(e),n=t%1;return t==t?n?t-n:t:0}function ga(e){return e?sr(ya(e),0,h):0}function ma(e){if("number"==typeof e)return e;if(ca(e))return d;if(ta(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ta(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=$t(e);var n=pe.test(e);return n||ge.test(e)?nt(e.slice(2),n?2:8):he.test(e)?d:+e}function va(e){return Ti(e,Ma(e))}function wa(e){return null==e?"":ai(e)}var _a=Ri((function(e,t){if(So(t)||Gs(t))Ti(t,Na(t),e);else for(var n in t)Me.call(t,n)&&er(e,n,t[n])})),ba=Ri((function(e,t){Ti(t,Ma(t),e)})),Sa=Ri((function(e,t,n,r){Ti(t,Ma(t),e,r)})),Ca=Ri((function(e,t,n,r){Ti(t,Na(t),e,r)})),Ea=eo(or),Ia=Yr((function(e,t){e=Ee(e);var n=-1,r=t.length,o=r>2?t[2]:i;for(o&&vo(t[0],t[1],o)&&(r=1);++n<r;)for(var s=t[n],a=Ma(s),u=-1,c=a.length;++u<c;){var l=a[u],f=e[l];(f===i||zs(f,Re[l])&&!Me.call(e,l))&&(e[l]=s[l])}return e})),Oa=Yr((function(e){return e.push(i,Qi),mt(Da,i,e)}));function Aa(e,t,n){var r=null==e?i:Sr(e,t);return r===i?n:r}function Ta(e,t){return null!=e&&po(e,t,Ar)}var La=Fi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=We.call(t)),e[t]=n}),tu(iu)),Ra=Fi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=We.call(t)),Me.call(e,t)?e[t].push(n):e[t]=[n]}),so),ka=Yr(Lr);function Na(e){return Gs(e)?Kn(e):Dr(e)}function Ma(e){return Gs(e)?Kn(e,!0):function(e){if(!ta(e))return function(e){var t=[];if(null!=e)for(var n in Ee(e))t.push(n);return t}(e);var t=So(e),n=[];for(var r in e)("constructor"!=r||!t&&Me.call(e,r))&&n.push(r);return n}(e)}var Pa=Ri((function(e,t,n){Br(e,t,n)})),Da=Ri((function(e,t,n,r){Br(e,t,n,r)})),Wa=eo((function(e,t){var n={};if(null==e)return n;var r=!1;t=It(t,(function(t){return t=mi(t,e),r||(r=t.length>1),t})),Ti(e,no(e),n),r&&(n=ar(n,7,Zi));for(var i=t.length;i--;)ci(n,t[i]);return n})),xa=eo((function(e,t){return null==e?{}:function(e,t){return qr(e,t,(function(t,n){return Ta(e,n)}))}(e,t)}));function ja(e,t){if(null==e)return{};var n=It(no(e),(function(e){return[e]}));return t=so(t),qr(e,n,(function(e,n){return t(e,n[0])}))}var Fa=Yi(Na),Ba=Yi(Ma);function za(e){return null==e?[]:Ut(e,Na(e))}var $a=Pi((function(e,t,n){return t=t.toLowerCase(),e+(n?qa(t):t)}));function qa(e){return Qa(wa(e).toLowerCase())}function Ua(e){return(e=wa(e))&&e.replace(ve,Kt).replace(He,"")}var Ha=Pi((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Va=Pi((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Ga=Mi("toLowerCase"),Ya=Pi((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Ka=Pi((function(e,t,n){return e+(n?" ":"")+Qa(t)})),Ja=Pi((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Qa=Mi("toUpperCase");function Za(e,t,n){return e=wa(e),(t=n?i:t)===i?function(e){return Ke.test(e)}(e)?function(e){return e.match(Ge)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Xa=Yr((function(e,t){try{return mt(e,i,t)}catch(e){return Qs(e)?e:new be(e)}})),eu=eo((function(e,t){return wt(t,(function(t){t=jo(t),ir(e,t,Rs(e[t],e))})),e}));function tu(e){return function(){return e}}var nu=xi(),ru=xi(!0);function iu(e){return e}function ou(e){return Pr("function"==typeof e?e:ar(e,1))}var su=Yr((function(e,t){return function(n){return Lr(n,e,t)}})),au=Yr((function(e,t){return function(n){return Lr(e,n,t)}}));function uu(e,t,n){var r=Na(t),i=br(t,r);null!=n||ta(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=br(t,Na(t)));var o=!(ta(n)&&"chain"in n&&!n.chain),s=Zs(e);return wt(i,(function(n){var r=t[n];e[n]=r,s&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),i=n.__actions__=Ai(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Ot([this.value()],arguments))})})),e}function cu(){}var lu=zi(It),fu=zi(bt),du=zi(Lt);function hu(e){return wo(e)?xt(jo(e)):function(e){return function(t){return Sr(t,e)}}(e)}var pu=qi(),yu=qi(!0);function gu(){return[]}function mu(){return!1}var vu,wu=Bi((function(e,t){return e+t}),0),_u=Vi("ceil"),bu=Bi((function(e,t){return e/t}),1),Su=Vi("floor"),Cu=Bi((function(e,t){return e*t}),1),Eu=Vi("round"),Iu=Bi((function(e,t){return e-t}),0);return Fn.after=function(e,t){if("function"!=typeof t)throw new Ae(o);return e=ya(e),function(){if(--e<1)return t.apply(this,arguments)}},Fn.ary=Ts,Fn.assign=_a,Fn.assignIn=ba,Fn.assignInWith=Sa,Fn.assignWith=Ca,Fn.at=Ea,Fn.before=Ls,Fn.bind=Rs,Fn.bindAll=eu,Fn.bindKey=ks,Fn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Hs(e)?e:[e]},Fn.chain=hs,Fn.chunk=function(e,t,n){t=(n?vo(e,t,n):t===i)?1:mn(ya(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var s=0,a=0,u=r(ln(o/t));s<o;)u[a++]=ti(e,s,s+=t);return u},Fn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},Fn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Ot(Hs(n)?Ai(n):[n],gr(t,1))},Fn.cond=function(e){var t=null==e?0:e.length,n=so();return e=t?It(e,(function(e){if("function"!=typeof e[1])throw new Ae(o);return[n(e[0]),e[1]]})):[],Yr((function(n){for(var r=-1;++r<t;){var i=e[r];if(mt(i[0],this,n))return mt(i[1],this,n)}}))},Fn.conforms=function(e){return function(e){var t=Na(e);return function(n){return ur(n,e,t)}}(ar(e,1))},Fn.constant=tu,Fn.countBy=gs,Fn.create=function(e,t){var n=Bn(e);return null==t?n:rr(n,t)},Fn.curry=function e(t,n,r){var o=Ki(t,8,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Fn.curryRight=function e(t,n,r){var o=Ki(t,16,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Fn.debounce=Ns,Fn.defaults=Ia,Fn.defaultsDeep=Oa,Fn.defer=Ms,Fn.delay=Ps,Fn.difference=zo,Fn.differenceBy=$o,Fn.differenceWith=qo,Fn.drop=function(e,t,n){var r=null==e?0:e.length;return r?ti(e,(t=n||t===i?1:ya(t))<0?0:t,r):[]},Fn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?ti(e,0,(t=r-(t=n||t===i?1:ya(t)))<0?0:t):[]},Fn.dropRightWhile=function(e,t){return e&&e.length?fi(e,so(t,3),!0,!0):[]},Fn.dropWhile=function(e,t){return e&&e.length?fi(e,so(t,3),!0):[]},Fn.fill=function(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&vo(e,t,n)&&(n=0,r=o),function(e,t,n,r){var o=e.length;for((n=ya(n))<0&&(n=-n>o?0:o+n),(r=r===i||r>o?o:ya(r))<0&&(r+=o),r=n>r?0:ga(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Fn.filter=function(e,t){return(Hs(e)?St:yr)(e,so(t,3))},Fn.flatMap=function(e,t){return gr(Es(e,t),1)},Fn.flatMapDeep=function(e,t){return gr(Es(e,t),l)},Fn.flatMapDepth=function(e,t,n){return n=n===i?1:ya(n),gr(Es(e,t),n)},Fn.flatten=Vo,Fn.flattenDeep=function(e){return null!=e&&e.length?gr(e,l):[]},Fn.flattenDepth=function(e,t){return null!=e&&e.length?gr(e,t=t===i?1:ya(t)):[]},Fn.flip=function(e){return Ki(e,512)},Fn.flow=nu,Fn.flowRight=ru,Fn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},Fn.functions=function(e){return null==e?[]:br(e,Na(e))},Fn.functionsIn=function(e){return null==e?[]:br(e,Ma(e))},Fn.groupBy=bs,Fn.initial=function(e){return null!=e&&e.length?ti(e,0,-1):[]},Fn.intersection=Yo,Fn.intersectionBy=Ko,Fn.intersectionWith=Jo,Fn.invert=La,Fn.invertBy=Ra,Fn.invokeMap=Ss,Fn.iteratee=ou,Fn.keyBy=Cs,Fn.keys=Na,Fn.keysIn=Ma,Fn.map=Es,Fn.mapKeys=function(e,t){var n={};return t=so(t,3),wr(e,(function(e,r,i){ir(n,t(e,r,i),e)})),n},Fn.mapValues=function(e,t){var n={};return t=so(t,3),wr(e,(function(e,r,i){ir(n,r,t(e,r,i))})),n},Fn.matches=function(e){return jr(ar(e,1))},Fn.matchesProperty=function(e,t){return Fr(e,ar(t,1))},Fn.memoize=Ds,Fn.merge=Pa,Fn.mergeWith=Da,Fn.method=su,Fn.methodOf=au,Fn.mixin=uu,Fn.negate=Ws,Fn.nthArg=function(e){return e=ya(e),Yr((function(t){return zr(t,e)}))},Fn.omit=Wa,Fn.omitBy=function(e,t){return ja(e,Ws(so(t)))},Fn.once=function(e){return Ls(2,e)},Fn.orderBy=function(e,t,n,r){return null==e?[]:(Hs(t)||(t=null==t?[]:[t]),Hs(n=r?i:n)||(n=null==n?[]:[n]),$r(e,t,n))},Fn.over=lu,Fn.overArgs=xs,Fn.overEvery=fu,Fn.overSome=du,Fn.partial=js,Fn.partialRight=Fs,Fn.partition=Is,Fn.pick=xa,Fn.pickBy=ja,Fn.property=hu,Fn.propertyOf=function(e){return function(t){return null==e?i:Sr(e,t)}},Fn.pull=Zo,Fn.pullAll=Xo,Fn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Ur(e,t,so(n,2)):e},Fn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Ur(e,t,i,n):e},Fn.pullAt=es,Fn.range=pu,Fn.rangeRight=yu,Fn.rearg=Bs,Fn.reject=function(e,t){return(Hs(e)?St:yr)(e,Ws(so(t,3)))},Fn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=so(t,3);++r<o;){var s=e[r];t(s,r,e)&&(n.push(s),i.push(r))}return Hr(e,i),n},Fn.rest=function(e,t){if("function"!=typeof e)throw new Ae(o);return Yr(e,t=t===i?t:ya(t))},Fn.reverse=ts,Fn.sampleSize=function(e,t,n){return t=(n?vo(e,t,n):t===i)?1:ya(t),(Hs(e)?Qn:Jr)(e,t)},Fn.set=function(e,t,n){return null==e?e:Qr(e,t,n)},Fn.setWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:Qr(e,t,n,r)},Fn.shuffle=function(e){return(Hs(e)?Zn:ei)(e)},Fn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&vo(e,t,n)?(t=0,n=r):(t=null==t?0:ya(t),n=n===i?r:ya(n)),ti(e,t,n)):[]},Fn.sortBy=Os,Fn.sortedUniq=function(e){return e&&e.length?oi(e):[]},Fn.sortedUniqBy=function(e,t){return e&&e.length?oi(e,so(t,2)):[]},Fn.split=function(e,t,n){return n&&"number"!=typeof n&&vo(e,t,n)&&(t=n=i),(n=n===i?h:n>>>0)?(e=wa(e))&&("string"==typeof t||null!=t&&!sa(t))&&!(t=ai(t))&&Zt(e)?wi(sn(e),0,n):e.split(t,n):[]},Fn.spread=function(e,t){if("function"!=typeof e)throw new Ae(o);return t=null==t?0:mn(ya(t),0),Yr((function(n){var r=n[t],i=wi(n,0,t);return r&&Ot(i,r),mt(e,this,i)}))},Fn.tail=function(e){var t=null==e?0:e.length;return t?ti(e,1,t):[]},Fn.take=function(e,t,n){return e&&e.length?ti(e,0,(t=n||t===i?1:ya(t))<0?0:t):[]},Fn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ti(e,(t=r-(t=n||t===i?1:ya(t)))<0?0:t,r):[]},Fn.takeRightWhile=function(e,t){return e&&e.length?fi(e,so(t,3),!1,!0):[]},Fn.takeWhile=function(e,t){return e&&e.length?fi(e,so(t,3)):[]},Fn.tap=function(e,t){return t(e),e},Fn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Ae(o);return ta(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ns(e,t,{leading:r,maxWait:t,trailing:i})},Fn.thru=ps,Fn.toArray=ha,Fn.toPairs=Fa,Fn.toPairsIn=Ba,Fn.toPath=function(e){return Hs(e)?It(e,jo):ca(e)?[e]:Ai(xo(wa(e)))},Fn.toPlainObject=va,Fn.transform=function(e,t,n){var r=Hs(e),i=r||Ks(e)||la(e);if(t=so(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:ta(e)&&Zs(o)?Bn(Ve(e)):{}}return(i?wt:wr)(e,(function(e,r,i){return t(n,e,r,i)})),n},Fn.unary=function(e){return Ts(e,1)},Fn.union=ns,Fn.unionBy=rs,Fn.unionWith=is,Fn.uniq=function(e){return e&&e.length?ui(e):[]},Fn.uniqBy=function(e,t){return e&&e.length?ui(e,so(t,2)):[]},Fn.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?ui(e,i,t):[]},Fn.unset=function(e,t){return null==e||ci(e,t)},Fn.unzip=os,Fn.unzipWith=ss,Fn.update=function(e,t,n){return null==e?e:li(e,t,gi(n))},Fn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:li(e,t,gi(n),r)},Fn.values=za,Fn.valuesIn=function(e){return null==e?[]:Ut(e,Ma(e))},Fn.without=as,Fn.words=Za,Fn.wrap=function(e,t){return js(gi(t),e)},Fn.xor=us,Fn.xorBy=cs,Fn.xorWith=ls,Fn.zip=fs,Fn.zipObject=function(e,t){return pi(e||[],t||[],er)},Fn.zipObjectDeep=function(e,t){return pi(e||[],t||[],Qr)},Fn.zipWith=ds,Fn.entries=Fa,Fn.entriesIn=Ba,Fn.extend=ba,Fn.extendWith=Sa,uu(Fn,Fn),Fn.add=wu,Fn.attempt=Xa,Fn.camelCase=$a,Fn.capitalize=qa,Fn.ceil=_u,Fn.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=ma(n))==n?n:0),t!==i&&(t=(t=ma(t))==t?t:0),sr(ma(e),t,n)},Fn.clone=function(e){return ar(e,4)},Fn.cloneDeep=function(e){return ar(e,5)},Fn.cloneDeepWith=function(e,t){return ar(e,5,t="function"==typeof t?t:i)},Fn.cloneWith=function(e,t){return ar(e,4,t="function"==typeof t?t:i)},Fn.conformsTo=function(e,t){return null==t||ur(e,t,Na(t))},Fn.deburr=Ua,Fn.defaultTo=function(e,t){return null==e||e!=e?t:e},Fn.divide=bu,Fn.endsWith=function(e,t,n){e=wa(e),t=ai(t);var r=e.length,o=n=n===i?r:sr(ya(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},Fn.eq=zs,Fn.escape=function(e){return(e=wa(e))&&Y.test(e)?e.replace(V,Jt):e},Fn.escapeRegExp=function(e){return(e=wa(e))&&ne.test(e)?e.replace(te,"\\$&"):e},Fn.every=function(e,t,n){var r=Hs(e)?bt:hr;return n&&vo(e,t,n)&&(t=i),r(e,so(t,3))},Fn.find=ms,Fn.findIndex=Uo,Fn.findKey=function(e,t){return kt(e,so(t,3),wr)},Fn.findLast=vs,Fn.findLastIndex=Ho,Fn.findLastKey=function(e,t){return kt(e,so(t,3),_r)},Fn.floor=Su,Fn.forEach=ws,Fn.forEachRight=_s,Fn.forIn=function(e,t){return null==e?e:mr(e,so(t,3),Ma)},Fn.forInRight=function(e,t){return null==e?e:vr(e,so(t,3),Ma)},Fn.forOwn=function(e,t){return e&&wr(e,so(t,3))},Fn.forOwnRight=function(e,t){return e&&_r(e,so(t,3))},Fn.get=Aa,Fn.gt=$s,Fn.gte=qs,Fn.has=function(e,t){return null!=e&&po(e,t,Or)},Fn.hasIn=Ta,Fn.head=Go,Fn.identity=iu,Fn.includes=function(e,t,n,r){e=Gs(e)?e:za(e),n=n&&!r?ya(n):0;var i=e.length;return n<0&&(n=mn(i+n,0)),ua(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Mt(e,t,n)>-1},Fn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ya(n);return i<0&&(i=mn(r+i,0)),Mt(e,t,i)},Fn.inRange=function(e,t,n){return t=pa(t),n===i?(n=t,t=0):n=pa(n),function(e,t,n){return e>=vn(t,n)&&e<mn(t,n)}(e=ma(e),t,n)},Fn.invoke=ka,Fn.isArguments=Us,Fn.isArray=Hs,Fn.isArrayBuffer=Vs,Fn.isArrayLike=Gs,Fn.isArrayLikeObject=Ys,Fn.isBoolean=function(e){return!0===e||!1===e||na(e)&&Er(e)==m},Fn.isBuffer=Ks,Fn.isDate=Js,Fn.isElement=function(e){return na(e)&&1===e.nodeType&&!oa(e)},Fn.isEmpty=function(e){if(null==e)return!0;if(Gs(e)&&(Hs(e)||"string"==typeof e||"function"==typeof e.splice||Ks(e)||la(e)||Us(e)))return!e.length;var t=ho(e);if(t==S||t==A)return!e.size;if(So(e))return!Dr(e).length;for(var n in e)if(Me.call(e,n))return!1;return!0},Fn.isEqual=function(e,t){return kr(e,t)},Fn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:i)?n(e,t):i;return r===i?kr(e,t,i,n):!!r},Fn.isError=Qs,Fn.isFinite=function(e){return"number"==typeof e&&pn(e)},Fn.isFunction=Zs,Fn.isInteger=Xs,Fn.isLength=ea,Fn.isMap=ra,Fn.isMatch=function(e,t){return e===t||Nr(e,t,uo(t))},Fn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:i,Nr(e,t,uo(t),n)},Fn.isNaN=function(e){return ia(e)&&e!=+e},Fn.isNative=function(e){if(bo(e))throw new be("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Mr(e)},Fn.isNil=function(e){return null==e},Fn.isNull=function(e){return null===e},Fn.isNumber=ia,Fn.isObject=ta,Fn.isObjectLike=na,Fn.isPlainObject=oa,Fn.isRegExp=sa,Fn.isSafeInteger=function(e){return Xs(e)&&e>=-9007199254740991&&e<=f},Fn.isSet=aa,Fn.isString=ua,Fn.isSymbol=ca,Fn.isTypedArray=la,Fn.isUndefined=function(e){return e===i},Fn.isWeakMap=function(e){return na(e)&&ho(e)==R},Fn.isWeakSet=function(e){return na(e)&&"[object WeakSet]"==Er(e)},Fn.join=function(e,t){return null==e?"":yn.call(e,t)},Fn.kebabCase=Ha,Fn.last=Qo,Fn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=ya(n))<0?mn(r+o,0):vn(o,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):Nt(e,Dt,o,!0)},Fn.lowerCase=Va,Fn.lowerFirst=Ga,Fn.lt=fa,Fn.lte=da,Fn.max=function(e){return e&&e.length?pr(e,iu,Ir):i},Fn.maxBy=function(e,t){return e&&e.length?pr(e,so(t,2),Ir):i},Fn.mean=function(e){return Wt(e,iu)},Fn.meanBy=function(e,t){return Wt(e,so(t,2))},Fn.min=function(e){return e&&e.length?pr(e,iu,Wr):i},Fn.minBy=function(e,t){return e&&e.length?pr(e,so(t,2),Wr):i},Fn.stubArray=gu,Fn.stubFalse=mu,Fn.stubObject=function(){return{}},Fn.stubString=function(){return""},Fn.stubTrue=function(){return!0},Fn.multiply=Cu,Fn.nth=function(e,t){return e&&e.length?zr(e,ya(t)):i},Fn.noConflict=function(){return ot._===this&&(ot._=je),this},Fn.noop=cu,Fn.now=As,Fn.pad=function(e,t,n){e=wa(e);var r=(t=ya(t))?on(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return $i(fn(i),n)+e+$i(ln(i),n)},Fn.padEnd=function(e,t,n){e=wa(e);var r=(t=ya(t))?on(e):0;return t&&r<t?e+$i(t-r,n):e},Fn.padStart=function(e,t,n){e=wa(e);var r=(t=ya(t))?on(e):0;return t&&r<t?$i(t-r,n)+e:e},Fn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),_n(wa(e).replace(re,""),t||0)},Fn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&vo(e,t,n)&&(t=n=i),n===i&&("boolean"==typeof t?(n=t,t=i):"boolean"==typeof e&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=pa(e),t===i?(t=e,e=0):t=pa(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=bn();return vn(e+o*(t-e+tt("1e-"+((o+"").length-1))),t)}return Vr(e,t)},Fn.reduce=function(e,t,n){var r=Hs(e)?At:Ft,i=arguments.length<3;return r(e,so(t,4),n,i,fr)},Fn.reduceRight=function(e,t,n){var r=Hs(e)?Tt:Ft,i=arguments.length<3;return r(e,so(t,4),n,i,dr)},Fn.repeat=function(e,t,n){return t=(n?vo(e,t,n):t===i)?1:ya(t),Gr(wa(e),t)},Fn.replace=function(){var e=arguments,t=wa(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Fn.result=function(e,t,n){var r=-1,o=(t=mi(t,e)).length;for(o||(o=1,e=i);++r<o;){var s=null==e?i:e[jo(t[r])];s===i&&(r=o,s=n),e=Zs(s)?s.call(e):s}return e},Fn.round=Eu,Fn.runInContext=e,Fn.sample=function(e){return(Hs(e)?Jn:Kr)(e)},Fn.size=function(e){if(null==e)return 0;if(Gs(e))return ua(e)?on(e):e.length;var t=ho(e);return t==S||t==A?e.size:Dr(e).length},Fn.snakeCase=Ya,Fn.some=function(e,t,n){var r=Hs(e)?Lt:ni;return n&&vo(e,t,n)&&(t=i),r(e,so(t,3))},Fn.sortedIndex=function(e,t){return ri(e,t)},Fn.sortedIndexBy=function(e,t,n){return ii(e,t,so(n,2))},Fn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=ri(e,t);if(r<n&&zs(e[r],t))return r}return-1},Fn.sortedLastIndex=function(e,t){return ri(e,t,!0)},Fn.sortedLastIndexBy=function(e,t,n){return ii(e,t,so(n,2),!0)},Fn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=ri(e,t,!0)-1;if(zs(e[n],t))return n}return-1},Fn.startCase=Ka,Fn.startsWith=function(e,t,n){return e=wa(e),n=null==n?0:sr(ya(n),0,e.length),t=ai(t),e.slice(n,n+t.length)==t},Fn.subtract=Iu,Fn.sum=function(e){return e&&e.length?Bt(e,iu):0},Fn.sumBy=function(e,t){return e&&e.length?Bt(e,so(t,2)):0},Fn.template=function(e,t,n){var r=Fn.templateSettings;n&&vo(e,t,n)&&(t=i),e=wa(e),t=Sa({},t,r,Ji);var o,s,a=Sa({},t.imports,r.imports,Ji),u=Na(a),c=Ut(a,u),l=0,f=t.interpolate||we,d="__p += '",h=Ie((t.escape||we).source+"|"+f.source+"|"+(f===Q?fe:we).source+"|"+(t.evaluate||we).source+"|$","g"),p="//# sourceURL="+(Me.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Qe+"]")+"\n";e.replace(h,(function(t,n,r,i,a,u){return r||(r=i),d+=e.slice(l,u).replace(_e,Qt),n&&(o=!0,d+="' +\n__e("+n+") +\n'"),a&&(s=!0,d+="';\n"+a+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+t.length,t})),d+="';\n";var y=Me.call(t,"variable")&&t.variable;if(y){if(ce.test(y))throw new be("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(s?d.replace($,""):d).replace(q,"$1").replace(U,"$1;"),d="function("+(y||"obj")+") {\n"+(y?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var g=Xa((function(){return Se(u,p+"return "+d).apply(i,c)}));if(g.source=d,Qs(g))throw g;return g},Fn.times=function(e,t){if((e=ya(e))<1||e>f)return[];var n=h,r=vn(e,h);t=so(t),e-=h;for(var i=zt(r,t);++n<e;)t(n);return i},Fn.toFinite=pa,Fn.toInteger=ya,Fn.toLength=ga,Fn.toLower=function(e){return wa(e).toLowerCase()},Fn.toNumber=ma,Fn.toSafeInteger=function(e){return e?sr(ya(e),-9007199254740991,f):0===e?e:0},Fn.toString=wa,Fn.toUpper=function(e){return wa(e).toUpperCase()},Fn.trim=function(e,t,n){if((e=wa(e))&&(n||t===i))return $t(e);if(!e||!(t=ai(t)))return e;var r=sn(e),o=sn(t);return wi(r,Vt(r,o),Gt(r,o)+1).join("")},Fn.trimEnd=function(e,t,n){if((e=wa(e))&&(n||t===i))return e.slice(0,an(e)+1);if(!e||!(t=ai(t)))return e;var r=sn(e);return wi(r,0,Gt(r,sn(t))+1).join("")},Fn.trimStart=function(e,t,n){if((e=wa(e))&&(n||t===i))return e.replace(re,"");if(!e||!(t=ai(t)))return e;var r=sn(e);return wi(r,Vt(r,sn(t))).join("")},Fn.truncate=function(e,t){var n=30,r="...";if(ta(t)){var o="separator"in t?t.separator:o;n="length"in t?ya(t.length):n,r="omission"in t?ai(t.omission):r}var s=(e=wa(e)).length;if(Zt(e)){var a=sn(e);s=a.length}if(n>=s)return e;var u=n-on(r);if(u<1)return r;var c=a?wi(a,0,u).join(""):e.slice(0,u);if(o===i)return c+r;if(a&&(u+=c.length-u),sa(o)){if(e.slice(u).search(o)){var l,f=c;for(o.global||(o=Ie(o.source,wa(de.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var d=l.index;c=c.slice(0,d===i?u:d)}}else if(e.indexOf(ai(o),u)!=u){var h=c.lastIndexOf(o);h>-1&&(c=c.slice(0,h))}return c+r},Fn.unescape=function(e){return(e=wa(e))&&G.test(e)?e.replace(H,un):e},Fn.uniqueId=function(e){var t=++Pe;return wa(e)+t},Fn.upperCase=Ja,Fn.upperFirst=Qa,Fn.each=ws,Fn.eachRight=_s,Fn.first=Go,uu(Fn,(vu={},wr(Fn,(function(e,t){Me.call(Fn.prototype,t)||(vu[t]=e)})),vu),{chain:!1}),Fn.VERSION="4.17.21",wt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Fn[e].placeholder=Fn})),wt(["drop","take"],(function(e,t){qn.prototype[e]=function(n){n=n===i?1:mn(ya(n),0);var r=this.__filtered__&&!t?new qn(this):this.clone();return r.__filtered__?r.__takeCount__=vn(n,r.__takeCount__):r.__views__.push({size:vn(n,h),type:e+(r.__dir__<0?"Right":"")}),r},qn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),wt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;qn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:so(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),wt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");qn.prototype[e]=function(){return this[n](1).value()[0]}})),wt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");qn.prototype[e]=function(){return this.__filtered__?new qn(this):this[n](1)}})),qn.prototype.compact=function(){return this.filter(iu)},qn.prototype.find=function(e){return this.filter(e).head()},qn.prototype.findLast=function(e){return this.reverse().find(e)},qn.prototype.invokeMap=Yr((function(e,t){return"function"==typeof e?new qn(this):this.map((function(n){return Lr(n,e,t)}))})),qn.prototype.reject=function(e){return this.filter(Ws(so(e)))},qn.prototype.slice=function(e,t){e=ya(e);var n=this;return n.__filtered__&&(e>0||t<0)?new qn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=ya(t))<0?n.dropRight(-t):n.take(t-e)),n)},qn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},qn.prototype.toArray=function(){return this.take(h)},wr(qn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=Fn[r?"take"+("last"==t?"Right":""):t],s=r||/^find/.test(t);o&&(Fn.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,u=t instanceof qn,c=a[0],l=u||Hs(t),f=function(e){var t=o.apply(Fn,Ot([e],a));return r&&d?t[0]:t};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var d=this.__chain__,h=!!this.__actions__.length,p=s&&!d,y=u&&!h;if(!s&&l){t=y?t:new qn(this);var g=e.apply(t,a);return g.__actions__.push({func:ps,args:[f],thisArg:i}),new $n(g,d)}return p&&y?e.apply(this,a):(g=this.thru(f),p?r?g.value()[0]:g.value():g)})})),wt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Te[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Fn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Hs(i)?i:[],e)}return this[n]((function(n){return t.apply(Hs(n)?n:[],e)}))}})),wr(qn.prototype,(function(e,t){var n=Fn[t];if(n){var r=n.name+"";Me.call(Rn,r)||(Rn[r]=[]),Rn[r].push({name:t,func:n})}})),Rn[ji(i,2).name]=[{name:"wrapper",func:i}],qn.prototype.clone=function(){var e=new qn(this.__wrapped__);return e.__actions__=Ai(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ai(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ai(this.__views__),e},qn.prototype.reverse=function(){if(this.__filtered__){var e=new qn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},qn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Hs(e),r=t<0,i=n?e.length:0,o=function(e,t,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=vn(t,e+s);break;case"takeRight":e=mn(e,t-s)}}return{start:e,end:t}}(0,i,this.__views__),s=o.start,a=o.end,u=a-s,c=r?a:s-1,l=this.__iteratees__,f=l.length,d=0,h=vn(u,this.__takeCount__);if(!n||!r&&i==u&&h==u)return di(e,this.__actions__);var p=[];e:for(;u--&&d<h;){for(var y=-1,g=e[c+=t];++y<f;){var m=l[y],v=m.iteratee,w=m.type,_=v(g);if(2==w)g=_;else if(!_){if(1==w)continue e;break e}}p[d++]=g}return p},Fn.prototype.at=ys,Fn.prototype.chain=function(){return hs(this)},Fn.prototype.commit=function(){return new $n(this.value(),this.__chain__)},Fn.prototype.next=function(){this.__values__===i&&(this.__values__=ha(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Fn.prototype.plant=function(e){for(var t,n=this;n instanceof zn;){var r=Bo(n);r.__index__=0,r.__values__=i,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},Fn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof qn){var t=e;return this.__actions__.length&&(t=new qn(this)),(t=t.reverse()).__actions__.push({func:ps,args:[ts],thisArg:i}),new $n(t,this.__chain__)}return this.thru(ts)},Fn.prototype.toJSON=Fn.prototype.valueOf=Fn.prototype.value=function(){return di(this.__wrapped__,this.__actions__)},Fn.prototype.first=Fn.prototype.head,st&&(Fn.prototype[st]=function(){return this}),Fn}();ot._=cn,(r=function(){return cn}.call(t,n,t,e))===i||(e.exports=r)}.call(this)},54883:(e,t,n)=>{var r=n(25835);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(i.Cache||r),n}i.Cache=r,e.exports=i},98253:(e,t,n)=>{var r=n(158);e.exports=function(){return r.Date.now()}},75892:(e,t,n)=>{var r=n(11241),i=n(39169)((function(e,t){return null==e?{}:r(e,t)}));e.exports=i},59174:e=>{e.exports=function(){return[]}},30647:e=>{e.exports=function(){return!1}},38172:(e,t,n)=>{var r=n(76897),i=n(23619);e.exports=function(e,t,n){var o=!0,s=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return i(n)&&(o="leading"in n?!!n.leading:o,s="trailing"in n?!!n.trailing:s),r(e,t,{leading:o,maxWait:t,trailing:s})}},95053:(e,t,n)=>{var r=n(12383),i=n(23619),o=n(81878),s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=a.test(e);return n||u.test(e)?c(e.slice(2),n?2:8):s.test(e)?NaN:+e}},33270:(e,t,n)=>{var r=n(80430);e.exports=function(e){return null==e?"":r(e)}},42169:(e,t,n)=>{"use strict";const r=n(14561);e.exports=e=>{if(!Number.isInteger(e)&&e!==1/0||!(e>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");const t=new r;let n=0;const i=async(e,r,...i)=>{n++;const o=(async()=>e(...i))();r(o);try{await o}catch{}n--,t.size>0&&t.dequeue()()},o=(r,...o)=>new Promise((s=>{((r,o,...s)=>{t.enqueue(i.bind(null,r,o,...s)),(async()=>{await Promise.resolve(),n<e&&t.size>0&&t.dequeue()()})()})(r,s,...o)}));return Object.defineProperties(o,{activeCount:{get:()=>n},pendingCount:{get:()=>t.size},clearQueue:{value:()=>{t.clear()}}}),o}},88021:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(33034);class i extends Error{constructor(e){super(e),this.name="TimeoutError"}}class o{constructor(){Object.defineProperty(this,"_queue",{enumerable:!0,configurable:!0,writable:!0,value:[]})}enqueue(e,t){var n;const r={priority:(t={priority:0,...t}).priority,run:e};if(this.size&&(null===(n=this._queue[this.size-1])||void 0===n?void 0:n.priority)>=t.priority)return void this._queue.push(r);const i=function(e,t,n){let r=0,i=e.length;for(;i>0;){const n=Math.trunc(i/2);let s=r+n;o=e[s],t.priority-o.priority<=0?(r=++s,i-=n+1):i=n}var o;return r}(this._queue,r);this._queue.splice(i,0,r)}dequeue(){const e=this._queue.shift();return null==e?void 0:e.run}filter(e){return this._queue.filter((t=>t.priority===e.priority)).map((e=>e.run))}get size(){return this._queue.length}}const s=()=>{},a=new i;class u extends r{constructor(e){var t,n,r,i;if(super(),Object.defineProperty(this,"_carryoverConcurrencyCount",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isIntervalIgnored",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_intervalCount",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_intervalCap",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_interval",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_intervalEnd",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_intervalId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_timeoutId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_queue",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_queueClass",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pendingCount",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_concurrency",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isPaused",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_resolveEmpty",{enumerable:!0,configurable:!0,writable:!0,value:s}),Object.defineProperty(this,"_resolveIdle",{enumerable:!0,configurable:!0,writable:!0,value:s}),Object.defineProperty(this,"_timeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_throwOnTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),!("number"==typeof(e={carryoverConcurrencyCount:!1,intervalCap:Number.POSITIVE_INFINITY,interval:0,concurrency:Number.POSITIVE_INFINITY,autoStart:!0,queueClass:o,...e}).intervalCap&&e.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${null!==(n=null===(t=e.intervalCap)||void 0===t?void 0:t.toString())&&void 0!==n?n:""}\` (${typeof e.intervalCap})`);if(void 0===e.interval||!(Number.isFinite(e.interval)&&e.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${null!==(i=null===(r=e.interval)||void 0===r?void 0:r.toString())&&void 0!==i?i:""}\` (${typeof e.interval})`);this._carryoverConcurrencyCount=e.carryoverConcurrencyCount,this._isIntervalIgnored=e.intervalCap===Number.POSITIVE_INFINITY||0===e.interval,this._intervalCap=e.intervalCap,this._interval=e.interval,this._queue=new e.queueClass,this._queueClass=e.queueClass,this.concurrency=e.concurrency,this._timeout=e.timeout,this._throwOnTimeout=!0===e.throwOnTimeout,this._isPaused=!1===e.autoStart}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount<this._intervalCap}get _doesConcurrentAllowAnother(){return this._pendingCount<this._concurrency}_next(){this._pendingCount--,this._tryToStartAnother(),this.emit("next")}_resolvePromises(){this._resolveEmpty(),this._resolveEmpty=s,0===this._pendingCount&&(this._resolveIdle(),this._resolveIdle=s,this.emit("idle"))}_onResumeInterval(){this._onInterval(),this._initializeIntervalIfNeeded(),this._timeoutId=void 0}_isIntervalPaused(){const e=Date.now();if(void 0===this._intervalId){const t=this._intervalEnd-e;if(!(t<0))return void 0===this._timeoutId&&(this._timeoutId=setTimeout((()=>{this._onResumeInterval()}),t)),!0;this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0}return!1}_tryToStartAnother(){if(0===this._queue.size)return this._intervalId&&clearInterval(this._intervalId),this._intervalId=void 0,this._resolvePromises(),!1;if(!this._isPaused){const e=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){const t=this._queue.dequeue();return!!t&&(this.emit("active"),t(),e&&this._initializeIntervalIfNeeded(),!0)}}return!1}_initializeIntervalIfNeeded(){this._isIntervalIgnored||void 0!==this._intervalId||(this._intervalId=setInterval((()=>{this._onInterval()}),this._interval),this._intervalEnd=Date.now()+this._interval)}_onInterval(){0===this._intervalCount&&0===this._pendingCount&&this._intervalId&&(clearInterval(this._intervalId),this._intervalId=void 0),this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0,this._processQueue()}_processQueue(){for(;this._tryToStartAnother(););}get concurrency(){return this._concurrency}set concurrency(e){if(!("number"==typeof e&&e>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);this._concurrency=e,this._processQueue()}async add(e,t={}){return new Promise(((n,r)=>{this._queue.enqueue((async()=>{this._pendingCount++,this._intervalCount++;try{const i=void 0===this._timeout&&void 0===t.timeout?e():function(e,t,n,r){let i;const o=new Promise(((o,s)=>{if("number"!=typeof t||t<0)throw new TypeError("Expected `milliseconds` to be a positive number");t!==Number.POSITIVE_INFINITY?(r={customTimers:{setTimeout,clearTimeout},...r},i=r.customTimers.setTimeout.call(void 0,(()=>{try{o(n())}catch(e){s(e)}}),t),(async()=>{try{o(await e)}catch(e){s(e)}finally{r.customTimers.clearTimeout.call(void 0,i)}})()):o(e)}));return o.clear=()=>{clearTimeout(i),i=void 0},o}(Promise.resolve(e()),void 0===t.timeout?this._timeout:t.timeout,(()=>{(void 0===t.throwOnTimeout?this._throwOnTimeout:t.throwOnTimeout)&&r(a)})),o=await i;n(o),this.emit("completed",o)}catch(e){r(e),this.emit("error",e)}this._next()}),t),this._tryToStartAnother(),this.emit("add")}))}async addAll(e,t){return Promise.all(e.map((async e=>this.add(e,t))))}start(){return this._isPaused?(this._isPaused=!1,this._processQueue(),this):this}pause(){this._isPaused=!0}clear(){this._queue=new this._queueClass}async onEmpty(){if(0!==this._queue.size)return new Promise((e=>{const t=this._resolveEmpty;this._resolveEmpty=()=>{t(),e()}}))}async onSizeLessThan(e){if(!(this._queue.size<e))return new Promise((t=>{const n=()=>{this._queue.size<e&&(this.removeListener("next",n),t())};this.on("next",n)}))}async onIdle(){if(0!==this._pendingCount||0!==this._queue.size)return new Promise((e=>{const t=this._resolveIdle;this._resolveIdle=()=>{t(),e()}}))}get size(){return this._queue.size}sizeBy(e){return this._queue.filter(e).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){return this._timeout}set timeout(e){this._timeout=e}}},30705:(e,t,n)=>{"use strict";function r(e){return{}.toString.call(e).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function i(e,t,n,r){let o,s,a,u,c=null,l=-1;if(n){if(0===r)return null;-1!==r&&(l=r-1)}if(null==e||null==t||!Array.isArray(t)||t.length<1)c=null;else if(Array.isArray(e)){for(c=[],o=0;o<e.length;o++)s=t.slice(0),a=i(e[o],s,n,l-1),null!==a&&c.push(a);0===c.length&&(c=null)}else if("object"==typeof e)if(u=t[0],!e.hasOwnProperty(u)&&n){const r=Object.keys(e);for(c=[],o=0;o<r.length;o++){const s=e[r[o]];if(null!=s)if(Array.isArray(s))s.forEach((function(e){const r=i(e,t,n,l);null!==r&&c.push(r)}));else if("Object"===s.constructor.name){const e=i(s,t,n,l);null!==e&&c.push(e)}}0===c.length?c=null:1===c.length&&(c=c[0])}else c=t.length<2?e[u]:i(e[u],t.slice(1),n,l);return c}function o(e,t,n){let r;return r=void 0!==e?e:void 0!==t?t:n,r}function s(e,t){const n={};return e=e||{},n.negator=o(e._not,t.negator,!1),n.joinAnd="OR"!==o(e._join,t.join,"AND"),n.text=o(e._text,t.text,!1),n.word=o(e._word,t.word,!1),n.regexp=o(e._regexp,t.regexp,!1),n.start=o(e._start,t.start,!1),n.end=o(e._end,t.end,!1),n.separator=e._separator||t.separator||".",n.propertySearch=o(e._propertySearch,t.propertySearch,!1),n.propertySearchDepth=o(e._propertySearchDepth,t.propertySearchDepth,-1),n}n.r(t),n.d(t,{matchArray:()=>f,matchObject:()=>d,resetDefaults:()=>c,setDefaults:()=>u,singleMatch:()=>l});let a={};function u(e){for(const t in e)a[t]=e[t]}function c(){a={}}function l(e,t,n,i,o,s,a){let u,c,f,d,h,p=!1;if(u=typeof e,null===e)p=null===t;else if(void 0===e)p=void 0===t;else if("boolean"===u)p=t===e;else if("number"===u||e instanceof Date)null!=t&&"object"===r(t)?void 0!==t.from||void 0!==t.to||void 0!==t.gte||void 0!==t.lte?(d=t.from||t.gte,h=t.to||t.lte,p=(void 0===t.from&&void 0===t.gte||e>=d)&&(void 0===t.to&&void 0===t.lte||e<=h)):void 0===t.gt&&void 0===t.lt||(p=(void 0===t.gt||e>t.gt)&&(void 0===t.lt||e<t.lt)):p=e instanceof Date&&t instanceof Date?e.getTime()===t.getTime():e===t;else if("string"===u)"string"==typeof t&&(t=t.toLowerCase()),e=e.toLowerCase(),n?p=-1!==e.indexOf(t):o?(c=(g=(y=t).match(/(\/?)(.+)\1([a-z]*)/i))[3]&&!/^(?!.*?(.).*?\1)[gmixXsuUAJ]+$/.test(g[3])?RegExp(y):new RegExp(g[2],g[3]),p=e&&null!==e.match(c)):i?(c=new RegExp("(\\s|^)"+t+"(?=\\s|$)","i"),p=e&&null!==e.match(c)):s?(c=new RegExp("^"+t,"i"),p=e&&null!==e.match(c)):a?(c=new RegExp(t+"$","i"),p=e&&null!==e.match(c)):null!=t&&"object"===r(t)?void 0!==t.from||void 0!==t.to||void 0!==t.gte||void 0!==t.lte?(d=t.from||t.gte,h=t.to||t.lte,p=(void 0===t.from&&void 0===t.gte||e>=d)&&(void 0===t.to&&void 0===t.lte||e<=h)):void 0===t.gt&&void 0===t.lt||(p=(void 0===t.gt||e>t.gt)&&(void 0===t.lt||e<t.lt)):p=t===e;else if(void 0!==e.length)for(f=0;f<e.length&&(p=l(e[f],t,n,i,o,s,a),!p);f++);else"object"===u&&(p=void 0!==e[t]);var y,g;return p}function f(e,t){let n,r=!1,i=[],o=s(t,a);if(e&&e.length>0)for(n=0;n<e.length;n++)r=h(e[n],t,o),r&&i.push(e[n]);return i}function d(e,t){return h(e,t,s(t,a))}function h(e,t,n){let r,o,s,a,u,c;if(t=t||{},s=!!n.joinAnd,t.terms)for(o=0;o<t.terms.length;o++){if(a=d(e,t.terms[o]),n.negator&&(a=!a),n.joinAnd&&!a){s=!1;break}if(!n.joinAnd&&a){s=!0;break}}else for(r in t)if(t.hasOwnProperty(r)&&0!==r.indexOf("_")){for(c=r.split(n.separator),u=[].concat(t[r]),o=0;o<u.length&&(a=l(i(e,c,n.propertySearch,n.propertySearchDepth),u[o],n.text,n.word,n.regexp,n.start,n.end),!a);o++);if(n.negator&&(a=!a),n.joinAnd&&!a){s=!1;break}if(!n.joinAnd&&a){s=!0;break}}return s}},50586:(e,t,n)=>{var r=n(36589),i=n(22708),o=i;o.v1=r,o.v4=i,e.exports=o},98726:e=>{for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);e.exports=function(e,n){var r=n||0,i=t;return i[e[r++]]+i[e[r++]]+i[e[r++]]+i[e[r++]]+"-"+i[e[r++]]+i[e[r++]]+"-"+i[e[r++]]+i[e[r++]]+"-"+i[e[r++]]+i[e[r++]]+"-"+i[e[r++]]+i[e[r++]]+i[e[r++]]+i[e[r++]]+i[e[r++]]+i[e[r++]]}},76338:(e,t,n)=>{var r,i=n.g.crypto||n.g.msCrypto;if(i&&i.getRandomValues){var o=new Uint8Array(16);r=function(){return i.getRandomValues(o),o}}if(!r){var s=new Array(16);r=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),s[t]=e>>>((3&t)<<3)&255;return s}}e.exports=r},36589:(e,t,n)=>{var r=n(76338),i=n(98726),o=r(),s=[1|o[0],o[1],o[2],o[3],o[4],o[5]],a=16383&(o[6]<<8|o[7]),u=0,c=0;e.exports=function(e,t,n){var r=t&&n||0,o=t||[],l=void 0!==(e=e||{}).clockseq?e.clockseq:a,f=void 0!==e.msecs?e.msecs:(new Date).getTime(),d=void 0!==e.nsecs?e.nsecs:c+1,h=f-u+(d-c)/1e4;if(h<0&&void 0===e.clockseq&&(l=l+1&16383),(h<0||f>u)&&void 0===e.nsecs&&(d=0),d>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=f,c=d,a=l;var p=(1e4*(268435455&(f+=122192928e5))+d)%4294967296;o[r++]=p>>>24&255,o[r++]=p>>>16&255,o[r++]=p>>>8&255,o[r++]=255&p;var y=f/4294967296*1e4&268435455;o[r++]=y>>>8&255,o[r++]=255&y,o[r++]=y>>>24&15|16,o[r++]=y>>>16&255,o[r++]=l>>>8|128,o[r++]=255&l;for(var g=e.node||s,m=0;m<6;++m)o[r+m]=g[m];return t||i(o)}},22708:(e,t,n)=>{var r=n(76338),i=n(98726);e.exports=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"==e?new Array(16):null,e=null);var s=(e=e||{}).random||(e.rng||r)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var a=0;a<16;++a)t[o+a]=s[a];return t||i(s)}},14561:e=>{class t{constructor(e){this.value=e,this.next=void 0}}class n{constructor(){this.clear()}enqueue(e){const n=new t(e);this._head?(this._tail.next=n,this._tail=n):(this._head=n,this._tail=n),this._size++}dequeue(){const e=this._head;if(e)return this._head=this._head.next,this._size--,e.value}clear(){this._head=void 0,this._tail=void 0,this._size=0}get size(){return this._size}*[Symbol.iterator](){let e=this._head;for(;e;)yield e.value,e=e.next}}e.exports=n},34361:function(e,t,n){"use strict";var r,i,o,s,a,u,c,l,f,d,h,p,y,g=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},m=this&&this.__classPrivateFieldGet||function(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)},v=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FinsembleDesktopAgent=void 0;const w=n(98832),_=v(n(72551)),b=n(6192),S=n(81298),C=n(81298),E=v(n(60306));class I{constructor(e){r.set(this,void 0),i.set(this,void 0),g(this,r,e,"f")}start(e){const t={type:"heartbeat",meta:{uuid:e}};m(this,r,"f").transmit(S.HEARTBEAT_CHANNEL,t),g(this,i,setInterval((()=>{m(this,r,"f").transmit(S.HEARTBEAT_CHANNEL,t)}),S.HEARTBEAT_INTERVAL),"f")}stop(){clearInterval(m(this,i,"f")),g(this,i,void 0,"f")}}r=new WeakMap,i=new WeakMap;class O{constructor(e,t,n="app"){o.set(this,void 0),g(this,o,e,"f"),this.id=t,this.type=n}broadcast(e){m(this,o,"f").channelBroadcast(this.id,e)}getCurrentContext(e){return m(this,o,"f").channelGetCurrentContext(this.id,e)}addContextListener(e,t){return m(this,o,"f").channelAddContextListener(this.id,e,t)}}o=new WeakMap,t.FinsembleDesktopAgent=class{constructor({routerClient:e,startup:t}){s.set(this,!1),a.set(this,void 0),u.set(this,!1),c.set(this,""),l.set(this,`FSBL.FDC3.Client.${Date.now()}_${Math.random()}`),f.set(this,{}),d.set(this,{}),h.set(this,[]),p.set(this,void 0),y.set(this,void 0),g(this,p,e,"f"),g(this,a,new I(e),"f"),g(this,y,t,"f");const n=()=>!0===b.Globals?.FSBL?.Clients?.WindowClient?.options?.customData?.interop?.autoConnect;if(b.Globals?.FSBL?.addEventListener?b.Globals?.FSBL.addEventListener("onReady",(()=>{n()&&this.connectWhenFSBLIsReady()})):window.addEventListener("FSBLReady",(()=>{n()&&this.connectWhenFSBLIsReady()})),window.Event){const e=new Event("fdc3Ready");window&&window.dispatchEvent(e)}}meta(){return{uuid:m(this,c,"f"),href:window.document?document.location.href:""}}triggerContextListeners(e){const{context:t}=e.payload;(m(this,d,"f")[t?.type]??[]).concat(m(this,d,"f")["*"]??[]).forEach((({handler:n,channel:r})=>{e.meta.channel!==r&&(e.meta.channel||r)||n(t)}))}triggerIntentListeners(e){const{intent:t,context:n}=e.payload,r=m(this,f,"f")[t];n&&(r||[]).forEach((e=>e(n)))}handleIncoming(e){switch(_.default.log("FDC3 Client: handleIncoming",e.type,e),e.type){case"broadcast":this.triggerContextListeners(e);break;case"intent":this.triggerIntentListeners(e)}}releaseQueue(){const e=e=>(void 0!==e?.meta?.uuid&&(e.meta.uuid=m(this,c,"f")),e);m(this,h,"f").forEach((async t=>{const{message:n,handler:r,resolve:i}=t,{err:o,response:s}=await m(this,p,"f").query(S.SERVER_CHANNEL,e(n),r);i({err:o,receiveMessage:s?.data})})),g(this,h,[],"f")}async connectWhenFSBLIsReady(){m(this,u,"f")||(g(this,u,!0,"f"),await m(this,y,"f").onReady(),this.connect())}exchange(e,t=(()=>{})){return new Promise((async n=>{if(m(this,s,"f")){const{err:r,response:i}=await m(this,p,"f").query(S.SERVER_CHANNEL,e,t);n({err:r,receiveMessage:i?.data})}else m(this,h,"f").push({message:e,handler:t,resolve:n}),this.connectWhenFSBLIsReady()}))}async connect(){const e=m(this,y,"f").getStartupData(),{windowName:t="Unknown window",authenticationToken:n}=e;_.default.log(`fdc3.connect StartupData for ${t}`,e),g(this,c,t,"f");const r={type:"register",meta:this.meta(),payload:{clientChannel:m(this,l,"f"),windowName:t,authenticationToken:n}};m(this,p,"f").query(S.SERVER_CHANNEL,r,(e=>{e?_.default.error("connect error",e):(m(this,p,"f").addResponder(m(this,l,"f"),((e,t)=>{if(e||!t){const t=C.errorAsString(e??"No request received on responder");_.default.error(`FinsembleDesktopAgent can't listen on channel ${m(this,l,"f")} : ${t}`)}else t.data&&this.handleIncoming(t.data),t.sendQueryResponse(null)})),g(this,s,!0,"f"),this.releaseQueue())})),m(this,a,"f").start(m(this,c,"f"))}stop(){m(this,a,"f").stop();const e={type:"unregister",meta:this.meta()};this.exchange(e,(()=>{m(this,p,"f").removeResponder(m(this,l,"f")),g(this,s,!1,"f")}))}async getCurrentContext(e){const t={type:"currentContextRequest",meta:this.meta(),payload:{contextType:e}},{err:n,receiveMessage:r}=await this.exchange(t);return n?null:"currentContext"===r?.type&&r.payload.context?r.payload.context:null}async channelGetCurrentContext(e,t){const n={type:"currentContextRequest",meta:{...this.meta(),channel:e},payload:{contextType:t}},{err:r,receiveMessage:i}=await this.exchange(n);return r?null:"currentContext"===i?.type?i.payload.context:null}broadcast(e){const t={type:"broadcast",meta:this.meta(),payload:{context:e}};this.exchange(t)}channelBroadcast(e,t){const n={type:"broadcast",meta:{...this.meta(),channel:e},payload:{context:t}};this.exchange(n)}async getSystemChannels(){const e={type:"systemChannelRequest",meta:this.meta()},{err:t,receiveMessage:n}=await this.exchange(e);return t?[]:("systemChannels"===n?.type?n?.payload?.channels:[]).map((e=>new O(this,e,"system")))}async open(e,t){const n={type:"open",meta:this.meta(),payload:{target:e,context:t}},{err:r,receiveMessage:i}=await this.exchange(n),o=i;if(r)throw w.OpenError.ResolverUnavailable;if(o.payload.error)throw o.payload.error}async findIntent(e,t){const n={type:"findIntent",meta:this.meta(),payload:{intent:e,context:t}},{err:r,receiveMessage:i}=await this.exchange(n),o=i;if(r)throw w.ResolveError.ResolverUnavailable;if(o.payload.error)throw o.payload.error;if(!o.payload.appIntent)throw"Invalid response returned from InteropService for findIntent. No appIntent and no error.";return o.payload.appIntent}async findIntentsByContext(e){const t={type:"findIntentsByContext",meta:this.meta(),payload:{context:e}},{receiveMessage:n}=await this.exchange(t),r=n;if(r.payload.error)throw r.payload.error;return r.payload.intents||[]}async raiseIntent(e,t,n){const r={type:"raiseIntent",meta:this.meta(),payload:{intent:e,context:t,target:n}},{err:i,receiveMessage:o}=await this.exchange(r),s=o;if(i)throw w.ResolveError.ResolverUnavailable;if(s.payload.error)throw s.payload.error;if(!s.payload.data)throw"Invalid response returned from InteropService for raiseIntent. No data.";return s.payload.data}async raiseIntentForContext(e,t){const n={type:"raiseIntent",meta:this.meta(),payload:{context:e,target:t}},{err:r,receiveMessage:i}=await this.exchange(n),o=i;if(r)throw w.ResolveError.ResolverUnavailable;if(o.payload.error)throw o.payload.error;if(!o.payload.data)throw"Invalid response returned from InteropService for raiseIntentForContext. No data.";return o.payload.data}addIntentListener(e,t){m(this,f,"f")[e]=C.mmAdd(m(this,f,"f"),e,t);const n={type:"subscribeIntent",meta:this.meta(),payload:{intent:e}};return this.exchange(n),{unsubscribe:()=>{const n={type:"unsubscribeIntent",meta:this.meta(),payload:{intent:e}};this.exchange(n),m(this,f,"f")[e]=C.mmRemove(m(this,f,"f"),e,t)}}}channelAddContextListener(e,t,n){const r=n?t:"*";n||(n=t);const i={handler:n,channel:e};m(this,d,"f")[r]=C.mmAdd(m(this,f,"f"),r,i);let o={type:"subscribeContext",meta:this.meta(),payload:{contextType:r}};return e&&(o.meta.channel=e),this.exchange(o),{unsubscribe:()=>{let t={type:"unsubscribeContext",meta:this.meta(),payload:{contextType:r}};e&&(t.meta.channel=e),m(this,d,"f")[r]=C.mmRemove(m(this,f,"f"),r,i),this.exchange(t)}}}addContextListener(e,t){return this.channelAddContextListener(null,e,t)}async joinChannel(e){const t={type:"joinChannels",meta:this.meta(),payload:{channels:[e]}};await this.exchange(t)}async getOrCreateChannel(e){return new O(this,e)}async getCurrentChannels(){const e={type:"getCurrentChannels",meta:this.meta()},{err:t,receiveMessage:n}=await this.exchange(e),r=n;if(t)throw t;if(r.payload.error)throw r.payload.error;if(!r.payload.data)throw"Invalid response returned from InteropService for getCurrentChannels. No data.";return r.payload.data.map((e=>new O(this,e.channel,"system")))}async getCurrentChannel(){const e=await this.getCurrentChannels();return e&&e.length?e[0]:null}async leaveCurrentChannel(){const e={type:"leaveChannels",meta:this.meta(),payload:{}};await this.exchange(e)}getInfo(){return{fdc3Version:"1.2",provider:"Finsemble",providerVersion:E.default.version}}},s=new WeakMap,a=new WeakMap,u=new WeakMap,c=new WeakMap,l=new WeakMap,f=new WeakMap,d=new WeakMap,h=new WeakMap,p=new WeakMap,y=new WeakMap},81298:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousAuthenticationToken=t.HEARTBEAT_INTERVAL=t.HEARTBEAT_CHANNEL=t.INTENT_RESOLVER_CHANNEL=t.SERVER_CHANNEL=t.GLOBAL_CHANNEL=t.errorAsString=t.mmRemove=t.concatNoDups=t.mmAdd=void 0,t.mmAdd=function(e,t,n){return(e[t]||[]).concat([n])},t.concatNoDups=function(e,t){const n=Array.isArray(t)?t:[t],r=e?n.concat(e):n;return Array.from(new Set(r))},t.mmRemove=function(e,t,n){return(e[t]||[]).filter((e=>e===n))},t.errorAsString=function(e){return e?.message??e??null},t.GLOBAL_CHANNEL="global",t.SERVER_CHANNEL="FSBL.FDC3.Interop.Server",t.INTENT_RESOLVER_CHANNEL="FSBL.FDC3.intent.resolver",t.HEARTBEAT_CHANNEL="FSBL.FDC3.Interop.Server",t.HEARTBEAT_INTERVAL=4e3,t.AnonymousAuthenticationToken={authenticationKeyType:"unauthenticated",meta:{name:"Anonymous app"}}},10589:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FSBLService=void 0;const i=r(n(39319)),o=n(67580),s=n(51742),a=n(16925),u=n(50586),c=n(6192),l=n(34361);t.FSBLService=class{async startApp(){await s.System.ready();const e=await o.getSystemStartupData(),t=s.System.Window.getCurrent(),n=t.name??document?.location?.href??"Unknown App",r=t.name??document?.location?.href??`Unknown window-${u.v4()}`,f=o.getManifestFromStartupData(e)??{},d=o.getRouterConfig({windowName:r,systemManifest:f});await i.default.start(d);const h=a.Startup.getInstance();h.setStartupData({windowName:r,authenticationToken:{authenticationKeyType:"unauthenticated",meta:{name:n}}}),c.Globals.fdc3=new l.FinsembleDesktopAgent({routerClient:i.default,startup:h}),h.ready()}async stopApp(){i.default.stop()}}},67580:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getManifestFromStartupData=t.getSystemStartupData=t.getRouterConfig=t.getRecommendedTransport=void 0;const i=r(n(72551)),o=n(51742),s=n(33998),a={sameDomainTransport:"FinsembleTransport",crossDomainTransport:"FinsembleTransport",transportSettings:{FinsembleTransport:{serverAddress:"ws://127.0.0.1:3376"}},transportName:"FinsembleTransport"},u=e=>{if(!e)return i.default.error("No documentRoot provided to RouterConfig.isCrossDomain(). Check the moduleRoot entry of the manifest."),!0;const t=document.createElement("a");t.href=e;const n=window.location.hostname===t.hostname,r=window.location.protocol===t.protocol,o=(void 0!==window.location.port?window.location.port:80)===(void 0!==t.port?t.port:80),s=n&&o&&r;return i.default.system.debug(`Transport crossDomain=${u} (${n}:${r}:${o})`),!s};t.getRecommendedTransport=e=>{const{moduleRoot:t,router:n}=e?.finsemble,{sameDomainTransport:r="SharedWorker",crossDomainTransport:o="IPCBus"}=n??{},s=u(t)?o:r;return i.default.system.log(`Transport Info: Selected=${s} SameDomainDefault=${r} CrossDomainDefault=${o}`),console.log(`Transport Info: Selected=${s} SameDomainDefault=${r} CrossDomainDefault=${o}`),s},t.getRouterConfig=({windowName:e,systemManifest:n,transportSettings:r})=>n?((e,n)=>{if(i.default.system.info("WINDOW LIFECYCLE:STARTUP:RouterClient:routerConfigFromManifest"),e&&"string"!=typeof e){const r=e.finsemble,i=r?.router?.transportSettings??r?.IAC??{},o=r?.notificationURL??`${r.moduleRoot}/components/system/notification/notification.html`;return{windowName:n,routerDomainRoot:r.moduleRoot,transportName:t.getRecommendedTransport(e),transportSettings:i,notificationURL:o}}return i.default.system.error("WINDOW LIFECYCLE:STARTUP:RouterClient:routerConfigFromManifest failed -- fatal error. No manifest found.",e),{...a,windowName:n}})(n,e):{...a,windowName:e,transportSettings:r??{}},t.getSystemStartupData=async()=>new Promise((e=>{o.System.Window.getCurrent().getOptions((t=>{e(t)}))})),t.getManifestFromStartupData=e=>{let t=e?.manifest;return t?.finsemble&&s.ConfigUtilInstance.resolveConfigVariables(t.finsemble,t.finsemble),t}},16925:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Startup=void 0;const r=n(81298),i=n(6192),o=n(50586),s=n(4971);class a{constructor(){this.isReady=!1,this.onReadyListeners=[],this.currentStartupData={authenticationToken:r.AnonymousAuthenticationToken,windowName:`Unknown window-${o.v4()}`}}static getInstance(){return a.instance?a.instance:a.instance=s.singleton("Startup",a)}getStartupData(){return this.currentStartupData}setStartupData(e){this.currentStartupData=e}onReady(e){return new Promise((t=>{this.isReady?(e&&setTimeout(e,0),t()):this.onReadyListeners.push((()=>{e&&e(),t()}))}))}ready(){this.isReady=!0,this.onReadyListeners.forEach((e=>{e()})),i.Globals.dispatchEvent&&i.Globals.dispatchEvent(new Event("FSBLReady"))}}t.Startup=a,a.instance=null},72669:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t._BaseClient=void 0;const i=r(n(39319)),o=r(n(72551)),s=n(51742),a=n(13854);t._BaseClient=class{constructor(e){this.status="offline",this.startupTime=0,this.initialized=!1,this.startupDependencies={services:[],clients:[]},this.finsembleWindow=null,this.windowName="",this.clientReadyQueue=[],this.processClientReadyQueue=()=>{for(const e of this.clientReadyQueue)e();this.clientReadyQueue=[]},this.onReady=e=>{this.clientReadyQueue.push(e),"online"===this.status&&this.processClientReadyQueue()},this.setClientOnline=()=>{this.status="online";const e=`STARTUP:CLIENT ONLINE:${this.finWindow?.name}:${this.name}`;this.startupTime=window.performance.now()-this.startupTime;const t=()=>{this.logger.system.debug(e),this.processClientReadyQueue(),a.FSBLDependencyManagerSingleton.setClientOnline(this.name)};this._onReady?this._onReady(t):t()},this.initialize=(e=Function.prototype)=>{this.initialized||(this.initialized=!0,this.startupTime=performance.now(),this.finWindow=s.System.Window.getCurrent(),this.windowName=this.finWindow.name,this.logger.system.debug("Baseclient Init Router Ready",this.name),a.FSBLDependencyManagerSingleton.startup.waitFor(this.startupDependencies,(()=>{e(),this.setClientOnline()})))},this.onClose=e=>{e&&e()},this.name=e.name,this._onReady=e.onReady,this.startupDependencies=e.startupDependencies||{services:[],clients:[]},this.logger=o.default,this.routerClient=i.default}}},70010:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(57664),o=r(n(13712)),s=n(72669),a=r(n(5020)),u=r(n(72551));class c extends s._BaseClient{constructor(e){super(e),this.listeners=[],this.changeSub=e=>{this.subs||(this.subs={}),this.subs[e]||(this.routerClient.query("configService.addListener",e,(t=>{t&&u.default.system.error("Error adding listener to config service",t),this.routerClient.subscribe(e,this.handleChanges)})),this.subs[e]=!0)},this.handleChanges=(e,t)=>{e&&u.default.system.error(e),t.data.field||(t.data.field=null);const n=t.data.storeData?t.data.storeData:t.data.value;this.triggerListeners(t.data.field?t.data.field:"configService",n)},this.triggerListeners=(e,t)=>{if(this.listeners[e])for(let n=0;n<this.listeners[e].length;n++)"function"==typeof this.listeners[e][n]?this.listeners[e][n](null,{field:e,value:t}):u.default.system.warn("ConfigClient:triggerListeners: listener is not a function",e)},this.set=(e,t)=>{u.default.system.debug("ConfigClient.Set",e),"function"==typeof e?(t=e,o.default.args(t,"function"),e={}):o.default.args(e,"object",t,"function"),this.routerClient.query("config.set",e,((e,n)=>{t(e,n?n.data:null)}))},this.processAndSet=this.processAndSet.bind(this),this.getValue=this.getValue.bind(this),this.getValues=this.getValues.bind(this),this.setValue=this.setValue.bind(this),this.setValues=this.setValues.bind(this),this.removeValue=this.removeValue.bind(this),this.removeValues=this.removeValues.bind(this),this.addListener=this.addListener.bind(this),this.addListeners=this.addListeners.bind(this),this.removeListener=this.removeListener.bind(this),this.removeListeners=this.removeListeners.bind(this),this.setPreference=this.setPreference.bind(this),this.getPreferences=this.getPreferences.bind(this),this.unsetPreference=this.unsetPreference.bind(this)}getValue(e,t=Function.prototype){return"string"==typeof e&&(e={field:e}),new Promise(((n,r)=>{if(!e.field){const e="no field provided";return r(e),t(e)}this.routerClient.query("configService.getValue",{field:e.field},((e,i)=>e?(r(e),t(e)):(n({err:e,data:i.data}),t(e,i.data))))}))}getValues(e,t=Function.prototype){return"function"==typeof e&&(t=e,e=null),e&&!Array.isArray(e)?this.getValue(e,t):new Promise((n=>{this.routerClient.query("configService.getValues",{fields:e},((e,r)=>e?t(e):(n({err:e,data:r.data}),t(e,r.data))))}))}setValue(e,t){const n={field:e.field,value:e.value};return this.routerClient.query("configService.setValue",n,(e=>t?t(e):null))}setValues(e,t){return e?Array.isArray(e)?this.routerClient.query("configService.setValues",e,(e=>t?t(e):null)):u.default.system.error("ConfigClient.SetValues. Params must be an array"):u.default.system.error("ConfigClient.SetValues. No params given")}removeValue(e,t=Function.prototype){if(void 0!==e){if(e.field||"string"!=typeof e)return t("no field provided");e={field:e}}return e.value=null,this.setValue(e,t)}removeValues(e,t=Function.prototype){if(!Array.isArray(e))return t("The passed in parameter needs to be an array");i.map(e,this.removeValue,((e,n)=>t(e,n)))}addListener(e,t,n){let r=null;"function"==typeof e&&(t=e,e={field:r}),({field:r}=e);const i="configService"+(r?`.${r}`:"");return this.listeners[i]?this.listeners[i].push(t):this.listeners[i]=[t],this.changeSub(i),n?n():null}addListeners(e,t,n){if(!Array.isArray(e))return this.addListener({field:e.field},t,n);for(let n=0;n<e.length;n++){let i=null;const o=e[n];var r;"string"==typeof o?i=o:o.field&&(({field:i}=o),r=o.listener);const s="configService"+(i?`.${i}`:"");r||t&&"function"==typeof t&&(r=t),this.listeners[s]?this.listeners[s].push(r):this.listeners[s]=[r],this.changeSub(s)}return n?n():null}removeListener(e,t,n){let r=null;"function"==typeof e&&(n=t,t=e,e={field:r}),({field:r}=e);const i=this.name+(r?`.${r}`:"");if(this.listeners[i])for(let e=0;e<this.listeners[i].length;e++)if(this.listeners[i][e]===t)return this.listeners[i].pop(e),n?n(null,!0):null;return n?n(null,!1):null}removeListeners(e,t,n){if(!Array.isArray(e))return"function"==typeof e?this.removeListener({},e,n):e.field&&this.removeListener(e,t,n),n?.("missing fields");let r=0;for(let n=0;n<e.length;n++){let o=null;const s=e[n];var i;"string"==typeof s?o=s:s.field&&(({field:o}=s),i=e[n].listener);const a="configService"+(o?`.${o}`:"");if(!i){if(!t||"function"!=typeof t)continue;i=t}for(let e=0;e<this.listeners[a].length;e++)this.listeners[a][e]===i&&(this.listeners[a].pop(n),r++)}return r<e.length?n?.("All listeners could not be found",!1):n?n(null,!0):null}get(e,t){u.default.system.debug("ConfigClient.Get",e),u.default.system.deprecated("This functionality has been deprecated. It will be removed in a future Finsemble release. Use getValue instead.",e),1===arguments.length?(t=e,o.default.args(t,"function"),e={}):o.default.args(e,"object",t,"function"),this.routerClient.query("config.get",e,((e,n)=>{t(e,n?n.data:null)}))}processAndSet(e,t){if(u.default.system.debug("ConfigClient.processAndSet",e),o.default.args(e,"object",t,"function=")&&o.default.args2("params.newConfig",e.newConfig,"object","params.overwrite",e.overwrite,"boolean=","params.replace",e.replace,"boolean="),!e.overwrite&&e.replace){const e="cannot use replace option unless overwrite is also true";u.default.system.warn("ConfigClient.processAndSet:",e),t&&t(e,null)}else this.routerClient.query("config.processAndSet",e,((e,n)=>{t&&t(e,n?n.data:null)}))}setPreference(e,t){this.routerClient.query("PreferencesService.setPreference",e,((e,n)=>{t&&t(e,n?n.data:null)}))}async getPreferences(e){await a.default.waitForStartup("preferencesService"),this.routerClient.query("PreferencesService.getPreferences",{},((t,n)=>{u.default.system.debug("ConfigClient.getPreferences response",n),e&&e(t,n?n.data:null)}))}async unsetPreference(e,t){u.default.system.debug("ConfigClient.unsetPreference",e),this.routerClient.query("PreferencesService.unsetPreference",e,((e,n)=>{t&&t(e,n?n.data:null)}))}}const l=new c({startupDependencies:{services:["configService"]},onReady(e){e&&e()},name:"configClient"});t.default=l},68718:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(5939),o=n(72669),s=r(n(39319)),a=r(n(72551)),u=n(87063).F,c=window,l=new i.EventEmitter;function f(e,t=u){const n=[];return e.keys.forEach((e=>{if("string"!=typeof e)return a.default.system.error("FSBL.Clients.HotkeyClient - one of the keys passed into a function was not a string: ",e);e=e.toLowerCase();const r=t[e];if(!r)return a.default.system.error(`FSBL.Clients.HotkeyClient - At least one of the key codes does not map to a supported key - registering hotkey unsuccessful. Unsupported keys: ${e}`);n.push(r)})),n}const d=function(e){this.cb=e,this.shift=!1,this.ctrl=!1,this.cmd=!1,this.capsLock=!1,this.initialize()};d.prototype.keyup=function(e){switch(e.key){case"Shift":return this.shift=!1,void this.cb({key:e.key,e,keystroke:this});case"Control":case"Alt":return this.ctrl=!1,void this.cb({key:e.key,e,keystroke:this});case"Meta":case"Win":return this.cmd=!1,void this.cb({key:e.key,e,keystroke:this})}this.key&&this.cb({key:this.key,e,keystroke:this})},d.prototype.keydown=function(e){if(!this.noKeyCapture)switch(this.key=e.key,e.key){case"Meta":case"Win":this.cmd=!0;break;case"Shift":this.shift=!0;break;case"Control":case"Alt":this.ctrl=!0;break;case"CapsLock":this.capsLock=!this.capsLock;break;case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"Up":case"Down":case"Left":case"Right":this.key=null,this.cb({key:e.key,e,keystroke:this})}},d.prototype.keypress=function(e){if(this.noKeyCapture)return;const t=e.which;t<32||t>222||(this.key=e.key)},d.prototype.initialize=function(){const e=this;document.addEventListener("keyup",(t=>{e.keyup(t)})),document.addEventListener("keydown",(t=>{e.downValue=t.key,e.keydown(t)})),document.addEventListener("keypress",(t=>{e.keypress(t)})),window.addEventListener("blur",(t=>{e.ctrl=!1,e.cb({key:"Control",e:t,keystroke:e})}))};const h=[];class p extends o._BaseClient{constructor(e){super(e),this.onClose=e=>{this.removeAllHotkeys(e)},this.keyMap=u,this.listenForHotkeys=this.listenForHotkeys.bind(this),this.routerClient=s.default,this.localListeners={}}addLocalHotkey(e,t,n=(()=>{})){a.default.system.info("HotkeyClient.addLocalHotkey"),a.default.system.debug("HotkeyClient.addLocalHotkey, keyArr: ",e);const r=f({keys:e}).sort().toString(),i=()=>{document.hasFocus()&&t()};this.localListeners[r]||(this.localListeners[r]={}),this.localListeners[r][t]=i,l.addListener(r,i),this.routerClient.query("hotkeysService.registerGlobalHotkey",{keys:r,windowName:this.windowName},n)}addBrowserHotkey(e,t){this.KeyStroke||(this.KeyStroke=new d((e=>{const{key:t,keystroke:n}=e,r=[t];n.ctrl&&r.push("control"),n.shift&&r.push("shift"),n.alt&&r.push("alt"),n.cmd&&r.push("command");const i=r.sort().toString();h.forEach((e=>{const t=e.keyString.toUpperCase(),n=i.toUpperCase();n!==t&&n.replace(/(CONTROL|COMMAND)/,"COMMANDORCONTROL")!==t||e.handler()}))})));const n=f({keys:e}).sort().toString();h.push({keyString:n,handler:t})}removeLocalHotkey(e,t,n=(()=>{})){a.default.system.info("HotkeyClient.removeLocalHotkey"),a.default.system.debug("HotkeyClient.removeLocalHotkey, keyArr: ",e);const r=f({keys:e}).sort().toString(),i=this.localListeners[r][t];l.removeListener(r,i),this.routerClient.query("hotkeysService.unregisterGlobalHotkey",{keys:r,windowName:this.windowName},n)}addGlobalHotkey(e,t,n=(()=>{})){a.default.system.info("HotkeyClient.addGlobalHotkey"),a.default.system.debug("HotkeyClient.addGlobalHotkey, keyArr: ",e);const r=f({keys:e}).sort().join("+");l.addListener(r,t),this.routerClient.query("hotkeysService.registerGlobalHotkey",{keys:r,windowName:this.windowName},n)}removeGlobalHotkey(e,t,n=(()=>{})){a.default.system.info("HotkeyClient.removeGlobalHotkey"),a.default.system.debug("HotkeyClient.removeGlobalHotkey, keyArr: ",e);const r=f({keys:e}).sort().join("+");l.removeListener(r,t),this.routerClient.query("hotkeysService.unregisterGlobalHotkey",{keys:r,windowName:this.windowName},n)}listenForHotkeys(){const e=this;this.routerClient.addListener("HotkeyTriggered",((t,n)=>{t?console.error(`Hotkey Channel Error: ${JSON.stringify(t)}`):n.data.windows.includes(e.windowName)&&l.emit(n.data.keys)}))}removeAllHotkeys(e){l.removeAllListeners(),this.routerClient.query("hotkeysService.removeAllHotkeysForWindow",{windowName:this.windowName},e)}}const y=new p({onReady(e){y.listenForHotkeys(),e&&e()},name:"hotkeyClient"});c.Keystroke=d,t.default=y},9562:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=n(72669),u=s(n(95376)),c=o(n(76420)),l=s(n(13712)),f=n(51742),d=s(n(72551)),h=n(75688),p=window,y={};class g extends a._BaseClient{constructor(e){super(e),l.default.args(e,"object=")&&e&&l.default.args2("params.onReady",e.onReady,"function="),this.windowClient=e.clients.windowClient}getComponentList(e=Function.prototype){return l.default.args(e,"function="),new Promise((t=>{this.routerClient.query("Launcher.componentList",{},((n,r)=>{e(n,r.data),t({err:n,data:r.data})}))}))}getComponentDefaultConfig(e,t=Function.prototype){return l.default.args(t,"function="),new Promise((n=>{this.routerClient.query("Launcher.componentList",{},((r,i)=>{const o=i.data[e];t(r,o),n({err:r,data:o})}))}))}getMonitorInfo(e={},t=Function.prototype){const n=this;return l.default.args(t,"function="),d.default.system.debug("MONITOR: launcherClient.getMonitorInfo"),"all"===e.monitor?n.getMonitorInfoAll(t):new Promise((r=>{c.getMyWindowIdentifier((i=>{e.windowIdentifier||(e.windowIdentifier=i),n.routerClient.query("Launcher.getMonitorInfo",e,((e,n)=>{t&&t(e,n.data),d.default.system.log("MONITOR: launcherClient.getMonitorInfo query response data",n.data),r({err:e,data:n.data})}))}))}))}getMonitorInfoAll(e=Function.prototype){return l.default.args(e,"function="),d.default.system.debug("MONITOR: launcherClient.getMonitorInfoAll"),new Promise(((t,n)=>{this.routerClient.query("Launcher.getMonitorInfoAll",{},((r,i)=>{r&&(n({err:r}),e(r)),t({err:r,data:i.data}),e(r,i.data)}))}))}registerComponent(e,t=Function.prototype){return new Promise((n=>{this.routerClient.query("LauncherService.registerComponent",e,((e,r)=>{t&&t(e,r.data),n({err:e,data:r.data})}))}))}unRegisterComponent(e,t=Function.prototype){return e.componentType?new Promise((n=>{this.routerClient.query("LauncherService.unRegisterComponent",e,((e,r)=>{t&&t(e,r.data),n({err:e,data:r.data})}))})):t("No componentType provided")}locatorToIdentifier(e){let t={};return t.windowName="windowName"in e?e.windowName:"","componentType"in e&&(t.componentType=e.componentType),"uuid"in e&&(t.uuid=e.uuid),t}toggleWindowOnClick(e,t,n){const r=this;let i=this.locatorToIdentifier(t),o=`${i.windowName}:${i.uuid}`;i.windowName||(o=i.componentType),!1!==y[o]?(n.position||(n.position="absolute"),this.showWindow(t,n,(function(t,n){if(!n)return;const{finWindow:i}=n;var s=function(){y[o]=!0,r.windowClient.isMouseOverDOMElement(e,(e=>{y[o]=!e})),i.removeEventListener("blurred",s)};i.addEventListener("blurred",s)}))):y[o]=!0}showWindow(e,t,n=Function.prototype){l.default.args(e,"object",t,"object=",n,"function=");const r=this;return t||(t={}),(t=c.clone(t)).staggerPixels||0===t.staggerPixels||(t.staggerPixels=100),t.windowIdentifier=this.locatorToIdentifier(e),new Promise((e=>{c.getMyWindowIdentifier((i=>{t.relativeWindow||(t.relativeWindow=i),r.routerClient.query("Launcher.showWindow",t,(async(t,r)=>{if(t)return e({err:t}),n(t);const i=r.data.windowIdentifier;r.data.windowIdentifier.name=r.data.windowIdentifier.windowName;const{wrap:o}=await h.FinsembleWindow.getInstance({name:i.windowName});r.data.finWindow=o,e({err:t,data:r.data}),n(t,r.data)}))}))}))}spawn(e,t,n=Function.prototype){const r=this;return l.default.args(e,"string",t,"object=",n,"function="),t||(t={}),(t=c.clone(t)).component=e,t.options||(t.options={}),t.options.customData||(t.options.customData={}),t.staggerPixels||0===t.staggerPixels||(t.staggerPixels=50),d.default.system.debug(`LauncherClient.spawn starting for componentType:${e}`),new Promise((i=>{c.getMyWindowIdentifier((o=>{t.launchingWindow=o,r.callSpawn(t,((t,r)=>{d.default.system.debug(`LauncherClient.spawn completing for componentType:${e}`,t),i({err:t,response:r}),n(t,r)}))}))}))}callSpawn(e,t=Function.prototype){const n=this;return l.default.args(t,"function="),d.default.perf.debug("CallSpawn","start","from spawn to callback",e),new Promise((r=>{function i(e,n){t(e,n),r({err:e,data:n})}n.routerClient.query("Launcher.spawn",e,(async(e,t)=>{if(d.default.system.debug("CallSpawn","Initial launcher callback params",e,t),d.default.perf.debug("CallSpawn","Initial launcher callback",t),e)return i(e,t.data),d.default.system.error("LauncherClient.callSpawn",e);t.data.windowIdentifier.name=t.data.windowIdentifier.windowName;var r=t.data;if(r.windowDescriptor.native)return i(e,r);const o=r.windowIdentifier,{wrap:s}=await h.FinsembleWindow.getInstance({name:o.windowName});r.finWindow=s;const a=`Finsemble.${r.windowIdentifier.windowName}.componentReady`,u=n.routerClient.subscribe(a,((t,o)=>{if(t)return d.default.system.error(t);o&&0===Object.keys(o.data).length||(d.default.perf.debug("CallSpawn","stop"),i(e,r),n.routerClient.unsubscribe(u))}))}))}))}getMonitor(e,t=Function.prototype){return d.default.system.deprecated("This method is deprecated and will be removed in a future release. Method getMonitorInfo should be used instead."),l.default.args(t,"function="),this.getMonitorInfo({windowIdentifier:e},t)}getMyWindowIdentifier(e=Function.prototype){return l.default.args(e,"function="),new Promise((t=>{c.getMyWindowIdentifier((n=>{e(n),t(n)}))}))}getActiveDescriptors(e=Function.prototype){return l.default.args(e,"function="),new Promise((t=>{this.routerClient.query("Launcher.getActiveDescriptors",{},((n,r)=>{n&&d.default.system.error(n),e(n,r.data),t({err:n,data:r.data})}))}))}getActiveAndPendingWindowNames(e=Function.prototype){return new Promise((t=>{this.routerClient.query("Launcher.getActiveAndPendingWindowNames",{},((n,r)=>{n&&d.default.system.error(n),e(n,r.data),t({err:n,data:r.data})}))}))}async getPendingWindows(){const{err:e,response:t}=await this.routerClient.query("Launcher.getPendingWindows",{});return e&&d.default.system.error("Error retrieving pending windows:",e),{err:e,data:t.data}}addUserDefinedComponent(e,t=Function.prototype){return l.default.args(t,"function="),new Promise((n=>{this.routerClient.query("Launcher.userDefinedComponentUpdate",{type:"add",name:e.name,url:e.url},((e,r)=>{t(e,r.data),n({err:e,data:r.data})}))}))}removeUserDefinedComponent(e,t=Function.prototype){return l.default.args(t,"function="),new Promise((n=>{this.routerClient.query("Launcher.userDefinedComponentUpdate",{type:"remove",name:e.name,url:e.url},((e,r)=>{t(e,r.data),n({err:e,data:r.data})}))}))}getComponentsThatCanReceiveDataTypes(e,t=Function.prototype){return l.default.args(t,"function="),new Promise((n=>{if(!e||!e.dataTypes){const e="Invalid params. Expected: {dataTypes: string[]}";return t(e),n({err:e})}Array.isArray(e.dataTypes)||(e.dataTypes=[e.dataTypes]),this.routerClient.query("LauncherService.getComponentsThatCanReceiveDataTypes",e,((e,r)=>{t(e,r.data),n({err:e,data:r.data})}))}))}bringWindowsToFront(e={},t=Function.prototype){return l.default.args(t,"function="),e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),e.groupName&&l.default.args(e.groupName,"string"),e.componentType&&l.default.args(e.componentType,"string"),this.routerClient.query("LauncherService.bringWindowsToFront",e,((e,n)=>{t(e,n)})),Promise.resolve()}hyperFocus(e,t=Function.prototype){return d.default.system.deprecated("hyperFocus is deprecated as of version 4.0.0. This functionality may be removed in a future release"),l.default.args(t,"function="),e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),e.windowList||e.groupName||e.componentType||(e.windowList=[this.myWindowIdentifier]),e.groupName&&l.default.args(e.groupName,"string"),e.componentType&&l.default.args(e.componentType,"string"),this.routerClient.transmit("LauncherService.hyperFocus",e),t(),Promise.resolve()}minimizeWindows(e,t=Function.prototype){return l.default.args(t,"function="),e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),e.groupName&&l.default.args(e.groupName,"string"),e.componentType&&l.default.args(e.componentType,"string"),this.routerClient.transmit("LauncherService.minimizeWindows",e),t(),Promise.resolve()}createWindowGroup(e,t=Function.prototype){return l.default.args(t,"function="),e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList],delete e.groupName),l.default.args(e.groupName,"string"),new Promise((n=>{if(!e.groupName){const e="Invalid Parameters";return n({err:e}),void t(e)}this.routerClient.query("LauncherService.createWindowGroup",e,((e,r)=>{t(e,r),n({err:e,data:r})}))}))}addWindowsToGroup(e,t=Function.prototype){return l.default.args(t,"function="),new Promise((n=>{if(!e.groupName||!e.windowList){const e="Invalid Parameters";return n({err:e}),void t(e)}e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),l.default.args(e.groupName,"string"),this.routerClient.query("LauncherService.addWindowsToGroup",e,((e,r)=>{t(e,r),n({err:e,data:r})}))}))}removeWindowsFromGroup(e,t=Function.prototype){return l.default.args(t,"function="),new Promise((n=>{if(!e.groupName||!e.windowList){const e="Invalid Parameters";return n({err:e}),void t(e)}e.windowList&&!Array.isArray(e.windowList)&&(e.windowList=[e.windowList]),this.routerClient.query("LauncherService.removeWindowsFromGroup",e,((e,r)=>{t(e,r),n({err:e,data:r})}))}))}getGroupsForWindow(e,t=Function.prototype){return l.default.args(t,"function="),"function"==typeof e&&(t=e,e=null),new Promise((n=>{e&&e.windowIdentifier?this.routerClient.query("LauncherService.getGroupsForWindow",e,((e,r)=>{n({err:e,data:r.data}),t(e,r.data)})):this.windowClient.getComponentState({field:"finsemble:windowGroups"},((e,r)=>{n({err:e,data:r}),t(e,r)}))}))}addToGroups(e,t=Function.prototype){return l.default.args(t,"function="),l.default.args(e.groupNames,"array"),e.windowIdentifier||(e.windowIdentifier=this.myWindowIdentifier),new Promise((n=>{this.routerClient.query("LauncherService.addWindowToGroups",e,((e,r)=>{t(e,r),n({err:e,data:r})}))}))}_createWrap(e,t){this.routerClient.query("LauncherService.createWrap",e,t)}start(e){const t=this;if(void 0!==p.FSBL){function n(){t.routerClient.subscribe(`Finsemble.LauncherService.updateGroups.${t.windowName}`,((e,n)=>{Array.isArray(n.data)&&t.windowClient.setComponentState({field:"finsemble:windowGroups",value:n.data})}))}p.FSBL.addEventListener("onReady",(()=>{t.windowClient.onReady((()=>{t.windowClient.getComponentState({field:"finsemble:windowGroups"},((e,r)=>{if(!e&&r)return t.addToGroups({groupNames:r},n);n()}))}))}))}setInterval((()=>{t.routerClient.transmit("Finsemble.heartbeat",{type:"component",windowName:t.windowName,componentType:"finsemble",isBrowserView:f.System.isBrowserView()})}),1e3),this.getMyWindowIdentifier((n=>{t.myWindowIdentifier=n,e&&e()}))}}let m;function v(e){return(e=e||{}).windowClient||(e.windowClient=u.default),new g({clients:e,onReady(e){d.default.system.debug("launcherClient ready",window.name),d.default.perf.debug("LauncherClientReadyTime","stop"),m.start(e)},name:"launcherClient"})}m=v(),m.constructInstance=v,t.default=m},75729:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocalLogger=void 0;const{debug:n,warn:r,log:i,error:o}=console,s=()=>{},a=s,u={warn:r,info:s,log:i,debug:n,error:o,verbose:a,deprecated:o},c={Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0,Verbose:!0,LocalOnly:!1},l={console:{Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0},dev:c,system:c,perf:c};function f(e){return"logger.service.logMessages"===e}t.LocalLogger=class{constructor(){this.start=()=>{},this.isLogMessage=f,this.setting=()=>l,this.callStack=()=>function(){const{stack:e}=function(){try{throw Error("")}catch(e){return e}}(),t=("\n",4,e.split("\n",4).join("\n").length);return`Log Stack: \n${e.substring(t).substr(1)}`}(),this.unregisterClient=()=>{},this.setRouterClient=()=>{},this.warn=r,this.info=s,this.log=i,this.debug=n,this.error=o,this.verbose=a,this.system=u,this.perf=u,this.deprecated=o}}},72551:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=t.LoggerConstructor=void 0;const r=n(51742),i=n(75729),o=n(16925),s={Error:!0,Warn:!0,Info:!1,Log:!0,Debug:!1,Verbose:!1,LocalOnly:!1},a={Error:!0,Warn:!0,Info:!0,Log:!0,Debug:!0},u=n(38172);t.LoggerConstructor=function(e){const i=this;let c;i.RouterClient=e&&e.RouterClient;let l=!1,f=!1;const d=i;let h,p,y=0,g=0;this.startupTime=0;let m=[];if("undefined"==typeof window)return;let v=r.System.Window.getCurrent().name;window.top!==window&&(v=`${v}.Frame`),this.onLogStateChangeCallback=[];let w={console:a,dev:s,system:s,perf:s};function _(e,t,n){this.category=e,!c&&r.System.isBrowserView()&&(c=r.System.getViewId()),this.logClientName=c?`${v}: view-${c}`:v,this.logType=t,this.logData=n,this.logTimestamp=window.performance.timing.navigationStart+window.performance.now()+y}function b(e,t){e&&e.dev&&(w=e,i.onLogStateChangeCallback.forEach((t=>{t(e)}))),function(e){d.system.debug("Logger updateQueueBasedOnState",e,y,"QUEUE LENGTH",m.length,w);const t=[];for(let n=0,{length:r}=m;n<r;n++)if(w[m[n].category][m[n].logType]&&!w[m[n].category].LocalOnly)e&&(m[n].logTimestamp=m[n].logTimestamp+y),t.push(m[n]);else if(w[m[n].category][m[n].logType]&&w[m[n].category].LocalOnly){const e=m[n];console.log(e.category,e.logType,e.logTimestamp-window.performance.timing.navigationStart,e.logData,"(Previously queued!)")}m=t}(t)}function S(){const{stack:e}=function(){try{throw Error("")}catch(e){return e}}(),t=("\n",4,e.split("\n",4).join("\n").length);return`Log Stack: \n${e.substring(t).substr(1)}`}this.onStateChanged=e=>{-1===this.onLogStateChangeCallback.indexOf(e)&&this.onLogStateChangeCallback.push(e)},this.setClientName=function(e){console.error("logger.setClientName() is deprecated"),v=e},this.getClientName=function(){return console.error("logger.getClientName() is deprecated"),v},this.clearMessageList=function(){m=[]},this.callStack=function(){return S()},this.setting=function(){return w};const C=console.error,E=console.warn,I=console.info,O=console.log,A=console.debug;function T(e){return e.reduce(((e,t)=>e.concat(Array.isArray(t)?T(t):t)),[])}function L(e,t){try{e.apply(console,T(t))}catch(e){(t=[]).push(S())}}let R=()=>{m.length>0&&(i.RouterClient.transmit("logger.service.logMessages",m),d.clearMessageList())};function k(e,n,r){let i,o=!1,s=!0;"forceObjectsToLogger"===r[0]&&(o=!0,s=!1,r.splice(0,1)),r=r.map((e=>s&&function(e){const t=[],n=[e];let r=0,i=0;for(;n.length&&i<1e3;){i++;const e=n.pop();if("boolean"==typeof e)r+=4;else if("string"==typeof e)r+=2*e.length;else if("number"==typeof e)r+=8;else if("object"==typeof e&&-1===t.indexOf(e)){t.push(e);for(const t in e)n.push(e[t])}}return r}(e)>5e4?(L(I,["Message too large to send to the logger.",r]),"Log argument greater than 50KB. Check local Console to see output of the object."):e));try{for(let e=0;e<r.length;e++)r[e]instanceof Error&&(r[e]=r[e].toString());i=new _(e,n,JSON.stringify(r))}catch(t){r.splice(0,r.length),r.push(S()),i=new _(e,n,`*** Logging Error: ${JSON.stringify(r)}`)}o||!function(e){return!0===e.logData.includes("Finsemble.heartbeat")}(i)?function(e){if(m.length<2e4)m.push(e);else{console.error("Logging Queue Overflowed! Dumping queue here then continuing.",m.length);let e,n=0;for(;e=m.shift();)console.log("Message "+n++,e);t.Logger.system.error("Logging Queue Overflowed! Dumping queue in client then continuing.")}}(i):++g<=5&&L(I,[`"Filtered Logger Message (${g} of first 5 shown)`,i]),f&&R()}function N(){const{windowName:e}=o.Startup.getInstance().getStartupData();v=e,window.top!==window&&(v=`${v}.Frame`);const t=`finsemble.logger.client.${v}`;!c&&r.System.isBrowserView()&&(c=r.System.getViewId()),d.system.debug("logger.service.registering",v),r.System.Window.getCurrent().getOptions((n=>{const r=n?.customData?.component?.centralLoggerNamePrefix;i.RouterClient.query("logger.service.register",{clientName:v,clientChannel:t,windowName:e,viewId:c,centralLoggerNamePrefix:r},((e,t)=>{if(e)setTimeout(N,750);else{for(const e of m)e.viewId=c;f=!0,d.system.debug("logger.service.registered"),h=t.data,"routerService"!==v?(y=p,b(h,!0)):b(h,!1),k("system","Debug",["Logger Registered"]),R()}}))})),i.RouterClient.addListener(t,((e,t)=>{d.system.debug("logger.client.setLogState",t.data),h=t.data,b(h,!1)}))}R=u(R,"routerService"===v?100:250,{leading:!1}),this.error=function(){const e=Array.prototype.slice.call(arguments);e.push(S()),w.dev.Error&&!w.dev.LocalOnly&&k("dev","Error",e),e.unshift(`dev error (${window.performance.now()}):`),L(C,e)},this.warn=function(){if(w.dev.Warn){const e=Array.prototype.slice.call(arguments);e.push(S()),w.dev.Warn&&!w.dev.LocalOnly&&k("dev","Warn",e),w.dev.Warn&&w.dev.LocalOnly&&(e.unshift(`dev warn (${window.performance.now()}):`),L(E,e))}},this.info=function(){if(w.dev.Info){const e=Array.prototype.slice.call(arguments);w.dev.Info&&!w.dev.LocalOnly&&k("dev","Info",e),w.dev.Info&&w.dev.LocalOnly&&(e.unshift(`dev info (${window.performance.now()}):`),L(I,e))}},this.log=function(){if(w.dev.Log){const e=Array.prototype.slice.call(arguments);w.dev.Log&&!w.dev.LocalOnly&&k("dev","Log",e),w.dev.Log&&w.dev.LocalOnly&&(e.unshift(`dev log (${window.performance.now()}):`),L(O,e))}},this.debug=function(){if(w.dev.Debug){const e=Array.prototype.slice.call(arguments);w.dev.Debug&&!w.dev.LocalOnly&&k("dev","Debug",e),w.dev.Debug&&w.dev.LocalOnly&&(e.unshift(`dev debug (${window.performance.now()}):`),L(A,e))}},this.verbose=function(){if(w.dev.Verbose){const e=Array.prototype.slice.call(arguments);w.dev.Verbose&&!w.dev.LocalOnly&&k("dev","Verbose",e),w.dev.Verbose&&w.dev.LocalOnly&&(e.unshift(`dev verbose (${window.performance.now()}):`),L(A,e))}},this.deprecated=this.error,this.system={},this.system.error=function(){const e=Array.prototype.slice.call(arguments);e.push(S()),w.system.Error&&!w.system.LocalOnly&&k("system","Error",e),e.unshift(`system error (${window.performance.now()}):`),L(C,e)},this.system.warn=function(){if(w.system.Warn){const e=Array.prototype.slice.call(arguments);e.push(S()),w.system.Warn&&!w.system.LocalOnly&&k("system","Warn",e),w.system.Warn&&w.system.LocalOnly&&(e.unshift(`system warn (${window.performance.now()}):`),L(E,e))}},this.system.info=function(){if(w.system.Info){const e=Array.prototype.slice.call(arguments);w.system.Info&&!w.system.LocalOnly&&k("system","Info",e),w.system.Info&&w.system.LocalOnly&&(e.unshift(`system info (${window.performance.now()}):`),L(I,e))}},this.system.log=function(){if(w.system.Log){const e=Array.prototype.slice.call(arguments);w.system.Log&&!w.system.LocalOnly&&k("system","Log",e),w.system.Log&&w.system.LocalOnly&&(e.unshift(`system log (${window.performance.now()}):`),L(O,e))}},this.system.debug=function(){if(w.system.Debug){const e=Array.prototype.slice.call(arguments);w.system.Debug&&!w.system.LocalOnly&&k("system","Debug",e),w.system.Debug&&w.system.LocalOnly&&(e.unshift(`system debug (${window.performance.now()}):`),L(A,e))}},this.system.verbose=function(){if(w.system.Verbose){var e=Array.prototype.slice.call(arguments);w.system.Verbose&&!w.system.LocalOnly&&k("system","Verbose",e),w.system.Verbose&&w.system.LocalOnly&&((e=Array.prototype.slice.call(arguments)).unshift(`system log (${window.performance.now()}):`),L(A,e))}},this.system.deprecated=this.system.error,this.perf={},this.perf.error=function(){const e=Array.prototype.slice.call(arguments);e.push(S()),w.perf.Error&&!w.perf.LocalOnly&&k("perf","Error",e),e.unshift(`perf error (${window.performance.now()}):`),L(C,e)},this.perf.warn=function(){if(w.perf.Warn){const e=Array.prototype.slice.call(arguments);e.push(S()),w.perf.Warn&&!w.perf.LocalOnly&&k("perf","Warn",e),w.perf.Warn&&w.perf.LocalOnly&&(e.unshift(`perf warn (${window.performance.now()}):`),L(E,e))}},this.perf.info=function(){if(w.perf.Info){const e=Array.prototype.slice.call(arguments);w.perf.Info&&!w.perf.LocalOnly&&k("perf","Info",e),w.perf.Info&&w.perf.LocalOnly&&(e.unshift(`perf info (${window.performance.now()}):`),L(I,e))}},this.perf.log=function(){if(w.perf.Log){const e=Array.prototype.slice.call(arguments);w.perf.Log&&!w.perf.LocalOnly&&k("perf","Log",e),w.perf.Log&&w.perf.LocalOnly&&(e.unshift(`perf log (${window.performance.now()}):`),L(O,e))}},this.perf.debug=function(){if(w.perf.Debug){const e=Array.prototype.slice.call(arguments);w.perf.Debug&&!w.perf.LocalOnly&&k("perf","Debug",e),w.perf.Debug&&w.perf.LocalOnly&&(e.unshift(`perf debug (${window.performance.now()}):`),L(A,e))}},this.perf.verbose=function(){if(w.perf.Verbose){const e=Array.prototype.slice.call(arguments);w.perf.Verbose&&!w.perf.LocalOnly&&k("perf","Verbose",e),w.perf.Verbose&&w.perf.LocalOnly&&(e.unshift(`perf verbose (${window.performance.now()}):`),L(A,e))}},this.perf.deprecated=this.perf.error,this.unregisterClient=function(e=null,t=Function.prototype){d.system.debug("logger.service.unregister",v,e,c),R();const n=e||{clientName:v,viewId:c};i.RouterClient.query("logger.service.unregister",n,t)},this.isLogMessage=function(e){return"logger.service.logMessages"===e},this.status="offline",this.setRouterClient=e=>{this.RouterClient=e},this.start=function(){let e;this.startupTime=performance.now(),i.RouterClient||(console.log("No instance of the RouterClient found for this instance of the Logger. Dynamically requiring it."),i.RouterClient=n(39319).default);const t=()=>{e=i.RouterClient.subscribe("Finsemble.Service.State.loggerService",((t,n)=>{"ready"===n.data.state&&(i.status="online",d.system.debug("Logger onReady",v),i.RouterClient.calibrateTimeWithRouterService((e=>{p=e,l||(i.startupTime=performance.now()-i.startupTime,N(),l=!0)})),i.RouterClient.unsubscribe(e))}))};"routerService"===window.name?i.RouterClient.query("logger.service.register",{},(e=>{e?setTimeout(t,750):t()})):i.RouterClient.onReady(t),r.System.isBrowserView()&&window.addEventListener("beforeunload",(()=>{i.unregisterClient()}))}},t.Logger="undefined"!=typeof window?new t.LoggerConstructor:new i.LocalLogger,t.default=t.Logger},40568:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RouterClientConstructor=void 0;const i=r(n(82369)),o=r(n(13712)),s=r(n(73699)),a=n(51742),u=n(72551),c=n(6192),l=n(75729),f=n(50586),d=[];let h=u.Logger;function p(e,t={}){if(null===e||"object"!=typeof e)return e;if(e.constructor==Date||e.constructor==RegExp||e.constructor==Function||e.constructor==String||e.constructor==Number||e.constructor==Boolean)return new e.constructor(e);t=t||new e.constructor;for(const n in e)t[n]=void 0===t[n]?p(e[n],null):t[n];return t}t.RouterClientConstructor=function(){let e,t;const n={},r={},u={},y={},g={},m={},v={},w={},_={},b={};let S,C=null,E=!1;const I=[];function O(){this.header={origin:S,type:"initialHandshake"}}function A(e,t){this.header={origin:S,type:"timeCalibration"},this.clientBaseTime=e,this.serviceBaseTime=t}function T(e){this.header={origin:S,type:"addListener",channel:e}}function L(e,t,n){this.header={origin:S,type:"transmit",channel:e},this.data=t,this.options=n}function R(e){this.header={origin:S,type:"removeListener",channel:e}}function k(e){this.header={origin:S,type:"addResponder",channel:e}}function N(e,t,n){this.header={origin:S,type:"query",queryID:e,channel:t},this.data=n}function M(e,t,n){this.header={origin:S,type:"queryResponse",queryID:e,error:t},this.data=n}function P(e){this.header={origin:S,type:"removeResponder",channel:e}}function D(e,t){this.header={origin:S,type:"subscribe",subscribeID:e,topic:t}}function W(e,t){this.header={origin:S,type:"unsubscribe",subscribeID:e,topic:t}}function x(e,t){this.header={origin:S,type:"publish",topic:e},this.data=t}function j(e,t,n,r){this.header={origin:S,type:"notify",subscribeID:e,topic:t,error:n},this.data=r}function F(e,t,n){this.header={origin:S,type:"addPubSubResponder",topic:e,handleOnServer:n},this.data=t}function B(e){this.header={origin:S,type:"removePubSubResponder",topic:e}}function z(e){C?C.send(e):(h.system.info("RouterClient: Queuing message since router initialization not complete",e),d.push(e))}function $(){return this.header.origin===this.header.lastClient}function q(e,t){h.system.info("RouterClient: outgoing query response","CHANNEL",this.header.channel,"RESPONSE DATA",t,"QUERY ID",this.header.queryID),z(new M(this.header.queryID,e,t))}function U(e,t){const n=e[t.header.channel];void 0===n?h.system.warn(`RouterClient: no query responder define on channel ${t.header.channel} incoming from ${t.header.origin}`,t):t.header.error?(h.system.warn("RouterClient: queryResponder error",t),n(t.header.error,null),delete e[t.header.channel]):(t.originatedHere=$,t.sendQueryResponse=q.bind(t),h.system.info("RouterClient: incoming query","CHANNEL",t.header.channel,"FROM",t.header.origin,"QUERY MESSAGE",t),n(null,t))}function H(e,t){if(e)h.system.warn("RouterClient: income publish rejected by pubsub responder",e,t);else{y[this.header.topic]=t;const n=m[this.header.topic];if(void 0!==n)for(let r=0;r<n.length;r++)h.system.info("RouterClient: sending pubsub notify","TOPIC",this.header.topic,"NOTIFY DATA",t),z(new j(n[r],this.header.topic,e,t))}}function V(e,t){var n,r,i;(function(e){let t=!1;return void 0===e&&(t=!0),t})(t)||z(new j(this.header.subscribeID,this.header.topic,e,t)),e?h.system.warn("RouterClient: incoming subscription rejected by pubsub responder","TOPIC",this.header.topic,"MESSAGE",this):(n=m,r=this.header.topic,i=this.header.subscribeID,r in n?n[r].push(i):n[r]=[i],h.system.info("RouterClient: incoming subscription added","TOPIC",this.header.topic,"MESSAGE",this))}function G(){!function(e,t,n){let r=!1;if(t in e){const i=m[t];for(let o=0;o<i.length;o++)if(n===i[o]){i.splice(o,1),0===i.length&&delete e[t],r=!0,h.system.info("RouterClient: PubSub removeListener","TOPIC",t,"FROM",n);break}}r||h.system.warn(`RouterClient: tried to remove non-existent listener on ${t} from ${JSON.stringify(n)}`)}(m,this.header.topic,this.header.subscribeID)}function Y(i){switch(h.system.verbose("Incoming Message Type",i.header.type,i),i.header.type){case"transmit":!function(e,t){const n=e[t.header.channel]||[],r=[];if(Array.isArray(n)&&0!==n.length){t.originatedHere=$,n.forEach((e=>{r.push(e)}));for(let e=0;e<r.length;e++)h.isLogMessage(t.header.channel)||h.system.info("RouterClient: incoming transmit","CHANNEL",t.header.channel,"FROM",t.header.origin,"MESSAGE",t),r[e](null,t)}else h.system.warn(`RouterClient: no listener for incoming transmit on channel ${t.header.channel} from ${t.header.origin}`,t)}(n,i);break;case"query":U(r,i);break;case"queryResponse":!function(e,t){const n=e[t.header.queryID];void 0===n?h.system.warn("RouterClient: no handler for incoming query response","QUERY ID",t.header.queryID):(function(e,t){const n=e[t];void 0!==n&&clearTimeout(n)}(b,t.header.queryID),t.header.error?(h.system.debug("RouterClient: incoming queryResponse error",t.header,"QUERY ID",t.header.queryID),n(t.header.error,t)):(h.system.info("RouterClient: incoming query response","RESPONSE MESSAGE",t,"QUERY ID",t.header.queryID),n(null,t)),delete e[t.header.queryID])}(_,i);break;case"notify":!function(e,t){const n=e[t.header.subscribeID];void 0===n?h.system.warn("RouterClient: no subscription handler defined for incoming notify for subscriberID",t.header.subscribeID,t):t.header.error?(h.system.info("RouterClient: incoming PubSub notify error for subscriberID","SUBSCRIBER ID",t.header.subscribeID,"NOTIFY MESSAGE",t),n(t.header.error,t)):(t.originatedHere=$,h.system.info("RouterClient: incoming PubSub notify","SUBSCRIBER ID",t.header.subscribeID,"NOTIFY MESSAGE",t),n(null,t))}(v,i);break;case"publish":!function(e){let t=u[e.header.topic];if(void 0===t)for(const n in g)if(g[n].test(e.header.topic)){t=u[n];break}void 0===t?h.system.warn("RouterClient: no pubsub responder defined for incoming publish","TOPIC",e.header.topic,"PUBLISH MESSAGE",e):(e.sendNotifyToAllSubscribers=H,t.publishCallback?(h.system.info("RouterClient: incoming PubSub publish callback invoked","TOPIC",e.header.topic,"PUBLISH MESSAGE",e),t.publishCallback(null,e)):(h.system.info("RouterClient: incoming PubSub publish","TOPIC",e.header.topic,"PUBLISH MESSAGE",e),e.sendNotifyToAllSubscribers(null,e.data)))}(i);break;case"subscribe":!function(e){h.system.info("RouterClient: PubSub subscribe","TOPIC",e.header.topic);let t=u[e.header.topic];if(void 0===t)for(const n in g)if(g[n].test(e.header.topic)){t=u[n];let r=y[e.header.topic];void 0===r&&(r=y[n]),y[e.header.topic]=r;break}void 0===t?h.system.warn("RouterClient: no pubsub responder defined for incoming subscribe",e):e.header.error?h.system.warn(`RouterClient: pubsub error received from router service: ${JSON.stringify(e.header.error)}`):(e.sendNotifyToSubscriber=V,t.subscribeCallback?(e.data=y[e.header.topic],t.subscribeCallback(null,e)):e.sendNotifyToSubscriber(null,y[e.header.topic]))}(i);break;case"unsubscribe":!function(e){let t=u[e.header.topic];if(void 0===t)for(const n in g)if(g[n].test(e.header.topic)){t=u[n];break}void 0===t?h.system.warn("RouterClient: no pubsub responder defined for incoming unsubscribe","TOPIC",e.header.topic,"UNSUBSCRIBE MESSAGE",e):(e.removeSubscriber=G,t.unsubscribeCallback?(h.system.info("RouterClient: incoming unsubscribe callback","TOPIC",e.header.topic,"UNSUBSCRIBE MESSAGE",e),t.unsubscribeCallback(null,e)):(h.system.info("RouterClient: incoming unsubscribe","TOPIC",e.header.topic,"UNSUBSCRIBE MESSAGE",e),e.removeSubscriber()))}(i);break;case"timeCalibration":const o=()=>{t?t(i):setTimeout((()=>{o()}),10)};o();break;case"initialHandshakeResponse":e()}}function K(e,t){t.header.lastClient=S,t.header.incomingTransportInfo=e,Y(t)}this.startupTime=0,this.notificationURL="";const J=(t,n,r)=>{let o,a;h.system.debug(`Name of transport to establish: ${n}`),this.notificationURL=t.notificationURL;let u,c,l,f,p=!1,y=0;const g=t=>{a=0,h.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient:transport ready","TRANSPORT OBJECT",t),C=t,e=f,l(),o=setInterval(l,200)};u=e=>{h.system.error("RouterClientError",e)};const m=()=>{h.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient:getClientTransport","ROUTER PARAMS:",t),i.default.getTransport(t,n,K,S,"RouterService").then(g).catch(u)};c=()=>{if(clearInterval(o),y++,y<=3)h.system.error("WINDOW LIFECYCLE:STARTUP:RouterClient: failure to connect to router service. Retrying...",y,t),m();else{const e="A cross domain transport has failed to connect. Cross domain components may not work. Please contact your administrator.";h.system.error(e,t),s.default.alert("dev","ONCE-SINCE-STARTUP","FSBL-Internal-Transport-Failure",e,{url:this.notificationURL})}},l=()=>{h.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient: sendHandshake",a),z(new O),a++>50&&c()},f=()=>{if(!p){if(h.system.debug(`WINDOW LIFECYCLE:STARTUP:RouterClient connected: Starting ${S} with transport ${C.identifier()}`),p=!0,clearInterval(o),d)for(let e=0;e<d.length;e++){h.system.debug("RouterClient: firing queued msg");const t=d[e];C.send(t)}r&&r()}},m()};function Q(){return`${S}.${f.v4()}`}function Z(e,t){let n=!1;return void 0!==e[t]&&(delete e[t],n=!0),n}this.calibrateTimeWithRouterService=function(e){let n,r=0,i=1/0;t=function(t){r++,r>5?function(t){let r=0;for(let e=1;e<5;e++){const o=t.clientBaseTime[e-1],s=t.clientBaseTime[e]-o,a=t.serviceBaseTime[e-1]-(o+s/2);s<i&&(i=s,n=a),r+=a,h.system.debug("calibrationCalculation Intermediate Values","lastRRT",s,"lastOffset",a,"fastestOffset",n,"fastestRRT",i)}r/=4,h.system.debug("RouterClient calibrationCalculation","Average Offset",r,"Chosen FastestOffset",n,t),e(n)}(t):(t.clientBaseTime.push(c.Globals.performance.timing.navigationStart+c.Globals.performance.now()),z(new A(t.clientBaseTime,t.serviceBaseTime)))},t(new A([],[]))},this.onReady=e=>new Promise((t=>{o.default.args(e,"function");const n=()=>{e&&e(),t()};E?n():I.push(n)})),this.addListener=function(e,t){h.system.info("RouterClient.addListener","CHANNEL",e),o.default.args(e,"string",t,"function"),function(e,t,n){let r=!1;const i=e[t];return void 0===i||0===i.length?(e[t]=[n],r=!0):i.push(n),r}(n,e,t)&&z(new T(e))},this.transmit=function(e,t,n={suppressWarnings:!1}){h.isLogMessage(e)||h.system.info("RouterClient.transmit","TO CHANNEL",e,"EVENT",t),o.default.args(e,"string",t,"any"),z(new L(e,t,n))},this.removeListener=function(e,t){h.system.info("RouterClient.removeListener","CHANNEL",e,"EVENT HANDLER",t),o.default.args(e,"string",t,"function"),function(e,t,n){let r=!1;const i=e[t];if(void 0!==i){const e=i.indexOf(n);e>-1?(i.splice(e,1),0===i.length&&(r=!0)):h.system.warn(`no listener defined for channel: ${t}`)}return r}(n,e,t)&&z(new R(e))},this.addResponder=(e,t)=>{if(h.system.info("RouterClient.addResponder","CHANNEL",e),o.default.args(e,"string",t,"function"),function(e,t,n){let r=!1;return void 0===e[t]&&(e[t]=n,r=!0),r}(r,e,t))z(new k(e));else{const n=`RouterClient.addResponder: Responder already locally defined for channel ${e}`;h.system.warn(n),t(n,null)}},this.query=(e,t,n,r)=>{const i=`${Q()}.${e}`,s=window.performance.timing.navigationStart+window.performance.now(),a=window.performance.timing.navigationStart,u=window.performance.now();return h.system.info("RouterClient.query","RESPONDER CHANNEL",e,"QUERY EVENT",t,"PARAMS",n,"QUERY ID",i,{timestamp:s,navstart:a,timenow:u}),r||(r=n,n={timeout:2e4}),o.default.args(e,"string",t,"any=",n,"object=",r,"function"),n=n||{},o.default.args2("params.timeout",n.timeout,"number"),new Promise((function(o){_[i]=(c,l)=>{o({err:c,response:l}),"function"==typeof r?r(c,l):h.system.warn("No response event handler passed to RouterClient.query","RESPONDER CHANNEL",e,"QUERY EVENT",t,"PARAMS",n,"QUERY ID",i,{timestamp:s,navstart:a,timenow:u})},c.Globals.runningInFSBLUnitTest||function(e,t,n,r){r>0&&(e[t]=setTimeout((()=>{h.system.warn(`RouterClient: timeout waiting on query response on channel ${n} for queryID ${t} on timer ${e[t]} timeout=${r}`)}),r))}(b,i,e,n.timeout),z(new N(i,e,t))}))},this.removeResponder=e=>{h.system.info("RouterClient.removeResponder","RESPONDER CHANNEL",e),o.default.args(e,"string"),Z(r,e)&&z(new P(e))},this.addPubSubResponder=(e,t,n,r)=>{let i,s;h.system.info("RouterClient.addPubSubResponder","TOPIC",e,"INITIAL STATE",t,"PARAMS",n),o.default.args(e,"any",t,"object=",n,"object="),n=n||{},o.default.args2("params.subscribeCallback",n.subscribeCallback,"function=","params.publishCallback",n.publishCallback,"function=")&&o.default.args2("params.unsubscribeCallback",n.unsubscribeCallback,"function="),void 0===n.subscribeCallback&&void 0===n.publishCallback&&void 0===n.unsubscribeCallback?(t=t||{},z(new F(e.toString(),t,!0)),s="success"):!function(e,t,n,r){let i=!1;return void 0===u[e.toString()]&&(e instanceof RegExp&&(g[e.toString()]=e,h.system.info(`RouterClient: PubSub RegEx added for topic ${e.toString()}`)),u[e.toString()]={subscribeCallback:t,publishCallback:n,unsubscribeCallback:r},i=!0),i}(e,n.subscribeCallback,n.publishCallback,n.unsubscribeCallback)?(i=`RouterClient.addPubSubResponder: Responder already locally defined for topic ${e}`,h.system.error(i)):(t=t||{},y[e.toString()]=p(t),z(new F(e.toString(),t,!1)),s="success"),r&&r(i,s)},this.removePubSubResponder=e=>{h.system.info("RouterClient.removePubSubResponder","TOPIC",e),o.default.args(e,"any"),Z(u,e)?(delete y[e.toString()],delete g[e.toString()],z(new B(e))):h.system.warn(`RouterClient.removePubSubResponder failed: Could not find responder for topic ${e}`)},this.subscribe=(e,t)=>{h.system.info("RouterClient.subscribe","TOPIC",e),o.default.args(e,"string",t,"function");const n=Q();return function(e,t,n,r){e[t]=n,w[t]=r}(v,n,t,e),z(new D(n,e)),{subscribeID:n,topic:e}},this.publish=(e,t)=>{h.system.info("RouterClient.publish","TOPIC",e,"EVENT",t),o.default.args(e,"string",t,"any"),z(new x(e,t))},this.unsubscribe=e=>{h.system.info("RouterClient.unsubscribe","SUBSCRIBE ID",e),o.default.args(e,"object")&&o.default.args2("subscribeIDStruct.subscribeID",e.subscribeID,"string"),!function(e,t){let n=!1;return void 0!==e[t]&&(delete e[t],n=!0),n}(v,e.subscribeID)?h.system.warn(`RouterClient.unsubscribe: Could not find subscribeID for topic ${e.topic}`):z(new W(e.subscribeID,e.topic))},this.trustedMessage=function(e){let t=!0;return h.system.debug("RouterClient.trustedMessage header",e.header),"SharedWorker"===e.header.originIncomingTransportInfo.transportID&&(t=!0),t},this.disconnectAll=function(){h.system.info("RouterClient.disconnectAll");for(const e in n)h.system.debug(`RouterClient.disconnectAll is removing listener on ${e}`),z(new R(e)),delete n[e];for(const e in r)h.system.debug(`RouterClient.disconnectAll is removing responder on ${e}`),z(new P(e)),delete r[e];for(const e in u)h.system.debug(`RouterClient.disconnectAll is removing pubsub responder on ${e}`),z(new B(e)),delete u[e.toString()],delete y[e.toString()],delete g[e.toString()];for(const e in v){const t=w[e];h.system.debug(`RouterClient.disconnectAll is removing subscriber on ${t}`),z(new W(e,t)),delete v[e],delete w[e]}},this.start=e=>new Promise((async t=>{if(this.started){const e="RouterClient.start() called twice. Ignoring second call.";return h.warn(e),t(e)}this.started=!0,h=new l.LocalLogger,"loggerService"===a.System.Window.getCurrent().name&&(h=new l.LocalLogger),S=`RouterClient.${e.windowName}.${f.v4()}`;const n=`"RouterClient Check: connecting new client for ${S}`;h.system.debug(n),console.debug(n),J(e,e.transportName,(()=>{!function(){for(h.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient Ready"),E=!0;I.length>0;)h.system.debug("WINDOW LIFECYCLE:STARTUP:RouterClient parentReady invoked"),I.shift()()}(),t(null)}))})),this.stop=()=>{this.disconnectAll(),i.default.close(),this.started=!1}}},39319:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RouterConnectionInstance=t.RouterConnectionSingleton=void 0;const r=n(40568),i=n(72551),o=n(4971);t.RouterConnectionSingleton=o.singleton("RouterClient",r.RouterClientConstructor),i.Logger.setRouterClient(t.RouterConnectionSingleton);var s=n(40568);Object.defineProperty(t,"RouterConnectionInstance",{enumerable:!0,get:function(){return s.RouterClientConstructor}}),t.default=t.RouterConnectionSingleton},63862:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.StorageClient=void 0;const i=r(n(42169)),o=r(n(13712)),s=r(n(72551)),a=n(72669),u=n(24232),c=i.default(1);class l extends a._BaseClient{constructor(){super(...arguments),this.clientReady=!1,this.delete=this.remove}setUser(e,t){this.clientReady||s.default.system.error("storageClient invoked before ready"),o.default.args(e.user,"string",t,"function="),this.routerClient.query("Storage.setUser",{user:e.user},((n,r)=>{(n?s.default.system.error:s.default.system.info)("APPLICATION LIFECYCLE:StorageClient.setUser",e,n,r),t&&t(n,r.data)}))}setStore(e,t){this.clientReady||s.default.system.error("storageClient invoked before ready"),o.default.args(e.topic,"string",e.dataStore,"string=",t,"function="),s.default.system.log("APPLICATION LIFECYCLE:StorageClient.setStore",e,t),this.routerClient.query("Storage.setStore",e,((e,n)=>{(e?s.default.system.error:s.default.system.info)("Storage.setStore",e,n),t&&t(e,n.data)}))}save(e,t){if(this.clientReady||s.default.system.error("storageClient invoked before ready"),"string"!=typeof e.key||"string"!=typeof e.topic)throw new Error("Values for key and topic must be strings.");return new Promise(((n,r)=>{o.default.args(e.topic,"string",e.key,"string",e.value,"any",t,"function="),this.routerClient.query("Storage.save",e,((e,i)=>{(e?s.default.system.error:s.default.system.info)("Storage.save",e,i),t&&t(e,i.data),e?r({err:e,data:null}):n({err:e,data:i.data})}))}))}save1(e){return c((()=>this.save(e)))}get(e,t){if(this.clientReady||s.default.system.error("storageClient invoked before ready"),"string"!=typeof e.key||"string"!=typeof e.topic)throw new Error("Values for key and topic must be strings.");return new Promise(((n,r)=>{o.default.args(e.topic,"string",e.key,"string",t,"function="),this.routerClient.query("Storage.get",e,((e,i)=>{if(e)return s.default.system.error("Storage.get",e,i),t&&t(e,i?i.data:null),r(e,i?i.data:null);s.default.system.info("Storage.get",e,i),t&&t(e,i.data),n(i.data)}))}))}get1(e,t){return c((()=>this.get(e,t)))}keys(e,t){this.clientReady||s.default.system.error("storageClient invoked before ready"),o.default.args(e.topic,"string",t,"function="),s.default.system.debug("StorageClient.keys",e,t),this.routerClient.query("Storage.keys",e,((e,n)=>{(e?s.default.system.error:s.default.system.info)("Storage.keys",e,n),t&&t(e,n.data)}))}keys1(e){return c((()=>u.promisify(this.keys.bind(this))(e)))}getMultiple(e,t){this.clientReady||s.default.system.error("storageClient invoked before ready"),s.default.system.info("StorageClient.getMultiple",e,t),this.routerClient.query("Storage.getMultiple",e,((n,r)=>{(n?s.default.system.error:s.default.system.info)("StorageClient.getMultiple:",e,r),t&&t(n,r)}))}remove(e,t){return this.clientReady||s.default.system.error("storageClient invoked before ready"),new Promise(((n,r)=>{o.default.args(e.topic,"string",e.key,"string",t,"function="),this.routerClient.query("Storage.delete",e,((e,i)=>{(e?s.default.system.error:s.default.system.info)("StorageClient.delete",e,i),t&&t(e,i.data),e?r({err:e,data:null}):n({err:e,data:i.data})}))}))}remove1(e){return c((()=>this.remove(e)))}clearCache(e){s.default.system.log("StorageClient.clearCache",e),this.routerClient.query("Storage.clearCache",null,((t,n)=>{(t?s.default.system.error:s.default.system.info)("StorageClient.clearCache",t,n),e&&e(t,n.data)}))}}t.StorageClient=l;var f=new l({onReady(e){e&&e(),f.clientReady=!0},name:"storageClient"});t.default=f},95376:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=n(57664),u=s(n(63862)),c=s(n(68718)),l=o(n(76420)),f=n(51742),d=n(72669),h=s(n(72551)),p=s(n(13712)),y=n(75688),g=n(33998),m=s(n(39319)),v=n(78379),w=s(n(70010)),_=n(24232),b=n(80089);let S;function C(e,t){return e.classList?e.classList.contains(t):!!e.className.match(new RegExp(`(\\s|^)${t}(\\s|$)`))}class E extends d._BaseClient{constructor(e){super(e),this.showAtMousePosition=function(){this.routerClient.transmit("DockingService.showAtMousePosition",this.getWindowIdentifier())},p.default.args(e,"object=")&&e&&p.default.args2("params.onReady",e.onReady,"function="),this.options={},this.windowHash="",this.title=null,this.toolbarBottom=40,this.containers=[],this.componentState={},this.windowState="normal",this.hasHeader=!1,this.enableWindowsAeroSnap=!1,this.bindFunctions(),this.minimizeWithDockedWindows=this.minimize}bindFunctions(){this.onWindowRestored=this.onWindowRestored.bind(this),this.onWindowMaximized=this.onWindowMaximized.bind(this),this.onWindowBlurred=this.onWindowBlurred.bind(this),this.onWindowFocused=this.onWindowFocused.bind(this),this.onMinimizedRestored=this.onMinimizedRestored.bind(this),this.onWindowMinimized=this.onWindowMinimized.bind(this),this.close=this.close.bind(this),this.getInitialOptions=this.getInitialOptions.bind(this),this.cacheInitialBounds=this.cacheInitialBounds.bind(this),this._setHeaderHeight=this._setHeaderHeight.bind(this)}onWindowRestored(){this.updateHeaderState("Maximize",{hide:!1})}onWindowMaximized(){this.updateHeaderState("Maximize",{hide:!0})}onWindowBlurred(){this.setActive(!1)}onWindowFocused(){this.setActive(!0)}onMinimizedRestored(){this.routerClient.transmit("DockingService.windowRestored",S.name),S.removeEventListener("restored",this.onMinimizedRestored)}onWindowMinimized(){this.routerClient.query("DockingService.windowMinimized",{windowName:S.name}),S.addEventListener("restored",this.onMinimizedRestored)}getWindowGroups(){return this.windowGroups}groupUpdateHandler(e,t){e?FSBL.Clients.Logger.error(e):t.data&&t.data.groupData&&(this.windowGroups=Object.values(t.data.groupData).filter((e=>e.windowNames.includes(this.getWindowNameForDocking()))))}close(e,t=(()=>{})){e||(e={removeFromWorkspace:!0,closeWindow:!0});const{parentWindow:n}=S;if(e.userInitiated&&n)return n.close(e,t);S.close(e,t)}getWindowHash(){return this.windowHash}getWindowTitle(){return this.title}retrieveMonitorDimensions(e=Function.prototype){l.getMonitor(null,(t=>{S.updateOptions({options:{monitorDimensions:t.monitorRect}}),e&&e(t.monitorRect)}))}listenForHashChanges(){f.System.hasBrowserView()||(S.updateOptions({url:window.top.location.href},(()=>{})),function(e){const{pushState:t}=e;e.pushState=function(n){"function"==typeof e.onpushstate&&e.onpushstate({state:n}),t.apply(e,arguments),S.updateOptions({url:window.top.location.href},(()=>{}))};const{replaceState:n}=e;e.replaceState=function(t){"function"==typeof e.onreplacestate&&e.onreplacestate({state:t}),n.apply(e,arguments),S.updateOptions({url:window.top.location.toString()})}}(window.history),window.addEventListener("hashchange",(()=>{S.updateOptions({url:window.top.location.toString()},(()=>{}))})))}getInitialOptions(e){this.isInAService?(this.options={},h.default.system.debug("WindowClient:getting options empty",this.options),e()):S.getOptions(((t,n)=>{t&&(n={}),S.windowOptions=n,this.options=n,h.default.system.debug("WindowClient:getting options",this.options),e()}))}cacheInitialBounds(e){if(f.System.hasBrowserView())return e();this.cacheBounds((()=>{try{if(!S.windowOptions.customData.foreign.components["Window Manager"].persistWindowState)return e();S.updateOptions({options:{url:window.top.location.toString()}})}catch(e){h.default.system.warn('customData.foreign.components["Window Manager" is undefined')}e()}))}setInitialWindowBounds(e){h.default.system.warn("`FSBL.Clients.WindowClient.setInitialWindowBounds is deprecated and will be removed in a future version of finsemble. Use 'getInitialOptions' and 'cacheInitialBounds' instead."),a.parallel([this.getInitialOptions,this.cacheInitialBounds],e)}getWindowBounds(){return{top:S.windowOptions.defaultTop,left:S.windowOptions.defaultLeft,width:S.windowOptions.defaultWidth,height:S.windowOptions.defaultHeight}}saveWindowBounds(e,t){if(h.default.system.debug("WINDOW LIFECYCLE:SavingBounds:",e,"setActiveWorkspaceDirty",t),void 0===t&&(t=!1),p.default.args(e,"object")&&p.default.args2("bounds.top",e.top,"number"),e){S.updateOptions({options:{top:Math.round(e.top),defaultTop:Math.round(e.top),left:Math.round(e.left),defaultLeft:Math.round(e.left),width:Math.round(e.width),defaultWidth:Math.round(e.width),height:Math.round(e.height),defaultHeight:Math.round(e.height)}});try{S.windowOptions.customData.foreign.components["Window Manager"].persistWindowState}catch(e){}}}minimize(e){this.cacheBounds((()=>{S.minimize(null,(t=>{t&&h.default.system.error("WindowClient:minimize",t),e&&e(t)}))}))}setAlwaysOnTop(e,t){S.setAlwaysOnTop({alwaysOnTop:e},t)}restore(e=(()=>{})){S.restore(null,(t=>{t&&h.default.system.error("WindowClient:restore",t),e(t)}))}cacheBounds(e){this.getBounds(((t,n)=>{if(t)return e(),console.warn("Get bounds error.",t,"Window may not be registered with the window service");S.updateOptions({options:{cachedLeft:n.left,defaultLeft:n.left,cachedTop:n.top,defaultTop:n.top,cachedWidth:n.width,defaultWidth:n.width,cachedHeight:n.height,defaultHeight:n.height}}),e&&e(n)}))}maximize(e){S.maximize(),e()}removeFinWindowEventListeners(){S.removeEventListener("maximized",this.onWindowMaximized),S.removeEventListener("restored",this.onWindowRestored),S.removeEventListener("blurred",this.onWindowBlurred),S.removeEventListener("focused",this.onWindowFocused),S.removeEventListener("close-requested",this.close),S.removeEventListener("minimized",this.onWindowMinimized)}injectDOM(e){if(h.default.system.debug("injectDOM",e),document.getElementById("FSBLHeader"))return;window.scrollTo(0,0);const t=document.createElement("div");t.innerHTML=`<div id="FSBLHeader"${e?` style=height:${e}`:""}></div>`,t.firstChild&&document.body.insertBefore(t.firstChild,document.body.firstChild)}getComponentState(e,t){if(e||(e={}),e.fields&&!Array.isArray(e.fields)&&(e.fields=[e.fields]),p.default.args(e,"object",t,"function"),S)return S.getComponentState(e,t);h.default.system.warn("Attempt to use getComponentState before component is ready or in a service"),e.windowName||(e.windowName=window.name);const n=this.getContainerHash(e.windowName);u.default.get({topic:v.WORKSPACE.CACHE_STORAGE_TOPIC,key:n},((n,r)=>{if(n)return h.default.system.error("Error retrieving window client's component state."),void t(n);const i=r;if(r&&e.field)this.componentState=i||{},t(n,i[e.field]);else{if(e.fields){const n={};for(let t=0;t<e.fields.length;t++)i[e.fields[t]]&&(n[e.fields[t]]=i[e.fields[t]]);return t(null,n)}if(r)return t(null,i);h.default.system.info("WindowClient:getComponentState:error, response, params",n,r,e),t("Not found",r)}}))}async setComponentState(e,t=(()=>{})){return p.default.args(e,"object",t,"function=")&&p.default.args2("params.field",e.field,"string"),S?S.setComponentState(e,t):this.isInAService?(t("Cannot call setComponentState in a service."),Promise.resolve()):(t("Cannot call setComponentState. The window may not be ready"),Promise.reject("The window is not yet ready to save state."))}async removeComponentState(e,t=(()=>{})){return p.default.args(e,"object",t,"function=")&&p.default.args2("params.field",e.field,"string"),(S||await y.FinsembleWindow.getInstance({name:e.windowName||window.name})).removeComponentState(e,t)}getWindowNameForDocking(){const e=S.parentWindow;return e?e.name:S.name}getContainerHash(e){return l.camelCase(this.windowHash,e)}formGroup(){S.formGroup()}registerWithDockingManager(e,t){S.parentWindow&&(h.default.system.debug("registerWithDockingManager ignore registration request if has a parent"),t&&t());const n=S.name,{uuid:r}=S;this.startedRegistrationWithDocking=!0,this.routerClient.query("DockingService.registerWindow",{name:n,uuid:r,options:e||{},windowType:"WebWindow"},(()=>{this.startedRegistrationWithDocking=!1,this.deregisterPlease&&(this.deregisterWithDockingManager(),this.deregisterPlease=!1),h.default.system.debug("WINDOW LIFECYCLE: Docking Registration complete."),t&&t()}))}deregisterWithDockingManager(e){this.startedRegistrationWithDocking&&(this.deregisterPlease=!0);const t=S.name;this.routerClient.transmit("DockingService.deregisterWindow",{name:t,userInitiated:e})}bumpFixedElements(e){if("complete"!==document.readyState)return setTimeout((()=>{this.bumpFixedElements(e)}),100);if(!e)return;let{absolute:t,fixed:n,bumpBy:r}=e;if(!t&&!n)return;const i=document.getElementById("FSBLHeader");if(!i||0===i.children.length||!i.children[0].clientHeight)return setTimeout((()=>{this.bumpFixedElements(e)}),100);"auto"===r?r="0px":-1===new String(r).indexOf("px")&&(r=`${r}px`);const o=document.body.getElementsByTagName("*"),s=o.length;for(let e=0;e<s;e++){if("FSBLHeader"===o[e].id||o[e].classList.contains("fsbl-header"))continue;const i=window.getComputedStyle(o[e],null),s=["0","0px",0],a=i.getPropertyValue("top");t&&o[e].parentNode===document.body&&"absolute"==i.getPropertyValue("position")&&("all"==t?o[e].style.top=`calc(${a} + ${r})`:"0Positioned"==t&&s.includes(a)&&(o[e].style.top=r)),n&&"fixed"==i.getPropertyValue("position")&&("all"==n?o[e].style.top=`calc(${a} + ${r})`:"0Positioned"==n&&s.includes(a)&&(o[e].style.top=r))}}bringWindowToFront(){S.bringToFront({forceFocus:!0},(e=>{e?h.default.system.error(`WindowClient.bringWindowToFront: failure:${e}`):h.default.system.info("WindowClient.bringWindowToFront: success")}))}injectStylesheetOverride(){const e=document.createElement("style");e.type="text/css",e.appendChild(document.createTextNode(S.windowOptions.customData.cssOverride)),document.body.appendChild(e)}checkIfChildApp(){if(S.windowOptions&&S.windowOptions.customData&&S.windowOptions.customData.parentUUID&&S.windowOptions.customData.parentUUID!==f.System.Application.getCurrent().uuid){const e=f.System.Application.wrap(S.windowOptions.customData.parentUUID);e.addEventListener("crashed",this.close.bind(null,!1)),e.addEventListener("initialized",this.close.bind(null,!1)),e.addEventListener("out-of-memory",this.close.bind(null,!1))}}preventUnintendedDropEvents(){function e(e){e.preventDefault()}window.addEventListener("dragover",e,!1),window.addEventListener("drop",e,!1)}rejectWindowsKeyResizes(){let e=!1;const t=async t=>{this.enableWindowsAeroSnap?"Meta"===t.key&&m.default.transmit("Finsemble.WindowService.WindowsKey","up"):"Meta"===t.key&&e&&(e=!1,f.System.Window.getCurrent().updateOptions({resizable:!0}))},n=t=>{this.enableWindowsAeroSnap?"Meta"===t.key&&m.default.transmit("Finsemble.WindowService.WindowsKey","down"):"Meta"===t.key&&(e=!0,f.System.Window.getCurrent().updateOptions({resizable:!1}))};FSBL&&c.default.onReady((()=>{window.addEventListener("keyup",t),window.addEventListener("keydown",n)}))}modifyReload(){FSBL&&c.default.onReady((()=>{c.default.addBrowserHotkey(["ctrl","r"],S.reload)}))}addListeners(e=Function.prototype){this.listenForHashChanges(),this.preventUnintendedDropEvents(),this.rejectWindowsKeyResizes(),this.modifyReload(),S.addListener("setParent",(()=>{h.default.system.info("WindowClient.setParent deregisterWithDockingManager"),this.deregisterWithDockingManager()})),S.addEventListener("maximized",this.onWindowMaximized),S.addEventListener("minimized",this.onWindowMinimized),S.addEventListener("restored",this.onWindowRestored),S.addEventListener("blurred",this.onWindowBlurred),S.addEventListener("focused",this.onWindowFocused),e()}updateHeaderState(e,t){this.commandChannel&&this.commandChannel(e,t)}headerCommandChannel(e){this.commandChannel=e}ejectFromGroup(){S.ejectFromGroup()}setWindowTitle(e){h.default.system.deprecated("This method is deprecated and will be removed in a future release. Please simply set the application's `document.title` element to change the title. Or, set `components['Window Manager'].title` in the app's manifest."),this.setWindowTitlePrivate(e)}setWindowTitlePrivate(e){p.default.args(e,"string"),this.title=e,this.updateHeaderState("Main",{windowTitle:e}),S.setTitle(e)}getSpawnData(){if(!this.options.customData)return{};const{spawnData:e}=this.options.customData;return void 0===e?{}:e}getCurrentWindow(){return f.System.Window.getCurrent()}async getDesktopBoundingBox(e){let t=e;"string"==typeof e&&(t=document.querySelector(e));const n=t.getBoundingClientRect(),r=await S.getBounds(),i=r.data;let o,s;r.err?(o=this.options.defaultTop,s=this.options.defaultLeft):(o=i.top,s=i.left);const a={top:o+n.top,left:s+n.left,width:n.width,height:n.height,right:0,bottom:0};return a.right=a.left+a.width,a.bottom=a.top+a.height,a}isPointInBox(e,t){return t.bottom||(t.bottom=t.top+t.height),t.right||(t.right=t.left+t.width),e.x>t.left&&e.x<t.right&&e.y<t.bottom&&e.y>t.top}isMouseOverDOMElement(e,t){this.getDesktopBoundingBox(e).then((e=>{f.System.getMousePosition(((n,r)=>{t(this.isPointInBox(r,e))}))}))}getWindowIdentifier(){var e=null;return this.options&&this.options.customData&&this.options.customData.component&&(e=this.options.customData.component.type),{windowName:S?S.name:window.name,uuid:S?S.uuid:null,componentType:e}}setActive(e){var t,n;e?(n="desktop-active",(t=document.documentElement).classList?t.classList.add(n):C(t,n)||(t.className=`${t.className} ${n}`)):function(e,t){if(e.classList)e.classList.remove(t);else if(C(e,t)){const n=new RegExp(`(\\s|^)${t}(\\s|$)`);e.className=e.className.replace(n," ")}}(document.documentElement,"desktop-active")}getBounds(e){S.getBounds(((t,n)=>{e(t,n)}))}setShape(e,t=Function.prototype){S.setShape(e,t)}startTilingOrTabbing(e,t=Function.prototype){FSBL.Clients.RouterClient.transmit("DockingService.startTilingOrTabbing",e),t()}startMovingWindow(e){f.System.Window.getCurrent().startMovingWindow(e)}stopMovingWindow(){f.System.Window.getCurrent().stopMovingWindow()}cancelTilingOrTabbing(e,t=Function.prototype){console.debug("CancelTilingOrTabbing"),m.default.transmit("DockingService.cancelTilingOrTabbing",e),t()}sendIdentifierForTilingOrTabbing(e,t=Function.prototype){FSBL.Clients.RouterClient.transmit("DockingService.identifierForTilingOrTabbing",e),t()}stopTilingOrTabbing(e,t=Function.prototype){const n=()=>{m.default.query("DockingService.stopTilingOrTabbing",e,(()=>{t()})),m.default.transmit("DockingService.stopTilingOrTabbing",e)};return e.mousePosition?(n(),e.allowDropOnSelf?void 0:t()):f.System.getMousePosition(((r,i)=>{if(e.mousePosition=i,n(),!e.allowDropOnSelf)return t()}))}getStackedWindow(e,t){if(h.default.system.debug("WindowClient.getStackedWindow",e),t=t||e,(e=e||{}).windowIdentifiers=e.windowIdentifiers||[],!S.parentWindow&&e.create){const n=e=>{const{parentName:r}=e.data;S.setParent({windowName:r},((e,n)=>{t?.(e,n)})),S.removeListener("parent-set",n)};S.addListener("parent-set",n),FSBL.Clients.LauncherClient.spawn("StackedWindow",{windowType:"StackedWindow",data:{windowIdentifiers:e.windowIdentifiers},options:{newStack:!0}},((e,n)=>{h.default.system.debug("WindowClient.getStackedWindow-success",e,n),e&&t?.(e,null)}))}else S.getParent(t)}getMonitorInfo(e,t){l.getMyWindowIdentifier((n=>{e.windowIdentifier||(e.windowIdentifier=n),this.routerClient.query("Launcher.getMonitorInfo",e,((e,n)=>{t&&t(e,n.data)}))}))}fitToDOM(e,t){let n=document.documentElement.offsetHeight,r=this.options.width;"function"==typeof e&&(t=e,e=null),e&&e.padding&&(e.padding.height&&(n+=e.padding.height),e.padding.width&&(r+=e.padding.width)),e&&e.maxHeight&&n>e.maxHeight&&(n=e.maxHeight),h.default.system.debug("WindowClient.FitToDOM:newHeight",n,e),this.getMonitorInfo({},((e,i)=>{i&&(n>=i.availableRect.height&&(n=i.availableRect.height),r>=i.availableRect.width&&(r=i.availableRect.width)),h.default.system.debug("WindowClient.FitToDOM:fixBounds",n,r),S.getBounds(((e,i)=>{i.width!=r||i.height!=n?(i.width=r,i.height=n,S.setBounds({bounds:i},t)):"function"==typeof t&&t()}))}))}_setHeaderHeight(e){let t=document.getElementsByClassName("fsbl-header")[0];if(!t)return setTimeout((()=>{this._setHeaderHeight(e)}),100);let n=window.getComputedStyle(t,null).getPropertyValue("height");document.body.style.marginTop=n,e.bumpElements&&"auto"===e.bumpElements.bumpBy&&(e.bumpElements.bumpBy=n),this.bumpFixedElements(e.bumpElements)}async start(e=Function.prototype){if(p.default.args(e,"function"),_.iAmAServiceWindow())return this.isInAService=!0,e();setInterval((()=>{S&&document?.title&&this.title!==document.title&&(!FSBL.System.isBrowserView&&FSBL.System.hasBrowserView||this.setWindowTitlePrivate(document.title))}),200);const t=this;await w.default.getValue("finsemble");let n=null,r=!1,i=!1,o=!1;this.componentState={},(e=>{y.FinsembleWindow.getInstance({name:this.finWindow?.name,uuid:this.finWindow?.uuid},((t,n)=>{if(h.default.system.debug(`FinsembleWindow.getInstance ${this.finWindow?.name}`),"Cannot Wrap Service Manager or Services"==t)return this.isInAService=!0,this.windowHash=l.camelCase("activeWorkspace",window.name),e();!t&&n||h.default.system.error("wrap failure",t),this.finsembleWindow=n,({finsembleWindow:S}=this),this.windowHash=l.camelCase("activeWorkspace",S.name),this.addListeners(),this.routerClient.subscribe("Finsemble.WorkspaceService.groupUpdate",((e,t)=>this.groupUpdateHandler(e,t))),e()}))})((()=>{this.retrieveMonitorDimensions(),this.getInitialOptions((()=>{if(!S||!S.windowOptions)return this.isInAService||h.default.system.error("Something went wrong attempting to get the current window."),e();({customData:n}=S.windowOptions),h.default.system.debug("getInitialOptions",n),n&&(r=b(n,"window.compound",!1),n.cssOverride&&(h.default.system.debug("Window has cssOverride. See local window to inspect object"),i=!0),o=!r&&b(n,["foreign","components","Window Manager","FSBLHeader"],!1)),a.parallel([function(e){i&&t.injectStylesheetOverride(),e()},function(e){w.default.getValue("finsemble",((n,r)=>{n&&h.default.system.error("Error reading windowService config from finsemble");const i=r.services.windowService.config.enableWindowsAeroSnap;t.enableWindowsAeroSnap=g.ConfigUtilInstance.getDefault(r,"config.servicesConfig.docking.enableWindowsAeroSnap",i),e()}))},function(e){if(f.System.isBrowserView())e();else{if(!n||!n.component||_.iAmAServiceWindow())return e();{let r=g.ConfigUtilInstance.getDefault(n,"customData.foreign.services.windowService.manageWindowMovement",!1);r||(r=g.ConfigUtilInstance.getDefault(n,"customData.foreign.services.dockingService.manageWindowMovement",!1));const i=g.ConfigUtilInstance.getDefault(n,"customData.foreign.components.Window Manager.FSBLHeader",!1),o=g.ConfigUtilInstance.getDefault(n,"customData.window.dockable",!1);r=r||i||o;let s=_.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowAutoArrange",oldValue:"isArrangable"},null);if(null===s&&(s=_.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowAutoArrange",oldValue:"isArrangeable"},r)),!r&&!s)return e();if(n.window.allowAutoArrange=s,n.window.snapping=_.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowSnapping",oldValue:"ignoreSnappingRequests"},r),n&&n.foreign&&n.foreign.services){const e=void 0!==n.foreign.services.windowService?"windowService":"dockingService";void 0!==n.foreign.services[e].ignoreSnappingRequests&&(n.window.snapping=!n.foreign.services[e].ignoreSnappingRequests)}if(g.ConfigUtilInstance.getDefault(n,"customData.window.ephemeral",!1)&&!n.window.snapping&&(n.window.snapping=!1),n.window.tiling=_.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowTiling",oldValue:"ignoreTilingAndTabbingRequests"},r),n.window.tabbing=_.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowTabbing",oldValue:"ignoreTilingAndTabbingRequests"},r),n&&n.foreign&&n.foreign.services){const e=void 0!==n.foreign.services.windowService?"windowService":"dockingService";void 0!==n.foreign.services[e].ignoreTilingAndTabbingRequests&&(n.window.tiling=!n.window.tiling,n.window.tabbing=!n.window.tabbing)}n.window.canGroup=_.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowGrouping",oldValue:"canGroup"},r),n.window.canMinimize=_.checkDeprecatedConfigs(n,{baseString:"customData.foreign.services",newPath:"windowService",oldPath:"dockingService",newValue:"allowMinimize",oldValue:"canMinimize"},void 0),void 0===n.window.canMinimize&&(n.window.canMinimize=n.component.canMinimize,void 0===n.window.canMinimize&&(n.window.canMinimize=r)),void 0===n.window.canMaximize&&(n.window.canMaximize=n.component.canMaximize,void 0===n.window.canMaximize&&(n.window.canMaximize=r)),n.window.overwriteStartDocked=g.ConfigUtilInstance.getDefault(n,"customData.foreign.services.workspaceService.global",!1),t.registerWithDockingManager(n.window,(()=>{t.cacheInitialBounds(e)}))}}}],((t,n)=>e(t,n)))}))}))}}var I=new E({startupDependencies:{clients:["storageClient"]},onReady(e){I.start(e)},name:"windowClient"});t.default=I},6192:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Globals=void 0,t.Globals="undefined"==typeof window?n.g:window},4971:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.singleton=void 0,t.singleton=(e,t)=>{const r=Symbol.for(`com.finsemble.singleton.${e}`);return Object.getOwnPropertySymbols(n.g).indexOf(r)>-1||(n.g[r]=new t),n.g[r]}},78379:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.MOVE_REASON=t.LAUNCHER_SERVICE=t.HEARTBEAT_TIMEOUT_CHANNEL=t.COMPONENT_STATE_STORAGE_TOPIC=t.WINDOW_SERVICE_REQUESTS=t.WORKSPACE=t.WINDOW=t.INTERRUPTIBLE_EVENTS=t.EVENT_INTERRUPT_CHANNEL=t.DOCKING=t.SERVICE_STOP_CHANNEL=t.SERVICE_START_CHANNEL=t.WINDOWSTATE=t.SERVICES_STATE_CHANNEL=t.CLIENT_SERVER_MAPPING=t.SERVICE_QUERY_READY_CHANNEL=t.SERVICE_CLOSED_CHANNEL=t.SERVICE_CLOSING_CHANNEL=t.SERVICE_READY_CHANNEL=t.SERVICE_INITIALIZING_CHANNEL=t.APPLICATION_STATE_CHANNEL=t.WRAPPERS=void 0,t.WRAPPERS={EVENTS:["title-changed","bringToFront","setBounds","alwaysOnTop","setOpacity"]},t.APPLICATION_STATE_CHANNEL="Finsemble.Application.State",t.SERVICE_INITIALIZING_CHANNEL="Finsemble.ServiceManager.serviceInitializing",t.SERVICE_READY_CHANNEL="Finsemble.ServiceManager.serviceReady",t.SERVICE_CLOSING_CHANNEL="Finsemble.ServiceManager.serviceClosing",t.SERVICE_CLOSED_CHANNEL="Finsemble.ServiceManager.serviceClosed",t.SERVICE_QUERY_READY_CHANNEL=e=>`Finsemble.ServiceManager.queryReady.${e}`,t.CLIENT_SERVER_MAPPING=e=>({authenticationClient:"authenticationService",configClient:"configService",distributedStoreClient:"dataStoreService",hotkeysClient:"hotkeysService",linkerClient:"linkerService",logger:"loggerService",searchClient:"searchService",storageClient:"storageService",windowClient:"windowService",workspaceClient:"workspaceService"}[e]),t.SERVICES_STATE_CHANNEL="Finsemble.State.Services",(n=t.WINDOWSTATE||(t.WINDOWSTATE={}))[n.NORMAL=0]="NORMAL",n[n.MINIMIZED_WAS_NORMAL=1]="MINIMIZED_WAS_NORMAL",n[n.MAXIMIZED=2]="MAXIMIZED",n[n.MINIMIZED_WAS_MAXIMIZED=3]="MINIMIZED_WAS_MAXIMIZED",n[n.TRANSITIONING=4]="TRANSITIONING",t.SERVICE_START_CHANNEL="Finsemble.Service.Start",t.SERVICE_STOP_CHANNEL="Finsemble.Service.Stop",t.DOCKING={GROUP_UPDATE:"DockingService.groupUpdate",WORKSPACE_GROUP_UPDATE:"Finsemble.WorkspaceService.groupUpdate",REQUEST_PUBLISH:"DockingService.requestGroupDataPublish"},t.EVENT_INTERRUPT_CHANNEL="Finsemble.Event.Interrupt",t.INTERRUPTIBLE_EVENTS=["close-requested","closed","close-complete","_container-close-handlers"],t.WINDOW={DELAYABLE_EVENTS:["close-requested","closed","close-complete","_container-close-handlers"],CANCELABLE_EVENTS:["close-requested"]},t.WORKSPACE={DELAYABLE_EVENTS:["load-requested","close-requested","save-requested"],CANCELABLE_EVENTS:["close-requested"],CLEAN_SHUTDOWN:"Finsemble.Workspace.cleanShutdown",UPDATE_PUBSUB:"Finsemble.WorkspaceService.update",STORAGE_TOPIC:"finsemble.workspace",CACHE_STORAGE_TOPIC:"finsemble.workspace.cache",ALL_WORKSPACES:"finsemble.allWorkspaces",ACTIVE_WORKSPACE:"activeWorkspace",LAST_USED_WORKSPACE_TOPIC:"finsemble",LAST_USED_WORKSPACE_NAME:"finsemble.lastUsedWorkspace.name",LAST_USED_WORKSPACE:"finsemble.lastUsedWorkspace",INITIAL_WORKSPACE_PREFERENCE:"finsemble.initialWorkspace",PUBLISH_REASONS:{INIT:"workspace:initialization",LOAD_DATA_RETRIEVED:"workspace:load:dataRetrieved",LOAD_FINISHED:"workspace:load:finished",WINDOW_REMOVED:"window:remove",WINDOW_ADDED:"window:add",LOAD_STARTED:"workspace:load:start",WORKSPACE_REMOVED:"Workspace:remove",WORKSPACE_RENAMED:"rename",SWITCHTO_TERMINATED:"workspace:switchTo:terminated",NEW_WORKSPACE:"new workspace",SAVE_AS:"APPLICATION LIFECYCLE:WORKSPACE LIFECYCLE:SaveAs:Workspace:Save As"},API_CHANNELS:{NEW_WORKSPACE:"Finsemble.Workspace.NewWorkspace",SAVE:"Finsemble.Workspace.Save",RENAME:"Finsemble.Workspace.Rename",SAVE_AS:"Finsemble.Workspace.SaveAs",SWITCH_TO:"Finsemble.Workspace.SwitchTo",IMPORT:"Finsemble.Workspace.Import",EXPORT:"Finsemble.Workspace.Export",REMOVE:"Finsemble.Workspace.Remove",SAVE_GLOBAL_DATA:"Finsemble.Workspace.SaveGlobalData",SAVE_VIEW_DATA:"Finsemble.Workspace.SaveViewData",GET_GLOBAL_DATA:"Finsemble.Workspace.GetGlobalData",GET_VIEW_DATA:"Finsemble.Workspace.GetViewData",GET_WORKSPACES:"Finsemble.Workspace.GetWorkspaces",GET_WORKSPACE_NAMES:"Finsemble.Workspace.GetWorkspaceNames",SET_WORKSPACE_ORDER:"Finsemble.Workspace.SetWorkspaceOrder",GET_ACTIVE_WORKSPACE:"Finsemble.Workspace.GetActiveWorkspace",GET_ACTIVE_WORKSPACE_DIRTY:"Finsemble.Workspace.GetActiveWorkspaceDirty",GET_TEMPLATES:"Finsemble.Workspace.GetTemplates",IMPORT_TEMPLATE:"Finsemble.Workspace.ImportTemplate",EXPORT_TEMPLATE:"Finsemble.Workspace.ExportTemplate",REMOVE_TEMPLATE:"Finsemble.Workspace.RemoveTemplate",SET_WINDOW_STATE:"Finsemble.Workspace.SetWindowData",GET_WINDOW_STATE:"Finsemble.Workspace.GetWindowData",ADD_WINDOW:"WorkspaceService.addWindow",REMOVE_WINDOW:"WorkspaceService.removeWindow"},DEFAULT_WINDOW_PROPS:["name","componentType","windowType","alwaysOnTop","autoShow","minWidth","minHeight","maxWidth","maxHeight","resizable","maximizable","minimizable","opacity","windowState","left","top","width","height","right","bottom","defaultLeft","defaultTop","defaultWidth","defaultHeight","defaultRight","defaultBottom","monitorInfo","icon","cachedBounds","showTaskbarIcon","isEvergreen","compositeComponentData"],ADDITIONAL_WINDOW_PROPS:{WebWindow:["url","fullscreen","frame","backgroundColor","transparent","waitForPageLoad","affinity","appUUID"],NativeWindow:["path","alias","arguments","argumentsAsQueryString","isWPF"],StackedWindow:["childWindowIdentifiers","visibleWindowIdentifier","bounds"]}},t.WINDOW_SERVICE_REQUESTS={REMOTE_FOCUS:"WindowService.remoteFocus",SET_ALWAYS_ON_TOP:"WindowService-Request-setAlwaysOnTop",IS_ALWAYS_ON_TOP:"WindowService-Request-isAlwaysOnTop"},t.COMPONENT_STATE_STORAGE_TOPIC="finsemble.componentStateStorage",t.HEARTBEAT_TIMEOUT_CHANNEL="Finsemble.WindowService.HeartbeatTimeout",t.LAUNCHER_SERVICE={WINDOW_CLOSED:"LauncherService.WindowClosed"},t.MOVE_REASON={AERO_KEY:"aero_key",SYSTEM_RESTORED:"system_restored"}},13854:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FSBLDependencyManagerSingleton=t.FSBLDependencyManager=void 0;const i=n(5939),o=r(n(39319)),s=n(78379),a=r(n(5020)),u=r(n(72551));class c extends i.EventEmitter{constructor(e){super(),this.callback=e.callback,this.dependencies=e.dependencies,this.startupTimer=null,this.setStartupTimer=this.setStartupTimer.bind(this),this.clearStartupTimer=this.clearStartupTimer.bind(this)}clearStartupTimer(){this.startupTimer&&clearTimeout(this.startupTimer),delete this.startupTimer}setStartupTimer(){const e=this;this.startupTimer=+setTimeout((()=>{e.emit("timeout")}),1e4)}}function l(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}class f{constructor(){this.servicesAreAllOnline={},this.clientsAreAllOnline={},this.onlineClients=[],this.dependencies={},this.startupTimers={},this.startupTimerFired=!1,this.bindCorrectContext()}waitFor(e,t){const n=l();e.clients||(e.clients=[]),e.clients.length&&(e.clients=e.clients.map((e=>e.charAt(0).toLowerCase()+e.slice(1))));const r=new c({dependencies:e,callback:t});return r.setStartupTimer(),r.on("timeout",(()=>{this.onDependencyTimeout(r)})),this.dependencies[n]=r,this.checkDependencies(),r}onDependencyTimeout(e){const t=this.getOfflineClients();let n="APPLICATION LIFECYCLE:STARTUP:Dependency not online after 10 seconds.";t.length&&(n=`${n} Waiting for these clients: ${t.join(", ")}.`),e.emit("err",n)}checkDependencies(){for(const e in this.dependencies){const t=this.dependencies[e],{dependencies:n,callback:r}=t;(!n.clients.length||this.clientsAreAllOnline[e]||(this.clientsAreAllOnline[e]=this.checkClients(n.clients),this.clientsAreAllOnline[e]))&&(delete this.dependencies[e],t.clearStartupTimer(),r&&r())}}getOfflineClients(){let e=[];for(const t in this.dependencies){const{dependencies:n}=this.dependencies[t];e=e.concat(n.clients.filter((e=>!this.onlineClients.includes(e))))}return e.filter(((t,n)=>e.indexOf(t)===n))}checkClients(e){return e.every((e=>this.onlineClients.includes(e)))}setClientOnline(e){this.onlineClients.includes(e)||(this.onlineClients.push(e),this.checkDependencies())}getOnlineClients(){return this.onlineClients}bindCorrectContext(){this.checkDependencies=this.checkDependencies.bind(this),this.checkClients=this.checkClients.bind(this),this.getOfflineClients=this.getOfflineClients.bind(this),this.onDependencyTimeout=this.onDependencyTimeout.bind(this),this.waitFor=this.waitFor.bind(this)}}class d{constructor(){this.offlineServices=[],this.dependencies={},this.checkDependencies=this.checkDependencies.bind(this)}waitFor(e,t){u.default.system.debug("DependencyManager:waitFor",e),e.services||(e.services=[]);const n=l();this.dependencies[n]={dependencies:e,callback:t}}checkDependencies(){if(console.debug("checkDependencies",this.dependencies),Object.keys(this.dependencies))for(const e in this.dependencies){const{dependencies:t,callback:n}=this.dependencies[e];(u.default.system.debug("DependencyManager:checkDependency",t.services,this.offlineServices),!t.services.length||this.checkServices(t.services))&&(console.debug("checkDependencies callback"),delete this.dependencies[e],n&&n())}}checkServices(e){return e.every((e=>this.offlineServices.includes(e)))}setServiceOffline(e){u.default.system.debug("setServiceOffline",e),console.debug("setServiceOffline",e),this.offlineServices.push(e),this.checkDependencies()}}class h extends i.EventEmitter{constructor(){super(),this.startup=new f,this.shutdown=new d,this.RouterClient=o.default,this.AuthorizationCompleted=!1,this.bindCorrectContext(),this.onAuthorizationCompleted(this.startup.checkDependencies),o.default.onReady(this.listenForServices)}bindCorrectContext(){this.listenForServices=this.listenForServices.bind(this),this.onAuthorizationCompleted=this.onAuthorizationCompleted.bind(this)}setClientOnline(e){this.startup.setClientOnline(e)}onServiceStateChange(e){Object.keys(e).forEach((t=>{const{state:n}=e[t];"closed"===n&&this.shutdown.setServiceOffline(t)}))}listenForServices(){u.default.system.debug("DependencyManager:listenForServices before wait"),a.default.waitForBootStage("kernel","stageEntered",(()=>{u.default.system.debug("DependencyManager:listenForServices after wait"),this.RouterClient.subscribe(s.SERVICES_STATE_CHANNEL,((e,t)=>{u.default.system.debug("DependencyManager:listenForServices SERVICES_STATE_CHANNEL",t.data),this.onServiceStateChange(t.data)})),this.RouterClient.addListener(s.SERVICE_CLOSED_CHANNEL,((e,t)=>{u.default.system.debug("DependencyManager:listenForServices SERVICE_CLOSED_CHANNEL",t.data);const n={};n[t.data.name]={state:"closed"},this.onServiceStateChange(n)})),this.RouterClient.subscribe(s.APPLICATION_STATE_CHANNEL,((e,t)=>{switch(t.data.state){case"authenticated":case"ready":break;case"closing":this.shutdown.checkDependencies()}}))}))}onAuthorizationCompleted(e){this.AuthorizationCompleted?e():this.addListener("AuthorizationCompleted",e)}}t.FSBLDependencyManager=h,t.FSBLDependencyManagerSingleton=new h,t.default=t.FSBLDependencyManagerSingleton},24232:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.checkDeprecatedConfigs=t.isEqualIgnoringArrayOrder=t.sleep=t.checkIfBoundsAreEqual=t.removeKeys=t.toRecord=t.isStackedWindow=t.wrapWithTimeout=t.timeoutPromise=t.getRandomWindowName=t.getProp=t.composeRL=t.instrumentPromise=t.promisify=t.identity=t.isNumber=t.chunkArray=t.Timeout=t.mockLogger=t.capitalizeFirst=t.clone=t.isServiceInWindow=t.iAmAServiceWindow=t.guuid=void 0;const i=n(50586),o=r(n(80089)),s=r(n(75892)),a=r(n(47184)),u=r(n(65162)),c=n(33998),l=r(n(72551)),f=window;function d(e,t){if(Array.isArray(e))return e.slice();try{return JSON.parse(JSON.stringify(e))}catch(e){return t("clone error",e),e}}function h(e,t){return new Promise(((n,r)=>{const i=setTimeout((()=>{clearTimeout(i),r(t)}),e)}))}function p(e,t,n){return`${e}.${t}.${n}`}function y(e,t,n){const r=`${p(e.baseString,e.newPath,e.newValue)}`;l.default.system.deprecated(`${p(e.baseString,t,n)} has been deprecated in favor of ${r}`)}t.guuid=function(){return i.v4()},t.iAmAServiceWindow=function(){return!(!f.finsembleServices||!f.finsembleServices.length)},t.isServiceInWindow=function(e){return f.finsembleServices&&f.finsembleServices.find((t=>t.name===e))},t.clone=d,t.capitalizeFirst=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},t.mockLogger=new class{constructor({debug:e}={debug:!0}){e?(this.system=console,this.system.debug=console.log):this.system={warn:Function.prototype,debug:Function.prototype,log:Function.prototype,info:Function.prototype,error:console.error}}isLogMessage(){return!0}start(){}},t.Timeout=class{constructor(e,t){this.fired=!1,this.id=setTimeout((()=>{e(),this.fired=!0}),t),this.clear=this.clear.bind(this),this.didFire=this.didFire.bind(this)}clear(){this.fired||clearTimeout(this.id)}didFire(){return this.fired}},t.chunkArray=function(e,t){if(e<=0)throw new Error("Can't chunk array by number less than 0");return t.reduce(((n,r,i)=>{if(i%e==0){const r=[];for(let n=i;n<i+e;n++)n<t.length&&r.push(t[n]);n.push(r)}return n}),[])},t.isNumber=function(e){return!(!e||Number.isNaN(Number(e)))&&Number(e)},t.identity=function(e){return e},t.promisify=function(e,t){return function(){const n=Array.prototype.slice.call(arguments);return new Promise(((r,i)=>{n.push(((e,t)=>e?i(e):r(t))),e.apply(t,n)}))}},t.instrumentPromise=async(e,t,n)=>{const r=`${t} end`;return e(`${t} start`),n.then((()=>e(r)))},t.composeRL=(...e)=>e.reduce(((e,t)=>(...n)=>e(t(...n)))),t.getProp=function e(t,n,r){const i=Array.isArray(n)?n:n.split(".").filter((e=>e.length));return i.length?e(t[i.shift()],i,r):void 0===t?r:t},t.getRandomWindowName=function(e="RouterClient"){return`${e}-${i.v4()}`},t.timeoutPromise=h,t.wrapWithTimeout=function(e,t,n){return Promise.race([e,h(t,n)])},t.isStackedWindow=function(e){return e&&"StackedWindow"===(o.default(e,"windowIdentifier.windowType")||e.windowType)},t.toRecord=function(e,t){const n="string"==typeof e?t=>t[e]:e;return t.reduce(((e,t)=>(e[n(t)]=t,e)),{})},t.removeKeys=function(e,t){if(!e)return e;const n=Object.keys(e).filter((e=>!t.includes(e)));return s.default(e,n)},t.checkIfBoundsAreEqual=function(e,t){if(!e||!t)return!1;const n=["left","right","top","bottom","width","height"],r=s.default(e,n),i=s.default(t,n);return!!a.default(r,i)},t.sleep=function(e,t=!1){return new Promise(((n,r)=>{t?setTimeout((()=>{try{r("timeout expired")}catch{}}),e):setTimeout(n,e)}))},t.isEqualIgnoringArrayOrder=function(e,t){const n=d(e,Function.prototype),r=d(t,Function.prototype);return u.default(n,r,((e,t)=>{if(Array.isArray(e)&&Array.isArray(t))return u.default(e.sort(),t.sort())}))},t.checkDeprecatedConfigs=function(e,t,n){const{baseString:r,oldPath:i,newPath:o,oldValue:s,newValue:a}=t;let u=c.ConfigUtilInstance.getDefault(e,p(r,o,a),null);return null===u&&(u=c.ConfigUtilInstance.getDefault(e,p(r,o,s),null),u?y(t,o,s):(u=c.ConfigUtilInstance.getDefault(e,p(r,i,a),null),u?y(t,i,a):(u=c.ConfigUtilInstance.getDefault(e,p(r,i,s),null),u?y(t,i,s):u=n))),u}},59459:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=s(n(39319)),u=o(n(78379));t.default=class{constructor(e,t){this.allowDelay=!1,this.delayed=!1,this.allowCancel=!1,this.canceled=!1,this.completed=!1,this.event=e.event,this.source=e.source,this.sourceType=e.sourceType,this.listenerGuid=e.listenerGuid,u[this.sourceType.toUpperCase()]&&u[this.sourceType.toUpperCase()].DELAYABLE_EVENTS.includes(this.event)&&(this.allowDelay=!0),u[this.sourceType.toUpperCase()]&&u[this.sourceType.toUpperCase()].CANCELABLE_EVENTS.includes(this.event)&&(this.allowCancel=!0),this.handler=e.handler,this.queryMessage=t,this.guid=t.data.guid,this.internalHandler()}async internalHandler(){this.data=this.queryMessage.data.data,this.handler&&await this.handler(this),this.delayed||this.canceled||this.completed||this.done()}cancel(){this.allowCancel&&(this.canceled=!0,this.done())}wait(){this.allowDelay?(this.delayed=!0,this.queryMessage.sendQueryResponse(null,{delayed:!0})):this.done()}done(e){this.completed=!0,this.delayed?a.default.transmit(`Finsemble.Listener.Done.${this.guid}.${this.listenerGuid}`,{canceled:this.canceled,data:e}):this.queryMessage.sendQueryResponse(null,{canceled:this.canceled,data:e})}}},57815:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(39319)),o=r(n(72551)),s=r(n(59459));t.default=class{constructor(e){this.eventList=[],this.eventHandlerMap={},this.eventGuidMap={},this.name=e.name,this.sourceType=e.sourceType,window.addEventListener("beforeunload",(()=>{this.cleanup()}))}addListener(e,t){return this.addEventListener(e,t)}removeListener(e,t){return this.removeEventListener(e,t)}addEventListener(e,t){if(!t)return console.error("no handler",e);if(o.default.system.debug("addEventListener:",e),this.eventHandlerMap[e]||(this.eventHandlerMap[e]=[],this.eventGuidMap[e]=[]),!this.eventHandlerMap[e].includes(t)){const n=`${window.name}_public_${Date.now()}_${Math.random()}`;this.eventHandlerMap[e].push(t),this.eventGuidMap[e].push(n),i.default.transmit(`Finsemble.RegisterInterruptibleEvent.${this.name}`,{event:e,listenerGuid:n}),i.default.addResponder(`Finsemble.Interrupt.${n}`,((r,i)=>{new s.default({source:this.name,sourceType:this.sourceType,listenerGuid:n,handler:t,event:e},i)}))}}removeEventListener(e,t){if(o.default.system.debug("removeEventListener:",e),!this.eventHandlerMap[e])return o.default.system.warn("not found");let n=this.eventHandlerMap[e].indexOf(t);if(-1!==n){const t=this.eventGuidMap[e][n];this.eventHandlerMap[e].splice(n,1),this.eventGuidMap[e].splice(n,1),i.default.transmit(`Finsemble.UnregisterInterruptibleEvent.${window.name}`,{event:e,guid:t}),i.default.removeResponder(`Finsemble.Interrupt.${t}`)}}cleanup(){for(var e of Object.keys(this.eventHandlerMap))for(var t of this.eventHandlerMap[e])this.removeEventListener(e,t)}}},50631:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{}},52283:(e,t)=>{"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.FinsembleNotificationOptions=t.ActionTypes=void 0,(r=t.ActionTypes||(t.ActionTypes={})).DISMISS="DISMISS",r.SNOOZE="SNOOZE",r.SPAWN="SPAWN",r.QUERY="QUERY",r.PUBLISH="PUBLISH",r.TRANSMIT="TRANSMIT",(n=t.FinsembleNotificationOptions||(t.FinsembleNotificationOptions={})).MARK_AS_UNREAD="MARK_AS_UNREAD",n.MARK_AS_READ="MARK_AS_READ",n.SNOOZE="SNOOZE",n.DISMISS="DISMISS",n.SETTINGS="SETTINGS",n.DETAILS="DETAILS"},47887:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(e,t){this.source=e,this.issuedAt=t}}},15993:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{}},39243:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{}},82369:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(72551)),o=n(51742),s={activeTransports:{},liveTransport:null,addTransport(e,t){this.activeTransports[e]=t,i.default.system.log(`RouterTransport ${e} added to activeTransports`)},getActiveTransports(e){const t=[];function n(e){-1===t.indexOf(e)&&t.push(e)}return o.System.InterApplicationBus&&n("IPCBus"),n("FinsembleTransport"),SharedWorker&&n("SharedWorker"),n(e.sameDomainTransport),n(e.crossDomainTransport),i.default.system.log("getActiveTransports",t),t},getTransport:(e,t,n,r,i)=>new Promise(((o,a)=>{const u=s.activeTransports[t];u?s.liveTransport=new u(e,n,r,i,(e=>{o(e)})):a(`unknown router transport name: ${t}`)})),close(){s.liveTransport&&(s.liveTransport.close(),s.liveTransport=null)}},a=function(e,t,n,r,o){let s;const a=this;this.send=function(e,t){1===arguments.length?(t=arguments[0],e=null):(e=arguments[0],t=arguments[1]),i.default.system.verbose("SharedWorkerTransport Outgoing Transport",t);try{s.port.postMessage([e,t])}catch(e){i.default.system.error(`SharedWorkerTransport: post message failed: ${JSON.stringify(e)}`,"Probable cause is sending illegal data type (e.g. function).")}},this.identifier=function(){return"SharedWorker"};const u=e.transportSettings.SharedWorker&&e.transportSettings.SharedWorker.workerPath?e.transportSettings.SharedWorker.workerPath:`${e.routerDomainRoot}/common/routerSharedWorker.js`;i.default.system.log(`SharedWorker Transport Initializing for ${n} using ${u}`),console.log(`SharedWorker Transport Initializing for ${n} using ${u}`),s=new SharedWorker(u,{name:"Finsemble",credentials:"include"}),s.port.onmessage=function(e){const n=e.data[0],r=e.data[1],o={transportID:a.identifier(),port:n};i.default.system.verbose("SharedWorkerTransport Incoming Transport",o,"Message",r),t(o,r)},s.onerror=function(e){i.default.system.error(`SharedWorkerTransport Transport Error${JSON.stringify(e)}`)},s.port.start(),"RouterService"===n&&s.port.postMessage({data:"connect",source:"RouterService"}),this.close=()=>{s.port.close()},o(this)},u=function(e,t,n,r,s){const{uuid:a}=o.System.Application.getCurrent(),u=this;this.send=function(e,t){let n;1===arguments.length?(n=r,t=arguments[0]):(n=e.name,t=arguments[1]),i.default.system.verbose("IPCTransport Outgoing Transport",a,n,"Message",t),o.System.InterApplicationBus.publish(n,t,(()=>{}),(()=>{}))},this.identifier=function(){return"IPCBus"},i.default.system.log(`IPCBus Transport Initializing for ${n}`),console.log(`IPCBus Transport Initializing for ${n}`);const c=o.System.InterApplicationBus.subscribe("*",n,(function(e,n){const r={transportID:u.identifier(),senderUuid:n,name:e.header.origin};i.default.system.verbose("IPCTransport Incoming Transport",r,"Message",e),t(r,e)}),(()=>{}),(function(e){i.default.system.error(`IPCBus Subscribe Failure: ${e}`)}));this.close=()=>{o.System.InterApplicationBus.unsubscribe(c)},s(this)},c=function(e,t,n,r,o){const s=`${e?.transportSettings?.FinsembleTransport?.serverAddress??e?.transportSettings?.serverAddress??"ws://127.0.0.1:3376"}/router`,a=this;let u;function c(){i.default.system.error(`FinsembleTransport Connection Timeout for ${n}`),o(a)}function l(){i.default.system.log(`FinsembleTransport Transport Initializing for ${n} using ${s}`),console.log(`FinsembleTransport Transport Initializing for ${n} using ${s}`),s.startsWith("ws:")||s.startsWith("wss:")||console.error(`Illegal WebSocket address "${s}" (Missing ws:// or wss:// ?)`),u=new WebSocket(s);const e=setTimeout(c,3e3);u.addEventListener("open",(()=>{clearTimeout(e),i.default.system.log("FinsembleTransport Connected to Server"),console.log("FinsembleTransport Connected to Server"),u.addEventListener("message",(e=>{const r=JSON.parse(e.data);("RouterService"===n&&"ROUTER_SERVICE"==r.dest||n===r.message.client)&&function(e){const n={transportID:a.identifier(),client:e.clientMessage.header.origin};i.default.system.verbose("FinsembleTransport Incoming Transport",n,"Message",e),t(n,e.clientMessage)}(r.message)})),o(a)}))}this.send=function(e,t){let n,r;1===arguments.length?(n="ROUTER_SERVICE",r={clientMessage:t=arguments[0]}):(n="ROUTER_CLIENT",t=arguments[1],r={client:e.client,clientMessage:t}),i.default.system.verbose("FinsembleTransport Outgoing Transport",n,"NewMessage",r),u.readyState===WebSocket.OPEN&&u.send(JSON.stringify({dest:n,message:r})),u.readyState===WebSocket.CONNECTING&&u.addEventListener("open",(()=>{u.send(JSON.stringify({dest:n,message:r}))})),u.readyState===WebSocket.CLOSED&&(l(),u.addEventListener("open",(()=>{u.send(JSON.stringify({dest:n,message:r}))}))),u.readyState===WebSocket.CLOSING&&(u.onclose=()=>{l(),u.addEventListener("open",(()=>{u.send(JSON.stringify({dest:n,message:r}))}))})},this.identifier=function(){return"FinsembleTransport"},this.close=()=>{u.close()},l()};s.addTransport("SharedWorker",a),s.addTransport("IPCBus",u),s.addTransport("FinsembleTransport",c),t.default=s},51742:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.System=void 0;const r=n(16925);class i{constructor(e,t,n){return new fin.desktop.Window(e,t)}static get getCurrent(){return fin.desktop.Window.getCurrent}static get wrap(){return fin.desktop.Window.wrap}}class o{constructor(e,t,n){t&&t()}static getCurrent(){const{windowName:e}=r.Startup.getInstance().getStartupData();return{name:e,uuid:`${e}-uuid`,getOptions:e=>{e&&e({})},addEventListener:()=>{},updateOptions:()=>{},close:()=>{},startMovingWindow:()=>{},stopMovingWindow:()=>{},isShowing:()=>{},bringToFront:()=>{},show:()=>{},hide:()=>{},setTaskbarIcon:()=>{}}}static wrap(){return{}}}class s{constructor(e,t,n){return new fin.desktop.Application(e,t)}static get getCurrent(){return fin.desktop.Application.getCurrent}static get wrap(){return fin.desktop.Application.wrap}}class a{constructor(e){new fin.desktop.Notification(e)}}class u{constructor(){return new fin.desktop.System.Clipboard}static get writeText(){return fin.desktop.System.Clipboard.writeText}static get writeHTML(){return fin.desktop.System.Clipboard.writeHTML}static get writeRTF(){return fin.desktop.System.Clipboard.writeRTF}static get readText(){return fin.desktop.System.Clipboard.readText}static get readHTML(){return fin.desktop.System.Clipboard.readHTML}static get readRTF(){return fin.desktop.System.Clipboard.readRTF}}class c{static isFreestanding(){return"undefined"==typeof fin}static get Application(){return s}static get Window(){return c.isFreestanding()?o:i}static get Notification(){return a}static get Clipboard(){return u}static async getMousePosition(e=Function.prototype){return new Promise(((t,n)=>{fin.desktop.System.getMousePosition((n=>{(n.left||0===n.left)&&(n.x=n.left),(n.top||0===n.top)&&(n.y=n.top),e(null,n),t(n)}),(t=>{e(t,null),n(t)}))}))}static getSDServerInfo(e=Function.prototype){return new Promise((t=>{fin.desktop.System.getSDServerInfo((n=>{t(n),e(n)}))}))}static getMonitorInfo(e=Function.prototype){return new Promise((t=>{fin.desktop.System.getMonitorInfo((n=>{t(n),e(n)}))}))}static container(){return"undefined"==typeof fin?"freestanding":fin.container?fin.container:"FEA"}static isBrowserView(){return!c.isFreestanding()&&fin.isBrowserView()}static getViewId(){return fin.getViewId()}static hasBrowserView(){return!c.isFreestanding()&&fin.hasBrowserView()}static get fin(){return fin||{}}static ready(e){return new Promise((t=>{fin.desktop.main((()=>{e&&e(),t()}))}))}static getHostSpecs(e=Function.prototype){return new Promise((t=>{fin.desktop.System.getHostSpecs((n=>{t(n),e(n)}))}))}static get InterApplicationBus(){return fin.desktop.InterApplicationBus}static get launchExternalProcess(){return fin.desktop.System.launchExternalProcess}static get terminateExternalProcess(){return fin.desktop.System.terminateExternalProcess}static get getAllApplications(){return fin.desktop.System.getAllApplications}static get exit(){return fin.desktop.System.exit}static get clearCache(){return fin.desktop.System.clearCache}static get showDeveloperTools(){return fin.desktop.System.showDeveloperTools}static get getRuntimeInfo(){return fin.desktop.System.getRuntimeInfo}static get addEventListener(){return c.isFreestanding()?window.addEventListener:fin.desktop.System.addEventListener}static get addSelectClientCertificateListener(){return fin.desktop.System.addSelectClientCertificateListener}static get addCertificateErrorListener(){return fin.desktop.System.addCertificateErrorListener}static get getVersion(){return fin.desktop.System.getVersion}static get getUpdateAvailable(){return fin.desktop.System.getUpdateAvailable}static get openUrlWithBrowser(){return fin.desktop.System.openUrlWithBrowser}static get getAllWindows(){return fin.desktop.System.getAllWindows}static get getProcessList(){return fin.desktop.System.getProcessList}static get getProtocolString(){return fin.desktop.System.getProtocolString}static get hideSplashScreen(){return fin.desktop.System.hideSplashScreen}static startupApplicationHandshake(){fin.desktop.System.startupApplicationHandshake&&fin.desktop.System.startupApplicationHandshake()}static closeApplication(e,t=Function.prototype){return new Promise((n=>{let r,i=!1;const o=()=>{i||(console.log("Attempting to terminate",e.uuid),e.terminate((()=>{t(),n()}),(()=>{i||(i=!0,clearInterval(r),console.log("force closing ",e.uuid),e.terminate())})))};r=setInterval(o,2e3),console.log("closing ",e.uuid),e.close(!1,(()=>{console.log("app.close: successfully closed",e.uuid),i=!0,clearInterval(r),t(),n()}),o)}))}}t.System=c},5020:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(39319)),o=r(n(72551)),s=n(56188),a=n(33509),u=n(95269),c=new class{publishBootStatus(e,t,n){console.log("publishStartingStatus",e,n),o.default.system.debug("publishBootStatus",e,t,n),i.default.publish(u.statusChannel(e),{name:e,type:t,state:n})}waitForBootStage(e,t,n=Function.prototype){return new Promise(((r,u)=>{o.default.system.debug("SystemManagerClient.waitForBootStage entry",e,t);const c=s.ALL_BOOT_STAGES.indexOf(e);"microkernel"===e&&"stageEntered"===t&&o.default.system.error("Cannot wait on `stageEntered` for microkernel because router isn't up yet. So will instead wait for microkernal stage complete.");const l=i.default.subscribe(a.STAGE_CHANNEL,((a,f)=>{if(o.default.system.debug("SystemManagerClient.waitForBootStage new stage",f.data.stage,l),a)o.default.system.error("SystemManagerClient.waitForBootStage subscribe error",a),n(a),u(a);else if(-1===c)a="illegal stage argument",o.default.system.debug("SystemManagerClient.waitForBootStage subscribe error",a,e),n(a),u(a);else{const a=s.ALL_BOOT_STAGES.indexOf(f.data.stage);o.default.system.debug("SystemManagerClient.waitForBootStage new stage",f.data,l),"stageEntered"===t&&a+1>=c?(o.default.system.debug("SystemManagerClient.waitForBootStage stageEntered",e,l,n.name),n(),r(),i.default.unsubscribe(l)):"stageCompleted"===t&&a>=c?(o.default.system.debug("SystemManagerClient.waitForBootStage completed",e,l),n(),r(),i.default.unsubscribe(l)):o.default.system.debug(`SystemManagerClient.waitForBootStage else currentStageIndex=${a} stageIndex=${c} `,a,c,e,l)}}))}))}waitForStartup(e,t=Function.prototype){return new Promise(((n,r)=>{o.default.system.debug(`SystemManagerClient.waitForStartup.${e}`,e);const s=i.default.subscribe(u.statusChannel(e),((a,u)=>{o.default.system.debug("SystemManagerClient.waitForStartup subscribe",e,a,u),a?(o.default.system.error("SystemManagerClient.waitForStartup subscribe error",a),t(a),r()):u.data.name===e&&"completed"===u.data.state&&(o.default.system.debug("SystemManagerClient.waitForStartup completed",e),t(),n(),i.default.unsubscribe(s))}))}))}publishCheckpointState(e,t,n){console.log("publishCheckpoint",e,t,n,u.checkpointChannel(e,t)),o.default.system.debug("publishCheckpoint",e,t,n,u.checkpointChannel(e,t)),i.default.publish(u.checkpointChannel(e,t),{windowName:e,checkpointName:t,state:n})}showSystemLog(){o.default.system.debug("SystemManagerClient.showSystemLog"),i.default.transmit(a.SHOW_SYSLOG_CHANNEL,!0)}systemLog(e,t){o.default.system.debug("SystemManagerClient.systemLog",e,t),i.default.transmit(a.SYSLOG_CHANNEL,{params:e,logMessage:t})}};t.default=c},76420:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.windowNameFromRouterHeader=t.getWindowType=t.isWindows=t.adjustBoundsToBeOnMonitor=t.isOnAMonitor=t.getNewBoundsWhenMovedToMonitor=t.openSharedData=t.injectJS=t.guuid=t.camelCase=t.getMyWindowIdentifier=t.getMonitorByDescriptor=t.windowOnMonitor=t.getMonitorFromCommand=t.getMonitor=t.getWhichMonitor=t.findMonitor=t.getWindowDescriptor=t.getFinWindow=t.getMonitorFromWindow=t.getMonitorFromXY=t.getAllMonitors=t.crossDomain=t.isPercentage=t.castToPromise=t.getContainerVersion=t.clone=t.Monitors=void 0;const i=r(n(36589)),o=n(51742),s=r(n(93802)),a=r(n(72551));function u(e,t={}){if(null===e||"object"!=typeof e)return e;if(e.constructor==Date||e.constructor==RegExp||e.constructor==Function||e.constructor==String||e.constructor==Number||e.constructor==Boolean)return new e.constructor(e);t=t||new e.constructor;for(const n in e)t[n]=void 0===t[n]?u(e[n],null):t[n];return t}function c(e,n){const r=Number.isFinite(e.x)?e.x:e.defaultLeft,i=Number.isFinite(e.y)?e.y:e.defaultTop,o=r+e.defaultWidth,s=i+e.defaultHeight;return new Promise(((e,c)=>{t.Monitors.getMonitorFromScaledXY(r,i,(l=>{if(!l)return a.default.system.debug("getMonitorFromWindow - top-left is off screen, trying bottom right"),void t.Monitors.getMonitorFromScaledXY(o,s,(o=>{if(!o)return a.default.system.debug("getMonitorFromWindow - bottom-right is off screen, getting primary"),void t.Monitors.getAllMonitors((t=>{t[0]?(n&&n(t[0]),e(t[0])):(c(new Error("Cannot find monitor for window.")),n&&n(null))}));o=u(o);const{monitorRect:s}=o;(s.left<r||s.right<i)&&(o.straddling=!0),n&&n(o),e(o)}));l=u(l);const{monitorRect:f}=l;(f.right>o||f.bottom>s)&&(l.straddling=!0),n&&n(l),e(l)}))}))}function l(e,t){return new Promise(((n,r)=>{const i=o.System.Window.getCurrent();i.getOptions((s=>{if(e&&e.windowName){e.uuid||(e.uuid=s.uuid);const i=o.System.Window.wrap(e.uuid,e.windowName);i.getInfo((()=>{t&&t(i),n(i)}),(()=>{t&&t(null),r(`Window ${e.windowName} not found. UUID: ${e.uuid}`),console.debug(`util.getFinWindow: Window ${e.windowName} not found`)}))}else if(e&&e.componentType)if(void 0!==window.LauncherService){const i=window.LauncherService.componentFinder(e);i?(n(i),t&&t(i)):(r(`util.getFinWindow: Component ${e.componentType} not found.`),t&&t(null))}else r("getFinWindow by componentType is currently only operable within LaunchService"),t&&t(null);else t&&t(i),n(i)}))}))}function f(e,t){return new Promise(((n,r)=>{l(e).then((e=>{e.getOptions((e=>{t&&t(e),n(e)}))})).catch((e=>{console.warn(e),t&&t(null),r(e)}))}))}function d(e,t,n){for(let r=0;r<e.length;r++){const i=e[r];if(i[t]===n)return i}return null}function h(e,n){let r;arguments.length>2&&(e={commandMonitor:arguments[0],monitors:arguments[1],launchingMonitorPosition:arguments[2]},n=null);let{commandMonitor:i,monitors:o,launchingMonitorPosition:s}=e;const a=i&&""!==i||0===i;if("primary"===i)r=d(o,"whichMonitor","primary");else if("next"===i){let e=s+1;e>=o.length&&(e=0),r=o[e]}else if("previous"===i){let e=s-1;e<0&&(e=o.length-1),r=o[e]}else if("mine"===i){var u=!0;activeWindows.getWindow(e.windowIdentifier.windowName)._getBounds(((e,i)=>{e?(r=o[0],n(r)):t.Monitors.getMonitorFromScaledXY(i.left,i.top,(e=>{n(e)}))}))}else a?(i>=o.length&&(i=o.length-1),r=o.filter((e=>e.position===i))[0]):s&&(r=o[s]);if(r||(r=o[0]),!u){if(!n)return r;n(r)}}function p(e,t){return new Promise(((n,r)=>{f(e,(e=>{e?c(e,(e=>{t&&t(e),n(e)})):r("util.getMonitor: Can't locate windowDescriptor.")}))}))}t.Monitors=new s.default(Function.prototype,Function.prototype,{System:o.System}),t.clone=u,t.getContainerVersion=function(e=Function.prototype){return new Promise((t=>{o.System.getVersion((n=>{const r=n.split(".").map(Number),i={major:r[0],chromium:r[1],minor:r[2],patch:r[3]};e(i),t({versionObject:i})}))}))},t.castToPromise=function(e){return function(...t){return new Promise(((n,r)=>{const i=e.apply(null,Array.from(t));try{return i.then(n,r)}catch(e){e instanceof TypeError?n(i):r(e)}}))}},t.isPercentage=function(e){return"string"==typeof e&&-1!==e.indexOf("%")},t.crossDomain=function(e){const t=document.createElement("a");t.href=e;const n=window.location.hostname===t.hostname,r=window.location.protocol===t.protocol,i=(void 0!==window.location.port?window.location.port:80)===(void 0!==t.port?t.port:80),o=!(n&&i&&r);return a.default.system.debug(`Launcher crossDomain=${o} (${n}:${r}:${i})`),o},t.getAllMonitors=t.Monitors.getAllMonitors,t.getMonitorFromXY=t.Monitors.getMonitorFromScaledXY,t.getMonitorFromWindow=c,t.getFinWindow=l,t.getWindowDescriptor=f,t.findMonitor=d,t.getWhichMonitor=h,t.getMonitor=p,t.getMonitorFromCommand=function(e,n,r){return new Promise((i=>{p(n,(n=>{t.Monitors.getAllMonitors((t=>{h({commandMonitor:e,monitors:t,launchingMonitorPosition:n.position},(e=>{r&&r(e),i(e)}))}))}))}))},t.windowOnMonitor=function(e,t){return e.left>=t.left&&e.left<t.right||e.right<=t.right&&e.right>t.left},t.getMonitorByDescriptor=function(e,t){return new Promise((n=>{c(e,(e=>{t&&t(e),n(e)}))}))},t.getMyWindowIdentifier=function(e){const t=o.System.Window.getCurrent();return new Promise((n=>{t.getOptions((r=>{let i=null;const{customData:o}=r;o&&o.component&&(i=o.component.type);const s={windowName:t.name,uuid:t.uuid,componentType:i};e&&e(s),n(s)}))}))},t.camelCase=function(...e){let t="";for(let n=0;n<e.length;n++)t=`${t} ${e[n]}`;return t.replace(/\s(.)/g,(e=>e.toUpperCase())).replace(/\s/g,"").replace(/^(.)/,(e=>e.toLowerCase()))},t.guuid=function(){return i.default()},t.injectJS=function(e,t){const n=document.createElement("script");n.onload=t,n.type="text/javascript",n.async=!0,n.src=e;const r=document.getElementsByTagName("head")[0],i=r.getElementsByTagName("script")[0];r.insertBefore(n,i)},t.openSharedData=function(e,t){const n=FSBL.Clients.LauncherClient,r=FSBL.Clients.LinkerClient;e.multipleOpenerHandler||(e.multipleOpenerHandler=function(e){let t,n=0;for(const r of Object.keys(e))e[r].length>n&&(t=r,n=e[r].length);return[t]});const i=[],o={};n.getComponentsThatCanReceiveDataTypes({dataTypes:Object.keys(e.data)},((s,u)=>{for(const e of Object.keys(u))if(u[e].componentTypes.length)for(const t of u[e].componentTypes)o[t]?o[t].push(e):o[t]=[e];else{const t=`No Components Available to Handle the type: ${e}`;i.push(t),a.default.system.error(t)}let c=Object.keys(o);if(c.length){c.length>1&&(c=e.multipleOpenerHandler(o));const s=Object.keys(r.channels);if(s.length)if(r.getLinkedComponents({componentTypes:c,windowIdentifier:r.windowIdentifier()}).length||e.publishOnly)r.publish({dataType:"Finsemble.DragAndDropClient",data:e.data},(()=>{})),t&&t(i.length?i:null,"Data published");else{for(const t of c)n.spawn(t,{data:{sharedData:e.data,linker:{channels:s}},addToWorkspace:!0});t&&t(i.length?i:null,"Linked Window(s) spawned with data")}else if(!e.publishOnly){for(const t of c)n.spawn(t,{data:{sharedData:e.data},addToWorkspace:!0});t&&t(i.length?i:null,"New Window(s) spawned with data")}}else t&&t(i.length?i:null,null)}))},t.getNewBoundsWhenMovedToMonitor=function(e,t,n="availableRect"){const r=e[n]||e.availableRect||e.monitorRect,i=u(t);return t.top<r.top?i.top=r.top:t.top>r.bottom-t.height&&(i.top=r.bottom-t.height),t.left<r.left?i.left=r.left:t.left>r.right-t.width&&(i.left=r.right-t.width),i.bottom=i.top+i.height,i.right=i.left+i.width,i.right>r.right&&(i.right=r.right),i.top<r.top&&(i.top=r.top),i.left<r.left&&(i.left=r.left),i.bottom>r.bottom&&(i.bottom=r.bottom),i.height=i.bottom-i.top,i.width=i.right-i.left,{newBounds:i,distanceMoved:Math.sqrt((t.left-i.left)**2+(t.top-i.top)**2),monitor:e}},t.isOnAMonitor=function(e){return this.Monitors.allMonitors.some((t=>{const{monitorRect:n}=t;return e.left>=n.left&&e.left<=n.right&&e.right>=n.left&&e.right<=n.right&&e.top>=n.top&&e.top<=n.bottom&&e.bottom>=n.top&&e.bottom<=n.bottom}))},t.adjustBoundsToBeOnMonitor=function(e,t="availableRect"){if(this.isOnAMonitor(e))return a.default.system.info("Launcher.adjustWindowDescriptorBoundsToBeOnMonitor: on monitor."),e;const n=this.Monitors.allMonitors.map((n=>{let r=n.rawMonitor?n.rawMonitor:n;return this.getNewBoundsWhenMovedToMonitor(r,e,t)})).sort(((e,t)=>e.distanceMoved-t.distanceMoved))[0];return a.default.system.info("Launcher.adjustWindowDescriptorBoundsToBeOnMonitor: not on monitor. bounds",e,"monitor name",n.monitor.name,"newBounds",n.newBounds),n.newBounds},t.isWindows=async function(e=Function.prototype){const t=(await o.System.getHostSpecs()).name.toUpperCase().includes("WINDOWS");return e(t),t},t.getWindowType=function(e){const t="WebWindow";if(e.windowType&&!["assimilation","assimilated","native","application","NativeWindow","FinsembleNativeWindow","CompoundWindow","WebWindow","WebApplication","StackedWindow"].includes(e.windowType))return a.default.system.error(`Invalid windowType: ${e.windowType}, defaulting to windowType: WebWindow`),t;let n=e.windowType||t;switch(e.windowType){case"assimilation":case"assimilated":n="NativeWindow";break;case"native":n="FinsembleNativeWindow";break;case"application":n="WebApplication";break;case"Web":n="WebWindow";break;case"StackedWindow":n="StackedWindow"}return e.native&&(n="NativeWindow"),e.compound&&(n="CompoundWindow"),n},t.windowNameFromRouterHeader=e=>{let t,n=/\.(.*)\./s;try{t=e.origin.match(n)[1]}catch(n){t=e.origin.split(".")[1]}return t}},10428:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FinsembleView=void 0,t.FinsembleView=class{constructor(e){this.win=e.win,this.id=e.id}async remove(e=Function.prototype){await this.win.removeBrowserView(this,e)}async setBounds(e,t=Function.prototype){await this.win.setViewBounds({view:this,bounds:e},t)}async bringToFront(e=Function.prototype){await this.win.bringViewToFront(this,e)}}},75688:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FinsembleWindow=void 0;const a=s(n(39319)),u=s(n(72551)),c=o(n(76420)),l=s(n(57815)),f=o(n(78379)),d=n(24232),h=n(51742),p=s(n(99748)),y=n(10428);window._FSBLCache||(window._FSBLCache={storeClientReady:!1,windows:{},gettingWindow:[],windowAttempts:{}});class g extends l.default{constructor(e){super({name:e.name,sourceType:"Window"}),this.types={},this.wrapState=e.wrapState||"initializing",this.componentState={},this.windowState=g.WINDOWSTATE.NORMAL,this.type=null,this.windowType=null,this.bounds={},this.guid=`${Date.now()}_${Math.random()}`,this.WINDOWSTATE=f.WINDOWSTATE,this.windowOptions={},this.doConstruction(e),this.TITLE_CHANGED_CHANNEL=`Finsemble.${this.name}.titleChanged`,this.componentKey=c.camelCase("activeWorkspace",this.name,this.name),this.windowKey=c.camelCase("activeWorkspace",this.name),g.bindFunctions(this)}standardizeEventName(e){switch(e){case"bounds-set":case"stoppedMoving":return"bounds-change-end";case"startedMoving":return"bounds-change-start";case"bringToFront":return"broughtToFront";case"setParent":return"parent-set";case"clearParent":return"parent-unset";default:return e}}addEventListener(e,t){return e=this.standardizeEventName(e),super.addEventListener(e,t)}removeEventListener(e,t){if("closed"!==e||!window.finsembleWindow||this.name!==finsembleWindow.name)return e=this.standardizeEventName(e),super.removeEventListener(e,t)}windowServiceChannelName(e){return`WindowService-Request-${e}`}eventChannelName(e){return`WindowService-Event-${this.name||this.windowName}-${e}`}doConstruction(e){if(e.setWindowType||e.windowType||(e.windowType="WebWindow"),e.windowType)return e.setWindowType=e.windowType,delete e.windowType,new g(e);if(e)for(const t in e)this[t]=e[t];this.name||(this.name=e.windowName),this.windowType=this.setWindowType}static registerType(e,t){const n=g;n.types||(n.types={}),n.types[e]=t}static bindFunctions(e){e.setParent=e.setParent.bind(e),e.getParent=e.getParent.bind(e),e.eventChannelName=e.eventChannelName.bind(e),e.windowServiceChannelName=e.windowServiceChannelName.bind(e),e.handleWrapRemoveRequest=e.handleWrapRemoveRequest.bind(e),e.reload=e.reload.bind(e)}static getInstance(e,t=Function.prototype){const n=h.System.Window.getCurrent().name;return e&&e.windowName&&(e.name=e.windowName),(e=p.default(e))&&e.name?(e.windowName=e.name,new Promise((async function(r,i){if(window._FSBLCache.windows[e.name]){u.default.system.debug("WRAP LIFECYCLE:",e.name,"Window found in the cache, returning without going to the Launcher");const n=window._FSBLCache.windows[e.name];return r({wrap:n}),t(null,n)}if(e.uuid&&e.name){if(e.windowIdentifier||(e.windowIdentifier={uuid:e.uuid,name:e.name,windowName:e.name,windowType:e.windowType}),!1!==e.waitForReady)try{await g._windowReady(e.windowName),e.wrapState="ready"}catch(e){return i(e),t(e,null)}if(u.default.system.debug("WRAP LIFECYCLE:",e.name,"All information for wrap passed in, creating wrap locally"),window._FSBLCache.windows[e.name]){u.default.system.debug("WRAP LIFECYCLE:",e.name,"Window found in the cache, returning without going to the Launcher");const n=window._FSBLCache.windows[e.name];return r({wrap:n}),t(null,n)}const{wrap:n}=await g._createWrap(e);return r({wrap:n}),t(null,n)}if(!1!==e.waitForReady)try{await g._windowReady(e.windowName),e.wrapState="ready"}catch(e){return i(e),t(e,null)}a.default.query("WindowService-Request-getWindowIdentifier",{windowName:e.name,requester:n},(async(n,o)=>{if(n)return u.default.system.error(n),i(n),t(n,null);if(window._FSBLCache.windows[e.name]){const n=window._FSBLCache.windows[e.name];return u.default.system.debug("WRAP LIFECYCLE:",e.name,"Information received from launcher, but wrap exists in cache. Returning cached wrap."),r({wrap:n}),t(null,n)}const{identifier:s}=o.data;s.windowName&&(s.name=s.windowName),u.default.system.debug("WRAP LIFECYCLE:",e.name,"Information received from launcher. Creating wrap."),e.retrievedIdentifier=s;const{wrap:a}=await g._createWrap(e);o.data.descriptor&&(a.descriptor=o.data.descriptor),r({wrap:a}),t(null,a)}))}))):t("name is required")}static _createWrap(e){return new Promise((function(t){const n=e.retrievedIdentifier||e.windowIdentifier;let r=null;void 0===window._FSBLCache.windowAttempts[e.name]&&(window._FSBLCache.windowAttempts[e.name]=0),(e.setWindowType||n.windowType)&&"WebApplication"!==n.windowType||(n.windowType="WebWindow");let i={...n};i=Object.assign(i,e),i.setWindowType=i.windowType,delete i.windowType,u.default.system.debug("WRAP LIFECYCLE: Placing wrap into the local cache.",n.windowName);const o=g;window._FSBLCache.windows[n.windowName]=new o(i),r=window._FSBLCache.windows[n.windowName],r.windowType=n.windowType,r.identifier=n,r.addEventListener("closed",r.handleWrapRemoveRequest),r.addEventListener("maximized",(()=>{r.windowState=g.WINDOWSTATE.MAXIMIZED})),r.addEventListener("minimized",(()=>{r.windowState=g.WINDOWSTATE.MINIMIZED})),r.addEventListener("restored",(()=>{r.windowState=g.WINDOWSTATE.NORMAL}));const s=a.default.subscribe(`Finsemble.Component.State.${n.windowName}`,((e,t)=>{if(e)u.default.system.error("Finsemble component state change error",e);else{const{state:e}=t.data;r.wrapState=e,a.default.unsubscribe(s)}}));r.parentSubscribeID=a.default.subscribe(`Finsemble.parentChange.${n.windowName}`,((e,n)=>{if(e)u.default.system.error("FinsembleWindow parent change notification error",e),t({wrap:r});else{const e=n.data||{};"Added"===e.type?(u.default.system.debug("FinsembleWindow Parent Notification: window.addedToStack listener",e),r.setParent(e.stackedWindowIdentifier,(()=>{t({wrap:r})}))):"Exists"===e.type?(u.default.system.debug("FinsembleWindow Parent Notification: Parent already exists, checking if added to wrap",e),r.setParentOnWrap(e.stackedWindowIdentifier,(()=>{t({wrap:r})}))):"Removed"===e.type?(u.default.system.debug("FinsembleWindow Parent Notification: window.removedFromStack listener",e),r.clearParent(),t({wrap:r})):e.type?(u.default.system.error("FinsembleWindow Parent Notification: unknown type",e),t({wrap:r})):t({wrap:r})}}))}))}static _getRemoveWrapChannel(e){return`${h.System.Window.getCurrent().name}.removeWrap.${e}`}async handleWrapRemoveRequest(e){e&&e.wait(),u.default.system.debug("WRAP Destructor. Removing cached window",this.name,"in ",window.name),this.removeListeners&&this.removeListeners(),this.cleanupRouter(),this.cleanup(),this.name!==window.name&&this.name&&(delete window._FSBLCache.windows[this.name],delete window._FSBLCache.windowAttempts[this.name]),e&&e.done()}cleanupRouter(){const e=g._getRemoveWrapChannel(this.name);a.default.removeResponder(e),this.TITLE_CHANGED_SUBSCRIPTION&&a.default.unsubscribe(this.TITLE_CHANGED_SUBSCRIPTION),a.default.unsubscribe(this.parentSubscribeID)}onReady(e){if("ready"===this.wrapState)return e();this.addEventListener("ready",e)}queryWindowService(e,t,n=Function.prototype){if("close"===e||"setParent"===e||"ready"===this.wrapState)return new Promise((async(r,i)=>{"function"==typeof t&&(n=t,t={}),(t=t||{}).windowIdentifier=this.identifier,u.default.setting().system.Debug&&(t.callstack=u.default.callStack()),u.default.system.debug("FinsembleWindow.queryWindowService",this.windowServiceChannelName(e),t);let o=null;a.default.query(this.windowServiceChannelName(e),t,((t,s)=>{t?(u.default.system.debug(`WindowService.${e}: failed`,t),console.debug(`WindowService.${e}: failed`,t),"getComponentState"!==e&&"Not found"!==t&&i(t)):(o=s.data,u.default.system.debug(`${this.windowServiceChannelName(e)} successful`,o),console.debug(`${this.windowServiceChannelName(e)} successful`,o)),r(o),n(t,o)}))}));this.onReady((()=>{this.wrapState="ready",this.queryWindowService(e,t,n)}))}minimize(e=null,t=Function.prototype){this.queryWindowService("minimize",e,t)}maximize(e=null,t=Function.prototype){this.getBounds(((n,r)=>{n?u.default.system.warn("Error getting bounds, cached bounds will not be set"):this.updateOptions({options:{cachedLeft:r.left,defaultLeft:r.left,cachedTop:r.top,defaultTop:r.top,cachedWidth:r.width,defaultWidth:r.width,cachedHeight:r.height,defaultHeight:r.height}}),this.queryWindowService("maximize",e,t)}))}restore(e=null,t=Function.prototype){this.queryWindowService("restore",e,t)}blur(e=null,t=Function.prototype){this.queryWindowService("blur",e,t)}focus(e=null,t=Function.prototype){this.queryWindowService("focus",e,t)}bringToFront(e=null,t=Function.prototype){this.queryWindowService("bringToFront",e,t)}setAlwaysOnTop(e={alwaysOnTop:!0},t=Function.prototype){this.queryWindowService("setAlwaysOnTop",e,t)}isAlwaysOnTop(e={},t){this.queryWindowService("isAlwaysOnTop",{},t)}isShowing(e={},t){this.queryWindowService("isShowing",e,t)}setIgnoreMouseEvents(e,t,n=Function.prototype){const r={ignore:new Boolean(e).valueOf(),options:new Boolean(t).valueOf()?t:{forward:!1}};this.queryWindowService("setIgnoreMouseEvents",r,n)}setShape(e,t=Function.prototype){this.queryWindowService("setShape",e,t)}async addBrowserView(e,t=Function.prototype){const n=await this.queryWindowService("addBrowserView",e,t);return new y.FinsembleView({id:n,win:this})}async removeBrowserView(e,t=Function.prototype){await this.queryWindowService("removeBrowserView",{viewId:e.id},t)}async bringViewToFront(e,t=Function.prototype){await this.queryWindowService("bringViewToFront",{viewId:e.id},t)}async setViewBounds(e,t=Function.prototype){await this.queryWindowService("setViewBounds",{viewId:e.view.id,bounds:e.bounds},t)}setBounds(e={bounds:{}},t=Function.prototype){"function"==typeof e||e.bounds||(e={bounds:e}),this.queryWindowService("setBounds",e,t)}getBounds(e={},t=Function.prototype){return new Promise((n=>{this.queryWindowService("getBounds",e,((e,r)=>{n({err:e,data:r}),t(e,r)}))}))}updateOptions(e,t=Function.prototype){this.queryWindowService("updateOptions",e,t)}hide(e={},t=Function.prototype){this.queryWindowService("hide",e,t)}reload(e={},t=Function.prototype){this.queryWindowService("reload",e,t)}show(e={},t=Function.prototype){this.queryWindowService("show",e,t)}showAt(e={},t=Function.prototype){this.queryWindowService("showAt",e,t)}close(e={},t=Function.prototype){u.default.system.debug("WRAP CLOSE. Public close initiated for",this.name,e),this.queryWindowService("close",e,(()=>{u.default.system.debug("WRAP CLOSE. Public close initiated for",this.name),t()}))}animate(e={},t=Function.prototype){this.queryWindowService("animate",e,t)}registerWithDocking(e={},t){this.onReady((()=>{a.default.query("DockingService.registerWindow",{type:this.type,windowType:this.windowType,windowMsg:e,name:this.windowName},t)}))}showNativeOpenDialog(e={},t){this.queryWindowService("showNativeOpenDialog",e,t)}unRegisterWithDocking(){a.default.transmit("DockingService.deregisterWindow",{name:this.windowName})}initializeWindow({manageWindowMovement:e,identifier:t},n=Function.prototype){const r=()=>{a.default.publish(`Finsemble.${this.windowName}.componentReady`,{name:this.windowName}),n()};e?this.registerWithDocking(t,r):r()}wrapReady(){a.default.publish(`Finsemble.${this.windowName}.wrapReady`,{name:this.windowName,state:"open"})}setOpacity(e,t=Function.prototype){this.queryWindowService("setOpacity",e,t)}startTabTileMonitoring(e={}){u.default.system.debug("FinsembleWindow.startTabTileMonitoring",e),a.default.transmit("TabTile.startTabTile",{params:e})}stopTabTileMonitoring(e={},t=Function.prototype){u.default.system.debug("FinsembleWindow.stopTabTileMonitoring",e),a.default.query("TabTile.stopTabTile",{params:e},(function(e,n){e?u.default.system.warn("TabTile.stopTabTile: query failed",e):u.default.system.debug("TabTile.stopTabTile results",n.data);const r=n.data;t?t(e,r,this.defaultStopTrackingAction):this.defaultTabTileAction(r)}))}defaultTabTileAction(e){const t=this;switch(u.default.system.debug("FinsembleWindow.defaultTabTileAction",e),e.stoppedLocation){case"OutsideWindow":case"TabSection":break;case"InsideWindow":e.tileGroupId?t.Group.addWindow(this.identifier,e.tileGroupId,e.dropCoordinates):t.Group.createGroup((function(n){t.Group.addWindow(this.identifier,n,e.dropCoordinates,{startingWindowIdentifier:e.droppedOnWindowIdentifier})}));break;default:u.default.system.error("stopTracking returned an unknown stoppedLocation result",e)}}mergeBounds(e){e.right=e.left+e.width;const t={left:e.left,right:e.right,width:e.width,top:e.top,bottom:e.top+e.height,height:e.height},n={defaultLeft:e.left,defaultWidth:e.width,defaultTop:e.top,defaultHeight:e.height};Object.assign(this.windowOptions,t),Object.assign(this.windowOptions,n),this.windowOptions.bounds=t}startMove(e={}){u.default.system.debug("FinsembleWindow.startMove",e),e.windowIdentifier=this.identifier,a.default.transmit(this.eventChannelName("startedMoving"),{})}stopMove(e={}){u.default.system.debug("FinsembleWindow.stopMove",e),e.windowIdentifier=this.identifier,a.default.transmit(this.eventChannelName("stoppedMoving"),{})}getMonitor(e){a.default.query("DockingService.getMonitorForWindow",{windowIdentifier:this.identifier},((t,n)=>n?e(n.data):e()))}getComponentState(e,t){this.queryWindowService("getComponentState",e,t)}getWindowState(e,t){this.queryWindowService("getWindowState",e,t)}setComponentState(e,t=(()=>{})){this.queryWindowService("setComponentState",e,t)}removeComponentState(e,t=(()=>{})){this.queryWindowService("removeComponentState",e,t)}setWindowState(e,t=(()=>{})){this.queryWindowService("setWindowState",e,t)}saveCompleteWindowState(e={},t=Function.prototype){this.queryWindowService("saveCompleteWindowState",e,t)}cancelTabTileMonitoring(e={}){u.default.system.debug("FinsembleWindow.cancelTabTileMonitoring",e),a.default.transmit("TabTile.cancelTabTile",{params:e})}getParent(e){this.settingParent?g.getInstance(this.settingParent,((t,n)=>{e(null,n)})):this.parentWindow?e(null,this.parentWindow):e(null,null)}setParent(e,t){if(this.settingParent)return this.getParent(t);this.settingParent=e,this.parentWindow&&this.parentWindow.name===e.windowName?(u.default.system.debug("FinsembleWindow.setParent already set",e),this.settingParent=!1,t(null,this.parentWindow)):this.queryWindowService("setParent",e,(()=>{u.default.system.debug("FinsembleWindow.setParent",e),g.getInstance(e,((n,r)=>{n?u.default.system.error("FinsembleWindow.setParent error",n):(u.default.system.debug("FinsembleWindow.setParent wrap success",e),this.parentWindow=r,this.parentWindow.windowType.includes("StackedWindow")||u.default.system.error("FinsembleWindow.setParent error",this.parentWindow.name,e.windowName)),a.default.transmit(f.DOCKING.REQUEST_PUBLISH,null),this.settingParent=!1;const i=()=>{this.removeEventListener("parent-set",i),t(n,r)};this.addEventListener("parent-set",i)}))}))}setParentOnWrap(e,t=Function.prototype){this.parentWindow&&this.parentWindow.name===e.windowName?(u.default.system.debug("FinsembleWindow.setParentOnWrap already set",e),t(null,this.parentWindow)):this.queryWindowService("setParent",e,(()=>{u.default.system.debug("FinsembleWindow.setParentOnWrap",e),g.getInstance(e,((n,r)=>{n?u.default.system.error("FinsembleWindow.setParentOnWrap error",n):(u.default.system.debug("FinsembleWindow.setParentOnWrap success getting wrap",e),this.parentWindow=r,!1===this.parentWindow.windowType.includes("StackedWindow")&&u.default.system.error("FinsembleWindow.setParentOnWrap error",this.parentWindow.name,e.windowName)),t(n,r)}))}))}clearParent(){u.default.system.debug("FinsembleWindow.clearParent",this.parentWindow),this.parentWindow=null}setTitle(e){u.default.system.debug("Title change",e),a.default.publish(this.TITLE_CHANGED_CHANNEL,e)}getOptions(e=Function.prototype){this.queryWindowService("getOptions",{},e)}_privateManagementPreface(e,t){return"function"==typeof t&&u.default.system.error("StackedWindowWrapper.wrapPreface bad params",t),(t=t||{}).stackedWindowIdentifier={windowName:this.identifier?.windowName,windowType:this.identifier?.windowType},u.default.system.debug(`StackedWindow.${e} _privateManagementPreface`,t),t}addWindow(e,t=Function.prototype){return e=this._privateManagementPreface("addWindow",e),new Promise((n=>{a.default.query("StackedWindow.addWindow",e,((e,r)=>{u.default.system.debug("StackedWindow.addWindow callback",e,r),t(e,r.data),n({err:e,data:r.data})}))}))}removeWindow(e,t=Function.prototype){return e=this._privateManagementPreface("removeWindow",e),new Promise((n=>{a.default.query("StackedWindow.removeWindow",e,((e,r)=>{u.default.system.debug("StackedWindow.removeWindow callback",e,r),t(e,r.data),n({err:e,data:r.data})}))}))}deleteWindow(e,t=Function.prototype){return e=this._privateManagementPreface("deleteWindow",e),new Promise((n=>{a.default.query("StackedWindow.deleteWindow",e,((e,r)=>{u.default.system.debug("StackedWindow.deleteWindow callback",e,r),t(e,r.data),n({err:e,data:r.data})}))}))}setVisibleWindow(e,t=Function.prototype){return e=this._privateManagementPreface("setVisibleWindow",e),new Promise((n=>{a.default.query("StackedWindow.setVisibleWindow",e,((e,r)=>{u.default.system.debug("StackedWindow.setVisibleWindow callback",e,r),t(e,r.data),n({err:e,data:r.data})}))}))}reorder(e,t=Function.prototype){return e=this._privateManagementPreface("reorder",e),new Promise((n=>{a.default.query("StackedWindow.reorder",e,((e,r)=>{u.default.system.debug("StackedWindow.reorder callback",e,r),t(e,r.data),n({err:e,data:r.data})}))}))}formGroup(){const e=this.parentWindow?this.parentWindow.name:this.name;a.default.transmit("DockingService.formGroup",{windowName:e})}ejectFromGroup(){const e=this.parentWindow?this.parentWindow.name:this.name;a.default.query("DockingService.leaveGroup",{name:e},(()=>{}))}}t.FinsembleWindow=g,g.WINDOWSTATE={NORMAL:0,MINIMIZED:1,MAXIMIZED:2,HIDDEN:3},g.wrap=g.getInstance,g.isStartupApplication=async function(e){let t;const n=await new Promise(((e,t)=>{h.System.Application.getCurrent().getManifest(e,t)})).catch((()=>{t=!1}));return n&&(t=n&&n.startup_app&&n.startup_app.name===e),t},g._windowReady=function(e){let t;u.default.system.debug(`windowServiceReady: ${e} starting`);const n=`Finsemble.Component.State.${e}`;return new Promise((async(r,i)=>{await g.isStartupApplication(e)||d.isServiceInWindow(e)?i("Cannot Wrap Service Manager or Services"):(u.default.system.debug(`windowServiceReady: ${e} waiting`),t=a.default.subscribe(n,((n,i)=>{const{state:o}=i.data;switch(u.default.system.debug(`windowServiceReady: ${e} state change: ${o}`),o){case"ready":case"reloading":case"closing":u.default.system.debug(`windowServiceReady: ${e} ${o}`),a.default.unsubscribe(t),r()}})))}))}},96755:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseService=void 0;const a=n(57664),u=n(13854),c=s(n(39319)),l=s(n(72551)),f=s(n(5020)),d=n(51742),h=o(n(78379)),p=n(6192),y=n(10589),{SERVICE_INITIALIZING_CHANNEL:g,SERVICE_READY_CHANNEL:m,SERVICE_QUERY_READY_CHANNEL:v,SERVICE_CLOSING_CHANNEL:w,SERVICE_CLOSED_CHANNEL:_,SERVICE_STOP_CHANNEL:b}=h,S={startupDependencies:{services:[],clients:[]},shutdownDependencies:{services:[]},addOFWrapper:!1,name:window.name};t.BaseService=class{constructor(e=S){!function(e){e.startupDependencies?(e.startupDependencies.services||(e.startupDependencies.services=S.startupDependencies.services),e.startupDependencies.clients||(e.startupDependencies.clients=S.startupDependencies.clients)):e.startupDependencies=S.startupDependencies,e.shutdownDependencies?e.shutdownDependencies.services||(e.shutdownDependencies.services=S.shutdownDependencies.services):e.shutdownDependencies=S.shutdownDependencies}(e),this.name=e.name?e.name:window.name,this.startupDependencies=e.startupDependencies,this.shutdownDependencies=e.shutdownDependencies,this.Logger=l.default,this.RouterClient=c.default,this.onBaseServiceReadyCB=null,this.setOnConnectionCompleteCB=null,this.listeners={},this.start=()=>{},this.started=!1,this.status="initializing",this.setOnline=this.setOnline.bind(this),this.onBaseServiceReady=this.onBaseServiceReady.bind(this),this.handleShutdown=this.handleShutdown.bind(this),this.waitForDependencies(),p.Globals.finsembleServices?p.Globals.finsembleServices.push(this):p.Globals.finsembleServices=[this]}async initialize(e){e()}waitForDependencies(){const e=this;if(this.started)return;this.started=!0;const t=this;function n(e){l.default.system.debug("BaseService.start.setParentUUID"),d.System.Window.getCurrent().getOptions((n=>{t.customData=n.customData,t.parentUuid=n.customData.parentUuid,e()}))}async function r(){await(new y.FSBLService).startApp(),c.default.addResponder(v(e.name),((t,n)=>{(e.status="ready")?n?.sendQueryResponse(null):n?.sendQueryResponse("service not ready")})),c.default.transmit(g,{name:t.name}),window.addEventListener("beforeunload",t.RouterClient.disconnectAll),l.default.system.debug("APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.onRouterReady")}function i(e){const n=t.customData.debugServiceDelay||0;if(l.default.system.debug(`Custom Data: ${t.name} custom data`,t.customData),Number.isInteger(n))n>0&&l.default.system.debug(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.debugDelay: ${t.name} startup will delayed by ${n} milliseconds for debugging`);else{const e=`debugDelay has an illegal value ("${n}") for ${t.name}. Value must be an integer.`;l.default.system.error(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start: ${e}`),f.default.systemLog({error:!0},e)}setTimeout(e,n)}function o(e){l.default.system.debug(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.readyToGo ${t.name}`),console.log("Startup Dependencies for",t.name,t.startupDependencies),console.log("Shutdown Dependencies for",t.name,t.shutdownDependencies),u.FSBLDependencyManagerSingleton.shutdown.waitFor(t.shutdownDependencies,t.handleShutdown),l.default.system.debug(`APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.readyToGo after wait ${t.name}`),c.default.transmit(`${d.System.Window.getCurrent().name}.onSpawned`,{name:d.System.Window.getCurrent().name},{suppressWarnings:!0}),u.FSBLDependencyManagerSingleton.startup.waitFor(t.startupDependencies,e).on("err",(e=>{l.default.system.error(e)}))}function s(e){const n=d.System.Window.getCurrent();n.isShowing((r=>{r&&!1!==t.customData.showDevConsoleOnVisible?d.System.showDeveloperTools(n.uuid,n.name,null,e):(l.default.system.debug("APPLICATION LIFECYCLE:STARTUP:SERVICE:BaseService.start.delayStartup done"),e())}))}return l.default.system.debug(`${this.name} starting`),new Promise((e=>{a.series([r,n,s,i,o],(()=>{e(),this.onDependenciesReady()}))}))}setOnline(){"ready"!==this.status&&(this.RouterClient.addListener(`${b}.${this.name}`,(()=>{u.FSBLDependencyManagerSingleton.shutdown.checkDependencies()})),this.status="ready",c.default.transmit(m,{serviceName:this.name},{suppressWarnings:!0}),l.default.system.log("APPLICATION LIFECYCLE:STARTUP:SERVICE ONLINE",this.name),f.default.publishBootStatus(this.name,"services","completed"))}onDependenciesReady(){l.default.system.debug("APPLICATION LIFECYCLE:STARTUP:BaseService onDependenciesReady",this.name),this.status="initializing",this.onBaseServiceReadyCB?this.onBaseServiceReadyCB(this.setOnline):this.initialize?this.initialize(this.setOnline):setTimeout((()=>{"ready"!==this.status&&"routerService"!==this.name&&(console.error("No onBaseServiceReadyCB on initialize function defined on your service. Ensure that service.setOnline is called"),l.default.system.error("No onBaseServiceReadyCB on initialize function defined on your service. Ensure that service.setOnline is called"))}),3e3)}onBaseServiceReady(e){"initializing"===this.status?this.onBaseServiceReadyCB=()=>{e(this.setOnline)}:e(this.setOnline)}addEventListener(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}onShutdown(e){this.addEventListener("onShutdown",e)}handleShutdown(){l.default.system.debug("BaseService.handleShutdown");const e=this;this.listeners.onShutdown?(c.default.transmit(w,{waitForMe:!0,name:this.name}),a.each(this.listeners.onShutdown,(function(e,t){a.asyncify(e)(null,t)}),(function(t){t&&l.default.system.error(t),e.shutdownComplete()}))):(c.default.transmit(w,{waitForMe:!1,name:this.name}),e.shutdownComplete())}shutdownComplete(){l.default.system.info(`"APPLICATION LIFECYCLE:SHUTDOWN:SERVICE SHUTDOWN: ${this.name}`),c.default.transmit(_,{name:this.name,uuid:d.System.Application.getCurrent().uuid})}},window.addEventListener("error",(e=>{const t=e.error?e.error.stack.substring(e.error.stack.search("at ")):"";return l.default.error(e.message,`File: ${e.filename}`,`Line: ${e.lineno}`,`Column: ${e.colno}`,`Error Stack: \n ${t}`),!1})),window.addEventListener("unhandledrejection",(e=>{"Cannot Wrap Service Manager or Services"==e.reason?l.default.warn("A service tried To wrap itself. This is a side effect of using Clients in services."):l.default.error("Unhandled rejection","reason",e.reason)}))},16640:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(50631)),o=n(52283),s=r(n(15993)),a=n(84155),u=n(30705),c="defaultDismissButtonText";class l{static normaliseConfig(e){return{service:l.getServiceDefaults(e),types:l.getTypes(e)}}static getTypes(e){return Object.assign({},e&&e.hasOwnProperty("types")?e.types:null)}static getServiceDefaults(e){const t=Object.assign({maxNotificationsToRetain:1e3,maxNotificationRetentionPeriodSeconds:!1},e);return t.hasOwnProperty("types")&&delete t.types,t.hasOwnProperty("presentationComponents")&&delete t.presentationComponents,t}static applyDefaults(e,t){let n;if(t.type&&e&&e.types&&e.types[t.type]?n=e.types[t.type]:e&&e.types&&e.types.default&&(n=e.types.default),Array.isArray(t.actions)||(t.actions=[]),Array.isArray(t.actionsHistory)||(t.actionsHistory=[]),Array.isArray(t.stateHistory)||(t.stateHistory=[]),n){let r=a.Map(t).toObject();if(n.hasOwnProperty("defaults")&&(r=l.setDefaultsFromConfig(t,n.defaults)),n.hasOwnProperty("showDismissAction")&&n.showDismissAction){let t="Dismiss";n.hasOwnProperty(c)?t=n.defaultDismissButtonText:e.hasOwnProperty("service")&&e.service.hasOwnProperty(c)&&(t=e.service.defaultDismissButtonText),r=l.addDismissActionToNotification(r,t)}return r}return t}static addDismissActionToNotification(e,t){if(!l.hasDismissAction(e)){const n=new i.default;n.type=o.ActionTypes.DISMISS,n.buttonText=t,e.actions?.push(n)}return e}static hasDismissAction(e){let t=!1;return e.actions?.reduce(((e,t)=>e.concat(t)),[]).forEach((e=>{"dismiss"===e.type.toLowerCase()&&(t=!0)})),t}static setDefaultsFromConfig(e,t){for(const[n,r]of Object.entries(t))!e[n]&&void 0===e[n]||Array.isArray(e[n])&&0===e[n].length?e[n]=r:e[n]&&"object"==typeof e[n]&&"object"==typeof r&&(e[n]=l.setDefaultsFromConfig(e[n],r));return e}static filterMatches(e,t){const n=e&&e.include&&e.include.length>0,r=e&&e.exclude&&e.exclude.length>0;if(!n&&!r)return!0;let i=!n;return n&&e.include.forEach((e=>{u.matchObject(t,e)&&(i=!0)})),r&&e.exclude.forEach((e=>{u.matchObject(t,e)&&(i=!1)})),i}static addPerformedAction(e,t){let n;n=a.Map.isMap(e)?e:a.Map(e);const r=new s.default;r.id=t.id,r.type=t.type,r.datePerformed=(new Date).toISOString();const i=n.get("actionsHistory").slice(0);return i.push(r),n=n.set("actionsHistory",i),a.Map.isMap(e)?n:n.toObject()}static setNotificationHistory(e,t,n){const r=a.Map(e);let i,o;return t.has(e.id)?(i=t.get(e.id),o=i.stateHistory,i.stateHistory=[]):(o=r.get("stateHistory"),i=n,i.stateHistory=[]),o.push(i),r.set("stateHistory",o).toObject()}static getItemsToPurge(e,t){const n=[];let r=!1===t.maxNotificationRetentionPeriodSeconds,i=0;const o=e.entries();do{const s=o.next();if(s.done)break;if(t.maxNotificationRetentionPeriodSeconds){const e=s.value[1].actionsHistory;if(e&&e.length){const o=Date.parse(e[e.length-1].datePerformed);if(Date.now()-1e3*t.maxNotificationRetentionPeriodSeconds>o){i++,n.push(s.value[1]);continue}r=!0}}e.size-i>t.maxNotificationsToRetain&&(i++,n.push(s.value[1]))}while(!r||e.size-i>t.maxNotificationsToRetain);return n}static matchesMuteFilters(e,t){let n=!1;return t.forEach((t=>{!n&&t.source&&t.type?n=t.source===e.source&&t.type===e.type:(!n&&t.source===e.source||t.type===e.type)&&(n=!0)})),n}}t.default=l},32272:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.STORAGE_KEY_NOTIFICATION_PREFIX=void 0;const i=r(n(63862)),o="finsemble.notifications",s="last.issued",a="snooze.timers",u="list.contents";t.STORAGE_KEY_NOTIFICATION_PREFIX="id.";class c{static async persistNotification(e,n,r=!1){await c.storeListIds(e),n&&await c.storeValue(t.STORAGE_KEY_NOTIFICATION_PREFIX+n.id,n)}static async fetchNotifications(){return new Promise((async e=>{const t=new Map,n=await c.getValue(u),r=[];n&&n.forEach((e=>{r.push(c.getNotification(e))})),(await Promise.all(r)).forEach(((e,r)=>{e?t.set(e.id,e):c.logger.error(`Notification ${n[r]} not found`)})),e(t)}))}static storeLastIssued(e){return c.storeValue(s,e)}static async fetchLastIssued(){return new Promise((async e=>{let t=await c.getValue(s);t||(t=new Map),e(t)}))}static storeSnoozeTimers(e){return c.storeValue(a,e)}static async fetchSnoozeTimers(){return new Promise((async e=>{let t=await c.getValue(a);t||(t=new Map),e(t)}))}static async storeListIds(e){const t=[...e.keys()];await i.default.save({topic:o,key:u,value:t})}static async getNotification(e){return await c.getValue(t.STORAGE_KEY_NOTIFICATION_PREFIX+e)}static async deleteValue(e){await i.default.remove({topic:o,key:e})}static async storeValue(e,t){await i.default.save({topic:o,key:e,value:t})}static async getValue(e){return await i.default.get({topic:o,key:e})}}t.default=c},41567:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=n(52283),u=s(n(39243)),c=s(n(47887)),l=s(n(50631)),f=s(n(16640)),d=o(n(32272)),h=n(50586),p=n(84155),y=n(96755),g=s(n(72551)),m=s(n(70010)),v=s(n(9562)),w=s(n(63862)),_=s(n(9562)),b=n(76420);g.default.start(),g.default.system.log("notification Service starting up"),w.default.initialize(),v.default.initialize(),m.default.initialize();const S="NO_SOURCE_DEFINED",C="finsemble.servicesConfig.notifications.userPreferences",E="finsemble.servicesConfig.notifications",I="notification.",O="subscribe",A={DISABLE_DOT_ON_TOOLBAR_ICON:"disableDotOnToolbarIcon",SHOW_DOT_ON_TOOLBAR_ICON_MUTED_NOTIFICATIONS:"showDotOnToolbarIconForMutedNotifications",INFORMATIONAL_NOTIFICATION_TOAST_PERIOD_SECONDS:"informationalNotificationToastPeriodSeconds",DEFAULT_SNOOZE_PERIOD_SECONDS:"defaultSnoozePeriodSeconds",NEW_NOTIFICATION_HALO_PERIOD_SECONDS:"newNotificationHaloPeriodSeconds",TOAST_TIMEOUT_ON_ACTIONABLE_NOTIFICATIONS:"toastTimeoutOnActionableNotifications"},T=e=>e instanceof Map?e:new Map(Object.entries(e));class L extends y.BaseService{constructor(e){super({name:e,addOFWrapper:!1,startupDependencies:{clients:["storageClient","ConfigClient"]},shutdownDependencies:{services:["windowService"]}}),this.config={service:{},types:{}},this.initialize=async e=>{this.createRouterEndpoints(),m.default.addListener({field:E},this.applyConfigChange),m.default.getValue({field:E},this.applyConfigChange),m.default.addListener({field:`${C}.mute`},this.applyMuteFilterChange),m.default.getValue({field:`${C}.mute`},this.applyMuteFilterChange),await this.fetchStateFromStorage(),this.wakeSnoozeFromLoad(),this.Logger.system.log("notification Service ready"),e()},this.applyConfigChange=(e,t)=>{e&&this.Logger.system.error(`Unable to get config err: ${e}`),this.config=f.default.normaliseConfig(t)},this.applyMuteFilterChange=(e,t)=>{e&&this.Logger.system.error(`Unable to get config err: ${e}`),t&&(t.value&&(t=t.value),this.muteFilters=t)},d.default.logger=this.Logger,this.serviceStartTime=new Date,this.proxyToWebApiFilter=!1,this.subscriptions=new Map,this.storageAbstraction={snoozeTimers:new Map,notifications:new Map,lastIssued:new Map},this.muteFilters=[],this.bindCorrectContext(),this.onBaseServiceReady(this.initialize.bind(this)),this.setPreferenceChangeListener(),this.start()}createRouterEndpoints(){this.setupNotify(),this.setupLastIssued(),this.setupSubscribe(),this.setupAction(),this.setupFetchHistory(),this.setupMute(),this.setupUnsubscribe(),this.setupUIPubSub(),this.setupMarkUnread(),this.setupDelete(),this.setupMarkRead(),this.setupSources(),this.setupMuteFilters(),this.setupPreferences()}bindCorrectContext(){this.createRouterEndpoints=this.createRouterEndpoints.bind(this),this.subscribe=this.subscribe.bind(this),this.notify=this.notify.bind(this),this.broadcastNotification=this.broadcastNotification.bind(this),this.getLastIssued=this.getLastIssued.bind(this),this.performAction=this.performAction.bind(this),this.fetchHistory=this.fetchHistory.bind(this),this.unsubscribe=this.unsubscribe.bind(this),this.mute=this.mute.bind(this),this.unmute=this.unmute.bind(this),this.markNotificationAs=this.markNotificationAs.bind(this),this.deleteNotifications=this.deleteNotifications.bind(this),this.applyConfigChange=this.applyConfigChange.bind(this),this.getSources=this.getSources.bind(this),this.getMuteFilters=this.getMuteFilters.bind(this),this.getNotificationsPreferences=this.getNotificationsPreferences.bind(this)}getMuteFilters(){return this.muteFilters}async getNotificationsPreferences(){const{data:e}=await m.default.getValues([`${E}.${A.DISABLE_DOT_ON_TOOLBAR_ICON}`,`${E}.${A.INFORMATIONAL_NOTIFICATION_TOAST_PERIOD_SECONDS}`,`${E}.${A.DEFAULT_SNOOZE_PERIOD_SECONDS}`,`${E}.${A.NEW_NOTIFICATION_HALO_PERIOD_SECONDS}`,`${E}.${A.SHOW_DOT_ON_TOOLBAR_ICON_MUTED_NOTIFICATIONS}`,`${E}.${A.TOAST_TIMEOUT_ON_ACTIONABLE_NOTIFICATIONS}`,`${C}.${A.DISABLE_DOT_ON_TOOLBAR_ICON}`,`${C}.${A.INFORMATIONAL_NOTIFICATION_TOAST_PERIOD_SECONDS}`,`${C}.${A.DEFAULT_SNOOZE_PERIOD_SECONDS}`,`${C}.${A.NEW_NOTIFICATION_HALO_PERIOD_SECONDS}`,`${C}.${A.SHOW_DOT_ON_TOOLBAR_ICON_MUTED_NOTIFICATIONS}`,`${C}.${A.TOAST_TIMEOUT_ON_ACTIONABLE_NOTIFICATIONS}`]);return await Promise.all(Object.values(A).map((async t=>({[t]:await this.computePreference(e,t)})))).then((e=>e.reduce(((e,t)=>(Object.entries(t).forEach((([t,n])=>{e[`${t}`]=n})),e)),{})))}async computePreference(e,t){return null!==e[`${C}.${t}`]&&void 0!==e[`${C}.${t}`]||(e[`${C}.${t}`]=e[`${E}.${t}`],await this.setPreference(t,e[`${E}.${t}`])),e[`${C}.${t}`]}getSources(){let e=Array.from(this.storageAbstraction.lastIssued.keys());const t=e.indexOf(S);return t>=0&&e.splice(t,1),e}async fetchStateFromStorage(){this.storageAbstraction.notifications=T(await d.default.fetchNotifications()),this.storageAbstraction.lastIssued=T(await d.default.fetchLastIssued()),this.storageAbstraction.snoozeTimers=T(await d.default.fetchSnoozeTimers())}query(e,t,n,r){return new Promise((async(i,o)=>{try{null==n&&(n=I),this.Logger.system.info(`sending message on ${n+e} channel`,t);const s=await this.RouterClient.query(n+e,t,(()=>{}));s.err?(this.Logger.system.error("Error: ",s.err),o(s.err)):(this.Logger.system.log(`${e} raw response: `,s),r&&r(null,s?.response?.data.data),i(s?.response?.data.data))}catch(e){this.Logger.system.error("Error: ",e),r&&r(e),o(e)}}))}broadcastNotification(e){this.Logger.system.log("Broadcasting Notification: ",e.id),this.subscriptions.forEach((t=>{f.default.filterMatches(t.filter,e)&&(this.expectReceipt(t,e),this.query(t.channel,e,null,((n,r)=>{this.setReceivedReceipt(t,e,n,r)})).then())})),this.config.service.proxyToWebApiFilter&&f.default.filterMatches(this.config.service.proxyToWebApiFilter,e)&&this.webApiNotify(e)}webApiNotify(e){const t=[];e.title&&t.push(e.title),e.title&&t.push(e.headerText);const n={body:(r=e).details,icon:r.contentLogo?r.contentLogo:r.headerLogo};var r;new Notification(t.join(" - "),n)}deleteFromStorage(e){const t=e;this.storageAbstraction.snoozeTimers.has(t)&&this.storageAbstraction.snoozeTimers.delete(t),this.storageAbstraction.notifications.has(t)&&this.storageAbstraction.notifications.delete(t)}deleteNotifications(e){e.map((e=>{this.deleteFromStorage(e.id),e.isDeleted=!0,this.notify([e])}))}addNotification(e){this.storageAbstraction.notifications.has(e.id)&&this.storageAbstraction.notifications.delete(e.id),this.storageAbstraction.notifications.set(e.id,e)}performAction(e){this.Logger.system.info("Request to perform Actions",e);const{notifications:t,action:n}=e,r={message:"success",errors:new Array};return t.forEach((e=>{try{this.delegateAction(e,n)}catch(e){r.message="fail",r.errors.push(e.message)}})),r}notify(e){e.forEach((async e=>{let t=this.receiveNotification(e);this.saveLastIssuedAt(t.source,t.issuedAt),t=f.default.setNotificationHistory(t,this.storageAbstraction.notifications,e);const n=await this.storeNotifications(t);t.isDeleted||this.broadcastNotification(t),n.forEach((e=>{d.default.deleteValue(d.STORAGE_KEY_NOTIFICATION_PREFIX+e.id),this.broadcastNotification(e)})),this.RouterClient.transmit("FinsembleNotificationsPreferencesChannel","notificationReceived")}))}subscribe(e){const t=this.getChannel();return e.id=this.getUuid(),this.Logger.system.info("Successfully processed subscription: ",e),e.channel=t,this.addToSubscription(e),{id:e.id,channel:t}}saveLastIssuedAt(e,t){if(e||(e=S),this.storageAbstraction.lastIssued.has(e)){if(new Date(t)>new Date(this.storageAbstraction.lastIssued.get(e).issuedAt)){this.storageAbstraction.lastIssued.set(e,new c.default(e,t));try{d.default.storeLastIssued(this.storageAbstraction.lastIssued).then()}catch(e){this.Logger.system.error("Failed to save lastIssued data",e)}}}else{this.storageAbstraction.lastIssued.set(e,new c.default(e,t));try{d.default.storeLastIssued(this.storageAbstraction.lastIssued).then()}catch(e){this.Logger.system.error("Failed to save lastIssued data",e)}}}getChannel(){return`subscribe.${this.getUuid()}`}snooze(e,t,n){this.removeFromSnoozeQueue(e);let r=this.config.service.defaultSnoozePeriodSeconds;!r||r<0?(this.Logger.system.warn("Invalid snooze timeout in configuration - defaulting to 180 seconds"),r=180):r=r;const i=n||(t.milliseconds?t.milliseconds:1e3*r),o=new u.default;o.notificationId=e.id,o.snoozeInterval=i,o.timeoutId=setTimeout((()=>{this.wake(e.id)}),i),this.Logger.system.log(`Timing Snoozing Date ${Date.now()}`),this.Logger.system.log(`Timing Snoozing Seconds ${i}`),o.wakeEpochMilliseconds=Date.now()+i,this.Logger.system.log(`Timing Snoozing for ${o.wakeEpochMilliseconds}`),this.storageAbstraction.snoozeTimers.set(e.id,o);try{d.default.storeSnoozeTimers(this.storageAbstraction.snoozeTimers).then()}catch(e){this.Logger.system.error("Failed to store snooze timers",e)}return e.isSnoozed=!0,e}wake(e){let t=this.storageAbstraction.notifications.get(e);const n=new l.default;n.id=this.getUuid(),n.type="FINSEMBLE:WAKE",t=f.default.addPerformedAction(t,n),t.isSnoozed=!1,t.isRead&&(t.isRead=!1),this.removeFromSnoozeQueue(t),this.notify([t])}dismiss(e){return e.isRead=!0,e}spawn(e,t){return v.default.spawn(t.component,t.spawnParams).then(),e}validateForwardParams(e){if(!e.channel)throw new Error(`No channel set when trying to perform '${e.type}'`)}unsubscribe(e){this.Logger.system.log(`Removing notification subscription: ${e}`),this.subscriptions.has(e)&&this.subscriptions.delete(e)}delegateAction(e,t){switch(e=f.default.addPerformedAction(e,t),this.removeFromSnoozeQueue(e),this.Logger.system.info(`Action type: ${t.type}`),t.type.toUpperCase()){case a.ActionTypes.SNOOZE:e=this.snooze(e,t),this.notify([e]);break;case a.ActionTypes.SPAWN:e=this.spawn(e,t);break;case a.ActionTypes.QUERY:e=this.forwardAsQuery(e,t);break;case a.ActionTypes.TRANSMIT:e=this.forwardAsTransmit(e,t);break;case a.ActionTypes.PUBLISH:e=this.forwardAsPublish(e,t);break;case a.ActionTypes.DISMISS:e=this.dismiss(e),this.notify([e]);break;default:return void this.Logger.system.error(`Unable to perform action '${t.type}' on notification`)}this.Logger.system.info("Updated notification state",e),[a.ActionTypes.SNOOZE,a.ActionTypes.DISMISS].includes(t.type.toUpperCase())||void 0!==t.markAsRead&&!0!==t.markAsRead||(e.isRead=!0,this.notify([e]))}markNotificationAs({notifications:e,isRead:t=!1}){this.Logger.system.info("Received state markAs",e);const n=e.map((e=>{this.removeFromSnoozeQueue(e);let n=p.Map(e);n=n.set("isRead",t);const r=new l.default;return r.id=this.getUuid(),r.type="FINSEMBLE:"+(t?"READ":"UNREAD"),n=f.default.addPerformedAction(n,r),t&&e.isSnoozed&&(n=n.set("isSnoozed",!1)),n.toObject()}));return this.notify(n),n}receiveNotification(e){if(this.Logger.system.info("Received state",e),Object.keys(e).includes("options")&&e.options){const{options:t}=e;e.details=t.body,e.headerLogo=t.icon,t.format&&t.format.includes("com.symphony")?(e.source="Symphony",e.title="Message from "+e.title):e.source=t.finsembleSource||"Unknown Source"}e=f.default.applyDefaults(this.config,e);let t=p.Map(e);if(t.get("id")||(t=t.set("id",this.getUuid())),t.get("issuedAt")||(t=t.set("issuedAt",(new Date).toISOString())),!t.get("receivedAt")){const n=new l.default;n.id=this.getUuid(),n.type="FINSEMBLE:RECEIVED",f.default.matchesMuteFilters(e,this.muteFilters)&&(t=t.set("isMuted",!0),this.Logger.system.log(`Mute notificationID:${e.id}, '${e.title}', source:'${e.source}', type: \n\t\t\t\t'${e.type}'`)),t=f.default.addPerformedAction(t,n),t=t.set("receivedAt",(new Date).toISOString())}return this.Logger.system.info("Applied state",t),t.toObject()}async storeNotifications(e){let t=[];return e.isDeleted||this.addNotification(e),t=f.default.getItemsToPurge(this.storageAbstraction.notifications,{maxNotificationRetentionPeriodSeconds:this.config.service.maxNotificationRetentionPeriodSeconds,maxNotificationsToRetain:this.config.service.maxNotificationsToRetain}),t.forEach((e=>{this.deleteFromStorage(e.id),e.isDeleted=!0})),e.isDeleted&&t.push(e),await d.default.persistNotification(this.storageAbstraction.notifications,e),await d.default.storeSnoozeTimers(this.storageAbstraction.snoozeTimers),t}addResponder(e,t,n){null==n&&(n=I),this.Logger.system.info(`Adding responder for endpoint: ${n+e}`),this.RouterClient.addResponder(n+e,(async(n,r)=>{if(this.Logger.system.info(`Message received on ${e}: `,r),n)this.Logger.system.error(`Failed to setup ${e} responder`,n);else try{this.Logger.system.info(`Processing message on channel ${e}: `,r);const n=await t(r?.data);this.Logger.system.info(`Message response on ${e}: `,n),r?.sendQueryResponse(null,{status:"success",data:n})}catch(n){this.Logger.system.error("Failed to process query",n),r?.sendQueryResponse(n)}}))}setPreferenceChangeListener(){this.RouterClient.addListener("FinsembleUserPreferencesChannel",(async(e,t)=>{const n=t.data.notificationPreferences;n&&Object.keys(n).map((e=>{this.setPreference(e,n[e])}))}))}setPreference(e,t){this.Logger.system.info("Updating notifications user preferences",e),m.default.setPreference({field:`${C}.${e}`,value:t},(t=>{t&&this.Logger.system.error("Could not save mute preference",e)}))}setupNotify(){this.addResponder("notify",this.notify)}setupLastIssued(){this.addResponder("last_issued",this.getLastIssued)}setupFetchHistory(){this.addResponder("fetch_history",this.fetchHistory)}setupMute(){this.addResponder("mute",this.mute),this.addResponder("unmute",this.unmute)}setupSubscribe(){this.addResponder(O,this.subscribe)}setupUnsubscribe(){this.addResponder("unsubscribe",this.unsubscribe)}setupMarkUnread(){this.addResponder("mark_unread",this.markNotificationAs)}setupMarkRead(){this.addResponder("mark_read",this.markNotificationAs)}setupDelete(){this.addResponder("delete",this.deleteNotifications)}setupAction(){this.addResponder("perform_action",this.performAction)}setupSources(){this.addResponder("sources",this.getSources)}setupMuteFilters(){this.addResponder("mute_filters",this.getMuteFilters)}setupPreferences(){this.addResponder("preferences",this.getNotificationsPreferences)}async setupUIPubSub(){const e=await w.default.get({topic:"finsemble.notifications",key:"last.position"}),t=e?.position?e.position:null;let n={showDrawer:!1,showCenter:!1,poppedOut:!!e?.poppedOut&&e.poppedOut,position:t,toasterMonitor:"0",overFlowMenu:{notification:!1,overflowCount:!1,clickCoordinates:!1}};this.RouterClient.addPubSubResponder("notification-ui",n,{publishCallback:async(e,t)=>{const r=await this.centerExists();e||(!r&&t.data.showCenter&&t.data.showCenter!=n.showCenter&&v.default.showWindow({windowName:"notifications-center",componentType:this.config.service.notificationsCenterComponentType||"NotificationsCenter"},{spawnIfNotFound:!0,relativeWindow:{windowName:b.windowNameFromRouterHeader(t.header)}}).then(),n=t.data,t.sendNotifyToAllSubscribers(null,t.data))}})}async centerExists(){const e=this.config.service.notificationsCenterComponentType||"NotificationsCenter";return new Promise((async t=>{const n=await _.default.getActiveDescriptors();for(const r in n.data)if(n.data.hasOwnProperty(r)&&n?.data[r]?.componentType===e){t(!0);break}t(!1)}))}expectReceipt(e,t){}setReceivedReceipt(e,t,n,r){this.Logger.system.info(`Got a receipt on: ${e.channel}`)}addToSubscription(e){this.subscriptions.set(e.id,e)}forwardAsQuery(e,t){this.validateForwardParams(t);try{this.query(t.channel,{notification:e,actionPayload:t.payload},"").then()}catch(n){this.Logger.system.error(`Error performing action on channel channel: '${t.channel}'`),e.isRead=!1}return e}transmit(e,t,n){null==n&&(n=I),this.Logger.info(`Transmitting on channel: ${n+e}`),this.RouterClient.transmit(n+e,t)}forwardAsTransmit(e,t){return this.validateForwardParams(t),this.transmit(t.channel,{notification:e,actionPayload:t.payload},""),e}publish(e,t,n){null==n&&(n=I),this.Logger.info(n),this.Logger.info(`Publishing on channel: ${n+e}`),this.RouterClient.publish(n+e,t)}forwardAsPublish(e,t){return this.validateForwardParams(t),this.publish(t.channel,{notification:e,actionPayload:t.payload},""),e}getLastIssued(e){this.Logger.system.info(`Finding last issued for source: '${e}'`);let t="";return e&&this.storageAbstraction.lastIssued.has(e)?t=this.storageAbstraction.lastIssued.get(e)?.issuedAt:this.storageAbstraction.lastIssued.forEach((e=>{if(t){const n=new Date(t);new Date(e.issuedAt)>n&&(t=e.issuedAt)}else t=e.issuedAt})),t}fetchHistory(e){let t,n,r,i;this.Logger.system.info("Fetch history request with params",e);let{options:o}=e;const{filter:s}=e,a=[];o&&"string"==typeof o?(this.Logger.system.deprecated(`FetchHistory: string parameter use has been deprecated. Use object form {sentAfter: "${o}"} instead`),t=o,this.Logger.system.info("Since date",t)):o&&"object"==typeof o&&(({sentAfter:t,sentBefore:n,pageSize:r,pageNumber:i}=o),r&&!i&&(i=1)),t&&(t="startup"==t?this.serviceStartTime:new Date(t)),n&&(n="startup"==n?this.serviceStartTime:new Date(n));let u=0;return Array.from(this.storageAbstraction.notifications).reverse().forEach((([e,o])=>{if(r&&a.length>=r)return;const c=new Date(o.receivedAt);t&&(this.Logger.system.info("Notification date",o.receivedAt),c<=t)||n&&c>=n||s&&!f.default.filterMatches(s,o)||(i&&u<(i-1)*r?u++:a.push(this.storageAbstraction.notifications.get(e)))})),a}unmute(e){this.Logger.system.info("Unmute request with params",e);const{filter:t}=e,n=this.muteFilters.slice();Array.isArray(t)?t.map((e=>{this.removeFromMuteFilters(n,e)})):this.removeFromMuteFilters(n,t),m.default.setPreference({field:`${C}.mute`,value:n},(t=>{t&&this.Logger.system.error("Could not save mute preference",e)}))}mute(e){this.Logger.system.info("Mute request with params",e);const{filter:t}=e,n=this.muteFilters.slice();Array.isArray(t)?t.map((e=>{this.addToMuteFilters(n,e)})):this.addToMuteFilters(n,t),m.default.setPreference({field:`${C}.mute`,value:n},(t=>{t&&this.Logger.system.error("Could not save mute preference",e)}))}addToMuteFilters(e,t){let n=!1;this.muteFilters.forEach((e=>{e.source===t.source&&e.type===t.type&&(n=!0)})),n||e.push(t)}removeFromMuteFilters(e,t){this.filterMutate(e,(e=>e.source!==t.source||e.type!==t.type))}filterMutate(e,t){for(let n=e.length-1;n>=0;n-=1)t(e[n])||e.splice(n,1)}getUuid(){return h.v4()}removeFromSnoozeQueue(e){if(e.id&&this.storageAbstraction.snoozeTimers.has(e.id)){clearTimeout(this.storageAbstraction.snoozeTimers.get(e.id).timeoutId),this.storageAbstraction.snoozeTimers.delete(e.id);try{d.default.storeSnoozeTimers(this.storageAbstraction.snoozeTimers).then()}catch(e){this.Logger.system.error("Failed to store snooze timers",e)}}}wakeSnoozeFromLoad(){const e=[],t=[];this.storageAbstraction.snoozeTimers.forEach(((n,r)=>{let i=this.storageAbstraction.notifications.get(r);i&&(Date.now()>=n.wakeEpochMilliseconds?t.push(i):e.push(i))})),e.forEach((e=>{const t=this.storageAbstraction.snoozeTimers.get(e.id);this.Logger.system.log(`Timing Timestamp ${t?.wakeEpochMilliseconds}`),this.Logger.system.log(`Timing Now Timestamp ${Date.now()}`),this.Logger.system.log("Timing: "+(t.wakeEpochMilliseconds-Date.now())),this.snooze(e,new l.default,Math.max(1e4,t.wakeEpochMilliseconds-Date.now()))})),t.forEach((e=>{setTimeout((()=>{this.wake(e.id)}),1e4)}))}}const R=new L("notificationService");t.default=R},33509:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CHECKPOINT_CHANNEL_BASE=t.STAGE_CHANNEL=t.STATUS_CHANNEL_BASE=t.SHOW_SYSLOG_CHANNEL=t.SYSLOG_CHANNEL=t.CRITICAL_BOOT_STAGES=t.ALL_BOOT_STAGES=void 0,t.ALL_BOOT_STAGES=["microkernel","kernel","authentication","preuser","earlyuser","user"],t.CRITICAL_BOOT_STAGES=["microkernel","kernel","authentication"],t.SYSLOG_CHANNEL="systemManager.systemlog",t.SHOW_SYSLOG_CHANNEL="systemManager.showSystemlog",t.STATUS_CHANNEL_BASE="systemManager.boot.status",t.STAGE_CHANNEL="systemManager.boot.stage",t.CHECKPOINT_CHANNEL_BASE="systemManager.checkpoint"},56188:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BootReadyItem=t.BootConfigElement=t.ALL_BOOT_STAGES=void 0,t.ALL_BOOT_STAGES=["microkernel","kernel","authentication","preuser","earlyuser","user"],t.BootConfigElement=class{},t.BootReadyItem=class{constructor(e,t,n){this.name=e,this.type=t,this.config=n}}},95269:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkpointChannel=t.statusChannel=t.killOldApplications=void 0;const r=n(51742),i=n(33509);t.killOldApplications=function(e){return new Promise((async t=>{r.System.getAllApplications((async n=>{if(n)for(let t=0;t<n.length;t++){const i=n[t];if(i.uuid?.endsWith(`-${e}`)){const e=r.System.Application.wrap(i.uuid);await r.System.closeApplication(e)}}console.log("killOldApplications: finished closing old apps"),t()}))}))},t.statusChannel=function(e){return`${i.STATUS_CHANNEL_BASE}.${e}`},t.checkpointChannel=function(e,t){return`${i.CHECKPOINT_CHANNEL_BASE}.${e}.${t}`}},88801:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},77661:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},80498:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},74215:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},19600:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},89520:(e,t)=>{"use strict";var n,r,i;Object.defineProperty(t,"__esModule",{value:!0}),t.ChannelError=t.ResolveError=t.OpenError=void 0,(i=t.OpenError||(t.OpenError={})).AppNotFound="AppNotFound",i.ErrorOnLaunch="ErrorOnLaunch",i.AppTimeout="AppTimeout",i.ResolverUnavailable="ResolverUnavailable",(r=t.ResolveError||(t.ResolveError={})).NoAppsFound="NoAppsFound",r.ResolverUnavailable="ResolverUnavailable",r.ResolverTimeout="ResolverTimeout",(n=t.ChannelError||(t.ChannelError={})).NoChannelFound="NoChannelFound",n.AccessDenied="AccessDenied",n.CreationFailed="CreationFailed"},55182:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},35644:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},66129:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},51854:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},36611:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.versionIsAtLeast=t.compareVersionNumbers=t.getInfo=t.leaveCurrentChannel=t.getCurrentChannel=t.getOrCreateChannel=t.joinChannel=t.getSystemChannels=t.addContextListener=t.addIntentListener=t.raiseIntentForContext=t.raiseIntent=t.broadcast=t.findIntentsByContext=t.findIntent=t.open=t.fdc3Ready=void 0;const n=new Error("FDC3 DesktopAgent not available at `window.fdc3`."),r=new Error("Timed out waiting for `fdc3Ready` event."),i=new Error("`fdc3Ready` event fired, but `window.fdc3` not set to DesktopAgent.");function o(e){return window.fdc3?e():Promise.reject(n)}function s(e){if(!window.fdc3)throw n;return e()}t.fdc3Ready=async(e=5e3)=>new Promise(((t,n)=>{if(window.fdc3)t();else{const o=setTimeout((()=>window.fdc3?t():n(r)),e);window.addEventListener("fdc3Ready",(()=>{clearTimeout(o),window.fdc3?t():n(i)}),{once:!0})}})),t.open=function(e,t){return o((()=>window.fdc3.open(e,t)))},t.findIntent=function(e,t){return o((()=>window.fdc3.findIntent(e,t)))},t.findIntentsByContext=function(e){return o((()=>window.fdc3.findIntentsByContext(e)))},t.broadcast=function(e){s((()=>window.fdc3.broadcast(e)))},t.raiseIntent=function(e,t,n){return o((()=>window.fdc3.raiseIntent(e,t,n)))},t.raiseIntentForContext=function(e,t){return o((()=>window.fdc3.raiseIntentForContext(e,t)))},t.addIntentListener=function(e,t){return s((()=>window.fdc3.addIntentListener(e,t)))},t.addContextListener=function(e,t){return s("function"!=typeof e?()=>window.fdc3.addContextListener(e,t):()=>window.fdc3.addContextListener(e))},t.getSystemChannels=function(){return o((()=>window.fdc3.getSystemChannels()))},t.joinChannel=function(e){return o((()=>window.fdc3.joinChannel(e)))},t.getOrCreateChannel=function(e){return o((()=>window.fdc3.getOrCreateChannel(e)))},t.getCurrentChannel=function(){return o((()=>window.fdc3.getCurrentChannel()))},t.leaveCurrentChannel=function(){return o((()=>window.fdc3.leaveCurrentChannel()))},t.getInfo=function(){return s((()=>window.fdc3.getInfo()))},t.compareVersionNumbers=(e,t)=>{try{let n=e.split(".").map(Number),r=t.split(".").map(Number);for(let e=0;e<Math.max(n.length,r.length);e++){if(e===n.length||n[e]<r[e])return-1;if(e===r.length||n[e]>r[e])return 1}return 0}catch(e){return console.error("Failed to compare version strings",e),null}},t.versionIsAtLeast=(e,n)=>{let r=t.compareVersionNumbers(e.fdc3Version,n);return null===r?null:r>=0}},55972:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},91767:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ContextTypes=void 0,(n=t.ContextTypes||(t.ContextTypes={})).Contact="fdc3.contact",n.ContactList="fdc3.contactList",n.Country="fdc3.country",n.Instrument="fdc3.instrument",n.Organization="fdc3.organization",n.Portfolio="fdc3.portfolio",n.Position="fdc3.position"},91966:(e,t)=>{"use strict";function n(e,t,n=""){if(n)throw Error(`Invalid value for key "${n}". Expected type ${JSON.stringify(e)} but got ${JSON.stringify(t)}`);throw Error(`Invalid value ${JSON.stringify(t)} for type ${JSON.stringify(e)}`)}function r(e){if(void 0===e.jsonToJS){const t={};e.props.forEach((e=>t[e.json]={key:e.js,typ:e.typ})),e.jsonToJS=t}return e.jsonToJS}function i(e){if(void 0===e.jsToJSON){const t={};e.props.forEach((e=>t[e.js]={key:e.json,typ:e.typ})),e.jsToJSON=t}return e.jsToJSON}function o(e,t,r,i=""){if("any"===t)return e;if(null===t)return null===e?e:n(t,e);if(!1===t)return n(t,e);for(;"object"==typeof t&&void 0!==t.ref;)t=h[t.ref];return Array.isArray(t)?function(e,t){return-1!==e.indexOf(t)?t:n(e,t)}(t,e):"object"==typeof t?t.hasOwnProperty("unionMembers")?function(e,t){const i=e.length;for(let n=0;n<i;n++){const i=e[n];try{return o(t,i,r)}catch(e){}}return n(e,t)}(t.unionMembers,e):t.hasOwnProperty("arrayItems")?function(e,t){return Array.isArray(t)?t.map((t=>o(t,e,r))):n("array",t)}(t.arrayItems,e):t.hasOwnProperty("props")?function(e,t,i){if(null===i||"object"!=typeof i||Array.isArray(i))return n("object",i);const s={};return Object.getOwnPropertyNames(e).forEach((t=>{const n=e[t],a=Object.prototype.hasOwnProperty.call(i,t)?i[t]:void 0;s[n.key]=o(a,n.typ,r,n.key)})),Object.getOwnPropertyNames(i).forEach((n=>{Object.prototype.hasOwnProperty.call(e,n)||(s[n]=o(i[n],t,r,n))})),s}(r(t),t.additional,e):n(t,e):t===Date&&"number"!=typeof e?function(e){if(null===e)return null;const t=new Date(e);return isNaN(t.valueOf())?n("Date",e):t}(e):function(e,t){return typeof e==typeof t?t:n(e,t,i)}(t,e)}function s(e,t){return o(e,t,r)}function a(e,t){return o(e,t,i)}function u(e){return{arrayItems:e}}function c(...e){return{unionMembers:e}}function l(e,t){return{props:e,additional:t}}function f(e){return{props:[],additional:e}}function d(e){return{ref:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Convert=void 0,t.Convert=class{static toContext(e){return s(JSON.parse(e),d("Context"))}static contextToJson(e){return JSON.stringify(a(e,d("Context")),null,2)}static toContact(e){return s(JSON.parse(e),d("Contact"))}static contactToJson(e){return JSON.stringify(a(e,d("Contact")),null,2)}static toContactList(e){return s(JSON.parse(e),d("ContactList"))}static contactListToJson(e){return JSON.stringify(a(e,d("ContactList")),null,2)}static toInstrument(e){return s(JSON.parse(e),d("Instrument"))}static instrumentToJson(e){return JSON.stringify(a(e,d("Instrument")),null,2)}static toInstrumentList(e){return s(JSON.parse(e),d("InstrumentList"))}static instrumentListToJson(e){return JSON.stringify(a(e,d("InstrumentList")),null,2)}static toCountry(e){return s(JSON.parse(e),d("Country"))}static countryToJson(e){return JSON.stringify(a(e,d("Country")),null,2)}static toOrganization(e){return s(JSON.parse(e),d("Organization"))}static organizationToJson(e){return JSON.stringify(a(e,d("Organization")),null,2)}static toPortfolio(e){return s(JSON.parse(e),d("Portfolio"))}static portfolioToJson(e){return JSON.stringify(a(e,d("Portfolio")),null,2)}static toPosition(e){return s(JSON.parse(e),d("Position"))}static positionToJson(e){return JSON.stringify(a(e,d("Position")),null,2)}};const h={Context:l([{json:"id",js:"id",typ:c(void 0,f(""))},{json:"name",js:"name",typ:c(void 0,"")},{json:"type",js:"type",typ:""}],"any"),ContactList:l([{json:"contacts",js:"contacts",typ:u(d("Contact"))},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:c(void 0,f(""))},{json:"name",js:"name",typ:c(void 0,"")}],"any"),Contact:l([{json:"id",js:"id",typ:d("ContactID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:c(void 0,"")}],"any"),ContactID:l([{json:"email",js:"email",typ:c(void 0,"")},{json:"FDS_ID",js:"FDS_ID",typ:c(void 0,"")}],""),InstrumentList:l([{json:"instruments",js:"instruments",typ:u(d("Instrument"))},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:c(void 0,f(""))},{json:"name",js:"name",typ:c(void 0,"")}],"any"),Instrument:l([{json:"id",js:"id",typ:d("InstrumentID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:c(void 0,"")}],"any"),InstrumentID:l([{json:"BBG",js:"BBG",typ:c(void 0,"")},{json:"CUSIP",js:"CUSIP",typ:c(void 0,"")},{json:"FDS_ID",js:"FDS_ID",typ:c(void 0,"")},{json:"FIGI",js:"FIGI",typ:c(void 0,"")},{json:"ISIN",js:"ISIN",typ:c(void 0,"")},{json:"PERMID",js:"PERMID",typ:c(void 0,"")},{json:"RIC",js:"RIC",typ:c(void 0,"")},{json:"SEDOL",js:"SEDOL",typ:c(void 0,"")},{json:"ticker",js:"ticker",typ:c(void 0,"")}],""),Country:l([{json:"id",js:"id",typ:d("CountryID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:c(void 0,"")}],"any"),CountryID:l([{json:"ISOALPHA2",js:"ISOALPHA2",typ:c(void 0,"")},{json:"ISOALPHA3",js:"ISOALPHA3",typ:c(void 0,"")}],""),Organization:l([{json:"id",js:"id",typ:d("OrganizationID")},{json:"type",js:"type",typ:""},{json:"name",js:"name",typ:c(void 0,"")}],"any"),OrganizationID:l([{json:"FDS_ID",js:"FDS_ID",typ:c(void 0,"")},{json:"LEI",js:"LEI",typ:c(void 0,"")},{json:"PERMID",js:"PERMID",typ:c(void 0,"")}],""),Portfolio:l([{json:"positions",js:"positions",typ:u(d("Position"))},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:c(void 0,f(""))},{json:"name",js:"name",typ:c(void 0,"")}],"any"),Position:l([{json:"holding",js:"holding",typ:3.14},{json:"instrument",js:"instrument",typ:d("Instrument")},{json:"type",js:"type",typ:""},{json:"id",js:"id",typ:c(void 0,f(""))},{json:"name",js:"name",typ:c(void 0,"")}],"any")}},98832:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(88801),t),i(n(77661),t),i(n(80498),t),i(n(55972),t),i(n(74215),t),i(n(19600),t),i(n(89520),t),i(n(35644),t),i(n(66129),t),i(n(51854),t),i(n(55182),t),i(n(36611),t),i(n(91767),t),i(n(91966),t),i(n(77178),t)},77178:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Intents=void 0,(n=t.Intents||(t.Intents={})).StartCall="StartCall",n.StartChat="StartChat",n.ViewChart="ViewChart",n.ViewContact="ViewContact",n.ViewQuote="ViewQuote",n.ViewNews="ViewNews",n.ViewInstrument="ViewInstrument",n.ViewAnalysis="ViewAnalysis"},60306:e=>{"use strict";e.exports=JSON.parse('{"name":"@finsemble/finsemble-core","main":"dist/index.js","types":"types/index.d.ts","version":"6.1.5","description":"Finsemble is an application framework providing infrastructure, services, and components for quickly building HTML5 multi-window financial desktop applications.","scripts":{"do-audit":" improved-yarn-audit --min-severity high","build":"gulp build --production","build-docs":"gulp --gulpfile gulpfile-docs.js build-docs","clean":"gulp clean","dev":"gulp build --watch","dev:fresh":"gulp build --clean --watch","docs":"set DEBUG=gulp-jsdoc3&&gulp --gulpfile=./gulpfile-docs.js docs-server","lint":"eslint --ext .js,.jsx,.ts,.tsx ./src/**","lint-fix":"eslint --fix --ext .js,.jsx,.ts,.tsx ./src/**","lint-stats":"eslint --format node_modules/eslint-stats/byErrorAndWarning.js --ext .js,.jsx,.ts,.tsx ./src/**","monodev":"yarn dev","obfuscate":"gulp build --production --obfuscate","prod":"gulp build --production","test":"ts-mocha","test-coverage":"nyc ts-mocha && nyc merge .nyc_output ../../.nyc_output/core.json","types":"gulp types"},"author":"Cosaic","license":"SEE LICENSE IN LICENSE","dependencies":{"@babel/core":"7.14.6","@babel/preset-env":"7.14.7","@babel/preset-react":"7.14.5"},"devDependencies":{"@istanbuljs/nyc-config-typescript":"1.0.1","@reduxjs/toolkit":"1.6.1","@types/chai":"4.2.21","@types/deepmerge":"2.2.0","@types/lodash":"4.14.171","@types/mocha":"9.0.0","@types/node":"12.12.7","@typescript-eslint/eslint-plugin":"4.28.3","@typescript-eslint/parser":"4.28.4","ajv":"6.12.2","async":"3.2.0","babel-loader":"8.2.2","browser-sync":"2.27.4","case-sensitive-paths-webpack-plugin":"2.4.0","chai":"4.2.0","chalk":"4.1.1","copy-webpack-plugin":"6.4.1","css-loader":"3.5.3","deepmerge":"1.3.2","del":"6.0.0","esm":"~3.2.25","fast-check":"2.17.0","file-loader":"6.2.0","file-saver":"2.0.5","fs-extra":"2.1.2","fuse.js":"6.4.6","git-rev-sync":"3.0.1","gulp":"4.0.0","gulp-javascript-obfuscator":"^1.1.6","gulp-jsdoc3":"3.0.0","gulp-plumber":"1.2.1","gulp-rename":"1.2.3","gulp-string-replace":"1.1.2","gulp-watch":"5.0.1","immutable":"4.0.0-rc.14","improved-yarn-audit":"^2.3.2","jsdoc":"3.6.6","jszip":"3.6.0","lodash":"4.17.21","mocha":"^8.0.1","mock-socket":"9.0.3","nyc":"15.1.0","p-limit":"3.1.0","p-queue":"7.1.0","pretty-hrtime":"1.0.3","prop-types":"15.7.2","react":"17.0.2","react-dom":"17.0.2","react-redux":"7.2.4","react-virtualized":"9.22.3","redux-devtools":"3.7.0","redux-devtools-chart-monitor":"1.7.2","redux-devtools-log-monitor":"2.1.0","redux-loop":"6.1.0","require-directory":"2.1.1","resize-observer-polyfill":"1.5.1","rimraf":"3.0.2","sass-loader":"12.1.0","searchjs":"1.1.0","shelljs":"0.8.4","sinon":"11.1.1","sinon-chai":"3.7.0","source-map-loader":"3.0.0","style-loader":"3.2.1","superagent":"6.1.0","taffydb":"2.7.3","to-string-loader":"1.1.6","ts-loader":"9.2.3","ts-mocha":"8.0.0","typedoc":"0.17.8","typescript":"4.3.5","url-loader":"4.1.0","uuid":"3.0.1","vinyl-sourcemaps-apply":"0.2.1","webpack":"5.45.1","webpack-glob-entries":"1.0.1","worker-farm":"1.7.0"},"resolutions":{"ts-mocha/ts-node":"^10.1.0","xmlhttprequest-ssl":"1.6.3","underscore":"1.12.1","ua-parser-js":"0.7.24","javascript-obfuscator":"2.15.5"}}')},87063:e=>{"use strict";e.exports=JSON.parse('{"F":{"0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","backspace":"Backspace","bs":"Backspace","bksp":"Backspace","tab":"Tab","escape":"Escape","esc":"Escape","clear":"Clear","enter":"Enter","return":"Enter","shift":"Shift","shft":"Shift","lshift":"Shift","lshft":"Shift","left shift":"Shift","leftshift":"Shift","rshift":"Shift","rshft":"Shift","right shift":"Shift","rightshift":"Shift","control":"Control","ctrl":"Control","commandorcontrol":"CommandOrControl","alt":"Alt","alternate":"Alt","pause":"Pause","caps lock":"Capslock","capslock":"Capslock","spacebar":"Space","space":"Space","space bar":"Space","page up":"PageUp","pgup":"PageUp","pg up":"PageUp","page down":"PageDown","pgdn":"PageDown","pg dn":"PageDown","pgdown":"PageDown","end":"End","home":"Home","left arrow":"Left","left":"Left","up arrow":"Up","up":"Up","right arrow":"Right","right":"Right","down arrow":"Down","down":"Down","select":"Select","slct":"Select","print":"PrintScreen","prnt":"PrintScreen","execute":"Execute","print screen":"PrintScreen","printscreen":"PrintScreen","print scrn":"PrintScreen","printscrn":"PrintScreen","prnt scrn":"PrintScreen","prntscrn":"PrintScreen","prt scrn":"PrintScreen","prtscrn":"PrintScreen","prt scn":"PrintScreen","prtscn":"PrintScreen","prt scr":"PrintScreen","prtscr":"PrintScreen","prt sc":"PrintScreen","prtsc":"PrintScreen","pr sc":"PrintScreen","prsc":"PrintScreen","insert":"Insert","ins":"Insert","delete":"Delete","del":"Delete","a":"A","b":"B","c":"C","d":"D","e":"E","f":"F","g":"G","h":"H","i":"I","j":"J","k":"K","l":"L","m":"M","n":"N","o":"O","p":"P","q":"Q","r":"R","s":"S","t":"T","u":"U","v":"V","w":"W","x":"X","y":"Y","z":"Z","windows":"Super","left windows":"Super","right windows":"Super","numpad 0":"num0","numpad 1":"num1","numpad 2":"num2","numpad 3":"num3","numpad 4":"num4","numpad 5":"num5","numpad 6":"num6","numpad 7":"num7","numpad 8":"num8","numpad 9":"num9","f1":"F1","fn1":"F1","function 1":"F1","f2":"F2","fn2":"F2","function 2":"F2","f3":"F3","fn3":"F3","function 3":"F3","f4":"F4","fn4":"F4","function 4":"F4","f5":"F5","fn5":"F5","function 5":"F5","f6":"F6","fn6":"F6","function 6":"F6","f7":"F7","fn7":"F7","function 7":"F7","f8":"F8","fn8":"F8","function 8":"F8","f9":"F9","fn9":"F9","function 9":"F9","f10":"F10","fn10":"F10","function 10":"F10","f11":"F11","fn11":"F11","function 11":"F11","f12":"F12","fn12":"F12","function 12":"F12","f13":"F13","fn":"F13","function 13":"F13","f14":"F14","fn14":"F14","function 14":"F14","f15":"F15","fn15":"F15","function 15":"F15","f16":"F16","fn16":"F16","function 16":"F16","num lock":"Numlock","numlock":"Numlock","number lock":"Numlock","numeric lock":"Numlock","scroll lock":"Scrolllock","sclk":"Scrolllock","scrlk":"Scrolllock","slk":"Scrolllock","*":"*","+":"+","-":"-","/":"/",";":";","=":"=",",":",","_":"-",".":".","`":"`","[":"[","]":"]","\'":"\'"}}')}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n(41567)})();