@ishitatsuyuki/oruga-next
Version:
UI components for Vue.js and CSS framework agnostic
2 lines • 259 kB
JavaScript
/*! Oruga v0.5.5-direct-export | MIT License | github.com/oruga-ui/oruga */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e=e||self).Oruga={},e.Vue)}(this,(function(e,t){"use strict";const s=Math.sign||function(e){return e<0?-1:e>0?1:0};function i(e,t){return(e&t)===t}function a(e,t){return(e%t+t)%t}function o(e,t,s){return Math.max(t,Math.min(s,e))}function n(e,t,s){const i=t.split(".").reduce((e,t)=>void 0!==e?e[t]:void 0,e);return void 0!==i?i:s}function l(e,t,s){if(!e)return-1;if(!s||"function"!=typeof s)return e.indexOf(t);for(let i=0;i<e.length;i++)if(s(e[i],t))return i;return-1}const r=e=>"object"==typeof e&&!Array.isArray(e),c=(e,t,s=!1)=>{if(s||!Object.assign){const i=s=>r(t[s])&&null!==e&&Object.prototype.hasOwnProperty.call(e,s)&&r(e[s]);let a;return a=null!=t&&Object.getOwnPropertyNames(t).map(a=>({[a]:i(a)?c(e[a],t[a],s):t[a]})).reduce((e,t)=>({...e,...t}),{}),{...e,...a}}return Object.assign(e,t)},d=c,h={Android:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/Android/i)},BlackBerry:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/BlackBerry/i)},iOS:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/iPhone|iPad|iPod/i)},Opera:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/Opera Mini/i)},Windows:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/IEMobile/i)},any:function(){return h.Android()||h.BlackBerry()||h.iOS()||h.Opera()||h.Windows()}};function u(e){void 0!==e.remove?e.remove():void 0!==e.parentNode&&null!==e.parentNode&&e.parentNode.removeChild(e)}function m(e){const t=document.createElement("div");t.style.position="absolute",t.style.left="0px",t.style.top="0px";const s=document.createElement("div");return t.appendChild(s),s.appendChild(e),document.body.appendChild(t),t}function p(e){return e?e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):e}function g(e){return void 0===e?null:isNaN(e)?e:e+"px"}function C(e){return null!=e?e:""}function f(e,t){const s=t.match(e);return e.toString().match(/<(.+?)>/g).map(e=>{const t=e.match(/<(.+)>/);return!t||t.length<=0?null:e.match(/<(.+)>/)[1]}).reduce((e,t,i)=>(s&&s.length>i?e[t]=s[i+1]:e[t]=null,e),{})}function b(e,t,s){let i;return function(){const a=this,o=arguments,n=function(){i=null,s||e.apply(a,o)},l=s&&!i;clearTimeout(i),i=setTimeout(n,t),l&&e.apply(a,o)}}const y=e=>void 0!==e;function v(e){return e?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}let k={iconPack:"mdi",useHtml5Validation:!0,statusIcon:!0,transformClasses:void 0};const S=e=>{k=e},w=()=>k;let D;const F=e=>{D=e},B={getOptions:w,setOptions(e){S(d(w(),e,!0))}},A={install(e,t={}){F(e),S(d(w(),t,!0))}},V=(e,t)=>C(e).split(" ").filter(e=>e.length>0).map(e=>e+t).join(" "),_=e=>{const t=(e.$options.computed?Object.keys(e.$options.computed):[]).filter(e=>{return s="Classes",!(-1!==(t=e).indexOf(s,t.length-s.length));var t,s}).reduce((t,s)=>(t[s]=e[s],t),{});return{props:e.$props,data:e.$data,computed:t}};var x=t.defineComponent({isOruga:!0,props:{override:Boolean},methods:{computedClass(e,t,s=""){const i=!0===this.$props.override?{}:w(),a=this.$props.override||n(i,this.$options.configField+".override",!1),o=n(i,`${this.$options.configField}.${e}.override`,a),l=n(i,"transformClasses",void 0),r=n(i,this.$options.configField+".transformClasses",void 0);let c=n(i,`${this.$options.configField}.${e}.class`,"")||n(i,`${this.$options.configField}.${e}`,""),d=n(this.$props,e);Array.isArray(d)&&(d=d.join(" ")),-1!==t.search("{*}")?t=t.replace(/\{\*\}/g,s):t+=s;let h=null;"function"==typeof d?(h=_(this),d=d(s,h)):d=V(d,s),c="function"==typeof c?c(s,h||_(this)):V(c,s);let u=((a&&!o||!a&&!o?t:"")+" "+C(c)+" "+C(d)).trim().replace(/\s\s+/g," ");return r&&(u=r(u)),l&&(u=l(u)),u}}});const N={sizes:{default:"mdi-24px",small:null,medium:"mdi-36px",large:"mdi-48px"},iconPrefix:"mdi-"},$=()=>{const e=n(w(),"iconComponent")?"":"fa-";return{sizes:{default:null,small:null,medium:e+"lg",large:e+"2x"},iconPrefix:e,internalIcons:{check:"check",information:"info-circle",alert:"exclamation-triangle","alert-circle":"exclamation-circle","arrow-up":"arrow-up","chevron-right":"angle-right","chevron-left":"angle-left","chevron-down":"angle-down","chevron-up":"angle-up",eye:"eye","eye-off":"eye-slash","caret-down":"caret-down","caret-up":"caret-up","close-circle":"times-circle",close:"times",loading:"circle-notch"}}};var P=t.defineComponent({name:"OIcon",mixins:[x],configField:"icon",props:{variant:[String,Object],component:String,pack:String,icon:String,size:String,customSize:String,customClass:String,clickable:Boolean,spin:Boolean,rotation:[Number,String],both:Boolean,rootClass:[String,Function,Array],clickableClass:[String,Function,Array],spinClass:[String,Function,Array],sizeClass:[String,Function,Array],variantClass:[String,Function,Array]},computed:{rootClasses(){return[this.computedClass("rootClass","o-icon"),{[this.computedClass("clickableClass","o-icon--clickable")]:this.clickable},{[this.computedClass("spinClass","o-icon--spin")]:this.spin},{[this.computedClass("sizeClass","o-icon--",this.size)]:this.size},{[this.computedClass("variantClass","o-icon--",this.newVariant)]:this.newVariant}]},rootStyle(){const e={};return this.rotation&&(e.transform=`rotate(${this.rotation}deg)`),e},iconConfig(){return(()=>{let e={mdi:N,fa:$(),fas:$(),far:$(),fad:$(),fab:$(),fal:$()};const t=n(w(),"customIconPacks");return t&&(e=d(e,t,!0)),e})()[this.newPack]},iconPrefix(){return this.iconConfig&&this.iconConfig.iconPrefix?this.iconConfig.iconPrefix:""},newIcon(){return`${this.iconPrefix}${this.getEquivalentIconOf(this.icon)}`},newPack(){return this.pack||n(w(),"iconPack","mdi")},newVariant(){if(!this.variant)return;let e="";return e="string"==typeof this.variant?this.variant:Object.keys(this.variant).filter(e=>this.variant[e])[0],e},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(){if(this.component)return this.component;const e=n(w(),"iconComponent");return e||null}},methods:{getEquivalentIconOf(e){return this.both&&this.iconConfig&&this.iconConfig.internalIcons&&this.iconConfig.internalIcons[e]?this.iconConfig.internalIcons[e]:e}}});P.render=function(e,s,i,a,o,n){return t.openBlock(),t.createBlock("span",{class:e.rootClasses,style:e.rootStyle},[e.useIconComponent?(t.openBlock(),t.createBlock(t.Fragment,{key:1},[t.createCommentVNode(" custom icon component "),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.useIconComponent),{icon:[e.newPack,e.newIcon],size:e.newCustomSize,class:[e.customClass]},null,8,["icon","size","class"]))],64)):(t.openBlock(),t.createBlock("i",{key:0,class:[e.newPack,e.newIcon,e.newCustomSize,e.customClass]},null,2))],6)},P.__file="src/components/icon/Icon.vue";var M=t.defineComponent({inject:{$field:{from:"$field",default:!1}},emits:["blur","focus"],props:{expanded:Boolean,rounded:Boolean,icon:String,iconPack:String,autocomplete:String,maxlength:[Number,String],useHtml5Validation:{type:Boolean,default:()=>n(w(),"useHtml5Validation",!0)},statusIcon:{type:Boolean,default:()=>n(w(),"statusIcon",!0)},validationMessage:String},data(){return{isValid:!0,isFocused:!1,newIconPack:this.iconPack}},computed:{parentField(){return this.$field},statusVariant(){if(this.parentField&&this.parentField.newVariant){if("string"==typeof this.parentField.newVariant)return this.parentField.newVariant;for(const e in this.parentField.newVariant)if(this.parentField.newVariant[e])return e}},statusMessage(){if(this.parentField)return this.parentField.newMessage||this.parentField.hasMessageSlot},statusVariantIcon(){return n(w(),"statusVariantIcon",{success:"check",danger:"alert-circle",info:"information",warning:"alert"})[this.statusVariant]||""}},methods:{focus(){const e=this.getElement();e&&this.$nextTick(()=>{e&&e.focus()})},onBlur(e){this.isFocused=!1,this.parentField&&(this.parentField.isFocused=!1),this.$emit("blur",e),this.checkHtml5Validity()},onFocus(e){this.isFocused=!0,this.parentField&&(this.parentField.isFocused=!0),this.$emit("focus",e)},getElement(){let e=this.$refs[this.$elementRef];for(;e&&e.$elementRef;)e=e.$refs[e.$elementRef];return e},setInvalid(){const e=this.validationMessage||this.getElement().validationMessage;this.setValidity("danger",e)},setValidity(e,t){this.$nextTick(()=>{this.parentField&&(this.parentField.variant||(this.parentField.newVariant=e),this.parentField.message||(this.parentField.newMessage=t))})},checkHtml5Validity(){if(!this.useHtml5Validation)return;const e=this.getElement();return e?(e.checkValidity()?(this.setValidity(null,null),this.isValid=!0):(this.setInvalid(),this.isValid=!1),this.isValid):void 0},syncFilled(e){this.parentField&&(this.parentField.isFilled=!!e)}}}),T=t.defineComponent({name:"OInput",components:{[P.name]:P},mixins:[x,M],configField:"input",inheritAttrs:!1,emits:["update:modelValue","icon-click","icon-right-click"],props:{modelValue:[Number,String],autocomplete:String,type:{type:String,default:"text"},size:String,variant:String,passwordReveal:Boolean,iconClickable:Boolean,hasCounter:{type:Boolean,default:()=>n(w(),"input.counter",!1)},autosize:{type:Boolean,default:!1},iconRight:String,iconRightClickable:Boolean,iconRightVariant:String,clearable:{type:Boolean,default:()=>n(w(),"input.clearable",!1)},rootClass:[String,Function,Array],expandedClass:[String,Function,Array],iconLeftSpaceClass:[String,Function,Array],iconRightSpaceClass:[String,Function,Array],inputClass:[String,Function,Array],roundedClass:[String,Function,Array],iconLeftClass:[String,Function,Array],iconRightClass:[String,Function,Array],counterClass:[String,Function,Array],sizeClass:[String,Function,Array],variantClass:[String,Function,Array]},data(){return{newValue:this.modelValue,newType:this.type,newAutocomplete:this.autocomplete||n(w(),"input.autocompletete","off"),isPasswordVisible:!1,height:"auto"}},computed:{rootClasses(){return[this.computedClass("rootClass","o-ctrl-input"),{[this.computedClass("expandedClass","o-ctrl-input--expanded")]:this.expanded}]},inputClasses(){return[this.computedClass("inputClass","o-input"),{[this.computedClass("roundedClass","o-input--rounded")]:this.rounded},{[this.computedClass("sizeClass","o-input--",this.size)]:this.size},{[this.computedClass("variantClass","o-input--",this.statusVariant||this.variant)]:this.statusVariant||this.variant},{[this.computedClass("textareaClass","o-input__textarea")]:"textarea"===this.type},{[this.computedClass("iconLeftSpaceClass","o-input-iconspace-left")]:this.icon},{[this.computedClass("iconRightSpaceClass","o-input-iconspace-right")]:this.hasIconRight}]},iconLeftClasses(){return[this.computedClass("iconLeftClass","o-input__icon-left")]},iconRightClasses(){return[this.computedClass("iconRightClass","o-input__icon-right")]},counterClasses(){return[this.computedClass("counterClass","o-input__counter")]},computedValue:{get(){return this.newValue},set(e){this.newValue=e,this.$emit("update:modelValue",this.newValue),this.syncFilled(this.newValue),!this.isValid&&this.checkHtml5Validity()}},hasIconRight(){return this.passwordReveal||this.statusIcon&&this.statusVariantIcon||this.clearable&&this.newValue||this.iconRight},rightIcon(){return this.passwordReveal?this.passwordVisibleIcon:this.clearable&&this.newValue?"close-circle":this.iconRight?this.iconRight:this.statusVariantIcon},rightIconVariant(){return this.passwordReveal||this.iconRight?this.iconRightVariant||this.variant||null:this.statusVariant},hasMessage(){return!!this.statusMessage},passwordVisibleIcon(){return this.isPasswordVisible?"eye-off":"eye"},valueLength(){return"string"==typeof this.computedValue?this.computedValue.length:"number"==typeof this.computedValue?this.computedValue.toString().length:0},computedStyles(){return this.autosize?{resize:"none",height:this.height,overflow:"hidden"}:{}},$elementRef(){return"textarea"===this.type?"textarea":"input"}},watch:{modelValue:{immediate:!0,handler(e){this.newValue=e,this.syncFilled(this.newValue),this.autosize&&this.resize()}}},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.clearable?this.computedValue="":this.iconRightClickable&&this.iconClick("icon-right-click",e)},resize(){this.height="auto",this.$nextTick(()=>{let e=this.$refs.textarea.scrollHeight;this.height=e+"px"})}}});T.render=function(e,s,i,a,o,n){const l=t.resolveComponent("o-icon");return t.openBlock(),t.createBlock("div",{class:e.rootClasses},["textarea"!==e.type?(t.openBlock(),t.createBlock("input",t.mergeProps({key:0},e.$attrs,{ref:"input",class:e.inputClasses,type:e.newType,autocomplete:e.newAutocomplete,maxlength:e.maxlength,value:e.computedValue,onInput:s[1]||(s[1]=t=>e.computedValue=t.target.value),onBlur:s[2]||(s[2]=(...t)=>e.onBlur(...t)),onFocus:s[3]||(s[3]=(...t)=>e.onFocus(...t))}),null,16,["type","autocomplete","maxlength","value"])):(t.openBlock(),t.createBlock("textarea",t.mergeProps({key:1},e.$attrs,{ref:"textarea",class:e.inputClasses,maxlength:e.maxlength,value:e.computedValue,onInput:s[4]||(s[4]=t=>e.computedValue=t.target.value),onBlur:s[5]||(s[5]=(...t)=>e.onBlur(...t)),onFocus:s[6]||(s[6]=(...t)=>e.onFocus(...t)),style:e.computedStyles}),null,16,["maxlength","value"])),e.icon?t.createVNode(l,{key:2,class:e.iconLeftClasses,clickable:e.iconClickable,icon:e.icon,pack:e.iconPack,size:e.size,onClick:s[7]||(s[7]=t=>e.iconClick("icon-click",t))},null,8,["class","clickable","icon","pack","size"]):t.createCommentVNode("v-if",!0),e.hasIconRight?t.createVNode(l,{key:3,class:e.iconRightClasses,clickable:e.passwordReveal||e.clearable||e.iconRightClickable,icon:e.rightIcon,pack:e.iconPack,size:e.size,variant:e.rightIconVariant,both:"",onClick:e.rightIconClick},null,8,["class","clickable","icon","pack","size","variant","onClick"]):t.createCommentVNode("v-if",!0),e.maxlength&&e.hasCounter&&e.isFocused&&"number"!==e.type?(t.openBlock(),t.createBlock("small",{key:4,class:e.counterClasses},t.toDisplayString(e.valueLength)+" / "+t.toDisplayString(e.maxlength),3)):t.createCommentVNode("v-if",!0)],2)},T.__file="src/components/input/Input.vue";var O=t.defineComponent({name:"OAutocomplete",configField:"autocomplete",components:{[T.name]:T},mixins:[x,M],inheritAttrs:!1,emits:["update:modelValue","select","infinite-scroll","typing","focus","blur","icon-click","icon-right-click"],props:{modelValue:[Number,String],data:{type:Array,default:()=>[]},autocomplete:String,size:String,field:{type:String,default:"value"},keepFirst:Boolean,clearOnSelect:Boolean,openOnFocus:Boolean,customFormatter:Function,checkInfiniteScroll:Boolean,keepOpen:Boolean,clearable:Boolean,maxHeight:[String,Number],menuPosition:{type:String,default:"auto"},animation:{type:String,default:()=>n(w(),"autocomplete.animation","fade")},groupField:String,groupOptions:String,debounceTyping:Number,iconRight:String,iconRightClickable:Boolean,appendToBody:Boolean,confirmKeys:{type:Array,default:()=>["Tab","Enter"]},type:{type:String,default:"text"},menuTag:{type:String,default:()=>n(w(),"autocomplete.menuTag","div")},itemTag:{type:String,default:()=>n(w(),"autocomplete.itemTag","div")},selectOnClickOutside:Boolean,selectableHeader:Boolean,selectableFooter:Boolean,rootClass:[String,Function,Array],menuClass:[String,Function,Array],expandedClass:[String,Function,Array],menuPositionClass:[String,Function,Array],itemClass:[String,Function,Array],itemHoverClass:[String,Function,Array],itemGroupTitleClass:[String,Function,Array],itemEmptyClass:[String,Function,Array],itemHeaderClass:[String,Function,Array],itemFooterClass:[String,Function,Array],inputClasses:{type:Object,default:()=>n(w(),"autocomplete.inputClasses",{})}},data(){return{selected:null,hovered:null,headerHovered:null,footerHovered:null,isActive:!1,newValue:this.modelValue,ariaAutocomplete:this.keepFirst?"both":"list",newAutocomplete:this.autocomplete||"off",isListInViewportVertically:!0,hasFocus:!1,itemRefs:[],width:void 0,bodyEl:void 0}},computed:{rootClasses(){return[this.computedClass("rootClass","o-acp"),{[this.computedClass("expandedClass","o-acp--expanded")]:this.expanded}]},menuClasses(){return[this.computedClass("menuClass","o-acp__menu"),{[this.computedClass("menuPositionClass","o-acp__menu--",this.newDropdownPosition)]:!this.appendToBody}]},itemClasses(){return[this.computedClass("itemClass","o-acp__item")]},itemEmptyClasses(){return[...this.itemClasses,this.computedClass("itemEmptyClass","o-acp__item--empty")]},itemGroupClasses(){return[...this.itemClasses,this.computedClass("itemGroupTitleClass","o-acp__item-group-title")]},itemHeaderClasses(){return[...this.itemClasses,this.computedClass("itemHeaderClass","o-acp__item-header"),{[this.computedClass("itemHoverClass","o-acp__item--hover")]:this.headerHovered}]},itemFooterClasses(){return[...this.itemClasses,this.computedClass("itemFooterClass","o-acp__item-footer"),{[this.computedClass("itemHoverClass","o-acp__item--hover")]:this.footerHovered}]},inputBind(){return{...this.$attrs,...this.inputClasses}},computedData(){if(this.groupField){if(this.groupOptions){const e=[];return this.data.forEach(t=>{const s=n(t,this.groupField),i=n(t,this.groupOptions);e.push({group:s,items:i})}),e}{const e={};this.data.forEach(t=>{const s=n(t,this.groupField);e[s]||(e[s]=[]),e[s].push(t)});const t=[];return Object.keys(this.data).forEach(e=>{t.push({group:e,items:this.data[e]})}),t}}return[{items:this.data}]},isEmpty(){return!this.computedData||!this.computedData.some(e=>e.items&&e.items.length)},whiteList(){const e=[];if(e.push(this.$refs.input.$el.querySelector("input")),e.push(this.$refs.dropdown),void 0!==this.$refs.dropdown){const t=this.$refs.dropdown.querySelectorAll("*");for(const s of t)e.push(s)}return e},newDropdownPosition(){return"top"===this.menuPosition||"auto"===this.menuPosition&&!this.isListInViewportVertically?"top":"bottom"},newIconRight(){return this.clearable&&this.newValue?"close-circle":this.iconRight},newIconRightClickable(){return!!this.clearable||this.iconRightClickable},menuStyle(){return{maxHeight:g(this.maxHeight)}},$elementRef:()=>"input"},watch:{modelValue(e){this.newValue=e},isActive(e){"auto"===this.menuPosition&&(e?this.calcDropdownInViewportVertical():setTimeout(()=>{this.calcDropdownInViewportVertical()},100))},newValue(e){this.$emit("update:modelValue",e);const t=this.getValue(this.selected);t&&t!==e&&this.setSelected(null,!1),!this.hasFocus||this.openOnFocus&&!e||(this.isActive=!!e)},data(){if(this.keepFirst)this.$nextTick(()=>{this.isActive?this.selectFirstOption(this.computedData):this.setHovered(null)});else if(this.hovered){const e=this.getValue(this.hovered);this.computedData.map(e=>e.items).reduce((e,t)=>[...e,...t],[]).some(t=>this.getValue(t)===e)||this.setHovered(null)}},debounceTyping:{handler(e){this.debouncedEmitTyping=b(this.emitTyping,e)},immediate:!0}},methods:{itemOptionClasses(e){return[...this.itemClasses,{[this.computedClass("itemHoverClass","o-acp__item--hover")]:e===this.hovered}]},setHovered(e){void 0!==e&&(this.hovered=e)},setSelected(e,t=!0,s){if(void 0!==e){if(this.selected=e,this.$emit("select",this.selected,s),null!==this.selected){if(this.clearOnSelect){const e=this.$refs.input;e.newValue="",e.$refs.input.value=""}else this.newValue=this.getValue(this.selected);this.setHovered(null)}t&&this.$nextTick(()=>{this.isActive=!1}),this.checkValidity()}},selectFirstOption(e){this.$nextTick(()=>{const t=e.filter(e=>e.items&&e.items.length);if(t.length){const e=t[0].items[0];this.setHovered(e)}else this.setHovered(null)})},keydown(e){const{key:t}=e;if("Enter"===t&&e.preventDefault(),"Escape"!==t&&"Tab"!==t||(this.isActive=!1),this.confirmKeys.indexOf(t)>=0){","===t&&e.preventDefault();const s=!this.keepOpen||"Tab"===t;if(null===this.hovered)return void this.checkIfHeaderOrFooterSelected(e,null,s);this.setSelected(this.hovered,s,e)}},selectHeaderOrFoterByClick(e,t){this.checkIfHeaderOrFooterSelected(e,{origin:t})},checkIfHeaderOrFooterSelected(e,t,s=!0){this.selectableHeader&&(this.headerHovered||t&&"header"===t.origin)&&(this.$emit("select-header",e),this.headerHovered=!1,t&&this.setHovered(null),s&&(this.isActive=!1)),this.selectableFooter&&(this.footerHovered||t&&"header"===t.origin)&&(this.$emit("select-footer",e),this.footerHovered=!1,t&&this.setHovered(null),s&&(this.isActive=!1))},clickedOutside(e){!this.hasFocus&&this.whiteList.indexOf(e.target)<0&&(this.keepFirst&&this.hovered&&this.selectOnClickOutside?this.setSelected(this.hovered,!0):this.isActive=!1)},getValue(e){if(null!==e)return void 0!==this.customFormatter?this.customFormatter(e):"object"==typeof e?n(e,this.field):e},checkIfReachedTheEndOfScroll(){const e=this.$refs.dropdown;e.clientHeight!==e.scrollHeight&&e.scrollTop+e.clientHeight>=e.scrollHeight&&this.$emit("infinite-scroll")},calcDropdownInViewportVertical(){this.$nextTick(()=>{if(!this.$refs.dropdown)return;const e=this.$refs.dropdown.getBoundingClientRect();this.isListInViewportVertically=e.top>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight),this.appendToBody&&this.updateAppendToBody()})},keyArrows(e){const t="down"===e?1:-1;if(this.isActive){const e=this.computedData.map(e=>e.items).reduce((e,t)=>[...e,...t],[]);let s;this.$slots.header&&this.selectableHeader&&e.unshift(void 0),this.$slots.footer&&this.selectableFooter&&e.push(void 0),s=this.headerHovered?0+t:this.footerHovered?e.length-1+t:e.indexOf(this.hovered)+t,s=s>e.length-1?e.length-1:s,s=s<0?0:s,this.footerHovered=!1,this.headerHovered=!1,this.setHovered(void 0!==e[s]?e[s]:null),this.$slots.footer&&this.selectableFooter&&s===e.length-1&&(this.footerHovered=!0),this.$slots.header&&this.selectableHeader&&0===s&&(this.headerHovered=!0);const i=this.$refs.dropdown;let a=this.itemRefs||[];this.$slots.header&&this.selectableHeader&&(a=[this.$refs.header,...a]),this.$slots.footer&&this.selectableFooter&&(a=[...a,this.$refs.footer]);const o=a[s];if(!o)return;const n=i.scrollTop,l=i.scrollTop+i.clientHeight-o.clientHeight;o.offsetTop<n?i.scrollTop=o.offsetTop:o.offsetTop>=l&&(i.scrollTop=o.offsetTop-i.clientHeight+o.clientHeight)}else this.isActive=!0},focused(e){this.getValue(this.selected)===this.newValue&&this.$el.querySelector("input").select(),this.openOnFocus&&(this.isActive=!0,this.keepFirst&&this.selectFirstOption(this.computedData)),this.hasFocus=!0,this.$emit("focus",e)},onBlur(e){this.hasFocus=!1,this.$emit("blur",e)},onInput(){const e=this.getValue(this.selected);e&&e===this.newValue||(this.debounceTyping?this.debouncedEmitTyping():this.emitTyping())},emitTyping(){this.$emit("typing",this.newValue),this.checkValidity()},rightIconClick(e){this.clearable?(this.newValue="",this.setSelected(null,!1),this.openOnFocus&&this.$refs.input.$el.focus()):this.$emit("icon-right-click",e)},checkValidity(){this.useHtml5Validation&&this.$nextTick(()=>{this.checkHtml5Validity()})},setItemRef(e){e&&this.itemRefs.push(e)},updateAppendToBody(){const e=this.$refs.dropdown,t=this.$refs.input.$el;if(e&&t){const s=this.$data.bodyEl;s.classList.forEach(e=>s.classList.remove(...e.split(" "))),this.rootClasses.forEach(e=>{e&&("object"==typeof e?Object.keys(e).filter(t=>t&&e[t]).forEach(e=>s.classList.add(e)):s.classList.add(...e.split(" ")))});const i=t.getBoundingClientRect();let a=i.top+window.scrollY;const o=i.left+window.scrollX;"top"!==this.newDropdownPosition?a+=t.clientHeight:a-=e.clientHeight,e.style.position="absolute",e.style.top=a+"px",e.style.left=o+"px",e.style.width=t.clientWidth+"px",e.style.maxWidth=t.clientWidth+"px",e.style.zIndex="9999"}}},created(){"undefined"!=typeof window&&(document.addEventListener("click",this.clickedOutside),"auto"===this.menuPosition&&window.addEventListener("resize",this.calcDropdownInViewportVertical))},mounted(){const e=this.$refs.dropdown;this.checkInfiniteScroll&&e&&e.addEventListener("scroll",this.checkIfReachedTheEndOfScroll),this.appendToBody&&(this.$data.bodyEl=m(e),this.updateAppendToBody())},beforeUpdate(){this.width=this.$refs.input?this.$refs.input.$el.clientWidth:void 0,this.itemRefs=[]},beforeUnmount(){if("undefined"!=typeof window&&(document.removeEventListener("click",this.clickedOutside),"auto"===this.menuPosition&&window.removeEventListener("resize",this.calcDropdownInViewportVertical)),this.checkInfiniteScroll&&this.$refs.dropdown){this.$refs.dropdown.removeEventListener("scroll",this.checkIfReachedTheEndOfScroll)}this.appendToBody&&u(this.$data.bodyEl)}});const I={key:1},L={key:1};O.render=function(e,s,i,a,o,n){const l=t.resolveComponent("o-input");return t.openBlock(),t.createBlock("div",{class:e.rootClasses},[t.createVNode(l,t.mergeProps(e.inputBind,{modelValue:e.newValue,"onUpdate:modelValue":[s[1]||(s[1]=t=>e.newValue=t),e.onInput],ref:"input",type:e.type,size:e.size,rounded:e.rounded,icon:e.icon,"icon-right":e.newIconRight,"icon-right-clickable":e.newIconRightClickable,"icon-pack":e.iconPack,maxlength:e.maxlength,autocomplete:e.newAutocomplete,"use-html5-validation":!1,"aria-autocomplete":e.ariaAutocomplete,expanded:e.expanded,onFocus:e.focused,onBlur:e.onBlur,onKeydown:[e.keydown,s[2]||(s[2]=t.withKeys(t.withModifiers(t=>e.keyArrows("up"),["prevent"]),["up"])),s[3]||(s[3]=t.withKeys(t.withModifiers(t=>e.keyArrows("down"),["prevent"]),["down"]))],"onIcon-right-click":e.rightIconClick,"onIcon-click":s[4]||(s[4]=t=>e.$emit("icon-click",t))}),null,16,["modelValue","type","size","rounded","icon","icon-right","icon-right-clickable","icon-pack","maxlength","autocomplete","aria-autocomplete","expanded","onUpdate:modelValue","onFocus","onBlur","onKeydown","onIcon-right-click"]),t.createVNode(t.Transition,{name:e.animation},{default:t.withCtx(()=>[t.withDirectives(t.createVNode("div",{class:e.menuClasses,is:e.menuTag,style:e.menuStyle,ref:"dropdown"},[e.$slots.header?(t.openBlock(),t.createBlock("div",{key:0,is:e.itemTag,ref:"header",role:"button",tabindex:0,onClick:s[5]||(s[5]=t=>e.selectHeaderOrFoterByClick(t,"header")),class:e.itemHeaderClasses},[t.renderSlot(e.$slots,"header")],10,["is"])):t.createCommentVNode("v-if",!0),(t.openBlock(!0),t.createBlock(t.Fragment,null,t.renderList(e.computedData,(s,i)=>(t.openBlock(),t.createBlock(t.Fragment,null,[s.group?(t.openBlock(),t.createBlock("div",{is:e.itemTag,key:i+"group",class:e.itemGroupClasses},[e.$slots.group?t.renderSlot(e.$slots,"group",{key:0,group:s.group,index:i}):(t.openBlock(),t.createBlock("span",I,t.toDisplayString(s.group),1))],10,["is"])):t.createCommentVNode("v-if",!0),(t.openBlock(!0),t.createBlock(t.Fragment,null,t.renderList(s.items,(s,a)=>(t.openBlock(),t.createBlock("div",{key:i+":"+a,is:e.itemTag,class:e.itemOptionClasses(s),onClick:t.withModifiers(t=>e.setSelected(s,!e.keepOpen,t),["stop"]),ref:e.setItemRef},[e.$slots.default?t.renderSlot(e.$slots,"default",{key:0,option:s,index:a}):(t.openBlock(),t.createBlock("span",L,t.toDisplayString(e.getValue(s)),1))],10,["is","onClick"]))),128))],64))),256)),e.isEmpty&&e.$slots.empty?(t.openBlock(),t.createBlock("div",{key:1,is:e.itemTag,class:e.itemEmptyClasses},[t.renderSlot(e.$slots,"empty")],10,["is"])):t.createCommentVNode("v-if",!0),e.$slots.footer?(t.openBlock(),t.createBlock("div",{key:2,is:e.itemTag,ref:"footer",role:"button",tabindex:0,onClick:s[6]||(s[6]=t=>e.selectHeaderOrFoterByClick(t,"footer")),class:e.itemFooterClasses},[t.renderSlot(e.$slots,"footer")],10,["is"])):t.createCommentVNode("v-if",!0)],14,["is"]),[[t.vShow,e.isActive&&(!e.isEmpty||e.$slots.empty||e.$slots.header||e.$slots.footer)]])]),_:1},8,["name"])],2)},O.__file="src/components/autocomplete/Autocomplete.vue";var R=t.defineComponent({name:"OButton",components:{[P.name]:P},configField:"button",mixins:[x],inheritAttrs:!1,props:{variant:String,size:String,label:String,iconPack:String,iconLeft:String,iconRight:String,rounded:{type:Boolean,default:()=>n(w(),"button.rounded",!1)},outlined:Boolean,expanded:Boolean,inverted:Boolean,nativeType:{type:String,default:"button",validator:e=>["button","submit","reset"].indexOf(e)>=0},tag:{type:String,default:"button"},disabled:Boolean,iconBoth:Boolean,elementsWrapperClass:[String,Function,Array],rootClass:[String,Function,Array],outlinedClass:[String,Function,Array],invertedClass:[String,Function,Array],expandedClass:[String,Function,Array],roundedClass:[String,Function,Array],disabledClass:[String,Function,Array],iconClass:[String,Function,Array],iconLeftClass:[String,Function,Array],iconRightClass:[String,Function,Array],labelClass:[String,Function,Array],sizeClass:[String,Function,Array],variantClass:[String,Function,Array]},computed:{rootClasses(){return[this.computedClass("rootClass","o-btn"),{[this.computedClass("sizeClass","o-btn--",this.size)]:this.size},{[this.computedClass("variantClass","o-btn--",this.variant)]:this.variant},{[this.computedClass("outlinedClass","o-btn--outlined")]:this.outlined&&!this.variant},{[this.computedClass("invertedClass","o-btn--inverted")]:this.inverted&&!this.variant},{[this.computedClass("outlinedClass","o-btn--outlined-",this.variant)]:this.outlined&&this.variant},{[this.computedClass("invertedClass","o-btn--inverted-",this.variant)]:this.inverted&&this.variant},{[this.computedClass("expandedClass","o-btn--expanded")]:this.expanded},{[this.computedClass("roundedClass","o-btn--rounded")]:this.rounded},{[this.computedClass("disabledClass","o-btn--disabled")]:this.disabled}]},labelClasses(){return[this.computedClass("labelClass","o-btn__label")]},iconClasses(){return[this.computedClass("iconClass","o-btn__icon")]},iconLeftClasses(){return[...this.iconClasses,this.computedClass("iconLeftClass","o-btn__icon-left")]},iconRightClasses(){return[...this.iconClasses,this.computedClass("iconRightClass","o-btn__icon-right")]},elementsWrapperClasses(){return[this.computedClass("elementsWrapperClass","o-btn__wrapper")]},computedTag(){return void 0!==this.disabled&&!1!==this.disabled?"button":this.tag},computedNativeType(){return"button"===this.tag||"input"===this.tag?this.nativeType:null},computedDisabled(){return!!this.disabled||null}}});R.render=function(e,s,i,a,o,n){const l=t.resolveComponent("o-icon");return t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.computedTag),t.mergeProps(e.$attrs,{disabled:e.computedDisabled,type:e.computedNativeType,class:e.rootClasses}),{default:t.withCtx(()=>[t.createVNode("span",{class:e.elementsWrapperClasses},[e.iconLeft?t.createVNode(l,{key:0,pack:e.iconPack,icon:e.iconLeft,size:e.size,both:e.iconBoth,class:e.iconLeftClasses},null,8,["pack","icon","size","both","class"]):t.createCommentVNode("v-if",!0),e.label||e.$slots.default?(t.openBlock(),t.createBlock("span",{key:1,class:e.labelClasses},[t.renderSlot(e.$slots,"default",{},()=>[t.createTextVNode(t.toDisplayString(e.label),1)])],2)):t.createCommentVNode("v-if",!0),e.iconRight?t.createVNode(l,{key:2,pack:e.iconPack,icon:e.iconRight,size:e.size,both:e.iconBoth,class:e.iconRightClasses},null,8,["pack","icon","size","both","class"]):t.createCommentVNode("v-if",!0)],2)]),_:1},16,["disabled","type","class"])},R.__file="src/components/button/Button.vue";var H=(e,s=0)=>{const a=t.defineComponent({provide(){return{["o"+e]:this}}});return i(s,1)&&(a.data=function(){return{childItems:[],sequence:1}},a.methods={_registerItem(t){t.index=this.childItems.length,this.childItems.push(t),this.$el&&this.$nextTick(()=>{const t=this.childItems.map(t=>`[data-id="${e}-${t.newValue}"]`).join(","),s=Array.from(this.$el.querySelectorAll(t)).map(t=>t.getAttribute("data-id").replace(e+"-",""));this.childItems.forEach(e=>e.index=s.indexOf(""+e.newValue))})},_unregisterItem(e){this.childItems=this.childItems.filter(t=>t!==e)},_nextSequence(){return this.sequence++}},i(s,3)&&(a.computed={sortedItems(){return this.childItems.slice().sort((e,t)=>e.index-t.index)}})),a},E=t.defineComponent({name:"OCarousel",components:{[P.name]:P},configField:"carousel",mixins:[H("carousel",3),x],emits:["update:modelValue","scroll","click"],props:{modelValue:{type:Number,default:0},interval:{type:Number,default:()=>n(w(),"carousel.interval",3500)},hasDrag:{type:Boolean,default:!0},autoplay:{type:Boolean,default:!1},pauseHover:{type:Boolean,default:!1},repeat:{type:Boolean,default:!1},indicator:{type:Boolean,default:!0},indicatorInside:{type:Boolean,default:!1},indicatorMode:{type:String,default:"click"},indicatorPosition:{type:String,default:"bottom"},indicatorStyle:{type:String,default:"dots"},overlay:Boolean,itemsToShow:{type:Number,default:1},itemsToList:{type:Number,default:1},asIndicator:Boolean,arrow:{type:Boolean,default:!0},arrowHover:{type:Boolean,default:!0},iconPack:String,iconSize:String,iconPrev:{type:String,default:()=>n(w(),"carousel.iconPrev","chevron-left")},iconNext:{type:String,default:()=>n(w(),"carousel.iconNext","chevron-right")},breakpoints:{type:Object,default:()=>({})},rootClass:[String,Function,Array],overlayClass:[String,Function,Array],sceneClass:[String,Function,Array],itemsClass:[String,Function,Array],itemsDraggingClass:[String,Function,Array],arrowIconClass:[String,Function,Array],arrowIconPrevClass:[String,Function,Array],arrowIconNextClass:[String,Function,Array],indicatorsClass:[String,Function,Array],indicatorsInsideClass:[String,Function,Array],indicatorsInsidePositionClass:[String,Function,Array],indicatorItemClass:[String,Function,Array],indicatorItemActiveClass:[String,Function,Array],indicatorItemStyleClass:[String,Function,Array]},data(){return{activeIndex:this.modelValue,scrollIndex:this.modelValue,delta:0,dragX:!1,hold:0,windowWidth:0,touch:!1,observer:null,refresh_:0,itemsHovered:!1,isPause:!1,timer:null}},computed:{rootClasses(){return[this.computedClass("rootClass","o-car"),{[this.computedClass("overlayClass","o-car__overlay")]:this.overlay}]},sceneClasses(){return[this.computedClass("sceneClass","o-car__scene")]},itemsClasses(){return[this.computedClass("itemsClass","o-car__items"),{[this.computedClass("itemsDraggingClass","o-car__items--dragging")]:this.dragging}]},arrowIconClasses(){return[this.computedClass("arrowIconClass","o-car__arrow__icon")]},arrowIconPrevClasses(){return[...this.arrowIconClasses,this.computedClass("arrowIconPrevClass","o-car__arrow__icon-prev")]},arrowIconNextClasses(){return[...this.arrowIconClasses,this.computedClass("arrowIconNextClass","o-car__arrow__icon-next")]},indicatorsClasses(){return[this.computedClass("indicatorsClass","o-car__indicators"),{[this.computedClass("indicatorsInsideClass","o-car__indicators--inside")]:this.indicatorInside},{[this.computedClass("indicatorsInsidePositionClass","o-car__indicators--inside--",this.indicatorPosition)]:this.indicatorInside&&this.indicatorPosition}]},indicatorClasses(){return[this.computedClass("indicatorClass","o-car__indicator")]},dragging(){return!1!==this.dragX},itemStyle(){return`width: ${this.itemWidth}px;`},translation(){return-o(this.delta+this.scrollIndex*this.itemWidth,0,(this.childItems.length-this.settings.itemsToShow)*this.itemWidth)},total(){return this.childItems.length-this.settings.itemsToShow},indicatorCount(){return Math.ceil(this.total/this.settings.itemsToList)+1},indicatorIndex(){return Math.ceil(this.scrollIndex/this.settings.itemsToList)},hasArrows(){return this.settings.arrowHover&&this.itemsHovered||!this.settings.arrowHover},hasPrev(){return(this.settings.repeat||this.scrollIndex>0)&&this.hasArrows},hasNext(){return(this.settings.repeat||this.scrollIndex<this.total)&&this.hasArrows},breakpointKeys(){return Object.keys(this.breakpoints).map(Number).sort((e,t)=>t-e)},settings(){let e=this.breakpointKeys.filter(e=>{if(this.windowWidth>=e)return!0})[0];return e?{...this.$props,...this.breakpoints[e]}:this.$props},itemWidth(){if(this.windowWidth){this.refresh_;return this.$el.getBoundingClientRect().width/this.settings.itemsToShow}return 0}},watch:{modelValue(e){e<=this.childItems.length-1&&(this.activeIndex=e,this.switchTo(e*this.settings.itemsToList,!0))},autoplay(e){e?this.startTimer():this.pauseTimer()},repeat(e){e&&this.startTimer()}},methods:{indicatorItemClasses(e){return[this.computedClass("indicatorItemClass","o-car__indicator__item"),{[this.computedClass("indicatorItemActiveClass","o-car__indicator__item--active")]:this.indicatorIndex===e},{[this.computedClass("indicatorItemStyleClass","o-car__indicator__item--",this.indicatorStyle)]:this.indicatorStyle}]},onMouseEnter(){this.itemsHovered=!0,this.checkPause()},onMouseLeave(){this.itemsHovered=!1,this.startTimer()},startTimer(){this.autoplay&&!this.timer&&(this.isPause=!1,this.timer=setInterval(()=>{!this.repeat&&this.activeIndex>=this.childItems.length-1?this.pauseTimer():this.next()},this.interval))},pauseTimer(){this.isPause=!0,this.timer&&(clearInterval(this.timer),this.timer=null)},restartTimer(){this.pauseTimer(),this.startTimer()},checkPause(){this.pauseHover&&this.autoplay&&this.pauseTimer()},modeChange(e,t){if(this.indicatorMode===e)return this.switchTo(t*this.settings.itemsToList)},resized(){this.windowWidth=window.innerWidth},switchTo(e,t=this.asIndicator){this.settings.repeat&&(e=a(e,this.total+1)),e=o(e,0,this.total),this.scrollIndex=e,this.$emit("scroll",this.indicatorIndex),t||(this.activeIndex=Math.ceil(e/this.settings.itemsToList),this.modelValue!==this.activeIndex&&this.$emit("update:modelValue",this.activeIndex))},next(){this.switchTo(this.scrollIndex+this.settings.itemsToList)},prev(){this.switchTo(this.scrollIndex-this.settings.itemsToList)},dragStart(e){this.dragging||!this.settings.hasDrag||0!==e.button&&"touchstart"!==e.type||(this.hold=Date.now(),this.touch=!!e.touches,this.dragX=this.touch?e.touches[0].clientX:e.clientX,this.touch&&this.pauseTimer(),window.addEventListener(this.touch?"touchmove":"mousemove",this.dragMove),window.addEventListener(this.touch?"touchend":"mouseup",this.dragEnd))},dragMove(e){if(!this.dragging)return;const t=e.touches?(e.changedTouches[0]||e.touches[0]).clientX:e.clientX;this.delta=this.dragX-t,e.touches||e.preventDefault()},dragEnd(e){if(this.dragging||this.hold){if(this.hold){const e=s(this.delta),t=Math.round(Math.abs(this.delta/this.itemWidth)+.15);this.switchTo(this.scrollIndex+e*t)}this.delta=0,this.dragX=!1,e&&e.touches&&this.startTimer(),window.removeEventListener(this.touch?"touchmove":"mousemove",this.dragMove),window.removeEventListener(this.touch?"touchend":"mouseup",this.dragEnd)}},refresh(){this.$nextTick(()=>{this.refresh_++})}},mounted(){if("undefined"!=typeof window&&(window.ResizeObserver&&(this.observer=new window.ResizeObserver(this.refresh),this.observer.observe(this.$el)),window.addEventListener("resize",this.resized),document.addEventListener("animationend",this.refresh),document.addEventListener("transitionend",this.refresh),document.addEventListener("transitionstart",this.refresh),this.resized(),this.startTimer()),this.$attrs.config)throw new Error("The config prop was removed, you need to use v-bind instead")},beforeUnmount(){"undefined"!=typeof window&&(window.ResizeObserver&&this.observer.disconnect(),window.removeEventListener("resize",this.resized),document.removeEventListener("animationend",this.refresh),document.removeEventListener("transitionend",this.refresh),document.removeEventListener("transitionstart",this.refresh),this.dragEnd(),this.pauseTimer())}});E.render=function(e,s,i,a,o,n){const l=t.resolveComponent("o-icon");return t.openBlock(),t.createBlock("div",{class:e.rootClasses,onMouseenter:s[3]||(s[3]=(...t)=>e.onMouseEnter(...t)),onMouseleave:s[4]||(s[4]=(...t)=>e.onMouseLeave(...t))},[t.createVNode("div",{class:e.sceneClasses},[t.createVNode("div",{onMousedown:s[1]||(s[1]=t.withModifiers((...t)=>e.dragStart(...t),["prevent"])),onTouchstart:s[2]||(s[2]=(...t)=>e.dragStart(...t)),class:e.itemsClasses,style:"transform:translateX("+e.translation+"px)"},[t.renderSlot(e.$slots,"default")],38),t.renderSlot(e.$slots,"arrow",{hasPrev:e.hasPrev,prev:e.prev,hasNext:e.hasNext,next:e.next},()=>[e.arrow?(t.openBlock(),t.createBlock(t.Fragment,{key:0},[t.withDirectives(t.createVNode(l,{class:e.arrowIconPrevClasses,onClick:e.prev,pack:e.iconPack,icon:e.iconPrev,size:e.iconSize,both:""},null,8,["class","onClick","pack","icon","size"]),[[t.vShow,e.hasPrev]]),t.withDirectives(t.createVNode(l,{class:e.arrowIconNextClasses,onClick:e.next,pack:e.iconPack,icon:e.iconNext,size:e.iconSize,both:""},null,8,["class","onClick","pack","icon","size"]),[[t.vShow,e.hasNext]])],64)):t.createCommentVNode("v-if",!0)])],2),t.renderSlot(e.$slots,"indicators",{active:e.activeIndex,switchTo:e.switchTo,indicatorIndex:e.indicatorIndex},()=>[e.childItems.length?(t.openBlock(),t.createBlock(t.Fragment,{key:0},[e.indicator&&!e.asIndicator?(t.openBlock(),t.createBlock("div",{key:0,class:e.indicatorsClasses},[(t.openBlock(!0),t.createBlock(t.Fragment,null,t.renderList(e.indicatorCount,(s,i)=>(t.openBlock(),t.createBlock("a",{class:e.indicatorClasses,onMouseover:t=>e.modeChange("hover",i),onClick:t=>e.modeChange("click",i),key:i},[t.renderSlot(e.$slots,"indicator",{i:i},()=>[t.createVNode("span",{class:e.indicatorItemClasses(i)},null,2)])],42,["onMouseover","onClick"]))),128))],2)):t.createCommentVNode("v-if",!0)],64)):t.createCommentVNode("v-if",!0)]),e.overlay?t.renderSlot(e.$slots,"overlay",{key:0}):t.createCommentVNode("v-if",!0)],34)},E.__file="src/components/carousel/Carousel.vue";var z=(e,s=0)=>{const a=t.defineComponent({inject:{parent:{from:"o"+e}},created(){var t,a;if(this.newValue=(t=this.value,a=this.parent&&this.parent._nextSequence(),null!=t?t:a),this.parent)this.parent._registerItem(this);else if(!i(s,2))throw new Error("You should wrap "+this.$options.name+" in a "+e)},beforeUnmount(){this.parent&&this.parent._unregisterItem(this)}});return i(s,1)&&(a.data=()=>({index:null})),a},W=t.defineComponent({name:"OCarouselItem",configField:"carousel",mixins:[z("carousel",1),x],props:{itemClass:[String,Function,Array],itemActiveClass:[String,Function,Array]},computed:{itemClasses(){return[this.computedClass("itemClass","o-car__item"),{[this.computedClass("itemActiveClass","o-car__item--active")]:this.isActive}]},itemStyle(){return`width: ${this.parent.itemWidth}px;`},isActive(){return this.parent.activeIndex===this.index}},methods:{onClick(e){this.isActive&&this.parent.$emit("click",e),this.parent.asIndicator&&(this.parent.activeIndex=this.index,this.parent.$emit("update:modelValue",this.index))}}});W.render=function(e,s,i,a,o,n){return t.openBlock(),t.createBlock("div",{class:e.itemClasses,onClick:s[1]||(s[1]=(...t)=>e.onClick(...t)),style:e.itemStyle},[t.renderSlot(e.$slots,"default")],6)},W.__file="src/components/carousel/CarouselItem.vue";const K={};function Y(e,t){K[e]=t}function j(){return{oruga:K,addProgrammatic:Y}}const U=(e,t)=>{e.use(t)};var q=t.defineComponent({emits:["update:modelValue"],props:{modelValue:[String,Number,Boolean,Array],nativeValue:[String,Number,Boolean,Array],variant:String,disabled:Boolean,required:Boolean,name:String,size:String},data(){return{newValue:this.modelValue}},computed:{computedValue:{get(){return this.newValue},set(e){this.newValue=e,this.$emit("update:modelValue",this.newValue)}}},watch:{modelValue(e){this.newValue=e}},methods:{focus(){this.$refs.input.focus()}}}),X=t.defineComponent({name:"OCheckbox",mixins:[x,q],configField:"checkbox",emits:["input"],props:{indeterminate:{type:Boolean,default:!1},trueValue:{type:[String,Number,Boolean],default:!0},falseValue:{type:[String,Number,Boolean],default:!1},ariaLabelledby:String,autocomplete:String,rootClass:[String,Function,Array],disabledClass:[String,Function,Array],checkClass:[String,Function,Array],checkCheckedClass:[String,Function,Array],checkIndeterminateClass:[String,Function,Array],labelClass:[String,Function,Array],sizeClass:[String,Function,Array],variantClass:[String,Function,Array]},watch:{indeterminate:{handler(e){this.isIndeterminate=e},immediate:!0}},computed:{isChecked(){return this.computedValue===this.trueValue||Array.isArray(this.computedValue)&&-1!==this.computedValue.indexOf(this.nativeValue)},rootClasses(){return[this.computedClass("rootClass","o-chk"),{[this.computedClass("checkedClass","o-chk--checked")]:this.isChecked},{[this.computedClass("sizeClass","o-chk--",this.size)]:this.size},{[this.computedClass("disabledClass","o-chk--disabled")]:this.disabled},{[this.computedClass("variantClass","o-chk--",this.variant)]:this.variant}]},checkClasses(){return[this.computedClass("checkClass","o-chk__check"),{[this.computedClass("checkCheckedClass","o-chk__check--checked")]:this.isChecked},{[this.computedClass("checkIndeterminateClass","o-chk__check--indeterminate")]:this.isIndeterminate}]},labelClasses(){return[this.computedClass("labelClass","o-chk__label")]}}});X.render=function(e,s,i,a,o,n){return t.openBlock(),t.createBlock("label",{class:e.rootClasses,ref:"label",onClick:s[3]||(s[3]=t.withModifiers((...t)=>e.focus(...t),["stop"])),onKeydown:s[4]||(s[4]=t.withKeys(t.withModifiers(t=>e.$refs.label.click(),["prevent"]),["enter"]))},[t.withDirectives(t.createVNode("input",{"onUpdate:modelValue":s[1]||(s[1]=t=>e.computedValue=t),indeterminate:e.indeterminate,type:"checkbox",ref:"input",onClick:s[2]||(s[2]=t.withModifiers(()=>{},["stop"])),class:e.checkClasses,disabled:e.disabled,required:e.required,name:e.name,autocomplete:e.autocomplete,value:e.nativeValue,"true-value":e.trueValue,"false-value":e.falseValue,"aria-labelledby":e.ariaLabelledby},null,10,["indeterminate","disabled","required","name","autocomplete","value","true-value","false-value","aria-labelledby"]),[[t.vModelCheckbox,e.computedValue]]),t.createVNode("span",{id:e.ariaLabelledby,class:e.labelClasses},[t.renderSlot(e.$slots,"default")],10,["id"])],34)},X.__file="src/components/checkbox/Checkbox.vue";var G=t.defineComponent({name:"OCollapse",mixins:[x],configField:"collapse",emits:["update:open","open","close"],props:{open:{type:Boolean,default:!0},animation:{type:String,default:()=>n(w(),"collapse.animation","fade")},ariaId:{type:String,default:""},position:{type:String,default:"top",validator:e=>["top","bottom"].indexOf(e)>-1},rootClass:[String,Function,Array],triggerClass:[String,Function,Array],contentClass:[String,Function,Array]},data(){return{isOpen:this.open}},watch:{open(e){this.isOpen=e}},methods:{toggle(){this.isOpen=!this.isOpen,this.$emit("update:open",this.isOpen),this.$emit(this.isOpen?"open":"close")}},render(){const e=t.h("div",{class:this.computedClass("triggerClass","o-clps__trigger"),onClick:this.toggle},this.$slots.trigger({open:this.isOpen})),s=t.h(t.Transition,{name:this.animation},()=>t.withDirectives(t.h("div",{class:this.computedClass("contentClass","o-clps__content"),id:this.ariaId},this.$slots.default()),[[t.vShow,this.isOpen]]));return t.h("div",{class:this.computedClass("rootClass","o-clps")},"top"===this.position?[e,s]:[s,e])}});G.__file="src/components/collapse/Collapse.vue";var Q=t.defineComponent({props:{mobileBreakpoint:String},data:()=>({matchMediaRef:void 0,isMatchMedia:void 0}),methods:{onMatchMedia(e){this.isMatchMedia=e.matches}},created(){if("undefined"!=typeof window){let e=this.mobileBreakpoint;if(!e){const t=w(),s=n(t,"mobileBreakpoint","1023px");e=n(t,this.$options.configField+".mobileBreakpoint",s)}this.matchMediaRef=window.matchMedia(`(max-width: ${e})`),this.isMatchMedia=this.matchMediaRef.matches,this.matchMediaRef.addListener(this.onMatchMedia,!1)}},beforeUnmount(){"undefined"!=typeof window&&this.matchMediaRef.removeListener(this.checkMatchMedia)}});const J=(e,t=!1)=>e?t?e.querySelectorAll('*[tabindex="-1"]'):e.querySelectorAll('a[href]:not([tabindex="-1"]),\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n *[tabindex]:not([tabindex="-1"]),\n *[contenteditable]'):null;let Z;const ee={beforeMount:(e,{value:t=!0})=>{if(t){let t=J(e),s=J(e,!0);t&&t.length>0&&(Z=i=>{t=J(e),s=J(e,!0);const a=t[0],o=t[t.length-1];i.target===a&&i.shiftKey&&"Tab"===i.key?(i.preventDefault(),o.focus()):(i.target===o||Array.from(s).indexOf(i.target)>=0)&&!i.shiftKey&&"Tab"===i.key&&(i.preventDefault(),a.focus())},e.addEventListener("keydown",Z))}},beforeUnmount:e=>{e.removeEventListener("keydown",Z)}};var te=t.defineComponent({name:"ODropdown",directives:{trapFocus:ee},configField:"dropdown",mixins:[x,Q],provide(){return{$dropdown:this}},emits:["update:modelValue","active-change","change"],props:{modelValue:{type:[String,Number,Boolean,Object,Array],default:null},disabled:Boolean,inline:Boolean,scrollable:Boolean,maxHeight:{type:[String,Number],default:()=>n(w(),"dropdown.maxHeight",200)},position:{type:String,validator:e=>["top-right","top-left","bottom-left","bottom-right"].indexOf(e)>-1},mobileModal:{type:Boolean,default:()=>n(w(),"dropdown.mobileModal",!0)},ariaRole:{type:String,validator:e=>["menu","list","dialog"].indexOf(e)>-1,default:null},animation:{type:String,default:()=>n(w(),"dropdown.animation","fade")},multiple:Boolean,trapFocus:{type:Boolean,default:()=>n(w(),"dropdown.trapFocus",!0)},closeOnClick:{type:Boolean,default:!0},canClose:{type:[Array,Boolean],default:!0},expanded:Boolean,triggers:{type:Array,default:()=>["click"]},appendToBody:Boolean,menuTag:{type:String,default:()=>n(w(),"dropdown.menuTag","div")},appendToBodyCopyParent:Boolean,rootClass:[String,Function,Array],triggerClass:[String,Function,Array],inl