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