buefy
Version:
Lightweight UI components for Vue.js (v3) based on Bulma
2 lines • 75 kB
JavaScript
/*! Buefy v3.0.7 | MIT License | github.com/buefy/buefy */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Table={},e.Vue)}(this,(function(e,t){"use strict";function o(e,t){return t.split(".").reduce(((e,t)=>e?e[t]:null),e)}function i(e,t,o){if(!e)return-1;if(!o||"function"!=typeof o)return e.indexOf(t);for(let i=0;i<e.length;i++)if(o(e[i],t))return i;return-1}function l(e){void 0!==e.remove?e.remove():void 0!==e.parentNode&&null!==e.parentNode&&e.parentNode.removeChild(e)}function n(e){return e?e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):e}function a(e){return e?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}function s(e,t){return JSON.parse(JSON.stringify(e)).sort((i=t,(e,t)=>i.map((i=>{const{field:l,order:n,customSort:a}=i;if("function"==typeof a)return a(e,t,"desc"!==n);{const i=o(e,l),a=o(t,l),s=i>a?1:i<a?-1:0;return"desc"===n?-s:s}})).reduce(((e,t)=>e||t),0)));var i}function r(e){return void 0===e?null:isNaN(+e)?`${e}`:e+"px"}const c=e=>null==e;const u=(e,t)=>{const{type:o,target:i}=t;let l=0,n=0;if(null!=i&&i!==e.target){const t=e.target.getBoundingClientRect(),o=i.getBoundingClientRect();l=o.left-t.left,n=o.top-t.top}const a=e.touches[0]||e.changedTouches[0];return new DragEvent(o,{dataTransfer:new DataTransfer,bubbles:!0,screenX:a.screenX,screenY:a.screenY,clientX:a.clientX+l,clientY:a.clientY+n,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey})};function d(e,t,o){let i;return function(...o){const l=this;clearTimeout(i),i=setTimeout((function(){i=void 0,e.apply(l,o)}),t)}}let h={defaultIconPack:"mdi",defaultIconComponent:null,defaultIconPrev:"chevron-left",defaultIconNext:"chevron-right",defaultLocale:void 0,defaultInputAutocomplete:"on",defaultInputHasCounter:!0,defaultCompatFallthrough:!0,defaultUseHtml5Validation:!0,defaultStatusIcon:!0,defaultLinkTags:["a","button","input","router-link","nuxt-link","n-link","RouterLink","NuxtLink","NLink"]};var p=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,f=t.defineComponent({inheritAttrs:!1,props:{compatFallthrough:{type:Boolean,default:()=>h.defaultCompatFallthrough}},computed:{rootAttrs(){return this.compatFallthrough?{class:this.$attrs.class,style:this.$attrs.style,id:this.$attrs.id}:{}},fallthroughAttrs(){if(this.compatFallthrough){const e=this.$attrs,{style:t,class:o,id:i}=e;return((e,t)=>{var o={};for(var i in e)m.call(e,i)&&t.indexOf(i)<0&&(o[i]=e[i]);if(null!=e&&p)for(var i of p(e))t.indexOf(i)<0&&g.call(e,i)&&(o[i]=e[i]);return o})(e,["style","class","id"])}return this.$attrs}}}),k=t.defineComponent({props:{modelValue:[String,Number,Boolean,Function,Object,Array],nativeValue:[String,Number,Boolean,Function,Object,Array],type:String,disabled:Boolean,required:Boolean,name:String,size:String},emits:{"update:modelValue":e=>!0},data(){return{newValue:this.modelValue}},computed:{computedValue:{get(){return this.newValue},set(e){this.newValue=e,this.$emit("update:modelValue",e)}},disabledOrUndefined(){return this.disabled||void 0},requiredOrUndefined(){return this.required||void 0}},watch:{modelValue(e){this.newValue=e}},methods:{focus(){this.$refs.input.focus()}}});const b={checkboxOn:{type:"svg",viewBox:"0 0 1 1",path:"M 0.04038059,0.6267767 0.14644661,0.52071068 0.42928932,0.80355339 0.3232233,0.90961941 z M 0.21715729,0.80355339 0.85355339,0.16715729 0.95961941,0.2732233 0.3232233,0.90961941 z"},checkboxIndeterminate:{type:"svg",viewBox:"0 0 1 1",path:"M 0.15,0.4 L 0.85,0.4 L 0.85,0.6 L 0.15,0.6 Z"},chevronLeft:{type:"svg",path:"M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z"},chevronRight:{type:"svg",path:"M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"},chevronDown:{type:"svg",path:"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"},chevronUp:{type:"svg",path:"M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z"},menuDown:{type:"svg",path:"M7,10L12,15L17,10H7Z"},menuUp:{type:"svg",path:"M7,14L12,9L17,14H7Z"},check:{type:"svg",path:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"},alertCircle:{type:"svg",path:"M13,13H11V7H13M13,17H11V15H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"},alert:{type:"svg",path:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"},information:{type:"svg",path:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"},close:{type:"svg",path:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"},closeCircle:{type:"svg",path:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"},eye:{type:"svg",path:"M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z"},eyeOff:{type:"svg",path:"M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.18 16.38,18.6L16.81,19L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z"}};function C(e){return b[e]}var y=t.defineComponent({name:"BCheckbox",mixins:[k],props:{indeterminate:Boolean,ariaLabelledby:String,trueValue:{type:[String,Number,Boolean,Function,Object,Array],default:!0},falseValue:{type:[String,Number,Boolean,Function,Object,Array],default:!1},autocomplete:{type:String,default:"on"},inputId:{type:String,default:""}},computed:{isChecked(){const e=this.computedValue;return Array.isArray(e)?e.includes(this.nativeValue):e===this.trueValue},checkmarkAlias(){return C(this.indeterminate?"checkboxIndeterminate":"checkboxOn")}}}),v=(e,t)=>{const o=e.__vccOpts||e;for(const[e,i]of t)o[e]=i;return o};const w=["disabled"],S=["id",".indeterminate","autocomplete","disabled","required","name","value","true-value","false-value","aria-labelledby"],B=["viewBox"],D=["d"],V=["id"];var P=v(y,[["render",function(e,o,i,l,n,a){return t.openBlock(),t.createElementBlock("label",{class:t.normalizeClass(["b-checkbox checkbox",[e.size,{"is-disabled":e.disabled}]]),ref:"label",disabled:e.disabledOrUndefined,onClick:o[2]||(o[2]=(...t)=>e.focus&&e.focus(...t)),onKeydown:[o[3]||(o[3]=t.withKeys(t.withModifiers((t=>e.$refs.label.click()),["prevent"]),["enter"])),o[4]||(o[4]=t.withKeys(t.withModifiers((t=>e.$refs.label.click()),["prevent"]),["space"]))]},[t.createCommentVNode(" Checkbox needs to listen for a space event instead of a just a\n click and enter event so that that using the keyboard spacebar will also\n trigger the checkbox change in the b-table "),t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":o[0]||(o[0]=t=>e.computedValue=t),id:e.inputId,".indeterminate":e.indeterminate,type:"checkbox",ref:"input",onClick:o[1]||(o[1]=t.withModifiers((()=>{}),["stop"])),autocomplete:e.autocomplete,disabled:e.disabledOrUndefined,required:e.requiredOrUndefined,name:e.name,value:e.nativeValue,"true-value":e.trueValue,"false-value":e.falseValue,"aria-labelledby":e.ariaLabelledby},null,40,S),[[t.vModelCheckbox,e.computedValue]]),t.createElementVNode("span",{class:t.normalizeClass(["check",e.type])},[e.isChecked||e.indeterminate?(t.openBlock(),t.createElementBlock("svg",{key:0,viewBox:e.checkmarkAlias.viewBox||"0 0 1 1",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[t.createElementVNode("path",{fill:"currentColor",d:e.checkmarkAlias.path},null,8,D)],8,B)):t.createCommentVNode("v-if",!0)],2),t.createElementVNode("span",{id:e.ariaLabelledby,class:"control-label"},[t.renderSlot(e.$slots,"default")],8,V)],42,w)}]]);const x={sizes:{default:"mdi-24px","is-small":null,"is-medium":"mdi-36px","is-large":"mdi-48px"},iconPrefix:"mdi-"},I=()=>{const e="fa-";return{sizes:{default:null,"is-small":null,"is-medium":e+"lg","is-large":e+"2x"},iconPrefix:e,internalIcons:{information:"info-circle",alert:"exclamation-triangle","alert-circle":"exclamation-circle","chevron-right":"angle-right","chevron-left":"angle-left","chevron-down":"angle-down","eye-off":"eye-slash","menu-down":"caret-down","menu-up":"caret-up","close-circle":"times-circle"}}};var E=t.defineComponent({name:"BIcon",props:{type:[String,Object],component:String,pack:String,icon:{type:String,required:!1,default:void 0},alias:String,size:String,customSize:String,customClass:String,both:Boolean},computed:{resolvedAlias(){var e;return this.alias&&null!=(e=C(this.alias))?e:null},isSvgAlias(){var e;return"svg"===(null==(e=this.resolvedAlias)?void 0:e.type)},isComponentAlias(){var e;return"component"===(null==(e=this.resolvedAlias)?void 0:e.type)},resolvedAliasSvg(){return this.resolvedAlias},resolvedAliasComponent(){return this.resolvedAlias},iconConfig(){return{mdi:x,fa:I(),fas:I(),far:I(),fad:I(),fab:I(),fal:I(),"fa-solid":I(),"fa-regular":I(),"fa-light":I(),"fa-thin":I(),"fa-duotone":I(),"fa-brands":I()}[this.newPack]},iconPrefix(){return this.iconConfig&&this.iconConfig.iconPrefix?this.iconConfig.iconPrefix:""},newIcon(){var e;return`${this.iconPrefix}${this.getEquivalentIconOf(null!=(e=this.icon)?e:"")}`},newPack(){return this.pack||h.defaultIconPack},newType(){if(!this.type)return;let e=[];if("string"==typeof this.type)e=this.type.split("-");else for(const t in this.type)if(this.type[t]){e=t.split("-");break}if(e.length<=1)return;const[,...t]=e;return`has-text-${t.join("-")}`},newCustomSize(){return this.customSize||this.customSizeByPack},customSizeByPack(){if(this.iconConfig&&this.iconConfig.sizes){if(this.size&&void 0!==this.iconConfig.sizes[this.size])return this.iconConfig.sizes[this.size];if(this.iconConfig.sizes.default)return this.iconConfig.sizes.default}return null},useIconComponent(){return this.component||h.defaultIconComponent}},methods:{getEquivalentIconOf(e){if(!this.both)return e;if(null==this.iconConfig)return e;const t=this.iconConfig;return t&&t.internalIcons&&t.internalIcons[e]?t.internalIcons[e]:e}}});const R=["viewBox"],L=["d"];var N=v(E,[["render",function(e,o,i,l,n,a){return t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["icon",[e.newType,e.size]])},[e.isSvgAlias?(t.openBlock(),t.createElementBlock("svg",{key:0,viewBox:e.resolvedAliasSvg.viewBox||"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",class:t.normalizeClass(e.customClass),"aria-hidden":"true"},[t.createElementVNode("path",{fill:"currentColor",d:e.resolvedAliasSvg.path},null,8,L)],10,R)):e.isComponentAlias?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.resolvedAliasComponent.component),{key:1,icon:e.resolvedAliasComponent.icon,class:t.normalizeClass(e.customClass)},null,8,["icon","class"])):e.useIconComponent?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.useIconComponent),{key:3,icon:[e.newPack,e.newIcon],size:e.newCustomSize,class:t.normalizeClass([e.customClass])},null,8,["icon","size","class"])):(t.openBlock(),t.createElementBlock("i",{key:2,class:t.normalizeClass([e.newPack,e.newIcon,e.newCustomSize,e.customClass])},null,2))],2)}]]);const $=t.defineComponent({props:{size:String,expanded:Boolean,loading:Boolean,rounded:Boolean,icon:String,iconPack:String,maxlength:[Number,String],useHtml5Validation:{type:Boolean,default:()=>h.defaultUseHtml5Validation},validationMessage:String,locale:{type:[String,Array],default:()=>h.defaultLocale},statusIcon:{type:Boolean,default:()=>h.defaultStatusIcon}},emits:{blur:e=>!0,focus:e=>!0},data(){return{isValid:!0,isFocused:!1,newIconPack:this.iconPack||h.defaultIconPack,_elementRef:""}},computed:{parentField(){let e=this.$parent;for(let t=0;t<3;t++)e&&!e.$data._isField&&(e=e.$parent);return e},statusType(){const{newType:e}=this.parentField||{};if(e){if("string"==typeof e)return e;for(const t in e)if(e[t])return t}},statusMessage(){if(this.parentField)return this.parentField.newMessage||this.parentField.$slots.message},iconSize(){switch(this.size){case"is-small":return this.size;case"is-medium":return;case"is-large":return"mdi"===this.newIconPack?"is-medium":""}}},methods:{focus(){const e=this.getElement();void 0!==e&&this.$nextTick((()=>{e&&e.focus()}))},onBlur(e){this.isFocused=!1,this.$emit("blur",e),this.checkHtml5Validity()},onFocus(e){this.isFocused=!0,this.$emit("focus",e)},getElement(){let e=this.$refs[this.$data._elementRef];for(;null!=e&&"object"==typeof e&&"$refs"in e;){const t=e;e=t.$refs[t.$data._elementRef]}return e},setInvalid(){const e=this.validationMessage||this.getElement().validationMessage;this.setValidity("is-danger",e)},setValidity(e,t){this.$nextTick((()=>{this.parentField&&(this.parentField.type||(this.parentField.newType=e),this.parentField.message||(this.parentField.newMessage=t))}))},checkHtml5Validity(){if(!this.useHtml5Validation)return!1;const e=this.getElement();return null!=e&&(e.checkValidity()?(this.setValidity(null,null),this.isValid=!0):(this.setInvalid(),this.isValid=!1),this.isValid)}}});var A=t.defineComponent({name:"BInput",components:{BIcon:N},mixins:[f,$],props:{modelValue:{type:[Number,String]},type:{type:String,default:"text"},lazy:{type:Boolean,default:!1},passwordReveal:Boolean,iconClickable:Boolean,hasCounter:{type:Boolean,default:()=>h.defaultInputHasCounter},customClass:{type:String,default:""},iconRight:String,iconRightClickable:Boolean,iconRightType:String,autocomplete:String},emits:{"icon-click":e=>!0,"icon-right-click":e=>!0,"update:modelValue":e=>!0},data(){return{newValue:this.modelValue,newType:this.type,newAutocomplete:this.autocomplete||h.defaultInputAutocomplete,isPasswordVisible:!1,_elementRef:"textarea"===this.type?"textarea":"input"}},computed:{computedValue:{get(){return this.newValue},set(e){this.newValue=e,this.$emit("update:modelValue",e)}},rootClasses(){return[this.iconPosition,this.size,{"is-expanded":this.expanded,"is-loading":this.loading,"is-clearfix":!this.hasMessage}]},inputClasses(){return[this.statusType,this.size,{"is-rounded":this.rounded}]},hasIconRight(){return this.passwordReveal||this.loading||this.statusIcon&&this.statusTypeIcon||this.iconRight},rightIcon(){return this.passwordReveal?this.passwordVisibleIcon:this.iconRight?this.iconRight:this.statusTypeIcon},rightIconType(){return this.passwordReveal?"is-primary":this.iconRight?this.iconRightType||void 0:this.statusType},iconPosition(){let e="";return this.icon&&(e+="has-icons-left "),this.hasIconRight&&(e+="has-icons-right"),e},statusTypeIcon(){switch(this.statusType){case"is-success":return"check";case"is-danger":return"alert-circle";case"is-info":return"information";case"is-warning":return"alert";default:return}},hasMessage(){return!!this.statusMessage},passwordVisibleIcon(){return this.isPasswordVisible?"eye-off":"eye"},valueLength(){return"string"==typeof this.computedValue?Array.from(this.computedValue).length:"number"==typeof this.computedValue?this.computedValue.toString().length:0}},watch:{modelValue(e){const t=this.computedValue!=e;this.newValue=e,t&&this.$nextTick((()=>{!this.isValid&&this.checkHtml5Validity()}))},type(e){this.newType=e}},methods:{togglePasswordVisibility(){this.isPasswordVisible=!this.isPasswordVisible,this.newType=this.isPasswordVisible?"text":"password",this.$nextTick((()=>{this.focus()}))},iconClick(e,t){this.$emit(e,t),this.$nextTick((()=>{this.focus()}))},rightIconClick(e){this.passwordReveal?this.togglePasswordVisibility():this.iconRightClickable&&this.iconClick("icon-right-click",e)},onInput(){this.lazy||this.revalidate()},onChange(){this.lazy&&this.revalidate()},revalidate(){!this.isValid&&this.checkHtml5Validity()}}});const M=["type","autocomplete","maxlength"],T=["maxlength"],z=["type","autocomplete","maxlength"],F=["maxlength"];var O=v(A,[["render",function(e,o,i,l,n,a){const s=t.resolveComponent("b-icon");return t.openBlock(),t.createElementBlock("div",t.mergeProps({class:["control",e.rootClasses]},e.rootAttrs),[e.lazy?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},["textarea"!==e.type?t.withDirectives((t.openBlock(),t.createElementBlock("input",t.mergeProps({key:0,ref:"input",class:["input",[e.inputClasses,e.customClass]],type:e.newType,autocomplete:e.newAutocomplete,maxlength:e.maxlength,"onUpdate:modelValue":o[0]||(o[0]=t=>e.computedValue=t)},e.fallthroughAttrs,{onInput:o[1]||(o[1]=(...t)=>e.onInput&&e.onInput(...t)),onChange:o[2]||(o[2]=(...t)=>e.onChange&&e.onChange(...t)),onBlur:o[3]||(o[3]=(...t)=>e.onBlur&&e.onBlur(...t)),onFocus:o[4]||(o[4]=(...t)=>e.onFocus&&e.onFocus(...t))}),null,16,M)),[[t.vModelDynamic,e.computedValue,void 0,{lazy:!0}]]):t.withDirectives((t.openBlock(),t.createElementBlock("textarea",t.mergeProps({key:1,ref:"textarea",class:["textarea",[e.inputClasses,e.customClass]],maxlength:e.maxlength,"onUpdate:modelValue":o[5]||(o[5]=t=>e.computedValue=t)},e.fallthroughAttrs,{onInput:o[6]||(o[6]=(...t)=>e.onInput&&e.onInput(...t)),onChange:o[7]||(o[7]=(...t)=>e.onChange&&e.onChange(...t)),onBlur:o[8]||(o[8]=(...t)=>e.onBlur&&e.onBlur(...t)),onFocus:o[9]||(o[9]=(...t)=>e.onFocus&&e.onFocus(...t))}),null,16,T)),[[t.vModelText,e.computedValue,void 0,{lazy:!0}]])],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},["textarea"!==e.type?t.withDirectives((t.openBlock(),t.createElementBlock("input",t.mergeProps({key:0,ref:"input",class:["input",[e.inputClasses,e.customClass]],type:e.newType,autocomplete:e.newAutocomplete,maxlength:e.maxlength,"onUpdate:modelValue":o[10]||(o[10]=t=>e.computedValue=t)},e.fallthroughAttrs,{onInput:o[11]||(o[11]=(...t)=>e.onInput&&e.onInput(...t)),onChange:o[12]||(o[12]=(...t)=>e.onChange&&e.onChange(...t)),onBlur:o[13]||(o[13]=(...t)=>e.onBlur&&e.onBlur(...t)),onFocus:o[14]||(o[14]=(...t)=>e.onFocus&&e.onFocus(...t))}),null,16,z)),[[t.vModelDynamic,e.computedValue]]):t.withDirectives((t.openBlock(),t.createElementBlock("textarea",t.mergeProps({key:1,ref:"textarea",class:["textarea",[e.inputClasses,e.customClass]],maxlength:e.maxlength,"onUpdate:modelValue":o[15]||(o[15]=t=>e.computedValue=t)},e.fallthroughAttrs,{onInput:o[16]||(o[16]=(...t)=>e.onInput&&e.onInput(...t)),onChange:o[17]||(o[17]=(...t)=>e.onChange&&e.onChange(...t)),onBlur:o[18]||(o[18]=(...t)=>e.onBlur&&e.onBlur(...t)),onFocus:o[19]||(o[19]=(...t)=>e.onFocus&&e.onFocus(...t))}),null,16,F)),[[t.vModelText,e.computedValue]])],64)),e.icon?(t.openBlock(),t.createBlock(s,{key:2,class:t.normalizeClass(["is-left",{"is-clickable":e.iconClickable}]),icon:e.icon,pack:e.iconPack,size:e.iconSize,onClick:o[20]||(o[20]=t=>e.iconClick("icon-click",t))},null,8,["class","icon","pack","size"])):t.createCommentVNode("v-if",!0),!e.loading&&e.hasIconRight&&e.rightIcon?(t.openBlock(),t.createBlock(s,{key:3,class:t.normalizeClass(["is-right",{"is-clickable":e.passwordReveal||e.iconRightClickable}]),icon:e.rightIcon,pack:e.iconPack,size:e.iconSize,type:e.rightIconType,both:"",onClick:e.rightIconClick},null,8,["class","icon","pack","size","type","onClick"])):t.createCommentVNode("v-if",!0),e.maxlength&&e.hasCounter&&"number"!==e.type?(t.openBlock(),t.createElementBlock("small",{key:4,class:t.normalizeClass(["help counter",{"is-invisible":!e.isFocused}])},t.toDisplayString(e.valueLength)+" / "+t.toDisplayString(e.maxlength),3)):t.createCommentVNode("v-if",!0)],16)}]]);const K="undefined"==typeof window?Object:window.HTMLElement,H=t.defineComponent({name:"BLoading",props:{modelValue:Boolean,programmatic:Boolean,container:[Object,Function,K],isFullPage:{type:Boolean,default:!0},animation:{type:String,default:"fade"},canCancel:{type:Boolean,default:!1},onCancel:{type:Function,default:()=>{}}},emits:{close:()=>!0,"update:is-full-page":e=>!0,"update:modelValue":e=>!0},data(){return{isActive:this.modelValue||!1,displayInFullPage:this.isFullPage}},watch:{modelValue(e){this.isActive=e},isFullPage(e){this.displayInFullPage=e}},methods:{cancel(){this.canCancel&&this.isActive&&this.close()},close(...e){this.onCancel.apply(null,e),this.$emit("close"),this.$emit("update:modelValue",!1),this.programmatic&&(this.isActive=!1,setTimeout((()=>{l(this.$el)}),150))},keyPress({key:e}){"Escape"!==e&&"Esc"!==e||this.cancel()}},created(){"undefined"!=typeof window&&document.addEventListener("keyup",this.keyPress)},mounted(){this.programmatic&&(this.container?(this.displayInFullPage=!1,this.$emit("update:is-full-page",!1),this.container.appendChild(this.$el)):document.body.appendChild(this.$el),this.isActive=!0)},beforeUnmount(){"undefined"!=typeof window&&document.removeEventListener("keyup",this.keyPress)}}),U=t.createElementVNode("div",{class:"loading-icon"},null,-1);var j=v(H,[["render",function(e,o,i,l,n,a){return t.openBlock(),t.createBlock(t.Transition,{name:e.animation},{default:t.withCtx((()=>[e.isActive?t.withDirectives((t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["loading-overlay is-active",{"is-full-page":e.displayInFullPage}])},[t.createElementVNode("div",{class:"loading-background",onClick:o[0]||(o[0]=(...t)=>e.cancel&&e.cancel(...t))}),t.renderSlot(e.$slots,"default",{},(()=>[U]))],2)),[[t.vShow,e.isActive]]):t.createCommentVNode("v-if",!0)])),_:3},8,["name"])}]]),_=t.defineComponent({name:"BSlotComponent",props:{component:{type:Object,required:!0},name:{type:String,default:"default"},scoped:{type:Boolean},props:{type:Object},tag:{type:[String,Object],default:"div"}},methods:{refresh(){this.$forceUpdate()}},render(){return t.h(this.tag,{},this.component.$slots?this.scoped?this.component.$slots[this.name](this.props):this.component.$slots[this.name]():void 0)}}),Z=t.defineComponent({name:"BSelect",components:{BIcon:N},mixins:[f,$],props:{modelValue:{type:[String,Number,Boolean,Object,Array,Function,Date,null],default:null},placeholder:String,multiple:Boolean,nativeSize:[String,Number]},emits:{blur:e=>!0,focus:e=>!0,"update:modelValue":e=>!0},data(){return{selected:this.modelValue,_elementRef:"select"}},computed:{computedValue:{get(){return this.selected},set(e){this.selected=e,this.$emit("update:modelValue",e),!this.isValid&&this.checkHtml5Validity()}},spanClasses(){return[this.size,this.statusType,{"is-fullwidth":this.expanded,"is-loading":this.loading,"is-multiple":this.multiple,"is-rounded":this.rounded,"is-empty":null===this.selected}]}},watch:{modelValue(e){this.selected=e,!this.isValid&&this.checkHtml5Validity()}}});const q=["multiple","size"],W={key:0,value:null,disabled:"",hidden:""};var Y=v(Z,[["render",function(e,o,i,l,n,a){const s=t.resolveComponent("b-icon");return t.openBlock(),t.createElementBlock("div",t.mergeProps({class:["control",{"is-expanded":e.expanded,"has-icons-left":e.icon}]},e.rootAttrs),[t.createElementVNode("span",{class:t.normalizeClass(["select",e.spanClasses])},[t.withDirectives(t.createElementVNode("select",t.mergeProps({"onUpdate:modelValue":o[0]||(o[0]=t=>e.computedValue=t),ref:"select",multiple:e.multiple,size:e.nativeSize},e.fallthroughAttrs,{onBlur:o[1]||(o[1]=(...t)=>e.onBlur&&e.onBlur(...t)),onFocus:o[2]||(o[2]=t=>e.$emit("focus",t))}),[e.placeholder?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[null==e.computedValue?(t.openBlock(),t.createElementBlock("option",W,t.toDisplayString(e.placeholder),1)):t.createCommentVNode("v-if",!0)],64)):t.createCommentVNode("v-if",!0),t.renderSlot(e.$slots,"default")],16,q),[[t.vModelSelect,e.computedValue]])],2),e.icon?(t.openBlock(),t.createBlock(s,{key:0,class:"is-left",icon:e.icon,pack:e.iconPack,size:e.iconSize},null,8,["icon","pack","size"])):t.createCommentVNode("v-if",!0)],16)}]]),X=t.defineComponent({name:"BTableMobileSort",components:{BSelect:Y,BIcon:N},props:{currentSortColumn:Object,sortMultipleData:Array,isAsc:Boolean,columns:Array,placeholder:String,iconPack:String,sortIcon:{type:String,default:"arrow-up"},sortIconSize:{type:String,default:"is-small"},sortMultiple:{type:Boolean,default:!1}},emits:{removePriority:e=>!0,sort:(e,t)=>!0},data(){return{sortMultipleSelect:null,sortMultipleSelectIndex:-1,mobileSort:this.currentSortColumn,mobileSortIndex:this.columns?this.columns.indexOf(this.currentSortColumn):-1,defaultEvent:{shiftKey:!0,altKey:!0,ctrlKey:!0},ignoreSort:!1}},computed:{showPlaceholder(){return!this.columns||!this.columns.some((e=>e===this.mobileSort))},sortableColumns(){return this.columns&&this.columns.filter((e=>e.sortable))}},watch:{sortMultipleSelect(e){this.ignoreSort?this.ignoreSort=!1:this.$emit("sort",e,this.defaultEvent)},sortMultipleSelectIndex(e){this.sortMultipleSelect=-1!==e?this.columns[e]:null},mobileSort(e){this.currentSortColumn!==e&&this.$emit("sort",e,this.defaultEvent)},mobileSortIndex(e){-1!==e&&(this.mobileSort=this.columns[e])},currentSortColumn(e){this.mobileSort=e,this.mobileSortIndex=this.columns?this.columns.indexOf(e):-1},columns(e){this.sortMultiple?this.sortMultipleSelectIndex=e.indexOf(this.sortMultipleSelect):this.mobileSortIndex=e.indexOf(this.mobileSort)}},methods:{removePriority(){this.$emit("removePriority",this.sortMultipleSelect),this.ignoreSort=!0;const e=this.sortMultipleData.filter((e=>e.field!==this.sortMultipleSelect.field)).map((e=>e.field));this.sortMultipleSelectIndex=this.columns.findIndex((t=>e.includes(t.field)))},getSortingObjectOfColumn(e){return this.sortMultipleData.filter((t=>t.field===e.field))[0]},columnIsDesc(e){const t=e&&this.getSortingObjectOfColumn(e);return!t||!(!t.order||"desc"!==t.order)},getLabel(e){const t=this.getSortingObjectOfColumn(e);return t?e.label+"("+(this.sortMultipleData.indexOf(t)+1)+")":e.label},sort(){this.$emit("sort",this.sortMultiple?this.sortMultipleSelect:this.mobileSort,this.defaultEvent)}}});const J={class:"field table-mobile-sort"},G={class:"field has-addons"},Q=["value"],ee=["value"],te={class:"control"};var oe=v(X,[["render",function(e,o,i,l,n,a){const s=t.resolveComponent("b-select"),r=t.resolveComponent("b-icon");return t.openBlock(),t.createElementBlock("div",J,[t.createElementVNode("div",G,[e.sortMultiple?(t.openBlock(),t.createBlock(s,{key:0,modelValue:e.sortMultipleSelectIndex,"onUpdate:modelValue":o[0]||(o[0]=t=>e.sortMultipleSelectIndex=t),expanded:""},{default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.sortableColumns,((o,i)=>(t.openBlock(),t.createElementBlock("option",{key:i,value:i},[t.createTextVNode(t.toDisplayString(e.getLabel(o))+" ",1),e.getSortingObjectOfColumn(o)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.columnIsDesc(o)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(" ↓ ")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(" ↑ ")],64))],64)):t.createCommentVNode("v-if",!0)],8,Q)))),128))])),_:1},8,["modelValue"])):(t.openBlock(),t.createBlock(s,{key:1,modelValue:e.mobileSortIndex,"onUpdate:modelValue":o[1]||(o[1]=t=>e.mobileSortIndex=t),expanded:""},{default:t.withCtx((()=>[e.placeholder?t.withDirectives((t.openBlock(),t.createElementBlock("option",{key:0,value:{},selected:"",disabled:"",hidden:""},t.toDisplayString(e.placeholder),513)),[[t.vShow,e.showPlaceholder]]):t.createCommentVNode("v-if",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.sortableColumns,((e,o)=>(t.openBlock(),t.createElementBlock("option",{key:o,value:o},t.toDisplayString(e.label),9,ee)))),128))])),_:1},8,["modelValue"])),t.createElementVNode("div",te,[e.sortMultiple&&e.sortMultipleData.length>0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("button",{class:"button is-primary",onClick:o[2]||(o[2]=(...t)=>e.sort&&e.sort(...t))},[t.createVNode(r,{class:t.normalizeClass({"is-desc":e.columnIsDesc(e.sortMultipleSelect)}),icon:e.sortIcon,pack:e.iconPack,size:e.sortIconSize,both:""},null,8,["class","icon","pack","size"])]),t.createElementVNode("button",{class:"button is-primary",onClick:o[3]||(o[3]=(...t)=>e.removePriority&&e.removePriority(...t))},[t.createVNode(r,{icon:"delete",size:e.sortIconSize,both:""},null,8,["size"])])],64)):e.sortMultiple?t.createCommentVNode("v-if",!0):(t.openBlock(),t.createElementBlock("button",{key:1,class:"button is-primary",onClick:o[4]||(o[4]=(...t)=>e.sort&&e.sort(...t))},[t.withDirectives(t.createVNode(r,{class:t.normalizeClass({"is-desc":!e.isAsc}),icon:e.sortIcon,pack:e.iconPack,size:e.sortIconSize,both:""},null,8,["class","icon","pack","size"]),[[t.vShow,e.currentSortColumn===e.mobileSort]])]))])])])}]]);var ie=v(t.defineComponent({name:"BPaginationButton",props:{page:{type:Object,required:!0},tag:{type:[String,Object],default:"a",validator:e=>"object"==typeof e||h.defaultLinkTags.indexOf(e)>=0},disabled:{type:Boolean,default:!1}},computed:{href(){return"a"===this.tag?"#":void 0},isDisabled(){return this.disabled||this.page.disabled},disabledOrUndefined(){return this.isDisabled||void 0}}}),[["render",function(e,o,i,l,n,a){return t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.tag),t.mergeProps({role:"button",href:e.href,disabled:e.disabledOrUndefined,class:["pagination-link",{"is-current":e.page.isCurrent,[e.page.class]:!0}]},e.$attrs,{onClick:t.withModifiers(e.page.click,["prevent"]),"aria-label":e.page["aria-label"],"aria-current":e.page.isCurrent||void 0}),{default:t.withCtx((()=>[t.renderSlot(e.$slots,"default",{},(()=>[t.createTextVNode(t.toDisplayString(e.page.number),1)]))])),_:3},16,["href","disabled","class","onClick","aria-label","aria-current"])}]]),le=t.defineComponent({name:"BPagination",components:{BIcon:N,BPaginationButton:ie},props:{total:[Number,String],perPage:{type:[Number,String],default:20},modelValue:{type:[Number,String],default:1},rangeBefore:{type:[Number,String],default:1},rangeAfter:{type:[Number,String],default:1},size:String,simple:Boolean,rounded:Boolean,order:String,iconPack:String,iconPrev:{type:String,default:()=>h.defaultIconPrev},iconNext:{type:String,default:()=>h.defaultIconNext},ariaNextLabel:String,ariaPreviousLabel:String,ariaPageLabel:String,ariaCurrentLabel:String,pageInput:{type:Boolean,default:!1},pageInputPosition:String,debouncePageInput:[Number,String]},data(){return{inputValue:this.modelValue,debounceHandlePageInput:void 0}},emits:{change:e=>!0,"update:modelValue":e=>!0},computed:{rootClasses(){return[this.order,this.size,this.pageInputPosition,{"is-simple":this.simple,"is-rounded":this.rounded,"has-input":this.pageInput}]},beforeCurrent(){return parseInt(this.rangeBefore+"")},afterCurrent(){return parseInt(this.rangeAfter+"")},pageCount(){return Math.ceil(+this.total/+this.perPage)},firstItem(){const e=+this.modelValue*+this.perPage-+this.perPage+1;return e>=0?e:0},hasPrev(){return+this.modelValue>1},hasFirst(){return+this.modelValue>=2+this.beforeCurrent},hasFirstEllipsis(){return+this.modelValue>=this.beforeCurrent+4},hasLast(){return+this.modelValue<=this.pageCount-(1+this.afterCurrent)},hasLastEllipsis(){return+this.modelValue<this.pageCount-(2+this.afterCurrent)},hasNext(){return+this.modelValue<this.pageCount},pagesInRange(){if(this.simple)return;let e=Math.max(1,+this.modelValue-this.beforeCurrent);e-1==2&&e--;let t=Math.min(+this.modelValue+this.afterCurrent,this.pageCount);this.pageCount-t===2&&t++;const o=[];for(let i=e;i<=t;i++)o.push(this.getPage(i));return o}},watch:{pageCount(e){this.modelValue>e&&this.last()},modelValue(e){this.inputValue=e},debouncePageInput:{handler(e){this.debounceHandlePageInput=d(this.handleOnInputPageChange,e)},immediate:!0}},methods:{prev(e){this.changePage(+this.modelValue-1,e)},next(e){this.changePage(+this.modelValue+1,e)},first(e){this.changePage(1,e)},last(e){this.changePage(this.pageCount,e)},changePage(e,t){this.modelValue===e||e<1||e>this.pageCount||(this.$emit("update:modelValue",e),this.$emit("change",e),t&&t.target&&this.$nextTick((()=>t.target.focus())))},getPage(e,t={}){return{number:e,isCurrent:this.modelValue===e,click:t=>this.changePage(e,t),input:(e,t)=>this.changePage(+t,e),disabled:t.disabled||!1,class:t.class||"","aria-label":t["aria-label"]||this.getAriaPageLabel(e,this.modelValue===e)}},getAriaPageLabel(e,t){return!this.ariaPageLabel||t&&this.ariaCurrentLabel?this.ariaPageLabel&&t&&this.ariaCurrentLabel?this.ariaCurrentLabel+", "+this.ariaPageLabel+" "+e+".":null:this.ariaPageLabel+" "+e+"."},handleOnInputPageChange(e){this.getPage(+this.inputValue).input(e,this.inputValue)},handleOnInputDebounce(e){this.debouncePageInput?this.debounceHandlePageInput(e):this.handleOnInputPageChange(e)},handleOnKeyPress(e){const t=e.which||e.keyCode;return t>=48&&t<=57||e.preventDefault()},handleAllowableInputPageRange(e){const t=e.target;+t.value>0&&+t.value<=this.pageCount?this.handleOnInputValue(e):(this.inputValue=1,this.inputValue="")},handleOnInputValue(e){const t=+e.target.value;this.inputValue=t,Number.isInteger(this.inputValue)?this.handleOnInputDebounce(e):this.inputValue=this.modelValue}}});const ne={class:"control pagination-input"},ae=["value","size","maxlength"],se={key:4,class:"info"},re={key:5,class:"pagination-list"},ce={key:0},ue={key:1},de=[t.createElementVNode("span",{class:"pagination-ellipsis"},"…",-1)],he={key:2},pe=[t.createElementVNode("span",{class:"pagination-ellipsis"},"…",-1)],me={key:3};var ge=v(le,[["render",function(e,o,i,l,n,a){const s=t.resolveComponent("b-icon"),r=t.resolveComponent("BPaginationButton");return t.openBlock(),t.createElementBlock("nav",{class:t.normalizeClass(["pagination",e.rootClasses])},[e.$slots.previous?t.renderSlot(e.$slots,"previous",{key:0,page:e.getPage(+e.modelValue-1,{disabled:!e.hasPrev,class:"pagination-previous","aria-label":e.ariaPreviousLabel})},(()=>[t.createVNode(s,{icon:e.iconPrev,pack:e.iconPack,both:"","aria-hidden":"true"},null,8,["icon","pack"])])):(t.openBlock(),t.createBlock(r,{key:1,class:"pagination-previous",disabled:!e.hasPrev,page:e.getPage(+e.modelValue-1),"aria-label":e.ariaPreviousLabel},{default:t.withCtx((()=>[t.createVNode(s,{icon:e.iconPrev,pack:e.iconPack,both:"","aria-hidden":"true"},null,8,["icon","pack"])])),_:1},8,["disabled","page","aria-label"])),e.$slots.next?t.renderSlot(e.$slots,"next",{key:2,page:e.getPage(+e.modelValue+1,{disabled:!e.hasNext,class:"pagination-next","aria-label":e.ariaNextLabel})},(()=>[t.createVNode(s,{icon:e.iconNext,pack:e.iconPack,both:"","aria-hidden":"true"},null,8,["icon","pack"])])):(t.openBlock(),t.createBlock(r,{key:3,class:"pagination-next",disabled:!e.hasNext,page:e.getPage(+e.modelValue+1),"aria-label":e.ariaNextLabel},{default:t.withCtx((()=>[t.createVNode(s,{icon:e.iconNext,pack:e.iconPack,both:"","aria-hidden":"true"},null,8,["icon","pack"])])),_:1},8,["disabled","page","aria-label"])),t.createElementVNode("div",ne,[e.pageInput?(t.openBlock(),t.createElementBlock("input",{key:0,class:"input",value:e.inputValue,onInput:o[0]||(o[0]=(...t)=>e.handleAllowableInputPageRange&&e.handleAllowableInputPageRange(...t)),onKeypress:o[1]||(o[1]=(...t)=>e.handleOnKeyPress&&e.handleOnKeyPress(...t)),size:e.pageCount.toString().length,maxlength:e.pageCount.toString().length},null,40,ae)):t.createCommentVNode("v-if",!0)]),e.simple?(t.openBlock(),t.createElementBlock("small",se,[1==e.perPage?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(e.firstItem)+" / "+t.toDisplayString(e.total),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(e.firstItem)+"-"+t.toDisplayString(Math.min(+e.modelValue*+e.perPage,+e.total))+" / "+t.toDisplayString(e.total),1)],64))])):(t.openBlock(),t.createElementBlock("ul",re,[t.createCommentVNode("First"),e.hasFirst?(t.openBlock(),t.createElementBlock("li",ce,[e.$slots.default?t.renderSlot(e.$slots,"default",{key:0,page:e.getPage(1)}):(t.openBlock(),t.createBlock(r,{key:1,page:e.getPage(1)},null,8,["page"]))])):t.createCommentVNode("v-if",!0),e.hasFirstEllipsis?(t.openBlock(),t.createElementBlock("li",ue,[...de])):t.createCommentVNode("v-if",!0),t.createCommentVNode("Pages"),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.pagesInRange,(o=>(t.openBlock(),t.createElementBlock("li",{key:o.number},[e.$slots.default?t.renderSlot(e.$slots,"default",{key:0,page:o}):(t.openBlock(),t.createBlock(r,{key:1,page:o},null,8,["page"]))])))),128)),t.createCommentVNode("Last"),e.hasLastEllipsis?(t.openBlock(),t.createElementBlock("li",he,[...pe])):t.createCommentVNode("v-if",!0),e.hasLast?(t.openBlock(),t.createElementBlock("li",me,[e.$slots.default?t.renderSlot(e.$slots,"default",{key:0,page:e.getPage(e.pageCount)}):(t.openBlock(),t.createBlock(r,{key:1,page:e.getPage(e.pageCount)},null,8,["page"]))])):t.createCommentVNode("v-if",!0)]))],2)}]]),fe=t.defineComponent({name:"BTablePagination",components:{BPagination:ge},props:{paginated:Boolean,total:[Number,String],perPage:[Number,String],currentPage:[Number,String],paginationSimple:Boolean,paginationSize:String,rounded:Boolean,iconPack:String,ariaNextLabel:String,ariaPreviousLabel:String,ariaPageLabel:String,ariaCurrentLabel:String,pageInput:Boolean,paginationOrder:String,pageInputPosition:String,debouncePageInput:[Number,String]},emits:{"page-change":e=>!0,"update:currentPage":e=>!0},data(){return{newCurrentPage:this.currentPage}},watch:{currentPage(e){this.newCurrentPage=e}},methods:{pageChanged(e){this.newCurrentPage=e>0?e:1,this.$emit("update:currentPage",this.newCurrentPage),this.$emit("page-change",this.newCurrentPage)}}});const ke={class:"top level"},be={class:"level-left"},Ce={class:"level-right"},ye={key:0,class:"level-item"};var ve=v(fe,[["render",function(e,o,i,l,n,a){const s=t.resolveComponent("b-pagination");return t.openBlock(),t.createElementBlock("div",ke,[t.createElementVNode("div",be,[t.renderSlot(e.$slots,"default")]),t.createElementVNode("div",Ce,[e.paginated?(t.openBlock(),t.createElementBlock("div",ye,[t.createVNode(s,{"icon-pack":e.iconPack,total:e.total,"per-page":e.perPage,simple:e.paginationSimple,size:e.paginationSize,"model-value":e.newCurrentPage,rounded:e.rounded,onChange:e.pageChanged,"aria-next-label":e.ariaNextLabel,"aria-previous-label":e.ariaPreviousLabel,"aria-page-label":e.ariaPageLabel,"aria-current-label":e.ariaCurrentLabel,"page-input":e.pageInput,order:e.paginationOrder,"page-input-position":e.pageInputPosition,"debounce-page-input":e.debouncePageInput},null,8,["icon-pack","total","per-page","simple","size","model-value","rounded","onChange","aria-next-label","aria-previous-label","aria-page-label","aria-current-label","page-input","order","page-input-position","debounce-page-input"])])):t.createCommentVNode("v-if",!0)])])}]]),we=Object.defineProperty,Se=Object.defineProperties,Be=Object.getOwnPropertyDescriptors,De=Object.getOwnPropertySymbols,Ve=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable,xe=(e,t,o)=>t in e?we(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Ie=(e,t)=>{for(var o in t||(t={}))Ve.call(t,o)&&xe(e,o,t[o]);if(De)for(var o of De(t))Pe.call(t,o)&&xe(e,o,t[o]);return e};function Ee(e,i){return l=Ie(Ie({},{label:void 0,customKey:void 0,field:void 0,meta:void 0,width:void 0,numeric:void 0,centered:void 0,searchable:void 0,sortable:void 0,visible:!0,subheading:void 0,customSort:void 0,customSearch:void 0,sticky:void 0,headerSelectable:void 0,headerClass:void 0,thAttrs:()=>({}),tdAttrs:()=>({})}),i),n={newKey:i.customKey||i.label,_isTableColumn:!0,get thClasses(){const e=this.thAttrs(this),t=[this.headerClass,{"is-sortable":this.sortable,"is-sticky":this.sticky,"is-unselectable":this.isHeaderUnSelectable}];return e&&e.class&&t.push(e.class),t},get thStyle(){const e=this.thAttrs(this),t=[this.style];return e&&e.style&&t.push(e.style),t},get thWrapStyle(){return this.style},get style(){var e;return{width:null!=(e=r(this.width))?e:void 0}},getRootClasses(e){const t=this.tdAttrs(e,this),o=[this.rootClasses];return t&&t.class&&o.push(t.class),o},getRootStyle(e){const t=this.tdAttrs(e,this),o=[];return t&&t.style&&o.push(t.style),o},$slots:{default:e=>[t.h("span",{innerHTML:o(e.row,i.field)})]},get rootClasses(){return[this.cellClass,{"has-text-right":this.numeric&&!this.centered,"has-text-centered":this.centered,"is-sticky":this.sticky}]},get isHeaderUnSelectable(){return!this.headerSelectable&&!!this.sortable}},Se(l,Be(n));var l,n}const Re={thAttrs:()=>({}),tdAttrs:()=>({}),getRootClasses:()=>[],getRootStyle:()=>{},$slots:{}};var Le=t.defineComponent({name:"BTable",components:{BCheckbox:P,BIcon:N,BInput:O,BLoading:j,BSlotComponent:_,BTableMobileSort:oe,BTablePagination:ve},mixins:[f],provide(){return{$table:this}},props:{data:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]},bordered:Boolean,striped:Boolean,narrowed:Boolean,hoverable:Boolean,loading:Boolean,detailed:Boolean,checkable:Boolean,headerCheckable:{type:Boolean,default:!0},checkboxType:{type:String,default:"is-primary"},checkboxPosition:{type:String,default:"left",validator:e=>["left","right"].indexOf(e)>=0},stickyCheckbox:{type:Boolean,default:!1},selected:Object,isRowSelectable:{type:Function,default:()=>!0},focusable:Boolean,customIsChecked:Function,isRowCheckable:{type:Function,default:()=>!0},checkedRows:{type:Array,default:()=>[]},mobileCards:{type:Boolean,default:!0},defaultSort:[String,Array],defaultSortDirection:{type:String,default:"asc"},sortIcon:{type:String,default:"arrow-up"},sortIconSize:{type:String,default:"is-small"},sortMultiple:{type:Boolean,default:!1},sortMultipleData:{type:Array,default:()=>[]},sortMultipleKey:{type:String,default:null},paginated:Boolean,currentPage:{type:Number,default:1},perPage:{type:[Number,String],default:20},showDetailIcon:{type:Boolean,default:!0},detailIcon:{type:String,default:"chevron-right"},paginationPosition:{type:String,default:"bottom",validator:e=>["bottom","top","both"].indexOf(e)>=0},paginationRounded:Boolean,backendSorting:Boolean,backendFiltering:Boolean,rowClass:{type:Function,default:()=>""},openedDetailed:{type:Array,default:()=>[]},hasDetailedVisible:{type:Function,default:()=>!0},detailKey:{type:String,default:""},detailTransition:{type:String,default:""},customDetailRow:{type:Boolean,default:!1},backendPagination:Boolean,total:{type:[Number,String],default:0},iconPack:String,mobileSortPlaceholder:String,customRowKey:String,draggable:{type:Boolean,default:!1},draggableColumn:{type:Boolean,default:!1},scrollable:Boolean,ariaNextLabel:String,ariaPreviousLabel:String,ariaPageLabel:String,ariaCurrentLabel:String,stickyHeader:Boolean,height:[Number,String],filtersEvent:{type:String,default:""},cardLayout:Boolean,showHeader:{type:Boolean,default:!0},debounceSearch:Number,caption:String,showCaption:{type:Boolean,default:!0},pageInput:{type:Boolean,default:!1},paginationOrder:String,pageInputPosition:String,debouncePageInput:[Number,String]},emits:{cellclick:(e,t,o,i)=>!0,check:(e,t)=>!0,"check-all":e=>!0,click:e=>!0,columndragend:e=>!0,columndragleave:e=>!0,columndragover:e=>!0,columndragstart:e=>!0,columndrop:e=>!0,contextmenu:(e,t)=>!0,dblclick:e=>!0,"details-close":e=>!0,"details-open":e=>!0,dragend:e=>!0,dragleave:e=>!0,dragover:e=>!0,dragstart:e=>!0,drop:e=>!0,"filters-change":e=>!0,"page-change":e=>!0,select:(e,t)=>!0,sort:(e,t,o)=>!0,"sorting-priority-removed":e=>!0,"update:checkedRows":e=>!0,"update:currentPage":e=>!0,"update:openedDetailed":e=>!0,"update:selected":e=>!0},data(){return{sortMultipleDataLocal:[],getValueByPath:o,visibleDetailRows:this.openedDetailed,newData:this.data,newDataTotal:this.backendPagination?this.total:this.data.length,newCheckedRows:[...this.checkedRows],lastCheckedRowIndex:null,newCurrentPage:this.currentPage,currentSortColumn:{},isAsc:!0,filters:{},defaultSlots:[],firstTimeSort:!0,isDraggingRow:!1,isDraggingColumn:!1,debouncedHandleFiltersChange:void 0,_selectedRow:null,mayBeTouchDragging:!1,touchDragoverTarget:null,_draggedCellEl:void 0,draggedCellContent:""}},computed:{sortMultipleDataComputed(){return this.backendSorting?this.sortMultipleData:this.sortMultipleDataLocal},tableClasses(){return{"is-bordered":this.bordered,"is-striped":this.striped,"is-narrow":this.narrowed,"is-hoverable":(this.hoverable||this.focusable)&&this.visibleData.length}},tableWrapperClasses(){return{"has-mobile-cards":this.mobileCards,"has-sticky-header":this.stickyHeader,"is-card-list":this.cardLayout,"table-container":this.isScrollable}},tableStyle(){return{height:r(this.height)}},touchDraggedCellClasses(){return{"has-mobile-cards":this.mobileCards}},visibleData(){if(!this.paginated)return this.newData;const e=this.newCurrentPage,t=+this.perPage;if(this.newData.length<=t)return this.newData;{const o=(e-1)*t,i=parseInt(o+"",10)+parseInt(t+"",10);return this.newData.slice(o,i)}},visibleColumns(){return this.newColumns?this.newColumns.filter((e=>e.visible||void 0===e.visible)):this.newColumns},isAllChecked(){const e=this.visibleData.filter((e=>this.isRowCheckable(e)));if(0===e.length)return!1;return!e.some((e=>i(this.newCheckedRows,e,this.customIsChecked)<0))},isAllUncheckable(){return 0===this.visibleData.filter((e=>this.isRowCheckable(e))).length},hasSortablenewColumns(){return this.newColumns.some((e=>e.sortable))},hasSearchablenewColumns(){return this.newColumns.some((e=>e.searchable))},hasCustomSubheadings(){return!(!this.$slots||!this.$slots.subheading)||this.newColumns.some((e=>e.subheading||e.$slots.subheading))},columnCount(){let e=this.visibleColumns.length;return e+=this.checkable?1:0,e+=this.detailed&&this.showDetailIcon?1:0,e},showDetailRowIcon(){return this.detailed&&this.showDetailIcon},isScrollable(){return!!this.scrollable||!!this.newColumns&&this.newColumns.some((e=>e.sticky))},newColumns(){return this.columns&&this.columns.length?this.columns.map((e=>Ee(0,e))):this.defaultSlots},canDragRow(){return this.draggable&&!this.isDraggingColumn},canDragColumn(){return this.draggableColumn&&!this.isDraggingRow}},watch:{data(e){this.newData=e,this.backendFiltering||(this.newData=e.filter((e=>this.isRowFiltered(e)))),this.backendSorting||this.sort(this.currentSortColumn,!0),this.backendPagination||(this.newDataTotal=this.newData.length)},total(e){this.backendPagination&&(this.newDataTotal=e)},currentPage(e){this.newCurrentPage=e},newCurrentPage(e){this.$emit("update:currentPage",e)},checkedRows(e){this.newCheckedRows=[...e]},debounceSearch:{handler(e){this.debouncedHandleFiltersChange=d(this.handleFiltersChange,e)},immediate:!0},filters:{handler(e){this.debounceSearch?this.debouncedHandleFiltersChange(e):this.handleFiltersChange(e)},deep:!0},openedDetailed(e){this.visibleDetailRows=e}},methods:{onFiltersEvent(e){this.$emit(`filters-event-${this.filtersEvent}`,{event:e,filters:this.filters})},handleFiltersChange(e){this.backendFiltering?this.$emit("filters-change",e):(this.newData=this.data.filter((e=>this.isRowFiltered(e))),this.backendPagination||(this.newDataTotal=this.newData.length),this.backendSorting||(this.sortMultiple&&this.sortMultipleDataLocal&&this.sortMultipleDataLocal.length>0?this.doSortMultiColumn():Object.keys(this.currentSortColumn).length>0&&this.doSortSingleColumn(this.currentSortColumn)))},findIndexOfSortData(e){const t=this.sortMultipleDataComputed.filter((t=>t.field===e.field))[0];return this.sortMultipleDataComputed.indexOf(t)+1},removeSortingPriority(e){this.backendSorting?this.$emit("sorting-priority-removed",e.field):(this.sortMultipleDataLocal=this.sortMultipleDataLocal.filter((t=>t.field!==e.field)),0===this.sortMultipleDataLocal.length?this.resetMultiSorting():this.newData=s(this.newData,this.sortMultipleDataLocal))},resetMultiSorting(){this.sortMultipleDataLocal=[],this.currentSortColumn=Re,this.newData=this.data},sortBy(e,t,i,l){let n=[];return n=i&&"function"==typeof i?[...e].sort(((e,t)=>i(e,t,l))):[...e].sort(((e,i)=>{let n=o(e,t),a=o(i,t);return"boolean"==typeof n&&"boolean"==typeof a?l?+n-+a:+a-+n:!c(a)&&c(n)?l?1:-1:!c(n)&&c(a)?l?-1:1:n===a?0:(n="string"==typeof n?n.toUpperCase():n,a="string"==typeof a?a.toUpperCase():a,l?n>a?1:-1:n>a?-1:1)})),n},sortMultiColumn(e){if(this.currentSortColumn=Re,!this.backendSorting){const t=this.sortMultipleDataLocal.filter((t=>t.field===e.field))[0];t?t.order="desc"===t.order?"asc":"desc":this.sortMultipleDataLocal.push({field:e.field,order:this.isAsc?"asc":"desc",customSort:e.customSort}),this.doSortMultiColumn()}},doSortMultiColumn(){this.newData=s(this.newData,this.sortMultipleDataLocal)},sort(e,o=!1,i=null){e&&e.sortable&&(!this.backendSorting&&this.sortMultiple&&(this.sortMultipleKey&&i[this.sortMultipleKey]||!this.sortMultipleKey)?o?this.doSortMultiColumn():this.sortMultiColumn(e):(this.sortMultiple&&(this.sortMultipleDataLocal=[]),o||(this.isAsc=t.toRaw(e)===t.toRaw(this.currentSortColumn)?!this.isAsc:"desc"!==this.defaultSortDirection.toLowerCase()),this.firstTimeSort||this.$emit("sort",e.field,this.isAsc?"asc":"desc",i),this.backendSorting||this.doSortSingleColumn(e),this.currentSortColumn=e))},doSortSingleColumn(e){this.newData=this.sortBy(this.newData,e.field,e.customSort,this.isAsc)},isRowSelected(e,t){return!!t&&(this.customRowKey?e[this.customRowKey]===t[this.customRowKey]:e===t)},isRowChecked(e){return i(this.newCheckedRows,e,this.customIsChecked)>=0},removeCheckedRow(e){const t=i(this.newCheckedRows,e,this.customIsChecked);t>=0&&this.newCheckedRows.splice(t,1)},checkAll(){const e=this.isAllChecked;this.visibleData.forEach((t=>{this.isRowCheckable(t)&&this.removeCheckedRow(t),e||this.isRowCheckable(t)&&this.newCheckedRows.push(t)})),this.$emit("check",this.newCheckedRows),this.$emit("check-all",this.newCheckedRows),this.$emit("update:checkedRows",this.newCheckedRows)},checkRow(e,t,o){if(!this.isRowCheckable(e))return;const i=this.lastCheckedRowIndex;this.lastCheckedRowIndex=t,o.shiftKey&&null!==i&&t!==i?this.shiftCheckRow(e,t,i):this.isRowChecked(e)?this.removeCheckedRow(e):this.newCheckedRows.push(e),this.$emit("ch