@everymatrix/cashier-modal 1.76.0 → 1.76.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.
@@ -0,0 +1,4 @@
1
+ "use strict";var vt=Object.defineProperty,Et=Object.defineProperties;var Lt=Object.getOwnPropertyDescriptors;var nt=Object.getOwnPropertySymbols;var Mt=Object.prototype.hasOwnProperty,kt=Object.prototype.propertyIsEnumerable;var V=(e,t,n)=>t in e?vt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,it=(e,t)=>{for(var n in t||(t={}))Mt.call(t,n)&&V(e,n,t[n]);if(nt)for(var n of nt(t))kt.call(t,n)&&V(e,n,t[n]);return e},st=(e,t)=>Et(e,Lt(t));var p=(e,t,n)=>(V(e,typeof t!="symbol"?t+"":t,n),n);var rt=(e,t,n)=>new Promise((i,s)=>{var r=f=>{try{o(n.next(f))}catch(l){s(l)}},c=f=>{try{o(n.throw(f))}catch(l){s(l)}},o=f=>f.done?i(f.value):Promise.resolve(f.value).then(r,c);o((n=n.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function P(){}const $t=e=>e;function St(e,t){for(const n in t)e[n]=t[n];return e}function _t(e){return e()}function ot(){return Object.create(null)}function j(e){e.forEach(_t)}function X(e){return typeof e=="function"}function jt(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function Ot(e){return Object.keys(e).length===0}function At(e,t,n,i){if(e){const s=gt(e,t,n,i);return e[0](s)}}function gt(e,t,n,i){return e[1]&&i?St(n.ctx.slice(),e[1](i(t))):n.ctx}function Nt(e,t,n,i){if(e[2]&&i){const s=e[2](i(n));if(t.dirty===void 0)return s;if(typeof s=="object"){const r=[],c=Math.max(t.dirty.length,s.length);for(let o=0;o<c;o+=1)r[o]=t.dirty[o]|s[o];return r}return t.dirty|s}return t.dirty}function zt(e,t,n,i,s,r){if(s){const c=gt(t,n,i,r);e.p(c,s)}}function Bt(e){if(e.ctx.length>32){const t=[],n=e.ctx.length/32;for(let i=0;i<n;i++)t[i]=-1;return t}return-1}const mt=typeof window!="undefined";let Pt=mt?()=>window.performance.now():()=>Date.now(),Y=mt?e=>requestAnimationFrame(e):P;const M=new Set;function yt(e){M.forEach(t=>{t.c(e)||(M.delete(t),t.f())}),M.size!==0&&Y(yt)}function Rt(e){let t;return M.size===0&&Y(yt),{promise:new Promise(n=>{M.add(t={c:e,f:n})}),abort(){M.delete(t)}}}function C(e,t){e.appendChild(t)}function Tt(e,t,n){const i=tt(e);if(!i.getElementById(t)){const s=v("style");s.id=t,s.textContent=n,pt(i,s)}}function tt(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function Ht(e){const t=v("style");return t.textContent="/* empty */",pt(tt(e),t),t.sheet}function pt(e,t){return C(e.head||e,t),t.sheet}function et(e,t,n){e.insertBefore(t,n||null)}function O(e){e.parentNode&&e.parentNode.removeChild(e)}function v(e){return document.createElement(e)}function ct(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function wt(e){return document.createTextNode(e)}function It(){return wt(" ")}function Ut(){return wt("")}function G(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function y(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function Wt(e){return Array.from(e.childNodes)}let H;function Dt(){if(H===void 0){H=!1;try{typeof window!="undefined"&&window.parent&&window.parent.document}catch(e){H=!0}}return H}function Ft(e,t){getComputedStyle(e).position==="static"&&(e.style.position="relative");const i=v("iframe");i.setAttribute("style","display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"),i.setAttribute("aria-hidden","true"),i.tabIndex=-1;const s=Dt();let r;return s?(i.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",r=G(window,"message",c=>{c.source===i.contentWindow&&t()})):(i.src="about:blank",i.onload=()=>{r=G(i.contentWindow,"resize",t),t()}),C(e,i),()=>{(s||r&&i.contentWindow)&&r(),O(i)}}function Jt(e,t,{bubbles:n=!1,cancelable:i=!1}={}){return new CustomEvent(e,{detail:t,bubbles:n,cancelable:i})}function Vt(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}const W=new Map;let D=0;function qt(e){let t=5381,n=e.length;for(;n--;)t=(t<<5)-t^e.charCodeAt(n);return t>>>0}function Zt(e,t){const n={stylesheet:Ht(t),rules:{}};return W.set(e,n),n}function lt(e,t,n,i,s,r,c,o=0){const f=16.666/i;let l=`{
2
+ `;for(let _=0;_<=1;_+=f){const x=t+(n-t)*r(_);l+=_*100+`%{${c(x,1-x)}}
3
+ `}const $=l+`100% {${c(n,1-n)}}
4
+ }`,a=`__svelte_${qt($)}_${o}`,g=tt(e),{stylesheet:m,rules:u}=W.get(g)||Zt(g,e);u[a]||(u[a]=!0,m.insertRule(`@keyframes ${a} ${$}`,m.cssRules.length));const h=e.style.animation||"";return e.style.animation=`${h?`${h}, `:""}${a} ${i}ms linear ${s}ms 1 both`,D+=1,a}function Gt(e,t){const n=(e.style.animation||"").split(", "),i=n.filter(t?r=>r.indexOf(t)<0:r=>r.indexOf("__svelte")===-1),s=n.length-i.length;s&&(e.style.animation=i.join(", "),D-=s,D||Kt())}function Kt(){Y(()=>{D||(W.forEach(e=>{const{ownerNode:t}=e.stylesheet;t&&O(t)}),W.clear())})}let R;function z(e){R=e}function Qt(){if(!R)throw new Error("Function called outside component initialization");return R}function Xt(e){Qt().$$.on_mount.push(e)}const L=[],F=[];let k=[];const ut=[],Yt=Promise.resolve();let K=!1;function te(){K||(K=!0,Yt.then(w))}function S(e){k.push(e)}const q=new Set;let E=0;function w(){if(E!==0)return;const e=R;do{try{for(;E<L.length;){const t=L[E];E++,z(t),ee(t.$$)}}catch(t){throw L.length=0,E=0,t}for(z(null),L.length=0,E=0;F.length;)F.pop()();for(let t=0;t<k.length;t+=1){const n=k[t];q.has(n)||(q.add(n),n())}k.length=0}while(L.length);for(;ut.length;)ut.pop()();K=!1,q.clear(),z(e)}function ee(e){if(e.fragment!==null){e.update(),j(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(S)}}function ne(e){const t=[],n=[];k.forEach(i=>e.indexOf(i)===-1?t.push(i):n.push(i)),n.forEach(i=>i()),k=t}let N;function ie(){return N||(N=Promise.resolve(),N.then(()=>{N=null})),N}function Z(e,t,n){e.dispatchEvent(Jt(`${t?"intro":"outro"}${n}`))}const I=new Set;let b;function se(){b={r:0,c:[],p:b}}function re(){b.r||j(b.c),b=b.p}function B(e,t){e&&e.i&&(I.delete(e),e.i(t))}function Q(e,t,n,i){if(e&&e.o){if(I.has(e))return;I.add(e),b.c.push(()=>{I.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}const oe={duration:0};function ft(e,t,n,i){let r=t(e,n,{direction:"both"}),c=i?0:1,o=null,f=null,l=null,$;function a(){l&&Gt(e,l)}function g(u,h){const _=u.b-c;return h*=Math.abs(_),{a:c,b:u.b,d:_,duration:h,start:u.start,end:u.start+h,group:u.group}}function m(u){const{delay:h=0,duration:_=300,easing:x=$t,tick:A=P,css:d}=r||oe,J={start:Pt()+h,b:u};u||(J.group=b,b.r+=1),"inert"in e&&(u?$!==void 0&&(e.inert=$):($=e.inert,e.inert=!0)),o||f?f=J:(d&&(a(),l=lt(e,c,u,_,h,x,d)),u&&A(0,1),o=g(J,_),S(()=>Z(e,u,"start")),Rt(T=>{if(f&&T>f.start&&(o=g(f,_),f=null,Z(e,o.b,"start"),d&&(a(),l=lt(e,c,o.b,o.duration,0,x,r.css))),o){if(T>=o.end)A(c=o.b,1-c),Z(e,o.b,"end"),f||(o.b?a():--o.group.r||j(o.group.c)),o=null;else if(T>=o.start){const Ct=T-o.start;c=o.a+o.d*x(Ct/o.duration),A(c,1-c)}}return!!(o||f)}))}return{run(u){X(r)?ie().then(()=>{r=r({direction:u?"in":"out"}),m(u)}):m(u)},end(){a(),o=f=null}}}function ce(e,t,n){const{fragment:i,after_update:s}=e.$$;i&&i.m(t,n),S(()=>{const r=e.$$.on_mount.map(_t).filter(X);e.$$.on_destroy?e.$$.on_destroy.push(...r):j(r),e.$$.on_mount=[]}),s.forEach(S)}function le(e,t){const n=e.$$;n.fragment!==null&&(ne(n.after_update),j(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function ue(e,t){e.$$.dirty[0]===-1&&(L.push(e),te(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function fe(e,t,n,i,s,r,c=null,o=[-1]){const f=R;z(e);const l=e.$$={fragment:null,ctx:[],props:r,update:P,not_equal:s,bound:ot(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(f?f.$$.context:[])),callbacks:ot(),dirty:o,skip_bound:!1,root:t.target||f.$$.root};c&&c(l.root);let $=!1;if(l.ctx=n(e,t.props||{},(a,g,...m)=>{const u=m.length?m[0]:g;return l.ctx&&s(l.ctx[a],l.ctx[a]=u)&&(!l.skip_bound&&l.bound[a]&&l.bound[a](u),$&&ue(e,a)),g}),l.update(),$=!0,j(l.before_update),l.fragment=i(l.ctx),t.target){if(t.hydrate){const a=Wt(t.target);l.fragment&&l.fragment.l(a),a.forEach(O)}else l.fragment&&l.fragment.c();t.intro&&B(e.$$.fragment),ce(e,t.target,t.anchor),w()}z(f)}let bt;typeof HTMLElement=="function"&&(bt=class extends HTMLElement{constructor(t,n,i){super();p(this,"$$ctor");p(this,"$$s");p(this,"$$c");p(this,"$$cn",!1);p(this,"$$d",{});p(this,"$$r",!1);p(this,"$$p_d",{});p(this,"$$l",{});p(this,"$$l_u",new Map);this.$$ctor=t,this.$$s=n,i&&this.attachShadow({mode:"open"})}addEventListener(t,n,i){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(n),this.$$c){const s=this.$$c.$on(t,n);this.$$l_u.set(n,s)}super.addEventListener(t,n,i)}removeEventListener(t,n,i){if(super.removeEventListener(t,n,i),this.$$c){const s=this.$$l_u.get(n);s&&(s(),this.$$l_u.delete(n))}}connectedCallback(){return rt(this,null,function*(){if(this.$$cn=!0,!this.$$c){let t=function(r){return()=>{let c;return{c:function(){c=v("slot"),r!=="default"&&y(c,"name",r)},m:function(l,$){et(l,c,$)},d:function(l){l&&O(c)}}}};if(yield Promise.resolve(),!this.$$cn||this.$$c)return;const n={},i=Vt(this);for(const r of this.$$s)r in i&&(n[r]=[t(r)]);for(const r of this.attributes){const c=this.$$g_p(r.name);c in this.$$d||(this.$$d[c]=U(c,r.value,this.$$p_d,"toProp"))}for(const r in this.$$p_d)!(r in this.$$d)&&this[r]!==void 0&&(this.$$d[r]=this[r],delete this[r]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:st(it({},this.$$d),{$$slots:n,$$scope:{ctx:[]}})});const s=()=>{this.$$r=!0;for(const r in this.$$p_d)if(this.$$d[r]=this.$$c.$$.ctx[this.$$c.$$.props[r]],this.$$p_d[r].reflect){const c=U(r,this.$$d[r],this.$$p_d,"toAttribute");c==null?this.removeAttribute(this.$$p_d[r].attribute||r):this.setAttribute(this.$$p_d[r].attribute||r,c)}this.$$r=!1};this.$$c.$$.after_update.push(s),s();for(const r in this.$$l)for(const c of this.$$l[r]){const o=this.$$c.$on(r,c);this.$$l_u.set(c,o)}this.$$l={}}})}attributeChangedCallback(t,n,i){var s;this.$$r||(t=this.$$g_p(t),this.$$d[t]=U(t,i,this.$$p_d,"toProp"),(s=this.$$c)==null||s.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(t){return Object.keys(this.$$p_d).find(n=>this.$$p_d[n].attribute===t||!this.$$p_d[n].attribute&&n.toLowerCase()===t)||t}});function U(e,t,n,i){var r;const s=(r=n[e])==null?void 0:r.type;if(t=s==="Boolean"&&typeof t!="boolean"?t!=null:t,!i||!n[e])return t;if(i==="toAttribute")switch(s){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t==null?null:t;default:return t}else switch(s){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function ae(e,t,n,i,s,r){let c=class extends bt{constructor(){super(e,n,s),this.$$p_d=t}static get observedAttributes(){return Object.keys(t).map(o=>(t[o].attribute||o).toLowerCase())}};return Object.keys(t).forEach(o=>{Object.defineProperty(c.prototype,o,{get(){return this.$$c&&o in this.$$c?this.$$c[o]:this.$$d[o]},set(f){var l;f=U(o,f,t),this.$$d[o]=f,(l=this.$$c)==null||l.$set({[o]:f})}})}),i.forEach(o=>{Object.defineProperty(c.prototype,o,{get(){var f;return(f=this.$$c)==null?void 0:f[o]}})}),e.element=c,c}class de{constructor(){p(this,"$$");p(this,"$$set")}$destroy(){le(this,1),this.$destroy=P}$on(t,n){if(!X(n))return P;const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const s=i.indexOf(n);s!==-1&&i.splice(s,1)}}$set(t){this.$$set&&!Ot(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const he="4";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(he);function at(e,{delay:t=0,duration:n=400,easing:i=$t}={}){const s=+getComputedStyle(e).opacity;return{delay:t,duration:n,easing:i,css:r=>`opacity: ${r*s}`}}function $e(e,t){if(e){const n=document.createElement("style");n.innerHTML=t,e.appendChild(n)}}function _e(e,t){const n=new URL(t);fetch(n.href).then(i=>i.text()).then(i=>{const s=document.createElement("style");s.innerHTML=i,e&&e.appendChild(s)}).catch(i=>{console.error("There was an error while trying to load client styling from URL",i)})}function ge(e,t,n){if(window.emMessageBus){const i=document.createElement("style");window.emMessageBus.subscribe(t,s=>{i.innerHTML=s,e&&e.appendChild(i)})}}function me(e){Tt(e,"svelte-f275jp","*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}#Modal{position:fixed;width:100%;height:100%;top:0;left:0;background:var(--emw--color-black-transparency-10, rgba(0, 0, 0, 0.1));display:flex;justify-content:center;align-items:center;z-index:10}.ModalContainer{min-width:300px;height:100%;max-height:70%;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:var(--emw--spacing-large, 20px);position:relative;padding:var(--emw--spacing-medium, 15px);min-height:200px;border-radius:var(--mmw--border-radius-large-plus, 10px);background-color:var(--emw--color-white, #fff);max-width:600px}.CloseButton{position:absolute;left:0;top:0;margin:10px;z-index:20}@media(max-width: 475px){#Modal{align-items:start}.ModalContainer{margin-top:50%;max-width:90%}}")}const ye=e=>({}),dt=e=>({});function ht(e){let t,n,i,s,r,c,o,f,l,$,a,g;const m=e[12].content,u=At(m,e,e[11],dt);return{c(){t=v("div"),n=v("div"),i=v("div"),s=ct("svg"),r=ct("path"),c=It(),u&&u.c(),y(r,"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"),y(r,"fill","#111111"),y(s,"xmlns","http://www.w3.org/2000/svg"),y(s,"width","13"),y(s,"height","13"),y(s,"viewBox","0 0 13 13"),y(s,"fill","none"),y(s,"class","CloseButton"),y(i,"class","ModalContainer"),y(i,"style",o=e[3]==="true"?"height: 70%":"height: auto"),y(n,"id","Modal"),S(()=>e[14].call(n))},m(h,_){et(h,t,_),C(t,n),C(n,i),C(i,s),C(s,r),C(i,c),u&&u.m(i,null),e[13](n),f=Ft(n,e[14].bind(n)),e[15](t),$=!0,a||(g=G(s,"click",e[7]),a=!0)},p(h,_){e=h,u&&u.p&&(!$||_&2048)&&zt(u,m,e,e[11],$?Nt(m,e[11],_,ye):Bt(e[11]),dt),(!$||_&8&&o!==(o=e[3]==="true"?"height: 70%":"height: auto"))&&y(i,"style",o)},i(h){$||(B(u,h),h&&S(()=>{$&&(l||(l=ft(n,at,e[4],!0)),l.run(1))}),$=!0)},o(h){Q(u,h),h&&(l||(l=ft(n,at,e[4],!1)),l.run(0)),$=!1},d(h){h&&O(t),u&&u.d(h),e[13](null),f(),h&&l&&l.end(),e[15](null),a=!1,g()}}}function pe(e){let t,n,i=e[2]==="true"&&ht(e);return{c(){i&&i.c(),t=Ut()},m(s,r){i&&i.m(s,r),et(s,t,r),n=!0},p(s,[r]){s[2]==="true"?i?(i.p(s,r),r&4&&B(i,1)):(i=ht(s),i.c(),B(i,1),i.m(t.parentNode,t)):i&&(se(),Q(i,1,1,()=>{i=null}),re())},i(s){n||(B(i),n=!0)},o(s){Q(i),n=!1},d(s){s&&O(t),i&&i.d(s)}}}function we(e,t,n){let{$$slots:i={},$$scope:s}=t,{mbsource:r}=t,{clientstyling:c}=t,{clientstylingurl:o}=t,{show:f}=t,{isvideo:l=""}=t,{duration:$=200}=t,{width:a}=t,{height:g}=t,m,u;const h=()=>{window.postMessage({type:"CloseModal"},window.location.href)};Xt(()=>()=>{});function _(d){F[d?"unshift":"push"](()=>{m=d,n(6,m)})}function x(){a=this.clientWidth,g=this.clientHeight,n(0,a),n(1,g)}function A(d){F[d?"unshift":"push"](()=>{u=d,n(5,u)})}return e.$$set=d=>{"mbsource"in d&&n(8,r=d.mbsource),"clientstyling"in d&&n(9,c=d.clientstyling),"clientstylingurl"in d&&n(10,o=d.clientstylingurl),"show"in d&&n(2,f=d.show),"isvideo"in d&&n(3,l=d.isvideo),"duration"in d&&n(4,$=d.duration),"width"in d&&n(0,a=d.width),"height"in d&&n(1,g=d.height),"$$scope"in d&&n(11,s=d.$$scope)},e.$$.update=()=>{e.$$.dirty&544&&c&&u&&$e(u,c),e.$$.dirty&1056&&o&&u&&_e(u,o),e.$$.dirty&288&&r&&u&&ge(u,`${r}.Style`)},[a,g,f,l,$,u,m,h,r,c,o,s,i,_,x,A]}class xt extends de{constructor(t){super(),fe(this,t,we,pe,jt,{mbsource:8,clientstyling:9,clientstylingurl:10,show:2,isvideo:3,duration:4,width:0,height:1},me)}get mbsource(){return this.$$.ctx[8]}set mbsource(t){this.$$set({mbsource:t}),w()}get clientstyling(){return this.$$.ctx[9]}set clientstyling(t){this.$$set({clientstyling:t}),w()}get clientstylingurl(){return this.$$.ctx[10]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),w()}get show(){return this.$$.ctx[2]}set show(t){this.$$set({show:t}),w()}get isvideo(){return this.$$.ctx[3]}set isvideo(t){this.$$set({isvideo:t}),w()}get duration(){return this.$$.ctx[4]}set duration(t){this.$$set({duration:t}),w()}get width(){return this.$$.ctx[0]}set width(t){this.$$set({width:t}),w()}get height(){return this.$$.ctx[1]}set height(t){this.$$set({height:t}),w()}}ae(xt,{mbsource:{},clientstyling:{},clientstylingurl:{},show:{},isvideo:{},duration:{},width:{},height:{}},["content"],[],!0);exports.default=xt;