(function(){"use strict";try{if(typeof document<"u"){var i=document.createElement("style");i.appendChild(document.createTextNode(".v-pagination{display:flex;justify-content:flex-start;box-sizing:border-box}.v-pagination--right{justify-content:flex-end}.v-pagination--center{justify-content:center}.v-pagination.v-pagination--disabled a,.v-pagination.v-pagination--disabled select{color:#ddd!important}.v-pagination.v-pagination--disabled .v-pagination__item a{cursor:default!important}.v-pagination.v-pagination--disabled .v-pagination__item a:hover{background-color:transparent}.v-pagination.v-pagination--disabled.v-pagination--border ul{background-color:#fafafa}.v-pagination.v-pagination--circle .v-pagination__item a{border-radius:50rem;border:1px solid transparent;min-height:30px;min-width:30px;padding:0 .6rem;display:flex;align-items:center;justify-content:center}.v-pagination.v-pagination--circle .v-pagination__item a:hover{border:1px solid #f7f7f7}.v-pagination.v-pagination--circle .v-pagination__item.disabled a:hover{border:1px solid transparent}.v-pagination.v-pagination--circle .v-pagination__item.active a{border:1px solid #ddd!important;background-color:transparent!important;box-shadow:0 1px 3px #0000001a}.v-pagination ul{margin:0;padding:0;display:flex}.v-pagination ul li{list-style:none;display:flex}.v-pagination ul li a{padding:.3rem .6rem;text-decoration:none;line-height:1.3;font-size:14px;margin:0;outline:0;color:#333;border-radius:.5rem;display:inline-flex;align-items:center;cursor:default}.v-pagination ul li.v-pagination__list a,.v-pagination ul li.v-pagination__info a{color:#888}.v-pagination ul li.active a,.v-pagination ul li.disabled a{cursor:default!important}.v-pagination ul li.v-pagination__item a:hover{background-color:#f7f7f7;color:#000;cursor:pointer}.v-pagination ul li.active a{background-color:#eee!important;color:#aaa}.v-pagination ul li.active a:hover{color:#aaa}.v-pagination ul li.disabled a{color:#ddd!important}.v-pagination ul li.disabled a:hover{background-color:transparent}.v-pagination ul li select{width:auto!important;font-size:12px;padding:0;outline:0;margin:0 0 0 5px;border:1px solid #ccc;color:#333;border-radius:.3rem}.v-pagination.v-pagination--border ul{box-shadow:0 1px 2px #0000000d;border-radius:.5rem}.v-pagination.v-pagination--border ul li a{border:1px solid #DEE2E6;border-left:0;border-radius:0}.v-pagination.v-pagination--border ul li:first-child>a{border-bottom-left-radius:.5rem;border-top-left-radius:.5rem;border-left:1px solid #DEE2E6}.v-pagination.v-pagination--border ul li:last-child>a{border-top-right-radius:.5rem;border-bottom-right-radius:.5rem}.v-pagination.v-pagination--border ul li.active a{color:#aaa;background-color:#eee}")),document.head.appendChild(i)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})(); (function(m,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(m=typeof globalThis<"u"?globalThis:m||self,e(m.VPage={},m.Vue))})(this,function(m,e){"use strict";const[w,y,T,F,M]=["cn","en","de","jp","pt"],E={[w]:{pageLength:"每页记录数",pageInfo:"第 #pageNumber#/#totalPage# 页(共#totalRow#条记录)",first:"首页",last:"尾页",all:"全部"},[y]:{pageLength:"Per page",pageInfo:"Page #pageNumber#/#totalPage# (total #totalRow# records)",first:"First",last:"Last",all:"All"},[T]:{pageLength:"Seitenlänge",pageInfo:"Aktuell #pageNumber#/#totalPage# (gesamt #totalRow# Aufzeichnungen)",first:"Zuerst",last:"Letzte",all:"Alle"},[F]:{pageLength:"ページごとの記録数",pageInfo:"現在の第 #pageNumber#/#totalPage# ページ(全部で #totalRow# 条の記録)",first:"トップページ",last:"尾のページ",all:"すべて"},[M]:{pageLength:"Resultados por página",pageInfo:"#pageNumber#/#totalPage# (total de #totalRow#)",first:"Início",last:"Fim",all:"Todos"}},f=1,j=5,I=10,R=[I,20,50,100],v=0,[$,ee,C]=["left","center","right"];function G(t,o,n){if(o<=n)return f;const d=Math.floor(n/2),i=o-n+1,c=t-d;return ci?i:c}function k(t,o,n){const d=G(t,o,n);return Array.from({length:n}).map((i,c)=>d+c).filter(i=>i>=f&&i<=o)}function D(t=y){const o=String(t).toLowerCase();return E[Object.hasOwn(E,o)?o:y]}function L(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!e.isVNode(t)}function x(t,o,n){const{pageSizeOptions:d,pageSizeMenu:i,totalRow:c}=e.toRefs(t),l=e.ref(0),b=e.ref(j),u=e.ref(t.pageSize??I),p=D(t.language),P=e.computed(()=>{if(!d.value)return[];const a=Array.from(Array.isArray(i.value)&&i.value.length>0?i.value:R);return u.value!==0&&!a.includes(u.value)&&a.push(u.value),a.sort((r,g)=>r-g)}),s=e.computed(()=>u.value===v?f:Math.ceil(c.value/u.value)),h=e.computed(()=>k(l.value,s.value,b.value)),U=e.computed(()=>({"v-pagination":!0,"v-pagination--right":t.align==="right","v-pagination--center":t.align==="center","v-pagination--disabled":t.disabled,"v-pagination--border":t.border,"v-pagination--circle":!t.border&&t.circle})),A=e.computed(()=>l.value===f),z=e.computed(()=>l.value===s.value);e.watch(()=>t.modelValue,S),e.watch(()=>t.pageSize,B);function S(a=f){if(t.disabled||typeof a!="number")return;let r=as.value&&s.value>0&&(r=s.value),r!==l.value&&(l.value=r,o("update:modelValue",l.value),O())}function B(a){if(typeof a=="number"&&!(a<0)&&a!==u.value){if(u.value=a,o("update:pageSize",u.value),l.value===f)return O();S(f)}}function O(){o("change",{pageNumber:l.value,pageSize:Number(u.value),totalPage:s.value})}function _(a,{slots:r}){var g;return e.createVNode("a",{href:"javascript:void(0)"},[(g=r==null?void 0:r.default)==null?void 0:g.call(r)])}function Z(){if(!d.value)return null;const a=()=>P.value.map(g=>e.createVNode("option",{key:g,value:g,selected:u.value===g},[g])),r=()=>t.displayAll?e.createVNode("option",{value:v,selected:u.value===v},[p.all]):null;return e.createVNode("li",{class:"v-pagination__list"},[e.createVNode(_,null,{default:()=>[e.createVNode("span",null,[p.pageLength]),e.createVNode("select",{disabled:t.disabled,onChange:g=>B(Number(g.target.value))},[e.createVNode(a,null,null),e.createVNode(r,null,null)])]})])}function q(){if(!t.info)return null;const a=p.pageInfo.replace("#pageNumber#",l.value).replace("#totalPage#",s.value).replace("#totalRow#",c.value);return e.createVNode("li",{class:"v-pagination__info"},[e.createVNode(_,null,L(a)?a:{default:()=>[a]})])}function H(){let a;if(!Object.hasOwn(n,"default"))return null;const r={pageNumber:l.value,pageSize:u.value,totalPage:s.value,totalRow:c.value,isFirst:A.value,isLast:z.value};return e.createVNode("li",{class:"v-pagination__slot"},[e.createVNode(_,null,L(a=n.default(r))?a:{default:()=>[a]})])}function V({classes:a,pageNumberValue:r,name:g,hasItem:Y=!0}){return Y?e.createVNode("li",{class:["v-pagination__item",...a]},[e.createVNode(_,{onClick:()=>S(r)},L(g)?g:{default:()=>[g]})]):null}function J(){return t.pageNumber?h.value.map(a=>e.createVNode(V,{key:a,classes:[{active:a===l.value}],pageNumberValue:a,name:a},null)):null}function K(){return e.createVNode(V,{classes:["v-pagination__first",{disabled:A.value}],pageNumberValue:f,name:p.first,hasItem:t.first},null)}function Q(){return e.createVNode(V,{classes:["v-pagination__previous",{disabled:A.value}],pageNumberValue:l.value-1,name:"«"},null)}function W(){return e.createVNode(V,{classes:["v-pagination__next",{disabled:z.value}],pageNumberValue:l.value+1,name:"»"},null)}function X(){return e.createVNode(V,{classes:["v-pagination__last",{disabled:z.value}],pageNumberValue:s.value,name:p.last,hasItem:t.last},null)}return e.onMounted(()=>S(t.modelValue||f)),{containerClasses:U,totalPage:s,current:l,pageNumbers:h,PageSizeOptions:Z,PageInformation:q,PageSlot:H,PageNumberItems:J,FirstPageItem:K,PreviousPageItem:Q,NextPageItem:W,LastPageItem:X}}const N=e.defineComponent({name:"PaginationBar",props:{modelValue:{type:Number,default:0},pageSize:{type:Number,default:I},totalRow:{type:Number,default:0},language:{type:String,default:y},align:{type:String,default:C},pageSizeMenu:{type:[Array],default:()=>R},pageSizeOptions:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},circle:{type:Boolean,default:!1},border:{type:Boolean,default:!1},info:{type:Boolean,default:!0},pageNumber:{type:Boolean,default:!0},first:{type:Boolean,default:!0},last:{type:Boolean,default:!0},displayAll:{type:Boolean,default:!1},hideOnSinglePage:{type:Boolean,default:!1}},emits:["update:modelValue","update:pageSize","change"],setup(t,{emit:o,slots:n}){const{containerClasses:d,totalPage:i,PageSizeOptions:c,PageInformation:l,PageSlot:b,PageNumberItems:u,FirstPageItem:p,PreviousPageItem:P,NextPageItem:s,LastPageItem:h}=x(t,o,n);return()=>t.hideOnSinglePage&&i.value<=1?null:e.createVNode("div",{class:d.value},[e.createVNode("ul",null,[e.createVNode(c,null,null),e.createVNode(l,null,null),e.createVNode(b,null,null),e.createVNode(p,null,null),e.createVNode(P,null,null),e.createVNode(u,null,null),e.createVNode(s,null,null),e.createVNode(h,null,null)])])}});N.install=(t,o={})=>{if(Object.keys(o).length){const{props:n}=N,{language:d,align:i,info:c,border:l,pageNumber:b,first:u,last:p,pageSizeMenu:P}=o;d&&(n.language.default=d),i&&(n.align.default=i),typeof c=="boolean"&&(n.info.default=c),typeof l=="boolean"&&(n.border.default=l),typeof b=="boolean"&&(n.pageNumber.default=b),typeof u=="boolean"&&(n.first.default=u),typeof p=="boolean"&&(n.last.default=p),typeof P<"u"&&(n.pageSizeMenu.default=P)}t.component(N.name,N)},m.PaginationBar=N,m.default=N,Object.defineProperties(m,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});