@everymatrix/cashier-pagination 1.99.57 → 1.99.59

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.
@@ -10,7 +10,7 @@ var J = (e, t, n) => t in e ? gt(e, t, { enumerable: !0, configurable: !0, writa
10
10
  mt.call(t, n) && J(e, n, t[n]);
11
11
  return e;
12
12
  }, tt = (e, t) => bt(e, _t(t));
13
- var k = (e, t, n) => (J(e, typeof t != "symbol" ? t + "" : t, n), n);
13
+ var k = (e, t, n) => J(e, typeof t != "symbol" ? t + "" : t, n);
14
14
  var et = (e, t, n) => new Promise((s, i) => {
15
15
  var o = (u) => {
16
16
  try {
@@ -58,8 +58,7 @@ function kt(e, t, n) {
58
58
  }
59
59
  }
60
60
  function St(e) {
61
- if (!e)
62
- return document;
61
+ if (!e) return document;
63
62
  const t = e.getRootNode ? e.getRootNode() : e.ownerDocument;
64
63
  return t && /** @type {ShadowRoot} */
65
64
  t.host ? (
@@ -126,8 +125,7 @@ function H(e) {
126
125
  V = e;
127
126
  }
128
127
  function Lt() {
129
- if (!V)
130
- throw new Error("Function called outside component initialization");
128
+ if (!V) throw new Error("Function called outside component initialization");
131
129
  return V;
132
130
  }
133
131
  function At(e) {
@@ -158,8 +156,7 @@ function N() {
158
156
  } catch (t) {
159
157
  throw O.length = 0, j = 0, t;
160
158
  }
161
- for (H(null), O.length = 0, j = 0; W.length; )
162
- W.pop()();
159
+ for (H(null), O.length = 0, j = 0; W.length; ) W.pop()();
163
160
  for (let t = 0; t < M.length; t += 1) {
164
161
  const n = M[t];
165
162
  K.has(n) || (K.add(n), n());
@@ -479,8 +476,7 @@ function It(e, t) {
479
476
  }
480
477
  }
481
478
  function zt(e, t) {
482
- if (!e || !t)
483
- return;
479
+ if (!e || !t) return;
484
480
  const n = new URL(t);
485
481
  fetch(n.href).then((s) => s.text()).then((s) => {
486
482
  const i = document.createElement("style");
@@ -490,8 +486,7 @@ function zt(e, t) {
490
486
  });
491
487
  }
492
488
  function Gt(e, t, n, s = !1) {
493
- if (!window.emMessageBus)
494
- return;
489
+ if (!window.emMessageBus) return;
495
490
  if (!("adoptedStyleSheets" in Document.prototype) || !s)
496
491
  return n = Jt(e, t), n;
497
492
  window[B] || (window[B] = {}), n = Kt(e, t);
@@ -512,8 +507,7 @@ function Jt(e, t) {
512
507
  }
513
508
  function Kt(e, t) {
514
509
  return window.emMessageBus.subscribe(t, (n) => {
515
- if (!e)
516
- return;
510
+ if (!e) return;
517
511
  const s = e.getRootNode(), i = window[B];
518
512
  let o = i[t] && i[t].sheet;
519
513
  o ? i[t].refCount = i[t].refCount + 1 : (o = new CSSStyleSheet(), o.replaceSync(n), i[t] = {
@@ -705,8 +699,7 @@ function Yt(e) {
705
699
  function ft(e, t) {
706
700
  const s = [];
707
701
  if (t <= 5) {
708
- for (let r = 1; r <= t; r++)
709
- s.push(r);
702
+ for (let r = 1; r <= t; r++) s.push(r);
710
703
  return s;
711
704
  }
712
705
  let i = e - 1, o = e + 1;
@@ -29,8 +29,7 @@ function dt(t, e, n) {
29
29
  }
30
30
  }
31
31
  function at(t) {
32
- if (!t)
33
- return document;
32
+ if (!t) return document;
34
33
  const e = t.getRootNode ? t.getRootNode() : t.ownerDocument;
35
34
  return e && /** @type {ShadowRoot} */
36
35
  e.host ? (
@@ -97,8 +96,7 @@ function P(t) {
97
96
  U = t;
98
97
  }
99
98
  function bt() {
100
- if (!U)
101
- throw new Error("Function called outside component initialization");
99
+ if (!U) throw new Error("Function called outside component initialization");
102
100
  return U;
103
101
  }
104
102
  function pt(t) {
@@ -129,8 +127,7 @@ function B() {
129
127
  } catch (e) {
130
128
  throw j.length = 0, A = 0, e;
131
129
  }
132
- for (P(null), j.length = 0, A = 0; J.length; )
133
- J.pop()();
130
+ for (P(null), j.length = 0, A = 0; J.length; ) J.pop()();
134
131
  for (let e = 0; e < N.length; e += 1) {
135
132
  const n = N[e];
136
133
  G.has(n) || (G.add(n), n());
@@ -442,8 +439,7 @@ function Bt(t, e) {
442
439
  }
443
440
  }
444
441
  function Nt(t, e) {
445
- if (!t || !e)
446
- return;
442
+ if (!t || !e) return;
447
443
  const n = new URL(e);
448
444
  fetch(n.href).then((i) => i.text()).then((i) => {
449
445
  const s = document.createElement("style");
@@ -453,8 +449,7 @@ function Nt(t, e) {
453
449
  });
454
450
  }
455
451
  function Mt(t, e, n, i = !1) {
456
- if (!window.emMessageBus)
457
- return;
452
+ if (!window.emMessageBus) return;
458
453
  if (!("adoptedStyleSheets" in Document.prototype) || !i)
459
454
  return n = Tt(t, e), n;
460
455
  window[O] || (window[O] = {}), n = Rt(t, e);
@@ -475,8 +470,7 @@ function Tt(t, e) {
475
470
  }
476
471
  function Rt(t, e) {
477
472
  return window.emMessageBus.subscribe(e, (n) => {
478
- if (!t)
479
- return;
473
+ if (!t) return;
480
474
  const i = t.getRootNode(), s = window[O];
481
475
  let o = s[e] && s[e].sheet;
482
476
  o ? s[e].refCount = s[e].refCount + 1 : (o = new CSSStyleSheet(), o.replaceSync(n), s[e] = {
@@ -668,8 +662,7 @@ function Ht(t) {
668
662
  function it(t, e) {
669
663
  const i = [];
670
664
  if (e <= 5) {
671
- for (let r = 1; r <= e; r++)
672
- i.push(r);
665
+ for (let r = 1; r <= e; r++) i.push(r);
673
666
  return i;
674
667
  }
675
668
  let s = t - 1, o = t + 1;
@@ -0,0 +1,3 @@
1
+ "use strict";var bt=Object.defineProperty,_t=Object.defineProperties;var pt=Object.getOwnPropertyDescriptors;var X=Object.getOwnPropertySymbols;var mt=Object.prototype.hasOwnProperty,wt=Object.prototype.propertyIsEnumerable;var J=(e,t,n)=>t in e?bt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Z=(e,t)=>{for(var n in t||(t={}))mt.call(t,n)&&J(e,n,t[n]);if(X)for(var n of X(t))wt.call(t,n)&&J(e,n,t[n]);return e},tt=(e,t)=>_t(e,pt(t));var k=(e,t,n)=>J(e,typeof t!="symbol"?t+"":t,n);var et=(e,t,n)=>new Promise((s,i)=>{var o=u=>{try{l(n.next(u))}catch(c){i(c)}},r=u=>{try{l(n.throw(u))}catch(c){i(c)}},l=u=>u.done?s(u.value):Promise.resolve(u.value).then(o,r);l((n=n.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function T(){}function dt(e){return e()}function nt(){return Object.create(null)}function D(e){e.forEach(dt)}function ht(e){return typeof e=="function"}function yt(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function kt(e){return Object.keys(e).length===0}function m(e,t){e.appendChild(t)}function St(e,t,n){const s=vt(e);if(!s.getElementById(t)){const i=v("style");i.id=t,i.textContent=n,Et(s,i)}}function vt(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function Et(e,t){return m(e.head||e,t),t.sheet}function L(e,t,n){e.insertBefore(t,n||null)}function C(e){e.parentNode&&e.parentNode.removeChild(e)}function Ct(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function v(e){return document.createElement(e)}function I(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function F(e){return document.createTextNode(e)}function z(){return F(" ")}function U(e,t,n,s){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n,s)}function d(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function Lt(e){return Array.from(e.childNodes)}function at(e,t){t=""+t,e.data!==t&&(e.data=t)}function st(e,t,n){e.classList.toggle(t,!!n)}function xt(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}let V;function H(e){V=e}function At(){if(!V)throw new Error("Function called outside component initialization");return V}function jt(e){At().$$.on_mount.push(e)}const O=[],W=[];let M=[];const it=[],Ot=Promise.resolve();let Y=!1;function Bt(){Y||(Y=!0,Ot.then(N))}function q(e){M.push(e)}const K=new Set;let j=0;function N(){if(j!==0)return;const e=V;do{try{for(;j<O.length;){const t=O[j];j++,H(t),Nt(t.$$)}}catch(t){throw O.length=0,j=0,t}for(H(null),O.length=0,j=0;W.length;)W.pop()();for(let t=0;t<M.length;t+=1){const n=M[t];K.has(n)||(K.add(n),n())}M.length=0}while(O.length);for(;it.length;)it.pop()();Y=!1,K.clear(),H(e)}function Nt(e){if(e.fragment!==null){e.update(),D(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(q)}}function Mt(e){const t=[],n=[];M.forEach(s=>e.indexOf(s)===-1?t.push(s):n.push(s)),n.forEach(s=>s()),M=t}const Tt=new Set;function Pt(e,t){e&&e.i&&(Tt.delete(e),e.i(t))}function ot(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function Rt(e,t,n){const{fragment:s,after_update:i}=e.$$;s&&s.m(t,n),q(()=>{const o=e.$$.on_mount.map(dt).filter(ht);e.$$.on_destroy?e.$$.on_destroy.push(...o):D(o),e.$$.on_mount=[]}),i.forEach(q)}function Ht(e,t){const n=e.$$;n.fragment!==null&&(Mt(n.after_update),D(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Ft(e,t){e.$$.dirty[0]===-1&&(O.push(e),Bt(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Ut(e,t,n,s,i,o,r=null,l=[-1]){const u=V;H(e);const c=e.$$={fragment:null,ctx:[],props:o,update:T,not_equal:i,bound:nt(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:nt(),dirty:l,skip_bound:!1,root:t.target||u.$$.root};r&&r(c.root);let w=!1;if(c.ctx=n?n(e,t.props||{},(a,E,...y)=>{const $=y.length?y[0]:E;return c.ctx&&i(c.ctx[a],c.ctx[a]=$)&&(!c.skip_bound&&c.bound[a]&&c.bound[a]($),w&&Ft(e,a)),E}):[],c.update(),w=!0,D(c.before_update),c.fragment=s?s(c.ctx):!1,t.target){if(t.hydrate){const a=Lt(t.target);c.fragment&&c.fragment.l(a),a.forEach(C)}else c.fragment&&c.fragment.c();t.intro&&Pt(e.$$.fragment),Rt(e,t.target,t.anchor),N()}H(u)}let $t;typeof HTMLElement=="function"&&($t=class extends HTMLElement{constructor(t,n,s){super();k(this,"$$ctor");k(this,"$$s");k(this,"$$c");k(this,"$$cn",!1);k(this,"$$d",{});k(this,"$$r",!1);k(this,"$$p_d",{});k(this,"$$l",{});k(this,"$$l_u",new Map);this.$$ctor=t,this.$$s=n,s&&this.attachShadow({mode:"open"})}addEventListener(t,n,s){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(n),this.$$c){const i=this.$$c.$on(t,n);this.$$l_u.set(n,i)}super.addEventListener(t,n,s)}removeEventListener(t,n,s){if(super.removeEventListener(t,n,s),this.$$c){const i=this.$$l_u.get(n);i&&(i(),this.$$l_u.delete(n))}}connectedCallback(){return et(this,null,function*(){if(this.$$cn=!0,!this.$$c){let t=function(o){return()=>{let r;return{c:function(){r=v("slot"),o!=="default"&&d(r,"name",o)},m:function(c,w){L(c,r,w)},d:function(c){c&&C(r)}}}};if(yield Promise.resolve(),!this.$$cn||this.$$c)return;const n={},s=xt(this);for(const o of this.$$s)o in s&&(n[o]=[t(o)]);for(const o of this.attributes){const r=this.$$g_p(o.name);r in this.$$d||(this.$$d[r]=G(r,o.value,this.$$p_d,"toProp"))}for(const o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:tt(Z({},this.$$d),{$$slots:n,$$scope:{ctx:[]}})});const i=()=>{this.$$r=!0;for(const o in this.$$p_d)if(this.$$d[o]=this.$$c.$$.ctx[this.$$c.$$.props[o]],this.$$p_d[o].reflect){const r=G(o,this.$$d[o],this.$$p_d,"toAttribute");r==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,r)}this.$$r=!1};this.$$c.$$.after_update.push(i),i();for(const o in this.$$l)for(const r of this.$$l[o]){const l=this.$$c.$on(o,r);this.$$l_u.set(r,l)}this.$$l={}}})}attributeChangedCallback(t,n,s){var i;this.$$r||(t=this.$$g_p(t),this.$$d[t]=G(t,s,this.$$p_d,"toProp"),(i=this.$$c)==null||i.$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 G(e,t,n,s){var o;const i=(o=n[e])==null?void 0:o.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!s||!n[e])return t;if(s==="toAttribute")switch(i){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(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Vt(e,t,n,s,i,o){let r=class extends $t{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return Object.keys(t).map(l=>(t[l].attribute||l).toLowerCase())}};return Object.keys(t).forEach(l=>{Object.defineProperty(r.prototype,l,{get(){return this.$$c&&l in this.$$c?this.$$c[l]:this.$$d[l]},set(u){var c;u=G(l,u,t),this.$$d[l]=u,(c=this.$$c)==null||c.$set({[l]:u})}})}),s.forEach(l=>{Object.defineProperty(r.prototype,l,{get(){var u;return(u=this.$$c)==null?void 0:u[l]}})}),e.element=r,r}class Dt{constructor(){k(this,"$$");k(this,"$$set")}$destroy(){Ht(this,1),this.$destroy=T}$on(t,n){if(!ht(n))return T;const s=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return s.push(n),()=>{const i=s.indexOf(n);i!==-1&&s.splice(i,1)}}$set(t){this.$$set&&!kt(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const It="4";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(It);const B="__WIDGET_GLOBAL_STYLE_CACHE__";function zt(e,t){if(e){const n=document.createElement("style");n.innerHTML=t,e.appendChild(n)}}function Gt(e,t){if(!e||!t)return;const n=new URL(t);fetch(n.href).then(s=>s.text()).then(s=>{const i=document.createElement("style");i.innerHTML=s,e&&e.appendChild(i)}).catch(s=>{console.error("There was an error while trying to load client styling from URL",s)})}function Jt(e,t,n,s=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!s)return n=Kt(e,t),n;window[B]||(window[B]={}),n=Wt(e,t);const o=n.unsubscribe.bind(n),r=()=>{if(window[B][t]){const l=window[B][t];l.refCount>1?l.refCount=l.refCount-1:delete window[B][t]}o()};return n.unsubscribe=r,n}function Kt(e,t){const n=document.createElement("style");return window.emMessageBus.subscribe(t,s=>{e&&(n.innerHTML=s,e.appendChild(n))})}function Wt(e,t){return window.emMessageBus.subscribe(t,n=>{if(!e)return;const s=e.getRootNode(),i=window[B];let o=i[t]&&i[t].sheet;o?i[t].refCount=i[t].refCount+1:(o=new CSSStyleSheet,o.replaceSync(n),i[t]={sheet:o,refCount:1});const r=s.adoptedStyleSheets||[];r.includes(o)||(s.adoptedStyleSheets=[...r,o])})}function Yt(e){St(e,"svelte-1rkxa9f","*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:inherit}.pagination{display:flex;gap:4px;align-items:center;justify-content:center;flex-wrap:wrap}button{padding:6px;border:1px solid var(--emw--color-grey-10, #F8F8F8);background:transparent;cursor:pointer;border-radius:4px;color:var(--emw--color-grey-10, #111);min-width:30px}button:hover:not(:disabled):not(.selected){border-color:var(--emw--color-grey-105, #E8E9EB)}button:disabled{color:var(--emw--color-grey-105, #E8E9EB);cursor:not-allowed}.nav-btn{display:flex;align-items:center;gap:4px;font-weight:var(--emw--font-weight-bold, 700);color:var(--emw--color-primary, #4A975C);height:30px;width:30px}.selected{color:var(--emw--color-primary, #4A975C);font-weight:var(--emw--font-weight-bold, 700);border-color:var(--emw--color-primary, #4A975C)}")}function rt(e,t,n){const s=e.slice();return s[15]=t[n],s}function lt(e){let t,n,s,i;return{c(){t=v("button"),t.textContent="1",n=F(`
2
+ ...`)},m(o,r){L(o,t,r),L(o,n,r),s||(i=U(t,"click",e[9]),s=!0)},p:T,d(o){o&&(C(t),C(n)),s=!1,i()}}}function ct(e){let t,n=e[15]+"",s,i,o;function r(){return e[10](e[15])}return{c(){t=v("button"),s=F(n),st(t,"selected",e[15]===e[2])},m(l,u){L(l,t,u),m(t,s),i||(o=U(t,"click",r),i=!0)},p(l,u){e=l,u&8&&n!==(n=e[15]+"")&&at(s,n),u&12&&st(t,"selected",e[15]===e[2])},d(l){l&&C(t),i=!1,o()}}}function ut(e){let t,n,s,i,o;return{c(){t=F(`...
3
+ `),n=v("button"),s=F(e[0])},m(r,l){L(r,t,l),L(r,n,l),m(n,s),i||(o=U(n,"click",e[11]),i=!0)},p(r,l){l&1&&at(s,r[0])},d(r){r&&(C(t),C(n)),i=!1,o()}}}function qt(e){let t,n,s,i,o,r,l,u=!e[3].includes(1),c,w,a=!e[3].includes(+e[0]),E,y,$,P,x,R,h,b=u&&lt(e),A=ot(e[3]),_=[];for(let f=0;f<A.length;f+=1)_[f]=ct(rt(e,A,f));let p=a&&ut(e);return{c(){t=v("div"),n=v("nav"),s=v("button"),i=I("svg"),o=I("polyline"),l=z(),b&&b.c(),c=z();for(let f=0;f<_.length;f+=1)_[f].c();w=z(),p&&p.c(),E=z(),y=v("button"),$=I("svg"),P=I("polyline"),d(o,"points","15 18 9 12 15 6"),d(i,"xmlns","http://www.w3.org/2000/svg"),d(i,"width","24"),d(i,"height","24"),d(i,"viewBox","0 0 24 24"),d(i,"fill","none"),d(i,"stroke","currentColor"),d(i,"stroke-width","2"),d(i,"stroke-linecap","round"),d(i,"stroke-linejoin","round"),d(i,"class","feather feather-chevron-left"),d(s,"class","nav-btn"),s.disabled=r=e[2]===1,d(P,"points","9 18 15 12 9 6"),d($,"xmlns","http://www.w3.org/2000/svg"),d($,"width","24"),d($,"height","24"),d($,"viewBox","0 0 24 24"),d($,"fill","none"),d($,"stroke","currentColor"),d($,"stroke-width","2"),d($,"stroke-linecap","round"),d($,"stroke-linejoin","round"),d($,"class","feather feather-chevron-right"),d(y,"class","nav-btn"),y.disabled=x=e[2]===e[0],d(n,"class","pagination")},m(f,S){L(f,t,S),m(t,n),m(n,s),m(s,i),m(i,o),m(n,l),b&&b.m(n,null),m(n,c);for(let g=0;g<_.length;g+=1)_[g]&&_[g].m(n,null);m(n,w),p&&p.m(n,null),m(n,E),m(n,y),m(y,$),m($,P),e[13](t),R||(h=[U(s,"click",e[8]),U(y,"click",e[12])],R=!0)},p(f,[S]){if(S&4&&r!==(r=f[2]===1)&&(s.disabled=r),S&8&&(u=!f[3].includes(1)),u?b?b.p(f,S):(b=lt(f),b.c(),b.m(n,c)):b&&(b.d(1),b=null),S&28){A=ot(f[3]);let g;for(g=0;g<A.length;g+=1){const Q=rt(f,A,g);_[g]?_[g].p(Q,S):(_[g]=ct(Q),_[g].c(),_[g].m(n,w))}for(;g<_.length;g+=1)_[g].d(1);_.length=A.length}S&9&&(a=!f[3].includes(+f[0])),a?p?p.p(f,S):(p=ut(f),p.c(),p.m(n,E)):p&&(p.d(1),p=null),S&5&&x!==(x=f[2]===f[0])&&(y.disabled=x)},i:T,o:T,d(f){f&&C(t),b&&b.d(),Ct(_,f),p&&p.d(),e[13](null),R=!1,D(h)}}}function ft(e,t){const s=[];if(t<=5){for(let r=1;r<=t;r++)s.push(r);return s}let i=e-1,o=e+1;i<1&&(o+=1-i,i=1),o>t&&(i-=o-t,o=t),i=Math.max(1,i);for(let r=i;r<=o;r++)s.push(r);return s}function Qt(e,t,n){let{clientstyling:s=""}=t,{clientstylingurl:i=""}=t,{mbsource:o}=t,{totalpages:r=5}=t,l,u,c=1,w;w=ft(c,r),jt(()=>()=>{});function a(h){if(h>=1&&h<=r){n(2,c=h);const b=new CustomEvent("pageChange",{detail:{page:h},bubbles:!0,composed:!0});document.dispatchEvent(b)}}const E=()=>a(c-1),y=()=>a(1),$=h=>a(h),P=()=>a(+r),x=()=>a(c+1);function R(h){W[h?"unshift":"push"](()=>{l=h,n(1,l)})}return e.$$set=h=>{"clientstyling"in h&&n(5,s=h.clientstyling),"clientstylingurl"in h&&n(6,i=h.clientstylingurl),"mbsource"in h&&n(7,o=h.mbsource),"totalpages"in h&&n(0,r=h.totalpages)},e.$$.update=()=>{e.$$.dirty&5&&n(3,w=ft(c,r)),e.$$.dirty&34&&s&&l&&zt(l,s),e.$$.dirty&66&&i&&l&&Gt(l,i),e.$$.dirty&130&&o&&l&&Jt(l,`${o}.Style`,u)},[r,l,c,w,a,s,i,o,E,y,$,P,x,R]}class gt extends Dt{constructor(t){super(),Ut(this,t,Qt,qt,yt,{clientstyling:5,clientstylingurl:6,mbsource:7,totalpages:0},Yt)}get clientstyling(){return this.$$.ctx[5]}set clientstyling(t){this.$$set({clientstyling:t}),N()}get clientstylingurl(){return this.$$.ctx[6]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),N()}get mbsource(){return this.$$.ctx[7]}set mbsource(t){this.$$set({mbsource:t}),N()}get totalpages(){return this.$$.ctx[0]}set totalpages(t){this.$$set({totalpages:t}),N()}}Vt(gt,{clientstyling:{},clientstylingurl:{},mbsource:{},totalpages:{}},[],[],!0);exports.default=gt;
@@ -1 +1 @@
1
- "use strict";if(typeof window!="undefined"){let n=function(t){return function(...s){try{return t.apply(this,s)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>require("../components/CashierPagination-x4iM3x4_.cjs")).then(({default:t})=>{!customElements.get("cashier-pagination")&&customElements.define("cashier-pagination",t.element)})}
1
+ "use strict";if(typeof window!="undefined"){let n=function(t){return function(...s){try{return t.apply(this,s)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>require("../components/CashierPagination-Ct3-liov.cjs")).then(({default:t})=>{!customElements.get("cashier-pagination")&&customElements.define("cashier-pagination",t.element)})}
@@ -10,7 +10,7 @@ if (typeof window != "undefined") {
10
10
  }
11
11
  };
12
12
  };
13
- customElements.define = n(customElements.define), import("../components/CashierPagination-MNB6Miym.js").then(({ default: t }) => {
13
+ customElements.define = n(customElements.define), import("../components/CashierPagination-BLL5xL-R.js").then(({ default: t }) => {
14
14
  !customElements.get("cashier-pagination") && customElements.define("cashier-pagination", t.element);
15
15
  });
16
16
  }
@@ -1,4 +1,4 @@
1
- import { C as s } from "../components/CashierPagination-DxJfBGea.js";
1
+ import { C as s } from "../components/CashierPagination-BQFNhlra.js";
2
2
  function i(t) {
3
3
  return function(...n) {
4
4
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/cashier-pagination",
3
- "version": "1.99.57",
3
+ "version": "1.99.59",
4
4
  "type": "module",
5
5
  "main": "esnext/cashier-pagination.js",
6
6
  "module": "esnext/cashier-pagination.js",
@@ -1,3 +0,0 @@
1
- "use strict";var bt=Object.defineProperty,_t=Object.defineProperties;var pt=Object.getOwnPropertyDescriptors;var X=Object.getOwnPropertySymbols;var mt=Object.prototype.hasOwnProperty,wt=Object.prototype.propertyIsEnumerable;var J=(e,t,n)=>t in e?bt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Z=(e,t)=>{for(var n in t||(t={}))mt.call(t,n)&&J(e,n,t[n]);if(X)for(var n of X(t))wt.call(t,n)&&J(e,n,t[n]);return e},tt=(e,t)=>_t(e,pt(t));var k=(e,t,n)=>(J(e,typeof t!="symbol"?t+"":t,n),n);var et=(e,t,n)=>new Promise((s,i)=>{var o=u=>{try{l(n.next(u))}catch(c){i(c)}},r=u=>{try{l(n.throw(u))}catch(c){i(c)}},l=u=>u.done?s(u.value):Promise.resolve(u.value).then(o,r);l((n=n.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function T(){}function dt(e){return e()}function nt(){return Object.create(null)}function D(e){e.forEach(dt)}function ht(e){return typeof e=="function"}function yt(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function kt(e){return Object.keys(e).length===0}function m(e,t){e.appendChild(t)}function St(e,t,n){const s=vt(e);if(!s.getElementById(t)){const i=v("style");i.id=t,i.textContent=n,Et(s,i)}}function vt(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function Et(e,t){return m(e.head||e,t),t.sheet}function L(e,t,n){e.insertBefore(t,n||null)}function C(e){e.parentNode&&e.parentNode.removeChild(e)}function Ct(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function v(e){return document.createElement(e)}function I(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function F(e){return document.createTextNode(e)}function z(){return F(" ")}function U(e,t,n,s){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n,s)}function d(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function Lt(e){return Array.from(e.childNodes)}function at(e,t){t=""+t,e.data!==t&&(e.data=t)}function st(e,t,n){e.classList.toggle(t,!!n)}function xt(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}let V;function H(e){V=e}function At(){if(!V)throw new Error("Function called outside component initialization");return V}function jt(e){At().$$.on_mount.push(e)}const O=[],W=[];let M=[];const it=[],Ot=Promise.resolve();let Y=!1;function Bt(){Y||(Y=!0,Ot.then(N))}function q(e){M.push(e)}const K=new Set;let j=0;function N(){if(j!==0)return;const e=V;do{try{for(;j<O.length;){const t=O[j];j++,H(t),Nt(t.$$)}}catch(t){throw O.length=0,j=0,t}for(H(null),O.length=0,j=0;W.length;)W.pop()();for(let t=0;t<M.length;t+=1){const n=M[t];K.has(n)||(K.add(n),n())}M.length=0}while(O.length);for(;it.length;)it.pop()();Y=!1,K.clear(),H(e)}function Nt(e){if(e.fragment!==null){e.update(),D(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(q)}}function Mt(e){const t=[],n=[];M.forEach(s=>e.indexOf(s)===-1?t.push(s):n.push(s)),n.forEach(s=>s()),M=t}const Tt=new Set;function Pt(e,t){e&&e.i&&(Tt.delete(e),e.i(t))}function ot(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function Rt(e,t,n){const{fragment:s,after_update:i}=e.$$;s&&s.m(t,n),q(()=>{const o=e.$$.on_mount.map(dt).filter(ht);e.$$.on_destroy?e.$$.on_destroy.push(...o):D(o),e.$$.on_mount=[]}),i.forEach(q)}function Ht(e,t){const n=e.$$;n.fragment!==null&&(Mt(n.after_update),D(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Ft(e,t){e.$$.dirty[0]===-1&&(O.push(e),Bt(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Ut(e,t,n,s,i,o,r=null,l=[-1]){const u=V;H(e);const c=e.$$={fragment:null,ctx:[],props:o,update:T,not_equal:i,bound:nt(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:nt(),dirty:l,skip_bound:!1,root:t.target||u.$$.root};r&&r(c.root);let w=!1;if(c.ctx=n?n(e,t.props||{},(a,E,...y)=>{const $=y.length?y[0]:E;return c.ctx&&i(c.ctx[a],c.ctx[a]=$)&&(!c.skip_bound&&c.bound[a]&&c.bound[a]($),w&&Ft(e,a)),E}):[],c.update(),w=!0,D(c.before_update),c.fragment=s?s(c.ctx):!1,t.target){if(t.hydrate){const a=Lt(t.target);c.fragment&&c.fragment.l(a),a.forEach(C)}else c.fragment&&c.fragment.c();t.intro&&Pt(e.$$.fragment),Rt(e,t.target,t.anchor),N()}H(u)}let $t;typeof HTMLElement=="function"&&($t=class extends HTMLElement{constructor(t,n,s){super();k(this,"$$ctor");k(this,"$$s");k(this,"$$c");k(this,"$$cn",!1);k(this,"$$d",{});k(this,"$$r",!1);k(this,"$$p_d",{});k(this,"$$l",{});k(this,"$$l_u",new Map);this.$$ctor=t,this.$$s=n,s&&this.attachShadow({mode:"open"})}addEventListener(t,n,s){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(n),this.$$c){const i=this.$$c.$on(t,n);this.$$l_u.set(n,i)}super.addEventListener(t,n,s)}removeEventListener(t,n,s){if(super.removeEventListener(t,n,s),this.$$c){const i=this.$$l_u.get(n);i&&(i(),this.$$l_u.delete(n))}}connectedCallback(){return et(this,null,function*(){if(this.$$cn=!0,!this.$$c){let t=function(o){return()=>{let r;return{c:function(){r=v("slot"),o!=="default"&&d(r,"name",o)},m:function(c,w){L(c,r,w)},d:function(c){c&&C(r)}}}};if(yield Promise.resolve(),!this.$$cn||this.$$c)return;const n={},s=xt(this);for(const o of this.$$s)o in s&&(n[o]=[t(o)]);for(const o of this.attributes){const r=this.$$g_p(o.name);r in this.$$d||(this.$$d[r]=G(r,o.value,this.$$p_d,"toProp"))}for(const o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:tt(Z({},this.$$d),{$$slots:n,$$scope:{ctx:[]}})});const i=()=>{this.$$r=!0;for(const o in this.$$p_d)if(this.$$d[o]=this.$$c.$$.ctx[this.$$c.$$.props[o]],this.$$p_d[o].reflect){const r=G(o,this.$$d[o],this.$$p_d,"toAttribute");r==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,r)}this.$$r=!1};this.$$c.$$.after_update.push(i),i();for(const o in this.$$l)for(const r of this.$$l[o]){const l=this.$$c.$on(o,r);this.$$l_u.set(r,l)}this.$$l={}}})}attributeChangedCallback(t,n,s){var i;this.$$r||(t=this.$$g_p(t),this.$$d[t]=G(t,s,this.$$p_d,"toProp"),(i=this.$$c)==null||i.$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 G(e,t,n,s){var o;const i=(o=n[e])==null?void 0:o.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!s||!n[e])return t;if(s==="toAttribute")switch(i){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(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Vt(e,t,n,s,i,o){let r=class extends $t{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return Object.keys(t).map(l=>(t[l].attribute||l).toLowerCase())}};return Object.keys(t).forEach(l=>{Object.defineProperty(r.prototype,l,{get(){return this.$$c&&l in this.$$c?this.$$c[l]:this.$$d[l]},set(u){var c;u=G(l,u,t),this.$$d[l]=u,(c=this.$$c)==null||c.$set({[l]:u})}})}),s.forEach(l=>{Object.defineProperty(r.prototype,l,{get(){var u;return(u=this.$$c)==null?void 0:u[l]}})}),e.element=r,r}class Dt{constructor(){k(this,"$$");k(this,"$$set")}$destroy(){Ht(this,1),this.$destroy=T}$on(t,n){if(!ht(n))return T;const s=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return s.push(n),()=>{const i=s.indexOf(n);i!==-1&&s.splice(i,1)}}$set(t){this.$$set&&!kt(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const It="4";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(It);const B="__WIDGET_GLOBAL_STYLE_CACHE__";function zt(e,t){if(e){const n=document.createElement("style");n.innerHTML=t,e.appendChild(n)}}function Gt(e,t){if(!e||!t)return;const n=new URL(t);fetch(n.href).then(s=>s.text()).then(s=>{const i=document.createElement("style");i.innerHTML=s,e&&e.appendChild(i)}).catch(s=>{console.error("There was an error while trying to load client styling from URL",s)})}function Jt(e,t,n,s=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!s)return n=Kt(e,t),n;window[B]||(window[B]={}),n=Wt(e,t);const o=n.unsubscribe.bind(n),r=()=>{if(window[B][t]){const l=window[B][t];l.refCount>1?l.refCount=l.refCount-1:delete window[B][t]}o()};return n.unsubscribe=r,n}function Kt(e,t){const n=document.createElement("style");return window.emMessageBus.subscribe(t,s=>{e&&(n.innerHTML=s,e.appendChild(n))})}function Wt(e,t){return window.emMessageBus.subscribe(t,n=>{if(!e)return;const s=e.getRootNode(),i=window[B];let o=i[t]&&i[t].sheet;o?i[t].refCount=i[t].refCount+1:(o=new CSSStyleSheet,o.replaceSync(n),i[t]={sheet:o,refCount:1});const r=s.adoptedStyleSheets||[];r.includes(o)||(s.adoptedStyleSheets=[...r,o])})}function Yt(e){St(e,"svelte-1rkxa9f","*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:inherit}.pagination{display:flex;gap:4px;align-items:center;justify-content:center;flex-wrap:wrap}button{padding:6px;border:1px solid var(--emw--color-grey-10, #F8F8F8);background:transparent;cursor:pointer;border-radius:4px;color:var(--emw--color-grey-10, #111);min-width:30px}button:hover:not(:disabled):not(.selected){border-color:var(--emw--color-grey-105, #E8E9EB)}button:disabled{color:var(--emw--color-grey-105, #E8E9EB);cursor:not-allowed}.nav-btn{display:flex;align-items:center;gap:4px;font-weight:var(--emw--font-weight-bold, 700);color:var(--emw--color-primary, #4A975C);height:30px;width:30px}.selected{color:var(--emw--color-primary, #4A975C);font-weight:var(--emw--font-weight-bold, 700);border-color:var(--emw--color-primary, #4A975C)}")}function rt(e,t,n){const s=e.slice();return s[15]=t[n],s}function lt(e){let t,n,s,i;return{c(){t=v("button"),t.textContent="1",n=F(`
2
- ...`)},m(o,r){L(o,t,r),L(o,n,r),s||(i=U(t,"click",e[9]),s=!0)},p:T,d(o){o&&(C(t),C(n)),s=!1,i()}}}function ct(e){let t,n=e[15]+"",s,i,o;function r(){return e[10](e[15])}return{c(){t=v("button"),s=F(n),st(t,"selected",e[15]===e[2])},m(l,u){L(l,t,u),m(t,s),i||(o=U(t,"click",r),i=!0)},p(l,u){e=l,u&8&&n!==(n=e[15]+"")&&at(s,n),u&12&&st(t,"selected",e[15]===e[2])},d(l){l&&C(t),i=!1,o()}}}function ut(e){let t,n,s,i,o;return{c(){t=F(`...
3
- `),n=v("button"),s=F(e[0])},m(r,l){L(r,t,l),L(r,n,l),m(n,s),i||(o=U(n,"click",e[11]),i=!0)},p(r,l){l&1&&at(s,r[0])},d(r){r&&(C(t),C(n)),i=!1,o()}}}function qt(e){let t,n,s,i,o,r,l,u=!e[3].includes(1),c,w,a=!e[3].includes(+e[0]),E,y,$,P,x,R,h,b=u&&lt(e),A=ot(e[3]),_=[];for(let f=0;f<A.length;f+=1)_[f]=ct(rt(e,A,f));let p=a&&ut(e);return{c(){t=v("div"),n=v("nav"),s=v("button"),i=I("svg"),o=I("polyline"),l=z(),b&&b.c(),c=z();for(let f=0;f<_.length;f+=1)_[f].c();w=z(),p&&p.c(),E=z(),y=v("button"),$=I("svg"),P=I("polyline"),d(o,"points","15 18 9 12 15 6"),d(i,"xmlns","http://www.w3.org/2000/svg"),d(i,"width","24"),d(i,"height","24"),d(i,"viewBox","0 0 24 24"),d(i,"fill","none"),d(i,"stroke","currentColor"),d(i,"stroke-width","2"),d(i,"stroke-linecap","round"),d(i,"stroke-linejoin","round"),d(i,"class","feather feather-chevron-left"),d(s,"class","nav-btn"),s.disabled=r=e[2]===1,d(P,"points","9 18 15 12 9 6"),d($,"xmlns","http://www.w3.org/2000/svg"),d($,"width","24"),d($,"height","24"),d($,"viewBox","0 0 24 24"),d($,"fill","none"),d($,"stroke","currentColor"),d($,"stroke-width","2"),d($,"stroke-linecap","round"),d($,"stroke-linejoin","round"),d($,"class","feather feather-chevron-right"),d(y,"class","nav-btn"),y.disabled=x=e[2]===e[0],d(n,"class","pagination")},m(f,S){L(f,t,S),m(t,n),m(n,s),m(s,i),m(i,o),m(n,l),b&&b.m(n,null),m(n,c);for(let g=0;g<_.length;g+=1)_[g]&&_[g].m(n,null);m(n,w),p&&p.m(n,null),m(n,E),m(n,y),m(y,$),m($,P),e[13](t),R||(h=[U(s,"click",e[8]),U(y,"click",e[12])],R=!0)},p(f,[S]){if(S&4&&r!==(r=f[2]===1)&&(s.disabled=r),S&8&&(u=!f[3].includes(1)),u?b?b.p(f,S):(b=lt(f),b.c(),b.m(n,c)):b&&(b.d(1),b=null),S&28){A=ot(f[3]);let g;for(g=0;g<A.length;g+=1){const Q=rt(f,A,g);_[g]?_[g].p(Q,S):(_[g]=ct(Q),_[g].c(),_[g].m(n,w))}for(;g<_.length;g+=1)_[g].d(1);_.length=A.length}S&9&&(a=!f[3].includes(+f[0])),a?p?p.p(f,S):(p=ut(f),p.c(),p.m(n,E)):p&&(p.d(1),p=null),S&5&&x!==(x=f[2]===f[0])&&(y.disabled=x)},i:T,o:T,d(f){f&&C(t),b&&b.d(),Ct(_,f),p&&p.d(),e[13](null),R=!1,D(h)}}}function ft(e,t){const s=[];if(t<=5){for(let r=1;r<=t;r++)s.push(r);return s}let i=e-1,o=e+1;i<1&&(o+=1-i,i=1),o>t&&(i-=o-t,o=t),i=Math.max(1,i);for(let r=i;r<=o;r++)s.push(r);return s}function Qt(e,t,n){let{clientstyling:s=""}=t,{clientstylingurl:i=""}=t,{mbsource:o}=t,{totalpages:r=5}=t,l,u,c=1,w;w=ft(c,r),jt(()=>()=>{});function a(h){if(h>=1&&h<=r){n(2,c=h);const b=new CustomEvent("pageChange",{detail:{page:h},bubbles:!0,composed:!0});document.dispatchEvent(b)}}const E=()=>a(c-1),y=()=>a(1),$=h=>a(h),P=()=>a(+r),x=()=>a(c+1);function R(h){W[h?"unshift":"push"](()=>{l=h,n(1,l)})}return e.$$set=h=>{"clientstyling"in h&&n(5,s=h.clientstyling),"clientstylingurl"in h&&n(6,i=h.clientstylingurl),"mbsource"in h&&n(7,o=h.mbsource),"totalpages"in h&&n(0,r=h.totalpages)},e.$$.update=()=>{e.$$.dirty&5&&n(3,w=ft(c,r)),e.$$.dirty&34&&s&&l&&zt(l,s),e.$$.dirty&66&&i&&l&&Gt(l,i),e.$$.dirty&130&&o&&l&&Jt(l,`${o}.Style`,u)},[r,l,c,w,a,s,i,o,E,y,$,P,x,R]}class gt extends Dt{constructor(t){super(),Ut(this,t,Qt,qt,yt,{clientstyling:5,clientstylingurl:6,mbsource:7,totalpages:0},Yt)}get clientstyling(){return this.$$.ctx[5]}set clientstyling(t){this.$$set({clientstyling:t}),N()}get clientstylingurl(){return this.$$.ctx[6]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),N()}get mbsource(){return this.$$.ctx[7]}set mbsource(t){this.$$set({mbsource:t}),N()}get totalpages(){return this.$$.ctx[0]}set totalpages(t){this.$$set({totalpages:t}),N()}}Vt(gt,{clientstyling:{},clientstylingurl:{},mbsource:{},totalpages:{}},[],[],!0);exports.default=gt;