@everymatrix/user-transaction-history 1.54.6 → 1.54.8

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.
@@ -24,7 +24,7 @@ const NAMESPACE = 'user-transaction-history';
24
24
  const BUILD = /* user-transaction-history */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
25
25
 
26
26
  /*
27
- Stencil Client Platform v4.25.1 | MIT Licensed | https://stenciljs.com
27
+ Stencil Client Platform v4.25.3 | MIT Licensed | https://stenciljs.com
28
28
  */
29
29
  var __defProp = Object.defineProperty;
30
30
  var __export = (target, all) => {
@@ -1007,9 +1007,6 @@ var postUpdateComponent = (hostRef) => {
1007
1007
  }
1008
1008
  };
1009
1009
  var appDidLoad = (who) => {
1010
- {
1011
- addHydratedFlag(doc.documentElement);
1012
- }
1013
1010
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
1014
1011
  };
1015
1012
  var safeCall = (instance, method, arg, elm) => {
@@ -1198,7 +1195,8 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1198
1195
  let Cstr;
1199
1196
  if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
1200
1197
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1201
- {
1198
+ const bundleId = cmpMeta.$lazyBundleId$;
1199
+ if (bundleId) {
1202
1200
  const CstrImport = loadModule(cmpMeta, hostRef);
1203
1201
  if (CstrImport && "then" in CstrImport) {
1204
1202
  const endLoad = uniqueTime();
@@ -1233,6 +1231,10 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1233
1231
  hostRef.$flags$ |= 128 /* isWatchReady */;
1234
1232
  }
1235
1233
  endNewInstance();
1234
+ } else {
1235
+ Cstr = elm.constructor;
1236
+ const cmpTag = elm.localName;
1237
+ customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
1236
1238
  }
1237
1239
  if (Cstr && Cstr.style) {
1238
1240
  let style;
@@ -1404,6 +1406,10 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1404
1406
  plt.raf(() => {
1405
1407
  var _a3;
1406
1408
  const hostRef = getHostRef(this);
1409
+ const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
1410
+ if (i2 > -1) {
1411
+ deferredConnectedCallbacks.splice(i2, 1);
1412
+ }
1407
1413
  if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
1408
1414
  delete hostRef.$vnode$.$elm$;
1409
1415
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-f8cad885.js');
5
+ const index = require('./index-330de235.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  const defineCustomElements = async (win, options) => {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-f8cad885.js');
5
+ const index = require('./index-330de235.js');
6
6
 
7
7
  const DEFAULT_TRANSLATIONS = {
8
8
  "en": {
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-f8cad885.js');
5
+ const index = require('./index-330de235.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  /*
9
- Stencil Client Patch Browser v4.25.1 | MIT Licensed | https://stenciljs.com
9
+ Stencil Client Patch Browser v4.25.3 | MIT Licensed | https://stenciljs.com
10
10
  */
11
11
  var patchBrowser = () => {
12
12
  const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('user-transaction-history.cjs.js', document.baseURI).href));
@@ -4,7 +4,7 @@
4
4
  ],
5
5
  "compiler": {
6
6
  "name": "@stencil/core",
7
- "version": "4.25.1",
7
+ "version": "4.25.3",
8
8
  "typescriptVersion": "5.5.4"
9
9
  },
10
10
  "collections": [],
@@ -2,7 +2,7 @@ const NAMESPACE = 'user-transaction-history';
2
2
  const BUILD = /* user-transaction-history */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
3
3
 
4
4
  /*
5
- Stencil Client Platform v4.25.1 | MIT Licensed | https://stenciljs.com
5
+ Stencil Client Platform v4.25.3 | MIT Licensed | https://stenciljs.com
6
6
  */
7
7
  var __defProp = Object.defineProperty;
8
8
  var __export = (target, all) => {
@@ -985,9 +985,6 @@ var postUpdateComponent = (hostRef) => {
985
985
  }
986
986
  };
987
987
  var appDidLoad = (who) => {
988
- {
989
- addHydratedFlag(doc.documentElement);
990
- }
991
988
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
992
989
  };
993
990
  var safeCall = (instance, method, arg, elm) => {
@@ -1176,7 +1173,8 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1176
1173
  let Cstr;
1177
1174
  if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
1178
1175
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1179
- {
1176
+ const bundleId = cmpMeta.$lazyBundleId$;
1177
+ if (bundleId) {
1180
1178
  const CstrImport = loadModule(cmpMeta, hostRef);
1181
1179
  if (CstrImport && "then" in CstrImport) {
1182
1180
  const endLoad = uniqueTime();
@@ -1211,6 +1209,10 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1211
1209
  hostRef.$flags$ |= 128 /* isWatchReady */;
1212
1210
  }
1213
1211
  endNewInstance();
1212
+ } else {
1213
+ Cstr = elm.constructor;
1214
+ const cmpTag = elm.localName;
1215
+ customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
1214
1216
  }
1215
1217
  if (Cstr && Cstr.style) {
1216
1218
  let style;
@@ -1382,6 +1384,10 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1382
1384
  plt.raf(() => {
1383
1385
  var _a3;
1384
1386
  const hostRef = getHostRef(this);
1387
+ const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
1388
+ if (i2 > -1) {
1389
+ deferredConnectedCallbacks.splice(i2, 1);
1390
+ }
1385
1391
  if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
1386
1392
  delete hostRef.$vnode$.$elm$;
1387
1393
  }
@@ -1,5 +1,5 @@
1
- import { b as bootstrapLazy } from './index-fc58390d.js';
2
- export { s as setNonce } from './index-fc58390d.js';
1
+ import { b as bootstrapLazy } from './index-c0196f50.js';
2
+ export { s as setNonce } from './index-c0196f50.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  const defineCustomElements = async (win, options) => {
@@ -1,4 +1,4 @@
1
- import { h, r as registerInstance, g as getAssetPath, H as Host, a as getElement } from './index-fc58390d.js';
1
+ import { h, r as registerInstance, g as getAssetPath, H as Host, a as getElement } from './index-c0196f50.js';
2
2
 
3
3
  const DEFAULT_TRANSLATIONS = {
4
4
  "en": {
@@ -1,9 +1,9 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-fc58390d.js';
2
- export { s as setNonce } from './index-fc58390d.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-c0196f50.js';
2
+ export { s as setNonce } from './index-c0196f50.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  /*
6
- Stencil Client Patch Browser v4.25.1 | MIT Licensed | https://stenciljs.com
6
+ Stencil Client Patch Browser v4.25.3 | MIT Licensed | https://stenciljs.com
7
7
  */
8
8
  var patchBrowser = () => {
9
9
  const importMeta = import.meta.url;
@@ -0,0 +1,2 @@
1
+ var t=Object.defineProperty,e=new WeakMap,n=t=>e.get(t),o=(t,n)=>{e.set(n.t=t,n)},l=(t,e)=>e in t,s=(t,e)=>(0,console.error)(t,e),i=new Map,r=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="http://www.w3.org/1999/xlink",f="undefined"!=typeof window?window:{},a=f.document||{head:{}},h={o:0,l:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},d=t=>Promise.resolve(t),p=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),m=!1,v=[],y=[],w=(t,e)=>n=>{t.push(n),m||(m=!0,e&&4&h.o?g(b):h.raf(b))},$=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){s(t)}t.length=0},b=()=>{$(v),$(y),(m=v.length>0)&&h.raf(b)},g=t=>d().then(t),S=w(y,!0),j=t=>{const e=new URL(t,h.l);return e.origin!==f.location.origin?e.href:e.pathname},O=t=>"object"==(t=typeof t)||"function"===t;function k(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}((e,n)=>{for(var o in n)t(e,o,{get:n[o],enumerable:!0})})({},{err:()=>x,map:()=>C,ok:()=>E,unwrap:()=>P,unwrapErr:()=>R});var E=t=>({isOk:!0,isErr:!1,value:t}),x=t=>({isOk:!1,isErr:!0,value:t});function C(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>E(t))):E(n)}if(t.isErr)return x(t.value);throw"should never get here"}var M,P=t=>{if(t.isOk)return t.value;throw t.value},R=t=>{if(t.isErr)return t.value;throw t.value},A=(t,e,...n)=>{let o=null,l=null,s=!1,i=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((s="function"!=typeof t&&!O(o))&&(o+=""),s&&i?r[r.length-1].i+=o:r.push(s?H(null,o):o),i=s)};if(c(n),e){e.key&&(l=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}if("function"==typeof t)return t(null===e?{}:e,r,L);const u=H(t,null);return u.u=e,r.length>0&&(u.h=r),u.p=l,u},H=(t,e)=>({o:0,m:t,i:e,v:null,h:null,u:null,p:null}),D={},L={forEach:(t,e)=>t.map(N).forEach(e),map:(t,e)=>t.map(N).map(e).map(T)},N=t=>({vattrs:t.u,vchildren:t.h,vkey:t.p,vname:t.$,vtag:t.m,vtext:t.i}),T=t=>{if("function"==typeof t.vtag){const e={...t.vattrs};return t.vkey&&(e.key=t.vkey),t.vname&&(e.name=t.vname),A(t.vtag,e,...t.vchildren||[])}const e=H(t.vtag,t.vtext);return e.u=t.vattrs,e.h=t.vchildren,e.p=t.vkey,e.$=t.vname,e},U=(t,e)=>null==t||O(t)?t:4&e?"false"!==t&&(""===t||!!t):1&e?t+"":t,W=t=>n(t).$hostElement$,F=new WeakMap,V=t=>"sc-"+t.S,q=(t,e,n,o,s,i)=>{if(n!==o){let r=l(t,e),c=e.toLowerCase();if("class"===e){const e=t.classList,l=_(n);let s=_(o);e.remove(...l.filter((t=>t&&!s.includes(t)))),e.add(...s.filter((t=>t&&!l.includes(t))))}else if("style"===e){for(const e in n)o&&null!=o[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in o)n&&o[e]===n[e]||(e.includes("-")?t.style.setProperty(e,o[e]):t.style[e]=o[e])}else if("key"===e);else if("ref"===e)o&&o(t);else if(r||"o"!==e[0]||"n"!==e[1]){const l=O(o);if((r||l&&null!==o)&&!s)try{if(t.tagName.includes("-"))t[e]!==o&&(t[e]=o);else{const l=null==o?"":o;"list"===e?r=!1:null!=n&&t[e]==l||("function"==typeof t.__lookupSetter__(e)?t[e]=l:t.setAttribute(e,l))}}catch(t){}let f=!1;c!==(c=c.replace(/^xlink\:?/,""))&&(e=c,f=!0),null==o||!1===o?!1===o&&""!==t.getAttribute(e)||(f?t.removeAttributeNS(u,e):t.removeAttribute(e)):(!r||4&i||s)&&!l&&(o=!0===o?"":o,f?t.setAttributeNS(u,e,o):t.setAttribute(e,o))}else if(e="-"===e[2]?e.slice(3):l(f,c)?c.slice(2):c[2]+e.slice(3),n||o){const l=e.endsWith(z);e=e.replace(B,""),n&&h.rel(t,e,n,l),o&&h.ael(t,e,o,l)}}},G=/\s/,_=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(G):[]),z="Capture",B=RegExp(z+"$"),I=(t,e,n)=>{const o=11===e.v.nodeType&&e.v.host?e.v.host:e.v,l=t&&t.u||{},s=e.u||{};for(const t of J(Object.keys(l)))t in s||q(o,t,l[t],void 0,n,e.o);for(const t of J(Object.keys(s)))q(o,t,l[t],s[t],n,e.o)};function J(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var K=!1,Q=(t,e,n)=>{const o=e.h[n];let l,s,i=0;if(null!==o.i)l=o.v=a.createTextNode(o.i);else{if(K||(K="svg"===o.m),l=o.v=a.createElementNS(K?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o.m),K&&"foreignObject"===o.m&&(K=!1),I(null,o,K),o.h)for(i=0;i<o.h.length;++i)s=Q(t,o,i),s&&l.appendChild(s);"svg"===o.m?K=!1:"foreignObject"===l.tagName&&(K=!0)}return l["s-hn"]=M,l},X=(t,e,n,o,l,s)=>{let i,r=t;for(r.shadowRoot&&r.tagName===M&&(r=r.shadowRoot);l<=s;++l)o[l]&&(i=Q(null,n,l),i&&(o[l].v=i,nt(r,i,e)))},Y=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.v;et(e),t&&t.remove()}}},Z=(t,e,n=!1)=>t.m===e.m&&(n?(n&&!t.p&&e.p&&(t.p=e.p),!0):t.p===e.p),tt=(t,e,n=!1)=>{const o=e.v=t.v,l=t.h,s=e.h,i=e.m,r=e.i;null===r?(I(t,e,K="svg"===i||"foreignObject"!==i&&K),null!==l&&null!==s?((t,e,n,o,l=!1)=>{let s,i,r=0,c=0,u=0,f=0,a=e.length-1,h=e[0],d=e[a],p=o.length-1,m=o[0],v=o[p];for(;r<=a&&c<=p;)if(null==h)h=e[++r];else if(null==d)d=e[--a];else if(null==m)m=o[++c];else if(null==v)v=o[--p];else if(Z(h,m,l))tt(h,m,l),h=e[++r],m=o[++c];else if(Z(d,v,l))tt(d,v,l),d=e[--a],v=o[--p];else if(Z(h,v,l))tt(h,v,l),nt(t,h.v,d.v.nextSibling),h=e[++r],v=o[--p];else if(Z(d,m,l))tt(d,m,l),nt(t,d.v,h.v),d=e[--a],m=o[++c];else{for(u=-1,f=r;f<=a;++f)if(e[f]&&null!==e[f].p&&e[f].p===m.p){u=f;break}u>=0?(i=e[u],i.m!==m.m?s=Q(e&&e[c],n,u):(tt(i,m,l),e[u]=void 0,s=i.v),m=o[++c]):(s=Q(e&&e[c],n,c),m=o[++c]),s&&nt(h.v.parentNode,s,h.v)}r>a?X(t,null==o[p+1]?null:o[p+1].v,n,o,c,p):c>p&&Y(e,r,a)})(o,l,e,s,n):null!==s?(null!==t.i&&(o.textContent=""),X(o,null,e,s,0,s.length-1)):!n&&null!==l&&Y(l,0,l.length-1),K&&"svg"===i&&(K=!1)):t.i!==r&&(o.data=r)},et=t=>{t.u&&t.u.ref&&t.u.ref(null),t.h&&t.h.map(et)},nt=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),ot=(t,e)=>{if(e&&!t.j&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.j=()=>{e["s-p"].splice(n-1,1),o()})))}},lt=(t,e)=>{if(t.o|=16,!(4&t.o))return ot(t,t.O),S((()=>st(t,e)));t.o|=512},st=(t,e)=>{const n=t.$hostElement$,o=t.t;if(!o)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return e&&(t.o|=256,t.k&&(t.k.map((([t,e])=>ht(o,t,e,n))),t.k=void 0),l=ht(o,"componentWillLoad",void 0,n)),it(l,(()=>ct(t,o,e)))},it=(t,e)=>rt(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),rt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,ct=async(t,e,n)=>{var o;const l=t.$hostElement$,s=l["s-rc"];n&&(t=>{const e=t.C,n=t.$hostElement$,o=e.o,l=((t,e)=>{var n;const o=V(e),l=r.get(o);if(t=11===t.nodeType?t:a,l)if("string"==typeof l){let s,i=F.get(t=t.head||t);if(i||F.set(t,i=new Set),!i.has(o)){{s=document.querySelector(`[sty-id="${o}"]`)||a.createElement("style"),s.innerHTML=l;const i=null!=(n=h.M)?n:k(a);if(null!=i&&s.setAttribute("nonce",i),!(1&e.o))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(s,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(p){const e=new CSSStyleSheet;e.replaceSync(l),t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.innerHTML=l+e.innerHTML:t.prepend(s)}else t.append(s);1&e.o&&"HEAD"!==t.nodeName&&t.insertBefore(s,null)}4&e.o&&(s.innerHTML+=c),i&&i.add(o)}}else t.adoptedStyleSheets.includes(l)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]);return o})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&2&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);ut(t,e,l,n),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>ft(t);0===e.length?n():(Promise.all(e).then(n),t.o|=4,e.length=0)}},ut=(t,e,n,o)=>{try{e=e.render(),t.o&=-17,t.o|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.C,s=t.P||H(null,null),i=(t=>t&&t.m===D)(e)?e:A(null,null,e);if(M=o.tagName,l.R&&(i.u=i.u||{},l.R.map((([t,e])=>i.u[e]=o[t]))),n&&i.u)for(const t of Object.keys(i.u))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(i.u[t]=o[t]);i.m=null,i.o|=4,t.P=i,i.v=s.v=o.shadowRoot||o,tt(s,i,n)})(t,e,o)}catch(e){s(e,t.$hostElement$)}return null},ft=t=>{const e=t.$hostElement$,n=t.O;ht(t.t,"componentDidRender",void 0,e),64&t.o||(t.o|=64,dt(e),t.A(e),n||at()),t.j&&(t.j(),t.j=void 0),512&t.o&&g((()=>lt(t,!1))),t.o&=-517},at=()=>{g((()=>(t=>{const e=h.ce("appload",{detail:{namespace:"user-transaction-history"}});return t.dispatchEvent(e),e})(f)))},ht=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){s(t,o)}},dt=t=>t.classList.add("hydrated"),pt=(t,e,o,l)=>{const i=n(t);if(!i)throw Error(`Couldn't find host element for "${l.S}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const r=i.$hostElement$,c=i.H.get(e),u=i.o,f=i.t;if(o=U(o,l.D[e][0]),(!(8&u)||void 0===c)&&o!==c&&(!Number.isNaN(c)||!Number.isNaN(o))&&(i.H.set(e,o),f)){if(l.L&&128&u){const t=l.L[e];t&&t.map((t=>{try{f[t](o,c,e)}catch(t){s(t,r)}}))}2==(18&u)&&lt(i,!1)}},mt=(t,e,o)=>{var l,s;const i=t.prototype;if(e.D||e.L||t.watchers){t.watchers&&!e.L&&(e.L=t.watchers);const r=Object.entries(null!=(l=e.D)?l:{});if(r.map((([t,[l]])=>{if(31&l||2&o&&32&l){const{get:s,set:r}=Object.getOwnPropertyDescriptor(i,t)||{};s&&(e.D[t][0]|=2048),r&&(e.D[t][0]|=4096),(1&o||!s)&&Object.defineProperty(i,t,{get(){{if(!(2048&e.D[t][0]))return((t,e)=>n(this).H.get(e))(0,t);const o=n(this),l=o?o.t:i;if(!l)return;return l[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(i,t,{set(s){const i=n(this);if(r){const n=32&l?this[t]:i.$hostElement$[t];return void 0===n&&i.H.get(t)?s=i.H.get(t):!i.H.get(t)&&n&&i.H.set(t,n),r.call(this,U(s,l)),void pt(this,t,s=32&l?this[t]:i.$hostElement$[t],e)}{if(!(1&o&&4096&e.D[t][0]))return pt(this,t,s,e),void(1&o&&!i.t&&i.N.then((()=>{4096&e.D[t][0]&&i.t[t]!==i.H.get(t)&&(i.t[t]=s)})));const n=()=>{const n=i.t[t];!i.H.get(t)&&n&&i.H.set(t,n),i.t[t]=U(s,l),pt(this,t,i.t[t],e)};i.t?n():i.N.then((()=>n()))}}})}})),1&o){const o=new Map;i.attributeChangedCallback=function(t,l,s){h.jmp((()=>{var r;const c=o.get(t);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const o=n(this),i=null==o?void 0:o.o;if(i&&!(8&i)&&128&i&&s!==l){const n=o.t,i=null==(r=e.L)?void 0:r[t];null==i||i.forEach((e=>{null!=n[e]&&n[e].call(n,s,l,t)}))}return}}const u=Object.getOwnPropertyDescriptor(i,c);(s=(null!==s||"boolean"!=typeof this[c])&&s)===this[c]||u.get&&!u.set||(this[c]=s)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=e.L)?s:{}),...r.filter((([t,e])=>15&e[0])).map((([t,n])=>{var l;const s=n[1]||t;return o.set(s,t),512&n[0]&&(null==(l=e.R)||l.push([t,s])),s}))]))}}return t},vt=(t,o={})=>{var l;const u=[],d=o.exclude||[],m=f.customElements,v=a.head,y=v.querySelector("meta[charset]"),w=a.createElement("style"),$=[];let b,g=!0;Object.assign(h,o),h.l=new URL(o.resourcesUrl||"./",a.baseURI).href;let S=!1;if(t.map((t=>{t[1].map((o=>{var l;const c={o:o[0],S:o[1],D:o[2],T:o[3]};4&c.o&&(S=!0),c.D=o[2],c.T=o[3],c.R=[],c.L=null!=(l=o[4])?l:{};const f=c.S,a=class extends HTMLElement{constructor(t){if(super(t),this.hasRegisteredEventListeners=!1,((t,n)=>{const o={o:0,$hostElement$:t,C:n,H:new Map};o.N=new Promise((t=>o.A=t)),t["s-p"]=[],t["s-rc"]=[],e.set(t,o)})(t=this,c),1&c.o)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.S}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else t.attachShadow({mode:"open"})}connectedCallback(){const t=n(this);this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,yt(this,t,c.T)),b&&(clearTimeout(b),b=null),g?$.push(this):h.jmp((()=>(t=>{if(!(1&h.o)){const e=n(t),o=e.C,l=()=>{};if(1&e.o)yt(t,e,o.T),(null==e?void 0:e.t)||(null==e?void 0:e.N)&&e.N.then((()=>{}));else{e.o|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){ot(e,e.O=n);break}}o.D&&Object.entries(o.D).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;if(!(32&e.o)){if(e.o|=32,n.U){const l=((t,e)=>{const n=t.S.replace(/-/g,"_"),o=t.U;if(!o)return;const l=i.get(o);return l?l[n]:import(`./${o}.entry.js`).then((t=>(i.set(o,t),t[n])),(t=>{s(t,e.$hostElement$)}))
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(l&&"then"in l){const t=()=>{};o=await l,t()}else o=l;if(!o)throw Error(`Constructor for "${n.S}#${e.W}" was not found`);o.isProxied||(n.L=o.watchers,mt(o,n,2),o.isProxied=!0);const r=()=>{};e.o|=8;try{new o(e)}catch(e){s(e,t)}e.o&=-9,e.o|=128,r()}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.o|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=V(n);if(!r.has(e)){const o=()=>{};((t,e,n)=>{let o=r.get(t);p&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,r.set(t,o)})(e,t,!!(1&n.o)),o()}}}const l=e.O,c=()=>lt(e,!0);l&&l["s-rc"]?l["s-rc"].push(c):c()})(t,e,o)}l()}})(this)))}disconnectedCallback(){h.jmp((()=>(async t=>{if(!(1&h.o)){const e=n(t);e.F&&(e.F.map((t=>t())),e.F=void 0),(null==e?void 0:e.t)||(null==e?void 0:e.N)&&e.N.then((()=>{}))}F.has(t)&&F.delete(t),t.shadowRoot&&F.has(t.shadowRoot)&&F.delete(t.shadowRoot)})(this))),h.raf((()=>{var t;const e=n(this),o=$.findIndex((t=>t===this));o>-1&&$.splice(o,1),(null==(t=null==e?void 0:e.P)?void 0:t.v)instanceof Node&&!e.P.v.isConnected&&delete e.P.v}))}componentOnReady(){return n(this).N}};c.U=t[0],d.includes(f)||m.get(f)||(u.push(f),m.define(f,mt(a,c,1)))}))})),u.length>0&&(S&&(w.textContent+=c),w.textContent+=u.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",w.innerHTML.length)){w.setAttribute("data-styles","");const t=null!=(l=h.M)?l:k(a);null!=t&&w.setAttribute("nonce",t),v.insertBefore(w,y?y.nextSibling:v.firstChild)}g=!1,$.length?$.map((t=>t.connectedCallback())):h.jmp((()=>b=setTimeout(at,30)))},yt=(t,e,n)=>{n&&n.map((([n,o,l])=>{const s=$t(t,n),i=wt(e,l),r=bt(n);h.ael(s,o,i,r),(e.F=e.F||[]).push((()=>h.rel(s,o,i,r)))}))},wt=(t,e)=>n=>{var o;try{256&t.o?null==(o=t.t)||o[e](n):(t.k=t.k||[]).push([e,n])}catch(e){s(e,t.$hostElement$)}},$t=(t,e)=>8&e?f:t,bt=t=>({passive:!!(1&t),capture:!!(2&t)}),gt=t=>h.M=t;export{D as H,W as a,vt as b,j as g,A as h,d as p,o as r,gt as s}
@@ -1 +1 @@
1
- import{h as t,r as e,g as a,H as o,a as i}from"./p-76051e8b.js";class n{constructor(){}static async loadCustomTranslations(t){try{const e=await fetch(t,{headers:{"Content-Type":"application/json"}});if(!e.ok){const t=await e.text();throw new Error(t)}const a=await e.json();n.updateTranslations(a)}catch(e){console.error(`Failed to load translations ${t}. ${e.message}`)}}static translate(t,e){var a,o;const i=n.getAvaliableLanguages(e);return(null===(o=null===(a=n.customTranslation)||void 0===a?void 0:a[i.customLanguage])||void 0===o?void 0:o[t])||n.defaultTranslation[i.predefinedLanguage][t]}static getAvaliableLanguages(t){var e;const a=(null===(e=n.customLanguages)||void 0===e?void 0:e.includes(t))?t:n.defaultLanguage;return{predefinedLanguage:n.supportedLanguages.includes(t)?t:n.defaultLanguage,customLanguage:a}}static updateTranslations(t){n.customLanguages=Array.from(new Set([...n.supportedLanguages,...Object.keys(t).map((t=>t.toLowerCase()))])),n.customTranslation=t}}n.defaultLanguage="en",n.supportedLanguages=["en"],n.defaultTranslation={en:{deposit:"Deposit",withdrawals:"Withdrawals",show:"Show",from:"From",to:"To",filter:"Filter",transactionId:"Transaction ID",date:"Date",amount:"Amount",productType:"Product Type",status:"Status",noData:"There are no account activities"},hr:{deposit:"Uplate",withdrawals:"Isplate",show:"Prikaži",from:"Od",to:"Do",filter:"Filter",transactionId:"ID transakcije",date:"Datum",amount:"Iznos",productType:"Vrsta proizvoda",status:"Status",noData:"Nema aktivnosti na računu"}};const r=()=>t("div",{class:"loader"},t("div",null),t("div",null),t("div",null),t("div",null),t("div",null),t("div",null),t("div",null),t("div",null),t("div",null),t("div",null),t("div",null),t("div",null));class s{constructor(){}static dateToFormatedString(t){return`${t.toLocaleDateString("en-gb")}, ${t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1})}`}}class l{constructor(){}static format(t,e){let a=`${e} ${t}`;try{a=new Intl.NumberFormat("en-US",{style:"currency",currency:t}).format(e)}catch(t){}return a}}const d=e=>t("div",{class:"data-transaction"},t("p",null,e.productType),t("p",{class:"text-style text-style-status"},t("span",{class:e.status.toLowerCase()},e.status)),t("p",{class:"date"},e.transId," | ",s.dateToFormatedString(new Date(e.created))),t("p",{class:"text-style"},l.format(e.currency,e.realAmount)," ")),c=e=>t("div",{class:"page-size"},t("span",null,n.translate("show",e.language)),e.pageSizes.map((a=>t("button",{class:e.currentPageSize===a?"active":"",onClick:()=>e.changePageSize(a)},a)))),h=({from:e,to:a,applyFilters:o,language:i})=>{let r,s;return t("div",{class:"period"},t("div",{class:"period-content"},t("div",{class:"date-input"},t("vaadin-date-picker",{value:e,ref:t=>r=t,label:n.translate("from",i),onChange:()=>{e=r.value}})),t("span",null,t("svg",{width:"24px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"m21 11.75c0-.414-.336-.75-.75-.75h-16.5c-.414 0-.75.336-.75.75s.336.75.75.75h16.5c.414 0 .75-.336.75-.75z","fill-rule":"nonzero",fill:"#5d687b"}))),t("div",{class:"date-input"},t("vaadin-date-picker",{value:a,ref:t=>s=t,label:n.translate("to",i),onChange:()=>{a=s.value}})),t("button",{class:"filter-btn",onClick:()=>o(e,a)},n.translate("filter",i))))},p=({source:e,language:a})=>{const o=[{name:n.translate("transactionId",a)},{name:n.translate("date",a)},{name:n.translate("amount",a)},{name:n.translate("productType",a)},{name:n.translate("status",a)}];return t("table",null,t("thead",null,t("tr",null,o.map((e=>t("th",null,e.name))))),t("tbody",null,e.map((e=>t("tr",null,t("td",null,e.transId),t("td",null,s.dateToFormatedString(new Date(e.created))),t("td",null,l.format(e.currency,e.realAmount)," "),t("td",null,e.productType),t("td",null,t("span",{class:e.status.toLowerCase()},e.status)))))))},u=class{constructor(t){e(this,t),this.pageSizes=[10,25,50],this.pagination=null,this.stylingAppended=!1,this.language=n.defaultLanguage,this.mobile=!1,this.clientStyling=null,this.clientStylingUrl=null,this.page=0,this.pageSize=this.pageSizes[0],this.showMobileFilter=!1,this.type="0",this.showLoader=!0}watchMultiple(){this.loadTransactions()}async componentWillLoad(){this.translationUrl&&await n.loadCustomTranslations(this.translationUrl),this.loadTransactions()}componentDidRender(){this.getComponentHeight(),!this.stylingAppended&&this.stylingContainer&&(this.clientStyling&&this.setStyles(this.clientStyling),this.clientStylingUrl&&this.setClientStylingByURL(),this.stylingAppended=!0)}getComponentHeight(){var t;if(this.mobile){let e=this.el.getBoundingClientRect().height-(null===(t=this.el.shadowRoot.querySelector(".table"))||void 0===t?void 0:t.getBoundingClientRect().y);this.el.style.setProperty("--heightScrollableContainer",e+"px")}}setHeightTableProperty(){let t=this.getComponentHeight();this.el.style.setProperty("--heightScrollableContainer",t+"px")}changeTransactionsType(t){this.type=t}changePageSize(t){this.pageSize=t}prev(){var t;(null===(t=this.pagination)||void 0===t?void 0:t.previous)&&this.page--}next(){var t;(null===(t=this.pagination)||void 0===t?void 0:t.next)&&this.page++}applyFilters(t,e){this.from=t?new Date(t).toISOString():null,this.to=e?new Date(e).toISOString():null,this.loadTransactions()}showFilter(){this.showMobileFilter=!this.showMobileFilter}render(){var e;const i=a("../assets/filter.svg"),s=a("../assets/warning.svg");return t(o,{key:"c850ba36433277706247f4b7c0c08b0ae0fb8c76"},this.showLoader?t(r,null):"",t("div",{key:"20b817b5c9cf14e8af0db2ba417d09e21b6921d7",class:"wrapper",ref:t=>this.stylingContainer=t},t("div",{key:"3943f4ab79cb0e72083821b424000f96779e78a5",class:{"types types-mobile":this.mobile,"types types-desktop":!this.mobile}},t("button",{key:"d1f3dfc1f4fc7013bd81c92663f578129f63c0e7",class:"transaction-type "+("0"===this.type?"clicked":""),onClick:()=>this.changeTransactionsType("0")},n.translate("deposit",this.language)),t("button",{key:"46989070ef6703fdf7c8c7ac6628e9dce731fec6",class:"transaction-type "+("1"===this.type?"clicked":""),onClick:()=>this.changeTransactionsType("1")},n.translate("withdrawals",this.language))),this.mobile?"":t(c,{language:this.language,pageSizes:this.pageSizes,currentPageSize:this.pageSize,changePageSize:t=>this.changePageSize(t)}),this.mobile?t("button",{class:"mobile-filter-button",onClick:()=>this.showFilter()},t("img",{src:i,alt:"Filter"}),n.translate("filter",this.language)):"",!this.mobile||this.showMobileFilter&&this.mobile?t(h,{language:this.language,applyFilters:(t,e)=>this.applyFilters(t,e)}):"",(null===(e=this.transactions)||void 0===e?void 0:e.length)>0?t("div",{class:"table"},this.mobile?t("div",{class:"mobile-table"},this.transactions.map((e=>t(d,Object.assign({},e))))):t(p,{source:this.transactions,language:this.language})):t("div",{class:"noData"},t("img",{src:s,alt:"Warning"}),t("span",null,n.translate("noData",this.language))),t("div",{key:"50710657788295389a20d59e0092dd033e428268",class:"pagination"},t("button",{key:"cd29c880eab413a06666dc12c8df38d3ffdcfe2f",onClick:()=>this.prev()},"<"),t("button",{key:"df351ecd4237433a8ab38766669ac48d2548ed6a",onClick:()=>this.next()},">"))))}async loadTransactions(){this.showLoader=!0;try{const t=`${this.endpoint}/v1/player/${this.userId}/transactions/banking?${this.getParams()}`,e=await fetch(t,{headers:{"X-Sessionid":this.session,"Content-Type":"application/json"}});if(!e.ok){const t=await e.text();throw new Error(t)}const a=await e.json();this.pagination=a.pagination,this.transactions=a.transactions}catch(t){console.error(t)}finally{this.showLoader=!1}}getParams(){var t,e;const a=new Date,o=(this.page*this.pageSize).toString(),i=null!==(t=this.from)&&void 0!==t?t:new Date(a.getFullYear(),a.getMonth(),1).toISOString();return`offset=${o}&endDate=${null!==(e=this.to)&&void 0!==e?e:new Date(a.getFullYear(),a.getMonth()+1,0).toISOString()}&startDate=${i}&type=${this.type}&limit=${this.pageSize}`}setStyles(t){const e=document.createElement("style");e.innerHTML=t,this.stylingContainer.prepend(e)}async setClientStylingByURL(){try{const t=await fetch(this.clientStylingUrl);if(!t.ok){const e=await t.text();throw new Error(e)}const e=await t.text();this.setStyles(e)}catch(t){console.error(`Failed to load client styles ${this.clientStylingUrl}`,t)}}static get assetsDirs(){return["../assets"]}get el(){return i(this)}static get watchers(){return{page:["watchMultiple"],type:["watchMultiple"],session:["watchMultiple"],userId:["watchMultiple"],pageSize:["watchMultiple"],showMobileFilter:["getComponentHeight"]}}};u.style=':host{--activeButtonBackground:#7ec51e;--activeButtonFont:#002149;--hoverBackground:#ffffff;--background:#e4e6e8;--success:#7ac345;--heightScrollableContainer:400px;--borderColor:#d3d3d3;--borderColorButton:#c4c4c4;--textColor:#002554;--textColorHover:#7ac345;--errorColor:#c23b21;--loaderColor:#7ac345;--headerTableBackground:#cdcdcd;--borderTable:#dedede;--shadowBorderTable:#f1f1f1;--backgroundTable:#ffffff;font-family:Roboto, Arial, sans-serif;font-size:14px;color:var(--textColor);display:block;background-color:var(--background)}:host .wrapper{height:100%;padding:1rem}:host .types{display:flex;width:100%;gap:5px}:host .transaction-type{background:inherit;font-weight:600;padding:0.6rem 1.6rem;border:1px solid #6c757d;cursor:pointer}:host .transaction-type:hover{color:var(--activeButtonBackground);border-color:var(--activeButtonBackground);background:var(--hoverBackground)}:host .clicked{background-color:var(--activeButtonBackground);border-color:var(--activeButtonBackground)}:host .types-mobile{justify-content:center;margin-bottom:15px}:host .types-desktop{justify-content:flex-end;margin-bottom:3rem}:host .page-size{display:flex;width:100%;justify-content:flex-end;align-items:center}:host .page-size button{background:transparent;border:none;cursor:pointer;margin:0.4rem;width:2rem;height:2rem}:host .page-size button:hover{color:var(--textColorHover)}:host .page-size button.active{background:var(--activeButtonBackground);color:var(--textColor);font-weight:600;border-radius:0.4rem}:host .period{display:flex;width:100%;align-items:flex-end;justify-content:center;gap:10px;background:#f0f0f0;border-bottom:2px solid #e9e9e9;padding:1.6rem 0 0;margin-bottom:4rem}@media (max-width: 801px){:host .period{margin-bottom:0;flex-direction:column;align-items:stretch;width:auto;padding:1.4rem 2.8rem;box-shadow:0 4px 5px 0 rgba(90, 90, 90, 0.24)}}:host .period .range{color:var(--errorColor)}:host .period .filter-btn{height:40px;background:transparent;border:0.1rem solid var(--borderColorButton);min-width:12rem;max-width:17rem;cursor:pointer}@media (max-width: 801px){:host .period .filter-btn{max-width:none;min-width:none;margin-top:1rem}}:host .period .filter-btn:hover{border:none;background:var(--hoverBackground)}:host .period .duet-date__input{padding:7px 60px 7px 7px}:host .period+button{padding:9px 15px}:host .period-content{display:flex;flex-direction:row;width:100%;justify-content:center;align-items:flex-end;margin:0 auto 1.6rem}@media (max-width: 801px){:host .period-content{flex-direction:column;align-items:stretch}}:host .period-content span{height:40px;display:flex;align-items:center;justify-content:center}@media (max-width: 801px){:host .period-content span{display:none}}:host .period-content .filter-btn{margin-left:60px}@media (max-width: 801px){:host .period-content .filter-btn{margin-left:0}}:host .period-content .date-input{padding:0 4px}@media (max-width: 801px){:host .period-content .date-input{width:auto}:host .period-content .date-input:first-child{margin-bottom:0.5rem}}:host .period-content .date-input label{display:inline-block;margin-bottom:0.9rem}:host .period-content .date-input input{border:0.1rem solid var(--borderColor);box-sizing:border-box;border-radius:0.2rem}:host .pagination{display:flex;width:100%;justify-content:center;margin-top:1.5rem}:host .pagination button{cursor:pointer;border:none;background-color:var(--activeButtonBackground);color:#fff;opacity:0.5;padding:7px 12px}:host .pagination button:hover{opacity:1}:host .pagination button:focus{opacity:1}:host button.active{color:var(--activeButtonFont);background-color:var(--activeButtonBackground)}.mobile-filter-button{display:flex;justify-content:center;align-items:center;width:100%;height:2.8rem;background:inherit;border:1px solid var(--borderColorButton)}.mobile-filter-button img{height:50%;margin-right:0.5rem}.noData{display:flex;align-items:center;box-shadow:0 0.4rem 0.4rem rgba(0, 0, 0, 0.25);padding:1.1rem;border-radius:0.6rem}.noData span{margin-left:0.5rem}.table{height:var(--heightScrollableContainer);overflow-y:auto}.table .mobile-table{height:100%}.data-transaction{border-bottom:1px solid var(--borderColor);background-color:var(--hoverBackground);padding:0 20px;display:grid;grid-template-columns:repeat(2, 1fr)}.data-transaction .text-style-status{font-weight:600}.data-transaction .text-style-status .success{color:var(--success)}.data-transaction .text-style-status .error{color:var(--errorColor)}.data-transaction .text-style{text-align:end}.data-transaction .date{font-size:12px;display:flex;align-items:center}.loader{display:inline-block;position:absolute;width:80px;height:80px;top:calc(50% - 40px);left:calc(50% - 40px);z-index:100}.loader::before{content:"";position:fixed;top:0;bottom:0;left:0;right:0;background-color:rgba(255, 255, 255, 0.6)}.loader div{position:absolute;width:6px;height:6px;background:var(--loaderColor);border-radius:50%;animation:loader 1.2s linear infinite}.loader div:nth-child(1){animation-delay:0s;top:37px;left:66px}.loader div:nth-child(2){animation-delay:-0.1s;top:22px;left:62px}.loader div:nth-child(3){animation-delay:-0.2s;top:11px;left:52px}.loader div:nth-child(4){animation-delay:-0.3s;top:7px;left:37px}.loader div:nth-child(5){animation-delay:-0.4s;top:11px;left:22px}.loader div:nth-child(6){animation-delay:-0.5s;top:22px;left:11px}.loader div:nth-child(7){animation-delay:-0.6s;top:37px;left:7px}.loader div:nth-child(8){animation-delay:-0.7s;top:52px;left:11px}.loader div:nth-child(9){animation-delay:-0.8s;top:62px;left:22px}.loader div:nth-child(10){animation-delay:-0.9s;top:66px;left:37px}.loader div:nth-child(11){animation-delay:-1s;top:62px;left:52px}.loader div:nth-child(12){animation-delay:-1.1s;top:52px;left:62px}@keyframes loader{0%,20%,80%,100%{transform:scale(1)}50%{transform:scale(1.5)}}.table thead th{position:sticky;top:0}table{border-collapse:collapse;width:100%}table th{padding:14px 24px;text-align:left;font-weight:600;color:var(--textColor);background:var(--headerTableBackground)}table td{padding:1rem 1.7rem;box-shadow:0 -1px 0 0 var(--shadowBorderTable) inset;border-bottom:0.1rem solid var(--borderTable);text-align:left;color:var(--textColor)}table tbody{background:var(--backgroundTable)}table .success{color:var(--success)}table .error{color:var(--errorColor)}vaadin-date-picker{min-width:320px}@media (max-width: 1261px){vaadin-date-picker{width:auto;min-width:auto}}@media (max-width: 801px){vaadin-date-picker{width:100%}}';export{u as user_transaction_history}
1
+ import{h as t,r as e,g as a,H as o,a as i}from"./p-0a0c7d87.js";class n{constructor(){}static async loadCustomTranslations(t){try{const e=await fetch(t,{headers:{"Content-Type":"application/json"}});if(!e.ok){const t=await e.text();throw new Error(t)}const a=await e.json();n.updateTranslations(a)}catch(e){console.error(`Failed to load translations ${t}. ${e.message}`)}}static translate(t,e){var a,o;const i=n.getAvaliableLanguages(e);return(null===(o=null===(a=n.customTranslation)||void 0===a?void 0:a[i.customLanguage])||void 0===o?void 0:o[t])||n.defaultTranslation[i.predefinedLanguage][t]}static getAvaliableLanguages(t){var e;const a=(null===(e=n.customLanguages)||void 0===e?void 0:e.includes(t))?t:n.defaultLanguage;return{predefinedLanguage:n.supportedLanguages.includes(t)?t:n.defaultLanguage,customLanguage:a}}static updateTranslations(t){n.customLanguages=Array.from(new Set([...n.supportedLanguages,...Object.keys(t).map((t=>t.toLowerCase()))])),n.customTranslation=t}}n.defaultLanguage="en",n.supportedLanguages=["en"],n.defaultTranslation={en:{deposit:"Deposit",withdrawals:"Withdrawals",show:"Show",from:"From",to:"To",filter:"Filter",transactionId:"Transaction ID",date:"Date",amount:"Amount",productType:"Product Type",status:"Status",noData:"There are no account activities"},hr:{deposit:"Uplate",withdrawals:"Isplate",show:"Prikaži",from:"Od",to:"Do",filter:"Filter",transactionId:"ID transakcije",date:"Datum",amount:"Iznos",productType:"Vrsta proizvoda",status:"Status",noData:"Nema aktivnosti na računu"}};const r=()=>t("div",{class:"loader"},t("div",null),t("div",null),t("div",null),t("div",null),t("div",null),t("div",null),t("div",null),t("div",null),t("div",null),t("div",null),t("div",null),t("div",null));class s{constructor(){}static dateToFormatedString(t){return`${t.toLocaleDateString("en-gb")}, ${t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1})}`}}class l{constructor(){}static format(t,e){let a=`${e} ${t}`;try{a=new Intl.NumberFormat("en-US",{style:"currency",currency:t}).format(e)}catch(t){}return a}}const d=e=>t("div",{class:"data-transaction"},t("p",null,e.productType),t("p",{class:"text-style text-style-status"},t("span",{class:e.status.toLowerCase()},e.status)),t("p",{class:"date"},e.transId," | ",s.dateToFormatedString(new Date(e.created))),t("p",{class:"text-style"},l.format(e.currency,e.realAmount)," ")),c=e=>t("div",{class:"page-size"},t("span",null,n.translate("show",e.language)),e.pageSizes.map((a=>t("button",{class:e.currentPageSize===a?"active":"",onClick:()=>e.changePageSize(a)},a)))),h=({from:e,to:a,applyFilters:o,language:i})=>{let r,s;return t("div",{class:"period"},t("div",{class:"period-content"},t("div",{class:"date-input"},t("vaadin-date-picker",{value:e,ref:t=>r=t,label:n.translate("from",i),onChange:()=>{e=r.value}})),t("span",null,t("svg",{width:"24px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"m21 11.75c0-.414-.336-.75-.75-.75h-16.5c-.414 0-.75.336-.75.75s.336.75.75.75h16.5c.414 0 .75-.336.75-.75z","fill-rule":"nonzero",fill:"#5d687b"}))),t("div",{class:"date-input"},t("vaadin-date-picker",{value:a,ref:t=>s=t,label:n.translate("to",i),onChange:()=>{a=s.value}})),t("button",{class:"filter-btn",onClick:()=>o(e,a)},n.translate("filter",i))))},p=({source:e,language:a})=>{const o=[{name:n.translate("transactionId",a)},{name:n.translate("date",a)},{name:n.translate("amount",a)},{name:n.translate("productType",a)},{name:n.translate("status",a)}];return t("table",null,t("thead",null,t("tr",null,o.map((e=>t("th",null,e.name))))),t("tbody",null,e.map((e=>t("tr",null,t("td",null,e.transId),t("td",null,s.dateToFormatedString(new Date(e.created))),t("td",null,l.format(e.currency,e.realAmount)," "),t("td",null,e.productType),t("td",null,t("span",{class:e.status.toLowerCase()},e.status)))))))},u=class{constructor(t){e(this,t),this.pageSizes=[10,25,50],this.pagination=null,this.stylingAppended=!1,this.language=n.defaultLanguage,this.mobile=!1,this.clientStyling=null,this.clientStylingUrl=null,this.page=0,this.pageSize=this.pageSizes[0],this.showMobileFilter=!1,this.type="0",this.showLoader=!0}watchMultiple(){this.loadTransactions()}async componentWillLoad(){this.translationUrl&&await n.loadCustomTranslations(this.translationUrl),this.loadTransactions()}componentDidRender(){this.getComponentHeight(),!this.stylingAppended&&this.stylingContainer&&(this.clientStyling&&this.setStyles(this.clientStyling),this.clientStylingUrl&&this.setClientStylingByURL(),this.stylingAppended=!0)}getComponentHeight(){var t;if(this.mobile){let e=this.el.getBoundingClientRect().height-(null===(t=this.el.shadowRoot.querySelector(".table"))||void 0===t?void 0:t.getBoundingClientRect().y);this.el.style.setProperty("--heightScrollableContainer",e+"px")}}setHeightTableProperty(){let t=this.getComponentHeight();this.el.style.setProperty("--heightScrollableContainer",t+"px")}changeTransactionsType(t){this.type=t}changePageSize(t){this.pageSize=t}prev(){var t;(null===(t=this.pagination)||void 0===t?void 0:t.previous)&&this.page--}next(){var t;(null===(t=this.pagination)||void 0===t?void 0:t.next)&&this.page++}applyFilters(t,e){this.from=t?new Date(t).toISOString():null,this.to=e?new Date(e).toISOString():null,this.loadTransactions()}showFilter(){this.showMobileFilter=!this.showMobileFilter}render(){var e;const i=a("../assets/filter.svg"),s=a("../assets/warning.svg");return t(o,{key:"c850ba36433277706247f4b7c0c08b0ae0fb8c76"},this.showLoader?t(r,null):"",t("div",{key:"20b817b5c9cf14e8af0db2ba417d09e21b6921d7",class:"wrapper",ref:t=>this.stylingContainer=t},t("div",{key:"3943f4ab79cb0e72083821b424000f96779e78a5",class:{"types types-mobile":this.mobile,"types types-desktop":!this.mobile}},t("button",{key:"d1f3dfc1f4fc7013bd81c92663f578129f63c0e7",class:"transaction-type "+("0"===this.type?"clicked":""),onClick:()=>this.changeTransactionsType("0")},n.translate("deposit",this.language)),t("button",{key:"46989070ef6703fdf7c8c7ac6628e9dce731fec6",class:"transaction-type "+("1"===this.type?"clicked":""),onClick:()=>this.changeTransactionsType("1")},n.translate("withdrawals",this.language))),this.mobile?"":t(c,{language:this.language,pageSizes:this.pageSizes,currentPageSize:this.pageSize,changePageSize:t=>this.changePageSize(t)}),this.mobile?t("button",{class:"mobile-filter-button",onClick:()=>this.showFilter()},t("img",{src:i,alt:"Filter"}),n.translate("filter",this.language)):"",!this.mobile||this.showMobileFilter&&this.mobile?t(h,{language:this.language,applyFilters:(t,e)=>this.applyFilters(t,e)}):"",(null===(e=this.transactions)||void 0===e?void 0:e.length)>0?t("div",{class:"table"},this.mobile?t("div",{class:"mobile-table"},this.transactions.map((e=>t(d,Object.assign({},e))))):t(p,{source:this.transactions,language:this.language})):t("div",{class:"noData"},t("img",{src:s,alt:"Warning"}),t("span",null,n.translate("noData",this.language))),t("div",{key:"50710657788295389a20d59e0092dd033e428268",class:"pagination"},t("button",{key:"cd29c880eab413a06666dc12c8df38d3ffdcfe2f",onClick:()=>this.prev()},"<"),t("button",{key:"df351ecd4237433a8ab38766669ac48d2548ed6a",onClick:()=>this.next()},">"))))}async loadTransactions(){this.showLoader=!0;try{const t=`${this.endpoint}/v1/player/${this.userId}/transactions/banking?${this.getParams()}`,e=await fetch(t,{headers:{"X-Sessionid":this.session,"Content-Type":"application/json"}});if(!e.ok){const t=await e.text();throw new Error(t)}const a=await e.json();this.pagination=a.pagination,this.transactions=a.transactions}catch(t){console.error(t)}finally{this.showLoader=!1}}getParams(){var t,e;const a=new Date,o=(this.page*this.pageSize).toString(),i=null!==(t=this.from)&&void 0!==t?t:new Date(a.getFullYear(),a.getMonth(),1).toISOString();return`offset=${o}&endDate=${null!==(e=this.to)&&void 0!==e?e:new Date(a.getFullYear(),a.getMonth()+1,0).toISOString()}&startDate=${i}&type=${this.type}&limit=${this.pageSize}`}setStyles(t){const e=document.createElement("style");e.innerHTML=t,this.stylingContainer.prepend(e)}async setClientStylingByURL(){try{const t=await fetch(this.clientStylingUrl);if(!t.ok){const e=await t.text();throw new Error(e)}const e=await t.text();this.setStyles(e)}catch(t){console.error(`Failed to load client styles ${this.clientStylingUrl}`,t)}}static get assetsDirs(){return["../assets"]}get el(){return i(this)}static get watchers(){return{page:["watchMultiple"],type:["watchMultiple"],session:["watchMultiple"],userId:["watchMultiple"],pageSize:["watchMultiple"],showMobileFilter:["getComponentHeight"]}}};u.style=':host{--activeButtonBackground:#7ec51e;--activeButtonFont:#002149;--hoverBackground:#ffffff;--background:#e4e6e8;--success:#7ac345;--heightScrollableContainer:400px;--borderColor:#d3d3d3;--borderColorButton:#c4c4c4;--textColor:#002554;--textColorHover:#7ac345;--errorColor:#c23b21;--loaderColor:#7ac345;--headerTableBackground:#cdcdcd;--borderTable:#dedede;--shadowBorderTable:#f1f1f1;--backgroundTable:#ffffff;font-family:Roboto, Arial, sans-serif;font-size:14px;color:var(--textColor);display:block;background-color:var(--background)}:host .wrapper{height:100%;padding:1rem}:host .types{display:flex;width:100%;gap:5px}:host .transaction-type{background:inherit;font-weight:600;padding:0.6rem 1.6rem;border:1px solid #6c757d;cursor:pointer}:host .transaction-type:hover{color:var(--activeButtonBackground);border-color:var(--activeButtonBackground);background:var(--hoverBackground)}:host .clicked{background-color:var(--activeButtonBackground);border-color:var(--activeButtonBackground)}:host .types-mobile{justify-content:center;margin-bottom:15px}:host .types-desktop{justify-content:flex-end;margin-bottom:3rem}:host .page-size{display:flex;width:100%;justify-content:flex-end;align-items:center}:host .page-size button{background:transparent;border:none;cursor:pointer;margin:0.4rem;width:2rem;height:2rem}:host .page-size button:hover{color:var(--textColorHover)}:host .page-size button.active{background:var(--activeButtonBackground);color:var(--textColor);font-weight:600;border-radius:0.4rem}:host .period{display:flex;width:100%;align-items:flex-end;justify-content:center;gap:10px;background:#f0f0f0;border-bottom:2px solid #e9e9e9;padding:1.6rem 0 0;margin-bottom:4rem}@media (max-width: 801px){:host .period{margin-bottom:0;flex-direction:column;align-items:stretch;width:auto;padding:1.4rem 2.8rem;box-shadow:0 4px 5px 0 rgba(90, 90, 90, 0.24)}}:host .period .range{color:var(--errorColor)}:host .period .filter-btn{height:40px;background:transparent;border:0.1rem solid var(--borderColorButton);min-width:12rem;max-width:17rem;cursor:pointer}@media (max-width: 801px){:host .period .filter-btn{max-width:none;min-width:none;margin-top:1rem}}:host .period .filter-btn:hover{border:none;background:var(--hoverBackground)}:host .period .duet-date__input{padding:7px 60px 7px 7px}:host .period+button{padding:9px 15px}:host .period-content{display:flex;flex-direction:row;width:100%;justify-content:center;align-items:flex-end;margin:0 auto 1.6rem}@media (max-width: 801px){:host .period-content{flex-direction:column;align-items:stretch}}:host .period-content span{height:40px;display:flex;align-items:center;justify-content:center}@media (max-width: 801px){:host .period-content span{display:none}}:host .period-content .filter-btn{margin-left:60px}@media (max-width: 801px){:host .period-content .filter-btn{margin-left:0}}:host .period-content .date-input{padding:0 4px}@media (max-width: 801px){:host .period-content .date-input{width:auto}:host .period-content .date-input:first-child{margin-bottom:0.5rem}}:host .period-content .date-input label{display:inline-block;margin-bottom:0.9rem}:host .period-content .date-input input{border:0.1rem solid var(--borderColor);box-sizing:border-box;border-radius:0.2rem}:host .pagination{display:flex;width:100%;justify-content:center;margin-top:1.5rem}:host .pagination button{cursor:pointer;border:none;background-color:var(--activeButtonBackground);color:#fff;opacity:0.5;padding:7px 12px}:host .pagination button:hover{opacity:1}:host .pagination button:focus{opacity:1}:host button.active{color:var(--activeButtonFont);background-color:var(--activeButtonBackground)}.mobile-filter-button{display:flex;justify-content:center;align-items:center;width:100%;height:2.8rem;background:inherit;border:1px solid var(--borderColorButton)}.mobile-filter-button img{height:50%;margin-right:0.5rem}.noData{display:flex;align-items:center;box-shadow:0 0.4rem 0.4rem rgba(0, 0, 0, 0.25);padding:1.1rem;border-radius:0.6rem}.noData span{margin-left:0.5rem}.table{height:var(--heightScrollableContainer);overflow-y:auto}.table .mobile-table{height:100%}.data-transaction{border-bottom:1px solid var(--borderColor);background-color:var(--hoverBackground);padding:0 20px;display:grid;grid-template-columns:repeat(2, 1fr)}.data-transaction .text-style-status{font-weight:600}.data-transaction .text-style-status .success{color:var(--success)}.data-transaction .text-style-status .error{color:var(--errorColor)}.data-transaction .text-style{text-align:end}.data-transaction .date{font-size:12px;display:flex;align-items:center}.loader{display:inline-block;position:absolute;width:80px;height:80px;top:calc(50% - 40px);left:calc(50% - 40px);z-index:100}.loader::before{content:"";position:fixed;top:0;bottom:0;left:0;right:0;background-color:rgba(255, 255, 255, 0.6)}.loader div{position:absolute;width:6px;height:6px;background:var(--loaderColor);border-radius:50%;animation:loader 1.2s linear infinite}.loader div:nth-child(1){animation-delay:0s;top:37px;left:66px}.loader div:nth-child(2){animation-delay:-0.1s;top:22px;left:62px}.loader div:nth-child(3){animation-delay:-0.2s;top:11px;left:52px}.loader div:nth-child(4){animation-delay:-0.3s;top:7px;left:37px}.loader div:nth-child(5){animation-delay:-0.4s;top:11px;left:22px}.loader div:nth-child(6){animation-delay:-0.5s;top:22px;left:11px}.loader div:nth-child(7){animation-delay:-0.6s;top:37px;left:7px}.loader div:nth-child(8){animation-delay:-0.7s;top:52px;left:11px}.loader div:nth-child(9){animation-delay:-0.8s;top:62px;left:22px}.loader div:nth-child(10){animation-delay:-0.9s;top:66px;left:37px}.loader div:nth-child(11){animation-delay:-1s;top:62px;left:52px}.loader div:nth-child(12){animation-delay:-1.1s;top:52px;left:62px}@keyframes loader{0%,20%,80%,100%{transform:scale(1)}50%{transform:scale(1.5)}}.table thead th{position:sticky;top:0}table{border-collapse:collapse;width:100%}table th{padding:14px 24px;text-align:left;font-weight:600;color:var(--textColor);background:var(--headerTableBackground)}table td{padding:1rem 1.7rem;box-shadow:0 -1px 0 0 var(--shadowBorderTable) inset;border-bottom:0.1rem solid var(--borderTable);text-align:left;color:var(--textColor)}table tbody{background:var(--backgroundTable)}table .success{color:var(--success)}table .error{color:var(--errorColor)}vaadin-date-picker{min-width:320px}@media (max-width: 1261px){vaadin-date-picker{width:auto;min-width:auto}}@media (max-width: 801px){vaadin-date-picker{width:100%}}';export{u as user_transaction_history}
@@ -1 +1 @@
1
- import{p as e,b as t}from"./p-76051e8b.js";export{s as setNonce}from"./p-76051e8b.js";import{g as i}from"./p-e1255160.js";(()=>{const t=import.meta.url,i={};return""!==t&&(i.resourcesUrl=new URL(".",t).href),e(i)})().then((async e=>(await i(),t([["p-ef0d053d",[[1,"user-transaction-history",{endpoint:[513],session:[513],language:[513],userId:[513,"user-id"],translationUrl:[513,"translation-url"],mobile:[516],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],page:[32],pageSize:[32],showMobileFilter:[32],to:[32],from:[32],type:[32],transactions:[32],showLoader:[32]},[[9,"resize","getComponentHeight"]],{page:["watchMultiple"],type:["watchMultiple"],session:["watchMultiple"],userId:["watchMultiple"],pageSize:["watchMultiple"],showMobileFilter:["getComponentHeight"]}]]]],e))));
1
+ import{p as t,b as e}from"./p-0a0c7d87.js";export{s as setNonce}from"./p-0a0c7d87.js";import{g as i}from"./p-e1255160.js";(()=>{const e=import.meta.url,i={};return""!==e&&(i.resourcesUrl=new URL(".",e).href),t(i)})().then((async t=>(await i(),e([["p-574f2097",[[1,"user-transaction-history",{endpoint:[513],session:[513],language:[513],userId:[513,"user-id"],translationUrl:[513,"translation-url"],mobile:[516],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],page:[32],pageSize:[32],showMobileFilter:[32],to:[32],from:[32],type:[32],transactions:[32],showLoader:[32]},[[9,"resize","getComponentHeight"]],{page:["watchMultiple"],type:["watchMultiple"],session:["watchMultiple"],userId:["watchMultiple"],pageSize:["watchMultiple"],showMobileFilter:["getComponentHeight"]}]]]],t))));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/user-transaction-history",
3
- "version": "1.54.6",
3
+ "version": "1.54.8",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1,2 +0,0 @@
1
- var t=Object.defineProperty,e=new WeakMap,n=t=>e.get(t),o=(t,n)=>{e.set(n.t=t,n)},l=(t,e)=>e in t,s=(t,e)=>(0,console.error)(t,e),i=new Map,r=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="http://www.w3.org/1999/xlink",a="undefined"!=typeof window?window:{},f=a.document||{head:{}},h={o:0,l:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},d=t=>Promise.resolve(t),p=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),m=!1,v=[],y=[],w=(t,e)=>n=>{t.push(n),m||(m=!0,e&&4&h.o?g(b):h.raf(b))},$=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){s(t)}t.length=0},b=()=>{$(v),$(y),(m=v.length>0)&&h.raf(b)},g=t=>d().then(t),S=w(y,!0),j=t=>{const e=new URL(t,h.l);return e.origin!==a.location.origin?e.href:e.pathname},O=t=>"object"==(t=typeof t)||"function"===t;function k(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}((e,n)=>{for(var o in n)t(e,o,{get:n[o],enumerable:!0})})({},{err:()=>x,map:()=>C,ok:()=>E,unwrap:()=>P,unwrapErr:()=>R});var E=t=>({isOk:!0,isErr:!1,value:t}),x=t=>({isOk:!1,isErr:!0,value:t});function C(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>E(t))):E(n)}if(t.isErr)return x(t.value);throw"should never get here"}var M,P=t=>{if(t.isOk)return t.value;throw t.value},R=t=>{if(t.isErr)return t.value;throw t.value},A=(t,e,...n)=>{let o=null,l=null,s=!1,i=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((s="function"!=typeof t&&!O(o))&&(o+=""),s&&i?r[r.length-1].i+=o:r.push(s?H(null,o):o),i=s)};if(c(n),e){e.key&&(l=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}if("function"==typeof t)return t(null===e?{}:e,r,L);const u=H(t,null);return u.u=e,r.length>0&&(u.h=r),u.p=l,u},H=(t,e)=>({o:0,m:t,i:e,v:null,h:null,u:null,p:null}),D={},L={forEach:(t,e)=>t.map(N).forEach(e),map:(t,e)=>t.map(N).map(e).map(T)},N=t=>({vattrs:t.u,vchildren:t.h,vkey:t.p,vname:t.$,vtag:t.m,vtext:t.i}),T=t=>{if("function"==typeof t.vtag){const e={...t.vattrs};return t.vkey&&(e.key=t.vkey),t.vname&&(e.name=t.vname),A(t.vtag,e,...t.vchildren||[])}const e=H(t.vtag,t.vtext);return e.u=t.vattrs,e.h=t.vchildren,e.p=t.vkey,e.$=t.vname,e},U=(t,e)=>null==t||O(t)?t:4&e?"false"!==t&&(""===t||!!t):1&e?t+"":t,W=t=>n(t).$hostElement$,F=new WeakMap,V=t=>"sc-"+t.S,q=(t,e,n,o,s,i)=>{if(n!==o){let r=l(t,e),c=e.toLowerCase();if("class"===e){const e=t.classList,l=_(n);let s=_(o);e.remove(...l.filter((t=>t&&!s.includes(t)))),e.add(...s.filter((t=>t&&!l.includes(t))))}else if("style"===e){for(const e in n)o&&null!=o[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in o)n&&o[e]===n[e]||(e.includes("-")?t.style.setProperty(e,o[e]):t.style[e]=o[e])}else if("key"===e);else if("ref"===e)o&&o(t);else if(r||"o"!==e[0]||"n"!==e[1]){const l=O(o);if((r||l&&null!==o)&&!s)try{if(t.tagName.includes("-"))t[e]!==o&&(t[e]=o);else{const l=null==o?"":o;"list"===e?r=!1:null!=n&&t[e]==l||("function"==typeof t.__lookupSetter__(e)?t[e]=l:t.setAttribute(e,l))}}catch(t){}let a=!1;c!==(c=c.replace(/^xlink\:?/,""))&&(e=c,a=!0),null==o||!1===o?!1===o&&""!==t.getAttribute(e)||(a?t.removeAttributeNS(u,e):t.removeAttribute(e)):(!r||4&i||s)&&!l&&(o=!0===o?"":o,a?t.setAttributeNS(u,e,o):t.setAttribute(e,o))}else if(e="-"===e[2]?e.slice(3):l(a,c)?c.slice(2):c[2]+e.slice(3),n||o){const l=e.endsWith(z);e=e.replace(B,""),n&&h.rel(t,e,n,l),o&&h.ael(t,e,o,l)}}},G=/\s/,_=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(G):[]),z="Capture",B=RegExp(z+"$"),I=(t,e,n)=>{const o=11===e.v.nodeType&&e.v.host?e.v.host:e.v,l=t&&t.u||{},s=e.u||{};for(const t of J(Object.keys(l)))t in s||q(o,t,l[t],void 0,n,e.o);for(const t of J(Object.keys(s)))q(o,t,l[t],s[t],n,e.o)};function J(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var K=!1,Q=(t,e,n)=>{const o=e.h[n];let l,s,i=0;if(null!==o.i)l=o.v=f.createTextNode(o.i);else{if(K||(K="svg"===o.m),l=o.v=f.createElementNS(K?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o.m),K&&"foreignObject"===o.m&&(K=!1),I(null,o,K),o.h)for(i=0;i<o.h.length;++i)s=Q(t,o,i),s&&l.appendChild(s);"svg"===o.m?K=!1:"foreignObject"===l.tagName&&(K=!0)}return l["s-hn"]=M,l},X=(t,e,n,o,l,s)=>{let i,r=t;for(r.shadowRoot&&r.tagName===M&&(r=r.shadowRoot);l<=s;++l)o[l]&&(i=Q(null,n,l),i&&(o[l].v=i,nt(r,i,e)))},Y=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.v;et(e),t&&t.remove()}}},Z=(t,e,n=!1)=>t.m===e.m&&(n?(n&&!t.p&&e.p&&(t.p=e.p),!0):t.p===e.p),tt=(t,e,n=!1)=>{const o=e.v=t.v,l=t.h,s=e.h,i=e.m,r=e.i;null===r?(I(t,e,K="svg"===i||"foreignObject"!==i&&K),null!==l&&null!==s?((t,e,n,o,l=!1)=>{let s,i,r=0,c=0,u=0,a=0,f=e.length-1,h=e[0],d=e[f],p=o.length-1,m=o[0],v=o[p];for(;r<=f&&c<=p;)if(null==h)h=e[++r];else if(null==d)d=e[--f];else if(null==m)m=o[++c];else if(null==v)v=o[--p];else if(Z(h,m,l))tt(h,m,l),h=e[++r],m=o[++c];else if(Z(d,v,l))tt(d,v,l),d=e[--f],v=o[--p];else if(Z(h,v,l))tt(h,v,l),nt(t,h.v,d.v.nextSibling),h=e[++r],v=o[--p];else if(Z(d,m,l))tt(d,m,l),nt(t,d.v,h.v),d=e[--f],m=o[++c];else{for(u=-1,a=r;a<=f;++a)if(e[a]&&null!==e[a].p&&e[a].p===m.p){u=a;break}u>=0?(i=e[u],i.m!==m.m?s=Q(e&&e[c],n,u):(tt(i,m,l),e[u]=void 0,s=i.v),m=o[++c]):(s=Q(e&&e[c],n,c),m=o[++c]),s&&nt(h.v.parentNode,s,h.v)}r>f?X(t,null==o[p+1]?null:o[p+1].v,n,o,c,p):c>p&&Y(e,r,f)})(o,l,e,s,n):null!==s?(null!==t.i&&(o.textContent=""),X(o,null,e,s,0,s.length-1)):!n&&null!==l&&Y(l,0,l.length-1),K&&"svg"===i&&(K=!1)):t.i!==r&&(o.data=r)},et=t=>{t.u&&t.u.ref&&t.u.ref(null),t.h&&t.h.map(et)},nt=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),ot=(t,e)=>{if(e&&!t.j&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.j=()=>{e["s-p"].splice(n-1,1),o()})))}},lt=(t,e)=>{if(t.o|=16,!(4&t.o))return ot(t,t.O),S((()=>st(t,e)));t.o|=512},st=(t,e)=>{const n=t.$hostElement$,o=t.t;if(!o)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return e&&(t.o|=256,t.k&&(t.k.map((([t,e])=>ht(o,t,e,n))),t.k=void 0),l=ht(o,"componentWillLoad",void 0,n)),it(l,(()=>ct(t,o,e)))},it=(t,e)=>rt(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),rt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,ct=async(t,e,n)=>{var o;const l=t.$hostElement$,s=l["s-rc"];n&&(t=>{const e=t.C,n=t.$hostElement$,o=e.o,l=((t,e)=>{var n;const o=V(e),l=r.get(o);if(t=11===t.nodeType?t:f,l)if("string"==typeof l){let s,i=F.get(t=t.head||t);if(i||F.set(t,i=new Set),!i.has(o)){{s=document.querySelector(`[sty-id="${o}"]`)||f.createElement("style"),s.innerHTML=l;const i=null!=(n=h.M)?n:k(f);if(null!=i&&s.setAttribute("nonce",i),!(1&e.o))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(s,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(p){const e=new CSSStyleSheet;e.replaceSync(l),t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.innerHTML=l+e.innerHTML:t.prepend(s)}else t.append(s);1&e.o&&"HEAD"!==t.nodeName&&t.insertBefore(s,null)}4&e.o&&(s.innerHTML+=c),i&&i.add(o)}}else t.adoptedStyleSheets.includes(l)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]);return o})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&2&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);ut(t,e,l,n),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>at(t);0===e.length?n():(Promise.all(e).then(n),t.o|=4,e.length=0)}},ut=(t,e,n,o)=>{try{e=e.render(),t.o&=-17,t.o|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.C,s=t.P||H(null,null),i=(t=>t&&t.m===D)(e)?e:A(null,null,e);if(M=o.tagName,l.R&&(i.u=i.u||{},l.R.map((([t,e])=>i.u[e]=o[t]))),n&&i.u)for(const t of Object.keys(i.u))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(i.u[t]=o[t]);i.m=null,i.o|=4,t.P=i,i.v=s.v=o.shadowRoot||o,tt(s,i,n)})(t,e,o)}catch(e){s(e,t.$hostElement$)}return null},at=t=>{const e=t.$hostElement$,n=t.O;ht(t.t,"componentDidRender",void 0,e),64&t.o||(t.o|=64,dt(e),t.A(e),n||ft()),t.j&&(t.j(),t.j=void 0),512&t.o&&g((()=>lt(t,!1))),t.o&=-517},ft=()=>{dt(f.documentElement),g((()=>(t=>{const e=h.ce("appload",{detail:{namespace:"user-transaction-history"}});return t.dispatchEvent(e),e})(a)))},ht=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){s(t,o)}},dt=t=>t.classList.add("hydrated"),pt=(t,e,o,l)=>{const i=n(t);if(!i)throw Error(`Couldn't find host element for "${l.S}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const r=i.$hostElement$,c=i.H.get(e),u=i.o,a=i.t;if(o=U(o,l.D[e][0]),(!(8&u)||void 0===c)&&o!==c&&(!Number.isNaN(c)||!Number.isNaN(o))&&(i.H.set(e,o),a)){if(l.L&&128&u){const t=l.L[e];t&&t.map((t=>{try{a[t](o,c,e)}catch(t){s(t,r)}}))}2==(18&u)&&lt(i,!1)}},mt=(t,e,o)=>{var l,s;const i=t.prototype;if(e.D||e.L||t.watchers){t.watchers&&!e.L&&(e.L=t.watchers);const r=Object.entries(null!=(l=e.D)?l:{});if(r.map((([t,[l]])=>{if(31&l||2&o&&32&l){const{get:s,set:r}=Object.getOwnPropertyDescriptor(i,t)||{};s&&(e.D[t][0]|=2048),r&&(e.D[t][0]|=4096),(1&o||!s)&&Object.defineProperty(i,t,{get(){{if(!(2048&e.D[t][0]))return((t,e)=>n(this).H.get(e))(0,t);const o=n(this),l=o?o.t:i;if(!l)return;return l[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(i,t,{set(s){const i=n(this);if(r){const n=32&l?this[t]:i.$hostElement$[t];return void 0===n&&i.H.get(t)?s=i.H.get(t):!i.H.get(t)&&n&&i.H.set(t,n),r.call(this,U(s,l)),void pt(this,t,s=32&l?this[t]:i.$hostElement$[t],e)}{if(!(1&o&&4096&e.D[t][0]))return pt(this,t,s,e),void(1&o&&!i.t&&i.N.then((()=>{4096&e.D[t][0]&&i.t[t]!==i.H.get(t)&&(i.t[t]=s)})));const n=()=>{const n=i.t[t];!i.H.get(t)&&n&&i.H.set(t,n),i.t[t]=U(s,l),pt(this,t,i.t[t],e)};i.t?n():i.N.then((()=>n()))}}})}})),1&o){const o=new Map;i.attributeChangedCallback=function(t,l,s){h.jmp((()=>{var r;const c=o.get(t);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const o=n(this),i=null==o?void 0:o.o;if(i&&!(8&i)&&128&i&&s!==l){const n=o.t,i=null==(r=e.L)?void 0:r[t];null==i||i.forEach((e=>{null!=n[e]&&n[e].call(n,s,l,t)}))}return}}const u=Object.getOwnPropertyDescriptor(i,c);(s=(null!==s||"boolean"!=typeof this[c])&&s)===this[c]||u.get&&!u.set||(this[c]=s)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=e.L)?s:{}),...r.filter((([t,e])=>15&e[0])).map((([t,n])=>{var l;const s=n[1]||t;return o.set(s,t),512&n[0]&&(null==(l=e.R)||l.push([t,s])),s}))]))}}return t},vt=(t,o={})=>{var l;const u=[],d=o.exclude||[],m=a.customElements,v=f.head,y=v.querySelector("meta[charset]"),w=f.createElement("style"),$=[];let b,g=!0;Object.assign(h,o),h.l=new URL(o.resourcesUrl||"./",f.baseURI).href;let S=!1;if(t.map((t=>{t[1].map((o=>{var l;const c={o:o[0],S:o[1],D:o[2],T:o[3]};4&c.o&&(S=!0),c.D=o[2],c.T=o[3],c.R=[],c.L=null!=(l=o[4])?l:{};const a=c.S,f=class extends HTMLElement{constructor(t){if(super(t),this.hasRegisteredEventListeners=!1,((t,n)=>{const o={o:0,$hostElement$:t,C:n,H:new Map};o.N=new Promise((t=>o.A=t)),t["s-p"]=[],t["s-rc"]=[],e.set(t,o)})(t=this,c),1&c.o)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.S}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else t.attachShadow({mode:"open"})}connectedCallback(){const t=n(this);this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,yt(this,t,c.T)),b&&(clearTimeout(b),b=null),g?$.push(this):h.jmp((()=>(t=>{if(!(1&h.o)){const e=n(t),o=e.C,l=()=>{};if(1&e.o)yt(t,e,o.T),(null==e?void 0:e.t)||(null==e?void 0:e.N)&&e.N.then((()=>{}));else{e.o|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){ot(e,e.O=n);break}}o.D&&Object.entries(o.D).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;if(!(32&e.o)){e.o|=32;{const l=((t,e)=>{const n=t.S.replace(/-/g,"_"),o=t.U;if(!o)return;const l=i.get(o);return l?l[n]:import(`./${o}.entry.js`).then((t=>(i.set(o,t),t[n])),(t=>{s(t,e.$hostElement$)}))
2
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(l&&"then"in l){const t=()=>{};o=await l,t()}else o=l;if(!o)throw Error(`Constructor for "${n.S}#${e.W}" was not found`);o.isProxied||(n.L=o.watchers,mt(o,n,2),o.isProxied=!0);const r=()=>{};e.o|=8;try{new o(e)}catch(e){s(e,t)}e.o&=-9,e.o|=128,r()}if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=V(n);if(!r.has(e)){const o=()=>{};((t,e,n)=>{let o=r.get(t);p&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,r.set(t,o)})(e,t,!!(1&n.o)),o()}}}const l=e.O,c=()=>lt(e,!0);l&&l["s-rc"]?l["s-rc"].push(c):c()})(t,e,o)}l()}})(this)))}disconnectedCallback(){h.jmp((()=>(async t=>{if(!(1&h.o)){const e=n(t);e.F&&(e.F.map((t=>t())),e.F=void 0),(null==e?void 0:e.t)||(null==e?void 0:e.N)&&e.N.then((()=>{}))}F.has(t)&&F.delete(t),t.shadowRoot&&F.has(t.shadowRoot)&&F.delete(t.shadowRoot)})(this))),h.raf((()=>{var t;const e=n(this);(null==(t=null==e?void 0:e.P)?void 0:t.v)instanceof Node&&!e.P.v.isConnected&&delete e.P.v}))}componentOnReady(){return n(this).N}};c.U=t[0],d.includes(a)||m.get(a)||(u.push(a),m.define(a,mt(f,c,1)))}))})),u.length>0&&(S&&(w.textContent+=c),w.textContent+=u.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",w.innerHTML.length)){w.setAttribute("data-styles","");const t=null!=(l=h.M)?l:k(f);null!=t&&w.setAttribute("nonce",t),v.insertBefore(w,y?y.nextSibling:v.firstChild)}g=!1,$.length?$.map((t=>t.connectedCallback())):h.jmp((()=>b=setTimeout(ft,30)))},yt=(t,e,n)=>{n&&n.map((([n,o,l])=>{const s=$t(t,n),i=wt(e,l),r=bt(n);h.ael(s,o,i,r),(e.F=e.F||[]).push((()=>h.rel(s,o,i,r)))}))},wt=(t,e)=>n=>{var o;try{256&t.o?null==(o=t.t)||o[e](n):(t.k=t.k||[]).push([e,n])}catch(e){s(e,t.$hostElement$)}},$t=(t,e)=>8&e?a:t,bt=t=>({passive:!!(1&t),capture:!!(2&t)}),gt=t=>h.M=t;export{D as H,W as a,vt as b,j as g,A as h,d as p,o as r,gt as s}