@everymatrix/cashier-pagination 0.0.1 → 0.0.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,3 +1,3 @@
1
- "use strict";var gt=Object.defineProperty,mt=Object.defineProperties;var bt=Object.getOwnPropertyDescriptors;var X=Object.getOwnPropertySymbols;var _t=Object.prototype.hasOwnProperty,pt=Object.prototype.propertyIsEnumerable;var J=(e,t,n)=>t in e?gt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Y=(e,t)=>{for(var n in t||(t={}))_t.call(t,n)&&J(e,n,t[n]);if(X)for(var n of X(t))pt.call(t,n)&&J(e,n,t[n]);return e},Z=(e,t)=>mt(e,bt(t));var k=(e,t,n)=>(J(e,typeof t!="symbol"?t+"":t,n),n);var tt=(e,t,n)=>new Promise((i,s)=>{var o=c=>{try{r(n.next(c))}catch(u){s(u)}},l=c=>{try{r(n.throw(c))}catch(u){s(u)}},r=c=>c.done?i(c.value):Promise.resolve(c.value).then(o,l);r((n=n.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function M(){}function ft(e){return e()}function et(){return Object.create(null)}function V(e){e.forEach(ft)}function dt(e){return typeof e=="function"}function wt(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function yt(e){return Object.keys(e).length===0}function w(e,t){e.appendChild(t)}function kt(e,t,n){const i=vt(e);if(!i.getElementById(t)){const s=E("style");s.id=t,s.textContent=n,Et(i,s)}}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 w(e.head||e,t),t.sheet}function L(e,t,n){e.insertBefore(t,n||null)}function x(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 E(e){return document.createElement(e)}function I(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function R(e){return document.createTextNode(e)}function z(){return R(" ")}function F(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function d(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function xt(e){return Array.from(e.childNodes)}function at(e,t){t=""+t,e.data!==t&&(e.data=t)}function nt(e,t,n){e.classList.toggle(t,!!n)}function Lt(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}let H;function T(e){H=e}function St(){if(!H)throw new Error("Function called outside component initialization");return H}function jt(e){St().$$.on_mount.push(e)}const O=[],G=[];let B=[];const it=[],At=Promise.resolve();let K=!1;function Ot(){K||(K=!0,At.then(N))}function Q(e){B.push(e)}const q=new Set;let A=0;function N(){if(A!==0)return;const e=H;do{try{for(;A<O.length;){const t=O[A];A++,T(t),Nt(t.$$)}}catch(t){throw O.length=0,A=0,t}for(T(null),O.length=0,A=0;G.length;)G.pop()();for(let t=0;t<B.length;t+=1){const n=B[t];q.has(n)||(q.add(n),n())}B.length=0}while(O.length);for(;it.length;)it.pop()();K=!1,q.clear(),T(e)}function Nt(e){if(e.fragment!==null){e.update(),V(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(Q)}}function Bt(e){const t=[],n=[];B.forEach(i=>e.indexOf(i)===-1?t.push(i):n.push(i)),n.forEach(i=>i()),B=t}const Mt=new Set;function Pt(e,t){e&&e.i&&(Mt.delete(e),e.i(t))}function st(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function Tt(e,t,n){const{fragment:i,after_update:s}=e.$$;i&&i.m(t,n),Q(()=>{const o=e.$$.on_mount.map(ft).filter(dt);e.$$.on_destroy?e.$$.on_destroy.push(...o):V(o),e.$$.on_mount=[]}),s.forEach(Q)}function Rt(e,t){const n=e.$$;n.fragment!==null&&(Bt(n.after_update),V(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),Ot(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Ht(e,t,n,i,s,o,l=null,r=[-1]){const c=H;T(e);const u=e.$$={fragment:null,ctx:[],props:o,update:M,not_equal:s,bound:et(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(c?c.$$.context:[])),callbacks:et(),dirty:r,skip_bound:!1,root:t.target||c.$$.root};l&&l(u.root);let g=!1;if(u.ctx=n(e,t.props||{},(b,C,...y)=>{const h=y.length?y[0]:C;return u.ctx&&s(u.ctx[b],u.ctx[b]=h)&&(!u.skip_bound&&u.bound[b]&&u.bound[b](h),g&&Ft(e,b)),C}),u.update(),g=!0,V(u.before_update),u.fragment=i(u.ctx),t.target){if(t.hydrate){const b=xt(t.target);u.fragment&&u.fragment.l(b),b.forEach(x)}else u.fragment&&u.fragment.c();t.intro&&Pt(e.$$.fragment),Tt(e,t.target,t.anchor),N()}T(c)}let ht;typeof HTMLElement=="function"&&(ht=class extends HTMLElement{constructor(t,n,i){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,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 tt(this,null,function*(){if(this.$$cn=!0,!this.$$c){let t=function(o){return()=>{let l;return{c:function(){l=E("slot"),o!=="default"&&d(l,"name",o)},m:function(u,g){L(u,l,g)},d:function(u){u&&x(l)}}}};if(yield Promise.resolve(),!this.$$cn||this.$$c)return;const n={},i=Lt(this);for(const o of this.$$s)o in i&&(n[o]=[t(o)]);for(const o of this.attributes){const l=this.$$g_p(o.name);l in this.$$d||(this.$$d[l]=D(l,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:Z(Y({},this.$$d),{$$slots:n,$$scope:{ctx:[]}})});const s=()=>{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 l=D(o,this.$$d[o],this.$$p_d,"toAttribute");l==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,l)}this.$$r=!1};this.$$c.$$.after_update.push(s),s();for(const o in this.$$l)for(const l of this.$$l[o]){const r=this.$$c.$on(o,l);this.$$l_u.set(l,r)}this.$$l={}}})}attributeChangedCallback(t,n,i){var s;this.$$r||(t=this.$$g_p(t),this.$$d[t]=D(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 D(e,t,n,i){var o;const s=(o=n[e])==null?void 0:o.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 Vt(e,t,n,i,s,o){let l=class extends ht{constructor(){super(e,n,s),this.$$p_d=t}static get observedAttributes(){return Object.keys(t).map(r=>(t[r].attribute||r).toLowerCase())}};return Object.keys(t).forEach(r=>{Object.defineProperty(l.prototype,r,{get(){return this.$$c&&r in this.$$c?this.$$c[r]:this.$$d[r]},set(c){var u;c=D(r,c,t),this.$$d[r]=c,(u=this.$$c)==null||u.$set({[r]:c})}})}),i.forEach(r=>{Object.defineProperty(l.prototype,r,{get(){var c;return(c=this.$$c)==null?void 0:c[r]}})}),e.element=l,l}class Ut{constructor(){k(this,"$$");k(this,"$$set")}$destroy(){Rt(this,1),this.$destroy=M}$on(t,n){if(!dt(n))return M;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&&!yt(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);function zt(e,t){if(e){const n=document.createElement("style");n.innerHTML=t,e.appendChild(n)}}function Dt(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 Jt(e,t,n){if(window.emMessageBus){const i=document.createElement("style");window.emMessageBus.subscribe(t,s=>{i.innerHTML=s,e&&e.appendChild(i)})}}function qt(e){kt(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 ot(e,t,n){const i=e.slice();return i[15]=t[n],i}function lt(e){let t,n,i,s;return{c(){t=E("button"),t.textContent="1",n=R(`
1
+ "use strict";var gt=Object.defineProperty,mt=Object.defineProperties;var bt=Object.getOwnPropertyDescriptors;var X=Object.getOwnPropertySymbols;var _t=Object.prototype.hasOwnProperty,pt=Object.prototype.propertyIsEnumerable;var J=(e,t,n)=>t in e?gt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Y=(e,t)=>{for(var n in t||(t={}))_t.call(t,n)&&J(e,n,t[n]);if(X)for(var n of X(t))pt.call(t,n)&&J(e,n,t[n]);return e},Z=(e,t)=>mt(e,bt(t));var k=(e,t,n)=>(J(e,typeof t!="symbol"?t+"":t,n),n);var tt=(e,t,n)=>new Promise((i,s)=>{var o=c=>{try{r(n.next(c))}catch(u){s(u)}},l=c=>{try{r(n.throw(c))}catch(u){s(u)}},r=c=>c.done?i(c.value):Promise.resolve(c.value).then(o,l);r((n=n.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function M(){}function ft(e){return e()}function et(){return Object.create(null)}function V(e){e.forEach(ft)}function dt(e){return typeof e=="function"}function wt(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function yt(e){return Object.keys(e).length===0}function w(e,t){e.appendChild(t)}function kt(e,t,n){const i=vt(e);if(!i.getElementById(t)){const s=E("style");s.id=t,s.textContent=n,Et(i,s)}}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 w(e.head||e,t),t.sheet}function L(e,t,n){e.insertBefore(t,n||null)}function x(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 E(e){return document.createElement(e)}function I(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function R(e){return document.createTextNode(e)}function z(){return R(" ")}function F(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function d(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function xt(e){return Array.from(e.childNodes)}function at(e,t){t=""+t,e.data!==t&&(e.data=t)}function nt(e,t,n){e.classList.toggle(t,!!n)}function Lt(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}let H;function T(e){H=e}function St(){if(!H)throw new Error("Function called outside component initialization");return H}function jt(e){St().$$.on_mount.push(e)}const O=[],G=[];let B=[];const it=[],At=Promise.resolve();let K=!1;function Ot(){K||(K=!0,At.then(N))}function Q(e){B.push(e)}const q=new Set;let A=0;function N(){if(A!==0)return;const e=H;do{try{for(;A<O.length;){const t=O[A];A++,T(t),Nt(t.$$)}}catch(t){throw O.length=0,A=0,t}for(T(null),O.length=0,A=0;G.length;)G.pop()();for(let t=0;t<B.length;t+=1){const n=B[t];q.has(n)||(q.add(n),n())}B.length=0}while(O.length);for(;it.length;)it.pop()();K=!1,q.clear(),T(e)}function Nt(e){if(e.fragment!==null){e.update(),V(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(Q)}}function Bt(e){const t=[],n=[];B.forEach(i=>e.indexOf(i)===-1?t.push(i):n.push(i)),n.forEach(i=>i()),B=t}const Mt=new Set;function Pt(e,t){e&&e.i&&(Mt.delete(e),e.i(t))}function st(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function Tt(e,t,n){const{fragment:i,after_update:s}=e.$$;i&&i.m(t,n),Q(()=>{const o=e.$$.on_mount.map(ft).filter(dt);e.$$.on_destroy?e.$$.on_destroy.push(...o):V(o),e.$$.on_mount=[]}),s.forEach(Q)}function Rt(e,t){const n=e.$$;n.fragment!==null&&(Bt(n.after_update),V(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),Ot(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Ht(e,t,n,i,s,o,l=null,r=[-1]){const c=H;T(e);const u=e.$$={fragment:null,ctx:[],props:o,update:M,not_equal:s,bound:et(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(c?c.$$.context:[])),callbacks:et(),dirty:r,skip_bound:!1,root:t.target||c.$$.root};l&&l(u.root);let g=!1;if(u.ctx=n?n(e,t.props||{},(b,C,...y)=>{const h=y.length?y[0]:C;return u.ctx&&s(u.ctx[b],u.ctx[b]=h)&&(!u.skip_bound&&u.bound[b]&&u.bound[b](h),g&&Ft(e,b)),C}):[],u.update(),g=!0,V(u.before_update),u.fragment=i?i(u.ctx):!1,t.target){if(t.hydrate){const b=xt(t.target);u.fragment&&u.fragment.l(b),b.forEach(x)}else u.fragment&&u.fragment.c();t.intro&&Pt(e.$$.fragment),Tt(e,t.target,t.anchor),N()}T(c)}let ht;typeof HTMLElement=="function"&&(ht=class extends HTMLElement{constructor(t,n,i){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,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 tt(this,null,function*(){if(this.$$cn=!0,!this.$$c){let t=function(o){return()=>{let l;return{c:function(){l=E("slot"),o!=="default"&&d(l,"name",o)},m:function(u,g){L(u,l,g)},d:function(u){u&&x(l)}}}};if(yield Promise.resolve(),!this.$$cn||this.$$c)return;const n={},i=Lt(this);for(const o of this.$$s)o in i&&(n[o]=[t(o)]);for(const o of this.attributes){const l=this.$$g_p(o.name);l in this.$$d||(this.$$d[l]=D(l,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:Z(Y({},this.$$d),{$$slots:n,$$scope:{ctx:[]}})});const s=()=>{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 l=D(o,this.$$d[o],this.$$p_d,"toAttribute");l==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,l)}this.$$r=!1};this.$$c.$$.after_update.push(s),s();for(const o in this.$$l)for(const l of this.$$l[o]){const r=this.$$c.$on(o,l);this.$$l_u.set(l,r)}this.$$l={}}})}attributeChangedCallback(t,n,i){var s;this.$$r||(t=this.$$g_p(t),this.$$d[t]=D(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 D(e,t,n,i){var o;const s=(o=n[e])==null?void 0:o.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 Vt(e,t,n,i,s,o){let l=class extends ht{constructor(){super(e,n,s),this.$$p_d=t}static get observedAttributes(){return Object.keys(t).map(r=>(t[r].attribute||r).toLowerCase())}};return Object.keys(t).forEach(r=>{Object.defineProperty(l.prototype,r,{get(){return this.$$c&&r in this.$$c?this.$$c[r]:this.$$d[r]},set(c){var u;c=D(r,c,t),this.$$d[r]=c,(u=this.$$c)==null||u.$set({[r]:c})}})}),i.forEach(r=>{Object.defineProperty(l.prototype,r,{get(){var c;return(c=this.$$c)==null?void 0:c[r]}})}),e.element=l,l}class Ut{constructor(){k(this,"$$");k(this,"$$set")}$destroy(){Rt(this,1),this.$destroy=M}$on(t,n){if(!dt(n))return M;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&&!yt(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);function zt(e,t){if(e){const n=document.createElement("style");n.innerHTML=t,e.appendChild(n)}}function Dt(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 Jt(e,t,n){if(window.emMessageBus){const i=document.createElement("style");window.emMessageBus.subscribe(t,s=>{i.innerHTML=s,e&&e.appendChild(i)})}}function qt(e){kt(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 ot(e,t,n){const i=e.slice();return i[15]=t[n],i}function lt(e){let t,n,i,s;return{c(){t=E("button"),t.textContent="1",n=R(`
2
2
  ...`)},m(o,l){L(o,t,l),L(o,n,l),i||(s=F(t,"click",e[9]),i=!0)},p:M,d(o){o&&(x(t),x(n)),i=!1,s()}}}function rt(e){let t,n=e[15]+"",i,s,o;function l(){return e[10](e[15])}return{c(){t=E("button"),i=R(n),nt(t,"selected",e[15]===e[2])},m(r,c){L(r,t,c),w(t,i),s||(o=F(t,"click",l),s=!0)},p(r,c){e=r,c&8&&n!==(n=e[15]+"")&&at(i,n),c&12&&nt(t,"selected",e[15]===e[2])},d(r){r&&x(t),s=!1,o()}}}function ct(e){let t,n,i,s,o;return{c(){t=R(`...
3
3
  `),n=E("button"),i=R(e[0])},m(l,r){L(l,t,r),L(l,n,r),w(n,i),s||(o=F(n,"click",e[11]),s=!0)},p(l,r){r&1&&at(i,l[0])},d(l){l&&(x(t),x(n)),s=!1,o()}}}function Gt(e){let t,n,i,s,o,l,r,c=!e[3].includes(1),u,g,b=!e[3].includes(+e[0]),C,y,h,P,S,a,U,_=c&&lt(e),j=st(e[3]),m=[];for(let f=0;f<j.length;f+=1)m[f]=rt(ot(e,j,f));let p=b&&ct(e);return{c(){t=E("div"),n=E("nav"),i=E("button"),s=I("svg"),o=I("polyline"),r=z(),_&&_.c(),u=z();for(let f=0;f<m.length;f+=1)m[f].c();g=z(),p&&p.c(),C=z(),y=E("button"),h=I("svg"),P=I("polyline"),d(o,"points","15 18 9 12 15 6"),d(s,"xmlns","http://www.w3.org/2000/svg"),d(s,"width","24"),d(s,"height","24"),d(s,"viewBox","0 0 24 24"),d(s,"fill","none"),d(s,"stroke","currentColor"),d(s,"stroke-width","2"),d(s,"stroke-linecap","round"),d(s,"stroke-linejoin","round"),d(s,"class","feather feather-chevron-left"),d(i,"class","nav-btn"),i.disabled=l=e[2]===1,d(P,"points","9 18 15 12 9 6"),d(h,"xmlns","http://www.w3.org/2000/svg"),d(h,"width","24"),d(h,"height","24"),d(h,"viewBox","0 0 24 24"),d(h,"fill","none"),d(h,"stroke","currentColor"),d(h,"stroke-width","2"),d(h,"stroke-linecap","round"),d(h,"stroke-linejoin","round"),d(h,"class","feather feather-chevron-right"),d(y,"class","nav-btn"),y.disabled=S=e[2]===e[0],d(n,"class","pagination")},m(f,v){L(f,t,v),w(t,n),w(n,i),w(i,s),w(s,o),w(n,r),_&&_.m(n,null),w(n,u);for(let $=0;$<m.length;$+=1)m[$]&&m[$].m(n,null);w(n,g),p&&p.m(n,null),w(n,C),w(n,y),w(y,h),w(h,P),e[13](t),a||(U=[F(i,"click",e[8]),F(y,"click",e[12])],a=!0)},p(f,[v]){if(v&4&&l!==(l=f[2]===1)&&(i.disabled=l),v&8&&(c=!f[3].includes(1)),c?_?_.p(f,v):(_=lt(f),_.c(),_.m(n,u)):_&&(_.d(1),_=null),v&28){j=st(f[3]);let $;for($=0;$<j.length;$+=1){const W=ot(f,j,$);m[$]?m[$].p(W,v):(m[$]=rt(W),m[$].c(),m[$].m(n,g))}for(;$<m.length;$+=1)m[$].d(1);m.length=j.length}v&9&&(b=!f[3].includes(+f[0])),b?p?p.p(f,v):(p=ct(f),p.c(),p.m(n,C)):p&&(p.d(1),p=null),v&5&&S!==(S=f[2]===f[0])&&(y.disabled=S)},i:M,o:M,d(f){f&&x(t),_&&_.d(),Ct(m,f),p&&p.d(),e[13](null),a=!1,V(U)}}}function ut(e,t){const i=[];if(t<=5){for(let l=1;l<=t;l++)i.push(l);return i}let s=e-1,o=e+1;s<1&&(o+=1-s,s=1),o>t&&(s-=o-t,o=t),s=Math.max(1,s);for(let l=s;l<=o;l++)i.push(l);return i}function Kt(e,t,n){let{clientstyling:i=""}=t,{clientstylingurl:s=""}=t,{mbsource:o}=t,{totalpages:l=5}=t,r,c=1,u;u=ut(c,l),jt(()=>()=>{});function g(a){if(a>=1&&a<=l){n(2,c=a);const U=new CustomEvent("pageChange",{detail:{page:a},bubbles:!0,composed:!0});document.dispatchEvent(U)}}const b=()=>g(c-1),C=()=>g(1),y=a=>g(a),h=()=>g(+l),P=()=>g(c+1);function S(a){G[a?"unshift":"push"](()=>{r=a,n(1,r)})}return e.$$set=a=>{"clientstyling"in a&&n(5,i=a.clientstyling),"clientstylingurl"in a&&n(6,s=a.clientstylingurl),"mbsource"in a&&n(7,o=a.mbsource),"totalpages"in a&&n(0,l=a.totalpages)},e.$$.update=()=>{e.$$.dirty&5&&n(3,u=ut(c,l)),e.$$.dirty&34&&i&&r&&zt(r,i),e.$$.dirty&66&&s&&r&&Dt(r,s),e.$$.dirty&130&&o&&r&&Jt(r,`${o}.Style`)},[l,r,c,u,g,i,s,o,b,C,y,h,P,S]}class $t extends Ut{constructor(t){super(),Ht(this,t,Kt,Gt,wt,{clientstyling:5,clientstylingurl:6,mbsource:7,totalpages:0},qt)}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($t,{clientstyling:{},clientstylingurl:{},mbsource:{},totalpages:{}},[],[],!0);exports.default=$t;
@@ -199,10 +199,10 @@ function Lt(t, e, n, s, i, o, r = null, l = [-1]) {
199
199
  };
200
200
  r && r(u.root);
201
201
  let y = !1;
202
- if (u.ctx = n(t, e.props || {}, (_, E, ...w) => {
202
+ if (u.ctx = n ? n(t, e.props || {}, (_, E, ...w) => {
203
203
  const h = w.length ? w[0] : E;
204
204
  return u.ctx && i(u.ctx[_], u.ctx[_] = h) && (!u.skip_bound && u.bound[_] && u.bound[_](h), y && xt(t, _)), E;
205
- }), u.update(), y = !0, H(u.before_update), u.fragment = s(u.ctx), e.target) {
205
+ }) : [], u.update(), y = !0, H(u.before_update), u.fragment = s ? s(u.ctx) : !1, e.target) {
206
206
  if (e.hydrate) {
207
207
  const _ = $t(e.target);
208
208
  u.fragment && u.fragment.l(_), _.forEach(C);
@@ -228,10 +228,10 @@ function Ft(e, t, n, i, s, o, l = null, r = [-1]) {
228
228
  };
229
229
  l && l(u.root);
230
230
  let g = !1;
231
- if (u.ctx = n(e, t.props || {}, (b, C, ...y) => {
231
+ if (u.ctx = n ? n(e, t.props || {}, (b, C, ...y) => {
232
232
  const h = y.length ? y[0] : C;
233
233
  return u.ctx && s(u.ctx[b], u.ctx[b] = h) && (!u.skip_bound && u.bound[b] && u.bound[b](h), g && Rt(e, b)), C;
234
- }), u.update(), g = !0, V(u.before_update), u.fragment = i(u.ctx), t.target) {
234
+ }) : [], u.update(), g = !0, V(u.before_update), u.fragment = i ? i(u.ctx) : !1, t.target) {
235
235
  if (t.hydrate) {
236
236
  const b = Ct(t.target);
237
237
  u.fragment && u.fragment.l(b), b.forEach(x);
@@ -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-DcUVRfJ-.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-BbvO-H_R.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-DfPKulTl.js").then(({ default: t }) => {
13
+ customElements.define = n(customElements.define), import("../components/CashierPagination-d_Cd_6ld.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-CTEjanNX.js";
1
+ import { C as s } from "../components/CashierPagination-Wlxe9Kkx.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": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "type": "module",
5
5
  "main": "esnext/cashier-pagination.js",
6
6
  "module": "esnext/cashier-pagination.js",