@everymatrix/cashier-iframe-redirect 1.29.0 → 1.29.3

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.
@@ -584,6 +584,6 @@ this.formats=dt(e.formats,n),this.formatters=i&&i.formatters||(void 0===(o=this.
584
584
  // and Intl.DateTimeFormat instances.
585
585
  e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();const Ht={},Tt=(e,t,r)=>r?(t in Ht||(Ht[t]={}),e in Ht[t]||(Ht[t][e]=r),r):r,_t=(e,t)=>{if(null==t)return;if(t in Ht&&e in Ht[t])return Ht[t][e];const r=Zt(t);for(let n=0;n<r.length;n++){const i=St(r[n],e);if(i)return Tt(e,t,i)}};let Bt;const At=D({});function Lt(e){return e in Bt}function St(e,t){if(!Lt(e))return null;const r=function(e){return Bt[e]||null}(e);return function(e,t){if(null==t)return;if(t in e)return e[t];const r=t.split(".");let n=e;for(let e=0;e<r.length;e++)if("object"==typeof n){if(e>0){const t=r.slice(e,r.length).join(".");if(t in n){n=n[t];break}}n=n[r[e]]}else n=void 0;return n}(r,t)}function Pt(e,...t){delete Ht[e],At.update((r=>(r[e]=Z.all([r[e]||{},...t]),r)))}k([At],(([e])=>Object.keys(e))),At.subscribe((e=>Bt=e));const Ct={};function Nt(e){return Ct[e]}function wt(e){return null!=e&&Zt(e).some((e=>{var t;return null==(t=Nt(e))?void 0:t.size}))}function It(e,t){const r=Promise.all(t.map((t=>(function(e,t){Ct[e].delete(t),0===Ct[e].size&&delete Ct[e]}(e,t),t().then((e=>e.default||e))))));return r.then((t=>Pt(e,...t)))}const Ot={};function Rt(e){if(!wt(e))return e in Ot?Ot[e]:Promise.resolve();const t=function(e){return Zt(e).map((e=>{const t=Nt(e);return[e,t?[...t]:[]]})).filter((([,e])=>e.length>0))}(e);return Ot[e]=Promise.all(t.map((([e,t])=>It(e,t)))).then((()=>{if(wt(e))return Rt(e);delete Ot[e]})),Ot[e]}const Mt={fallbackLocale:null,loadingDelay:200,formats:{number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0};function Ut(){return Mt}const Gt=D(!1);var Dt=Object.defineProperty,kt=Object.defineProperties,Ft=Object.getOwnPropertyDescriptors,$t=Object.getOwnPropertySymbols,xt=Object.prototype.hasOwnProperty,jt=Object.prototype.propertyIsEnumerable,Vt=(e,t,r)=>t in e?Dt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;let Xt;const Kt=D(null);function Yt(e){return e.split("-").map(((e,t,r)=>r.slice(0,t+1).join("-"))).reverse()}function Zt(e,t=Ut().fallbackLocale){const r=Yt(e);return t?[...new Set([...r,...Yt(t)])]:r}function zt(){return null!=Xt?Xt:void 0}Kt.subscribe((e=>{Xt=null!=e?e:void 0,"undefined"!=typeof window&&null!=e&&document.documentElement.setAttribute("lang",e)}));const Wt=(Qt=((e,t)=>{for(var r in t||(t={}))xt.call(t,r)&&Vt(e,r,t[r]);if($t)for(var r of $t(t))jt.call(t,r)&&Vt(e,r,t[r]);return e})({},Kt),kt(Qt,Ft({set:e=>{if(e&&function(e){if(null==e)return;const t=Zt(e);for(let e=0;e<t.length;e++){const r=t[e];if(Lt(r))return r}}(e)&&wt(e)){const{loadingDelay:t}=Ut();let r;return"undefined"!=typeof window&&null!=zt()&&t?r=window.setTimeout((()=>Gt.set(!0)),t):Gt.set(!0),Rt(e).then((()=>{Kt.set(e)})).finally((()=>{clearTimeout(r),Gt.set(!1)}))}return Kt.set(e)}})));var Qt;const Jt=e=>{const t=Object.create(null);return r=>{const n=JSON.stringify(r);return n in t?t[n]:t[n]=e(r)}};var qt=Object.defineProperty,er=Object.getOwnPropertySymbols,tr=Object.prototype.hasOwnProperty,rr=Object.prototype.propertyIsEnumerable,nr=(e,t,r)=>t in e?qt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ir=(e,t)=>{for(var r in t||(t={}))tr.call(t,r)&&nr(e,r,t[r]);if(er)for(var r of er(t))rr.call(t,r)&&nr(e,r,t[r]);return e},or=(e,t)=>{var r={};for(var n in e)tr.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&er)for(var n of er(e))t.indexOf(n)<0&&rr.call(e,n)&&(r[n]=e[n]);return r};const sr=(e,t)=>{const{formats:r}=Ut();if(e in r&&t in r[e])return r[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},ar=Jt((e=>{var t=e,{locale:r,format:n}=t,i=or(t,["locale","format"]);if(null==r)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return n&&(i=sr("number",n)),new Intl.NumberFormat(r,i)})),hr=Jt((e=>{var t=e,{locale:r,format:n}=t,i=or(t,["locale","format"]);if(null==r)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return n?i=sr("date",n):0===Object.keys(i).length&&(i=sr("date","short")),new Intl.DateTimeFormat(r,i)})),cr=Jt((e=>{var t=e,{locale:r,format:n}=t,i=or(t,["locale","format"]);if(null==r)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return n?i=sr("time",n):0===Object.keys(i).length&&(i=sr("time","short")),new Intl.DateTimeFormat(r,i)})),ur=Jt((
586
586
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
587
- (e,t=zt())=>new vt(e,t,Ut().formats,{ignoreTag:Ut().ignoreTag}))),lr=(e,t={})=>{var r,n,i,o;let s=t;"object"==typeof e&&(s=e,e=s.id);const{values:a,locale:h=zt(),default:c}=s;if(null==h)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let u=_t(e,h);if(u){if("string"!=typeof u)return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof u}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),u}else u=null!=(o=null!=(i=null==(n=(r=Ut()).handleMissingMessage)?void 0:n.call(r,{locale:h,id:e,defaultValue:c}))?i:c)?o:e;if(!a)return u;let l=u;try{l=ur(u,h).format(a)}catch(t){t instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,t.message)}return l},fr=(e,t)=>((e={})=>{var t=e,{locale:r=zt()}=t,n=or(t,["locale"]);return cr(ir({locale:r},n))})(t).format(e),pr=(e,t)=>((e={})=>{var t=e,{locale:r=zt()}=t,n=or(t,["locale"]);return hr(ir({locale:r},n))})(t).format(e),mr=(e,t)=>((e={})=>{var t=e,{locale:r=zt()}=t,n=or(t,["locale"]);return ar(ir({locale:r},n))})(t).format(e),gr=(e,t=zt())=>_t(e,t),br=k([Wt,At],(()=>lr));function Er(e,t){Pt(e,t)}k([Wt],(()=>fr)),k([Wt],(()=>pr)),k([Wt],(()=>mr)),k([Wt,At],(()=>gr));const dr={en:{redirectHeader:"Deposit redirect"}};
587
+ (e,t=zt())=>new vt(e,t,Ut().formats,{ignoreTag:Ut().ignoreTag}))),lr=(e,t={})=>{var r,n,i,o;let s=t;"object"==typeof e&&(s=e,e=s.id);const{values:a,locale:h=zt(),default:c}=s;if(null==h)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let u=_t(e,h);if(u){if("string"!=typeof u)return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof u}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),u}else u=null!=(o=null!=(i=null==(n=(r=Ut()).handleMissingMessage)?void 0:n.call(r,{locale:h,id:e,defaultValue:c}))?i:c)?o:e;if(!a)return u;let l=u;try{l=ur(u,h).format(a)}catch(t){t instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,t.message)}return l},fr=(e,t)=>((e={})=>{var t=e,{locale:r=zt()}=t,n=or(t,["locale"]);return cr(ir({locale:r},n))})(t).format(e),pr=(e,t)=>((e={})=>{var t=e,{locale:r=zt()}=t,n=or(t,["locale"]);return hr(ir({locale:r},n))})(t).format(e),mr=(e,t)=>((e={})=>{var t=e,{locale:r=zt()}=t,n=or(t,["locale"]);return ar(ir({locale:r},n))})(t).format(e),gr=(e,t=zt())=>_t(e,t),br=k([Wt,At],(()=>lr));function Er(e,t){Pt(e,t)}k([Wt],(()=>fr)),k([Wt],(()=>pr)),k([Wt],(()=>mr)),k([Wt,At],(()=>gr));const dr={en:{redirectHeader:"Deposit redirect"},"pt-br":{redirectHeader:"Redirecionar depósito"},"es-mx":{redirectHeader:"Redirigir depósito"}};
588
588
  /* src/CashierIframeRedirect.svelte generated by Svelte v3.59.2 */function yr(e){let t;return{c(){t=p("div"),E(t,"class","LoadingSpinner")},m(e,r){l(e,t,r)},d(e){e&&f(t)}}}function vr(t){let r,i,o,s,a,c,d,y,v,H,T,_,B=/*$_*/t[2]("redirectHeader")+"",A=/*isLoading*/t[1]&&yr();return{c(){r=p("div"),i=p("div"),o=p("div"),s=m(B),a=g(),c=p("div"),c.innerHTML='<svg width="13" height="13" viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.7711 0.229435C13.0582 0.517619 13.0755 0.973729 12.8215 1.28141L12.7711 1.33721L7.60685 6.50068L12.7711 11.6641C12.9128 11.8066 12.9944 11.998 12.999 12.1988C13.0035 12.3997 12.9308 12.5946 12.7957 12.7433C12.6606 12.892 12.4735 12.9832 12.2731 12.9979C12.0728 13.0126 11.8744 12.9497 11.7191 12.8223L11.6633 12.7719L6.49958 7.60791L1.3359 12.7719C1.19349 12.9136 1.00207 12.9952 0.801203 12.9998C0.60034 13.0044 0.405398 12.9316 0.256676 12.7965C0.107955 12.6614 0.0168256 12.4744 0.00212786 12.274C-0.0125699 12.0736 0.0502877 11.8753 0.177706 11.7199L0.228086 11.6641L5.3923 6.50068L0.228086 1.33721C0.0863637 1.1948 0.00478102 1.00338 0.000203544 0.802529C-0.00437393 0.601674 0.0684038 0.40674 0.203491 0.258024C0.338579 0.109308 0.525647 0.0181829 0.726024 0.00348576C0.9264 -0.0112114 1.12476 0.0516437 1.28011 0.179057L1.3359 0.229435L6.49958 5.39345L11.6633 0.229435C11.736 0.156695 11.8223 0.0989949 11.9174 0.0596283C12.0124 0.0202617 12.1143 0 12.2172 0C12.32 0 12.4219 0.0202617 12.5169 0.0596283C12.612 0.0989949 12.6983 0.156695 12.7711 0.229435Z" fill="#111111"></path></svg>',d=g(),A&&A.c(),y=g(),v=p("iframe"),this.c=e,E(o,"class","RedirectHeader"),E(c,"class","CloseButton"),E(i,"class","HeaderContainer"),h(v.src,H=/*iframeurl*/t[0])||E(v,"src",H),E(v,"frameborder","0"),E(r,"class","CashierRedirectIframe")},m(e,n){l(e,r,n),u(r,i),u(i,o),u(o,s),u(i,a),u(i,c),u(r,d),A&&A.m(r,null),u(r,y),u(r,v),T||(_=[b(c,"click",/*close*/t[3]),b(v,"load",/*load_handler*/t[7])],T=!0)},p(e,[t]){/*$_*/4&t&&B!==(B=/*$_*/e[2]("redirectHeader")+"")&&function(e,t){t=""+t,e.data!==t&&(e.data=t)}(s,B),/*isLoading*/e[1]?A||(A=yr(),A.c(),A.m(r,y)):A&&(A.d(1),A=null),/*iframeurl*/1&t&&!h(v.src,H=/*iframeurl*/e[0])&&E(v,"src",H)},i:e,o:e,d(e){e&&f(r),A&&A.d(),T=!1,n(_)}}}function Hr(e,t,r){let n;var i,o;i=br,o=e=>r(2,n=e),e.$$.on_destroy.push(c(i,o));let{lang:s="en"}=t,{iframeurl:a}=t,{translationurl:h=""}=t,u=!0;v();Object.keys(dr).forEach((e=>{Er(e,dr[e])}));const l=()=>{var e;e=s,Wt.set(e)},f=e=>{e.target.src&&r(1,u=!1)};return e.$$set=e=>{"lang"in e&&r(5,s=e.lang),"iframeurl"in e&&r(0,a=e.iframeurl),"translationurl"in e&&r(6,h=e.translationurl)},e.$$.update=()=>{/*lang*/32&e.$$.dirty&&s&&l(),/*translationurl*/64&e.$$.dirty&&h&&(()=>{if(h)fetch(h).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{Er(t,e[t])}))})).catch((e=>{console.log(e)}))})()},[a,u,n,()=>{dispatchEvent(new CustomEvent("closeIframe",{bubbles:!0,cancelable:!0,composed:!0}))},f,s,h,e=>f(e)]}class Tr extends U{constructor(e){super();const t=document.createElement("style");t.textContent='.CashierRedirectIframe{height:inherit;width:inherit}iframe{height:100%;width:100%}.HeaderContainer{position:fixed;display:flex;top:0;background-color:var(--emw--color-white, #fff);justify-content:space-between;align-items:center;width:100%}.HeaderContainer .RedirectHeader{font-size:var(--emw--font-size-small, 14px);color:var(--mmw--color-grey-10, #111);font-weight:bold;line-height:var(--emw--font-size-small, 14px)}.HeaderContainer .CloseButton{display:flex;align-items:center;padding:var(--emw--spacing-small-minus, 10px) var(--emw--spacing-x-small, 8px);box-sizing:border-box;border-radius:var(--mmw--border-radius-1x-small, 2px);background:var(--emw--color-white, #fff);justify-content:end;cursor:pointer}.LoadingSpinner{display:block;width:80px;height:80px;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.LoadingSpinner:after{content:" ";display:block;width:64px;height:64px;margin:var(--emw--spacing-x-small, 8px);border-radius:50%;border:6px solid var(--mmw--color-main-button, #7EC51E);border-color:transparent var(--mmw--color-main-button, #7EC51E) transparent;animation:LoadingSpinner 1.2s linear infinite}@keyframes LoadingSpinner{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}',this.shadowRoot.appendChild(t),M(this,{target:this.shadowRoot,props:d(this.attributes),customElement:!0},Hr,vr,o,{lang:5,iframeurl:0,translationurl:6},null),e&&(e.target&&l(e.target,this,e.anchor),e.props&&(this.$set(e.props),N()))}static get observedAttributes(){return["lang","iframeurl","translationurl"]}get lang(){return this.$$.ctx[5]}set lang(e){this.$$set({lang:e}),N()}get iframeurl(){return this.$$.ctx[0]}set iframeurl(e){this.$$set({iframeurl:e}),N()}get translationurl(){return this.$$.ctx[6]}set translationurl(e){this.$$set({translationurl:e}),N()}}return!customElements.get("cashier-iframe-redirect")&&customElements.define("cashier-iframe-redirect",Tr),Tr}));
589
589
  //# sourceMappingURL=cashier-iframe-redirect.js.map