@avakhula/ui 0.0.342 → 0.0.343

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2972,6 +2972,9 @@ const ed = {
2972
2972
  readonly: {
2973
2973
  type: Boolean,
2974
2974
  default: !1
2975
+ },
2976
+ autocomplete: {
2977
+ type: String
2975
2978
  }
2976
2979
  },
2977
2980
  data() {
@@ -3052,7 +3055,7 @@ const ed = {
3052
3055
  IbDropdown: Kr
3053
3056
  },
3054
3057
  inheritAttrs: !1
3055
- }, td = ["aria-invalid", "readonly", "disabled", "id"], nd = { class: "settings-wrapper" };
3058
+ }, td = ["aria-invalid", "readonly", "disabled", "id", "autocomplete"], nd = { class: "settings-wrapper" };
3056
3059
  function id(t, n, e, r, o, i) {
3057
3060
  var h, c;
3058
3061
  const a = fe("ib-alert"), l = fe("ib-icon"), u = fe("ib-icon-button"), f = fe("ib-dropdown");
@@ -3078,6 +3081,7 @@ function id(t, n, e, r, o, i) {
3078
3081
  readonly: e.readonly,
3079
3082
  disabled: e.disabled,
3080
3083
  id: e.id,
3084
+ autocomplete: e.autocomplete,
3081
3085
  class: i.classes,
3082
3086
  onInput: n[1] || (n[1] = (s) => i.onInput(s)),
3083
3087
  onBlur: n[2] || (n[2] = (s) => i.onBlur(s)),
@@ -3151,7 +3155,7 @@ function id(t, n, e, r, o, i) {
3151
3155
  ], 2)
3152
3156
  ]);
3153
3157
  }
3154
- const Ia = /* @__PURE__ */ Ae(ed, [["render", id], ["__scopeId", "data-v-ea1e952e"]]);
3158
+ const Ia = /* @__PURE__ */ Ae(ed, [["render", id], ["__scopeId", "data-v-2abf13f4"]]);
3155
3159
  const rd = {
3156
3160
  name: "IbCheckbox",
3157
3161
  model: {
@@ -4708,6 +4712,7 @@ function Rd(t, n, e, r, o, i) {
4708
4712
  class: "tree-search",
4709
4713
  ref: "search",
4710
4714
  "show-icon": !0,
4715
+ autocomplete: "off",
4711
4716
  value: o.filterString,
4712
4717
  "aria-label": e.searchPlaceholderText ? e.searchPlaceholderText : o.actualStrings.searchPlaceholder,
4713
4718
  placeholder: e.searchPlaceholderText ? e.searchPlaceholderText : o.actualStrings.searchPlaceholder,
@@ -19,12 +19,12 @@
19
19
  top: ${a-p-c/2+f+12}px!important`;break;case"rightCenter":d=d+`left: ${l+5}px!important;
20
20
  top: ${a+f-p/2-c/2}px!important;`;break;case"rightBottom":d=d+`left: ${l+5}px!important;
21
21
  top: ${a+f-c/2-12}px!important`;break;default:d=d+`left: ${r+s/2-h/2}px!important;
22
- top: ${i-p+f-5}px!important`;break}return d}getClassList(n){return n?bo[n]:bo.topCenter}}const Gt=new _o,cd=(t,n)=>{var a;Gt.getTooltipContainer()&&Gt.destroyTooltip();const e=Object.keys(n.modifiers)[0]||n.arg,i={title:((a=n.value)==null?void 0:a.title)||"",text:typeof n.value=="object"?n.value.text:n.value};Gt.createTooltip(t,i,e)},ud=(t,n)=>{const e=Gt.getId();if(n.getAttribute("aria-describedby")!==e)return;const i=Gt.getTooltipContainer(),a=n!==t.target&&!n.contains(t.target),r=i!==t.target&&!(i!=null&&i.contains(t.target));a&&r&&Gt.destroyTooltip(n)},$o=(t,n)=>{t.__tooltip_create=()=>cd(t,n),t.__tooltip_destroy=e=>ud(e,t),t.addEventListener("mouseenter",t.__tooltip_create),document.addEventListener("mousemove",t.__tooltip_destroy)},wo=t=>{Gt.destroyTooltip(t),t.removeEventListener("mouseenter",t.__tooltip_create),document.removeEventListener("mousemove",t.__tooltip_destroy)},nr={mounted(t,n){$o(t,n)},updated(t,n){wo(t),$o(t,n)},beforeUnmount(t){wo(t)}},H0="",fd={name:"IbSorting",props:{tooltipTitle:{type:String,default:""},hideSortingButton:{type:Boolean,default:!1},tooltipText:{type:String},tooltipPosition:{type:String},tooltipIconPosition:{type:String},tooltipIconSorting:{type:String},toggleTipTitle:{type:String},title:{type:String,default:""},sort:{type:String,default:null},view:{type:String,required:!0},disable:{type:Boolean,default:!1},tableName:{type:String,required:!0}},mounted(){this.$globalEvents.$on(`sorting:update:${this.tableName}`,t=>{this.$el.contains(t.$el)||(this.currentTypeSort=null)})},data(){return{isOpenToggleTip:!1,sortingTypes:dd,sortingTypesView:sd,currentTypeSort:this.sort}},methods:{clickHandler(){this.currentTypeSort?this.currentTypeSort===this.sortingTypes.TYPE_ASC?this.currentTypeSort=this.sortingTypes.TYPE_DESC:this.currentTypeSort=null:this.currentTypeSort=this.sortingTypes.TYPE_ASC,this.updateTypeSorting()},updateTypeSorting(){this.$globalEvents.$emit(`sorting:update:${this.tableName}`,this),this.$emit("update-sorting",this.currentTypeSort)}},computed:{iconType(){return this.currentTypeSort===this.sortingTypes.TYPE_ASC?"arrow-up":this.currentTypeSort===this.sortingTypes.TYPE_DESC?"arrow-down":this.view!==this.sortingTypesView.GRID_VIEW?"swap-vertical":null},sortingTooltipPosition(){return this.hasToggleTip?"bottomCenter":this.tooltipPosition},sortingTooltipContent(){var t;return this.hasToggleTip?lang("click_to_view_details",(t=this.langComponents)==null?void 0:t.COMPONENT_SYSTEM):this.tooltipContent},tooltipIconText(){var t,n,e;return this.currentTypeSort===this.sortingTypes.TYPE_ASC?lang("sort_descending",(t=this.langComponents)==null?void 0:t.COMPONENT_SELECT):this.currentTypeSort===this.sortingTypes.TYPE_DESC?lang("reset_sorting",(n=this.langComponents)==null?void 0:n.COMPONENT_SELECT):this.view!==this.sortingTypesView.GRID_VIEW?lang("sort_ascending",(e=this.langComponents)==null?void 0:e.COMPONENT_SELECT):""},tooltipContent(){return this.tooltipTitle.length?{title:this.tooltipTitle,text:this.tooltipText}:this.tooltipText},hasToggleTip(){return this.toggleTipTitle&&this.$slots.toggleTipBody&&this.$slots.toggleTipButtons}},directives:{Tooltip:nr},components:{IbIcon:Le,IbIconButton:ht,IbToggleTip:fo}},hd={class:"sorting-wrapper"},pd=["name"],md=["aria-label"];function gd(t,n,e,i,a,r){var p;const l=o.resolveComponent("ib-toggle-tip"),s=o.resolveComponent("ib-icon-button"),c=o.resolveComponent("ib-icon"),h=o.resolveDirective("tooltip");return o.openBlock(),o.createElementBlock("div",hd,[e.view===a.sortingTypesView.TABLE_VIEW?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(["table-sorting-wrapper",{active:a.currentTypeSort,disabled:e.disable}])},[o.createElementVNode("div",null,[o.withDirectives((o.openBlock(),o.createElementBlock("button",{class:o.normalizeClass(["sorting-label",{"sorting-label-active":a.isOpenToggleTip&&r.hasToggleTip,"has-action":((p=e.tooltipText)==null?void 0:p.length)||r.hasToggleTip}]),type:"button",onClick:n[0]||(n[0]=f=>a.isOpenToggleTip=!a.isOpenToggleTip)},[o.createTextVNode(o.toDisplayString(e.title),1)],2)),[[h,r.sortingTooltipContent,r.sortingTooltipPosition]]),r.hasToggleTip?(o.openBlock(),o.createBlock(l,{key:0,position:"bottom-center","is-open":a.isOpenToggleTip,title:e.toggleTipTitle,onClose:n[1]||(n[1]=f=>a.isOpenToggleTip=!1)},{buttons:o.withCtx(()=>[o.renderSlot(t.$slots,"toggleTipButtons",{},void 0,!0)]),default:o.withCtx(()=>[o.renderSlot(t.$slots,"toggleTipBody",{},void 0,!0)]),_:3},8,["is-open","title"])):o.createCommentVNode("",!0)]),e.hideSortingButton?o.createCommentVNode("",!0):o.withDirectives((o.openBlock(),o.createBlock(s,{key:0,kind:"white",size:"s",onClick:r.clickHandler},{default:o.withCtx(()=>[o.createElementVNode("ion-icon",{name:r.iconType},null,8,pd)]),_:1},8,["onClick"])),[[h,r.tooltipIconText,e.tooltipIconPosition]])],2)):o.withDirectives((o.openBlock(),o.createElementBlock("button",{key:1,class:o.normalizeClass(["sorting-button",{active:a.currentTypeSort,disabled:e.disable}]),type:"button",onClick:n[2]||(n[2]=(...f)=>r.clickHandler&&r.clickHandler(...f)),"aria-label":e.sort},[o.createTextVNode(o.toDisplayString(e.title)+" ",1),r.iconType?(o.openBlock(),o.createBlock(c,{key:0,name:r.iconType},null,8,["name"])):o.createCommentVNode("",!0)],10,md)),[[h,e.tooltipText,e.tooltipPosition]])])}const yd=_e(fd,[["render",gd],["__scopeId","data-v-a4394881"]]),z0="",vd={name:"IbBreadcrumbs",props:{items:{type:Array,default:()=>[]},tooltipTextContext:{type:String}},computed:{last(){return this.items.length?this.items.length-1:null},initContextMenu(){return this.items.length>4},setItemsContextMenu(){return this.items.slice(0,-3)}},components:{IbIcon:Le,IbIconButton:ht,IbDropdownItem:Lr,IbDropdownList:tr,IbTooltip:an}},bd={"aria-label":"breadcrumb"},_d={class:"breadcrumb"},$d=["href"],wd={key:1},kd=["href"];function Cd(t,n,e,i,a,r){const l=o.resolveComponent("ib-icon"),s=o.resolveComponent("ib-tooltip"),c=o.resolveComponent("ib-icon-button"),h=o.resolveComponent("ib-dropdown-item"),p=o.resolveComponent("ib-dropdown-list");return o.openBlock(),o.createElementBlock("nav",bd,[o.createElementVNode("ul",_d,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.items,(f,d)=>(o.openBlock(),o.createElementBlock("li",{class:o.normalizeClass(["breadcrumb-item",d===r.last?"active":""]),"aria-current":"page",key:d},[d!==r.last&&d>e.items.length-4||d===0?(o.openBlock(),o.createElementBlock("a",{key:0,class:"ib-link",href:f.url},o.toDisplayString(f.title),9,$d)):o.createCommentVNode("",!0),d===r.last?(o.openBlock(),o.createElementBlock("p",wd,o.toDisplayString(f.title),1)):o.createCommentVNode("",!0),r.initContextMenu&&d===e.items.length-4?(o.openBlock(),o.createBlock(p,{key:2,horizontal:"center"},{trigger:o.withCtx(()=>[o.createVNode(c,{kind:"ghost"},{default:o.withCtx(()=>[o.createVNode(l,{name:"ellipsis-horizontal-sharp"}),e.tooltipTextContext?(o.openBlock(),o.createBlock(s,{key:0,text:e.tooltipTextContext},null,8,["text"])):o.createCommentVNode("",!0)]),_:1})]),body:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.setItemsContextMenu,(u,_)=>(o.openBlock(),o.createBlock(h,{key:_},{default:o.withCtx(()=>[o.createElementVNode("a",{class:"context-breadcrums",href:u.url},o.toDisplayString(u.title),9,kd)]),_:2},1024))),128))]),_:2},1024)):o.createCommentVNode("",!0),d!==r.last&&d>e.items.length-5||d===0?(o.openBlock(),o.createBlock(l,{key:3,name:"chevron-forward-outline"})):o.createCommentVNode("",!0)],2))),128))])])}const Od=_e(vd,[["render",Cd],["__scopeId","data-v-5ef772a9"]]),U0="",Ed={name:"IbLabel",props:{for:{type:String},required:{type:Boolean,default:!1},infoText:{type:String,default:""},tooltipPosition:{type:String}},mounted(){this.$globalEvents.$on(`label:disabled:${this.for}`,t=>{this.disabled=t})},data(){return{disabled:!1}},computed:{classes(){const t=["ib-label"];return this.infoText.length&&t.push("has-info-text"),this.disabled&&t.push("label-disabled"),t}},components:{IbIconButton:ht,IbIcon:Le},directives:{Tooltip:nr}},Sd=["for"],xd={key:0,class:"required"};function Td(t,n,e,i,a,r){const l=o.resolveComponent("ib-icon"),s=o.resolveComponent("ib-icon-button"),c=o.resolveDirective("tooltip");return o.openBlock(),o.createElementBlock("label",{class:o.normalizeClass(r.classes),for:e.for},[e.required?(o.openBlock(),o.createElementBlock("span",xd,"* ")):o.createCommentVNode("",!0),o.renderSlot(t.$slots,"default",{},void 0,!0),e.infoText.length?o.withDirectives((o.openBlock(),o.createBlock(s,{key:1,size:"xs",class:"info-button",kind:"ghost",type:"button"},{default:o.withCtx(()=>[o.createVNode(l,{name:"information-circle-outline"})]),_:1})),[[c,e.infoText,e.tooltipPosition]]):o.createCommentVNode("",!0)],10,Sd)}const wn=_e(Ed,[["render",Td],["__scopeId","data-v-524ad0fb"]]),Rr={text:"text",password:"password",email:"email",number:"number"},K0="",Nd={name:"IbInput",props:{type:{type:String,default:Rr.text,validator:t=>Object.keys(Rr).includes(t)},disabled:{type:Boolean,required:!1,default:!1},error:{type:Boolean,default:!1},errorMessage:{type:String,default:""},id:{type:[String],default(){return mt()}},debounce:{type:[Number,String]},showIcon:{type:Boolean,default:!1},showClearButton:{type:Boolean,default:!0},clearButtonMessage:{type:String,default:""},settingsButtonMessage:{type:String,default:""},showPasswordMessage:{type:String,default:""},hidePasswordMessage:{type:String,default:""},value:{type:[String,Number],default:""},modelValue:{type:[String,Number]},settingsVerticalPosition:{type:String,default:Qn.bottom},settingsHorizontalPosition:{type:String,default:$n.right},readonly:{type:Boolean,default:!1}},data(){return{actualValue:this.modelValue||this.value,showPassword:!1}},mounted(){setTimeout(()=>{this.$globalEvents.$emit(`label:disabled:${this.id}`,this.disabled)},10)},methods:{toggleShowPassword(){this.showPassword=!this.showPassword},clearInput(){this.actualValue="",this.$emit("update:modelValue",this.actualValue),this.$emit("input",this.actualValue),this.$emit("clear")},onBlur(){this.$emit("blur",this.actualValue)},onFocus(){this.$emit("focus",this.actualValue)},onInput(){this.debounce?this.delayedInput(this.actualValue):(this.$emit("update:modelValue",this.actualValue),this.$emit("input",this.actualValue))},delayedInput(t){this.timer&&(clearTimeout(this.timer),this.timer=null),this.timer=setTimeout(()=>{this.$emit("update:modelValue",t),this.$emit("input",t)},this.debounce)},focus(){this.$refs.field.focus()}},computed:{hasSettings(){return!!this.$slots.settings},classes(){const t=["ib-input"];return this.hasErrorState&&t.push("ib-error"),this.showIcon&&t.push("ib-input-has-icon"),t},attrs(){let t=Ar({...this.$attrs},["onInput","onBlur"]);return t.type=this.type===Rr.password?this.showPassword?"text":"password":this.type,t},hasErrorState(){return this.error||this.errorMessage.length}},watch:{value(t){this.actualValue=t},modelValue(t){this.actualValue=t},disabled(t){this.$globalEvents.$emit(`label:disabled:${this.id}`,t)}},emits:["input","blur","focus","clear","update:modelValue",`label:disabled:${globalThis==null?void 0:globalThis.id}`],components:{IbAlert:qt,IbIconButton:ht,IbIcon:Le,IbDropdown:er},inheritAttrs:!1},Ad=["aria-invalid","readonly","disabled","id"],Dd={class:"settings-wrapper"};function Id(t,n,e,i,a,r){var p,f;const l=o.resolveComponent("ib-alert"),s=o.resolveComponent("ib-icon"),c=o.resolveComponent("ib-icon-button"),h=o.resolveComponent("ib-dropdown");return o.openBlock(),o.createElementBlock("div",null,[e.errorMessage?(o.openBlock(),o.createBlock(l,{key:0},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(e.errorMessage),1)]),_:1})):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(["ib-input-wrapper",{"has-settings":r.hasSettings}])},[e.showIcon?(o.openBlock(),o.createBlock(s,{key:0,class:"icon-search",name:"search-outline"})):o.createCommentVNode("",!0),o.withDirectives(o.createElementVNode("input",o.mergeProps(r.attrs,{"onUpdate:modelValue":n[0]||(n[0]=d=>a.actualValue=d),ref:"field","aria-invalid":!!r.hasErrorState,readonly:e.readonly,disabled:e.disabled,id:e.id,class:r.classes,onInput:n[1]||(n[1]=d=>r.onInput(d)),onBlur:n[2]||(n[2]=d=>r.onBlur(d)),onFocus:n[3]||(n[3]=d=>r.onFocus(d))}),null,16,Ad),[[o.vModelDynamic,a.actualValue]]),e.type!=="password"&&e.showClearButton?o.withDirectives((o.openBlock(),o.createBlock(c,{key:1,kind:"ghost",class:"button-clear",disabled:e.readonly||e.disabled,"help-text":e.clearButtonMessage,"prevent-default":"",type:"button",onClick:r.clearInput,onKeypress:o.withKeys(r.clearInput,["enter"])},{default:o.withCtx(()=>[o.createVNode(s,{name:"close-outline"})]),_:1},8,["disabled","help-text","onClick","onKeypress"])),[[o.vShow,(p=a.actualValue)==null?void 0:p.length]]):o.createCommentVNode("",!0),e.type==="password"?o.withDirectives((o.openBlock(),o.createBlock(c,{key:2,kind:"ghost",class:"toggle-password","prevent-default":"",type:"button",disabled:e.readonly||e.disabled,"help-text":a.showPassword?e.hidePasswordMessage:e.showPasswordMessage,onClick:o.withModifiers(r.toggleShowPassword,["prevent"])},{default:o.withCtx(()=>[o.createVNode(s,{name:a.showPassword?"eye-off-outline":"eye-outline"},null,8,["name"])]),_:1},8,["disabled","help-text","onClick"])),[[o.vShow,(f=a.actualValue)==null?void 0:f.length]]):o.createCommentVNode("",!0),r.hasSettings?(o.openBlock(),o.createBlock(h,{key:3,class:"settings-dropdown-wrapper",horizontal:e.settingsHorizontalPosition,vertical:e.settingsVerticalPosition},{trigger:o.withCtx(()=>[o.createVNode(c,{"prevent-default":"","help-text":e.settingsButtonMessage,class:"options-trigger",kind:"ghost"},{default:o.withCtx(()=>[o.createVNode(s,{name:"options"})]),_:1},8,["help-text"])]),body:o.withCtx(()=>[o.createElementVNode("div",Dd,[o.renderSlot(t.$slots,"settings",{},void 0,!0)])]),_:3},8,["horizontal","vertical"])):o.createCommentVNode("",!0)],2)])}const jr=_e(Nd,[["render",Id],["__scopeId","data-v-ea1e952e"]]),G0="",Pd={name:"IbCheckbox",model:{event:"input"},props:{label:String,error:{type:[Boolean,null],default:!1},name:String,id:{type:String,default(){return mt()}},value:{default:1},modelValue:{type:Boolean},isChecked:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},disableFocus:{type:Boolean,default:!1},required:{type:Boolean,default:!1},labelPosition:{type:String,default:"right"}},watch:{isChecked(t){this.checked=t},modelValue(t){this.$emit("update:modelValue",this.modelValue),this.checked=t}},data(){return{checked:this.modelValue?this.modelValue:this.isChecked}},methods:{onChange(t){this.disabled||this.readonly||(this.checked=!this.checked,this.$emit("update:modelValue",this.checked),this.$emit("input",this.checked))}},computed:{classes(){return{"ib-checkbox":!0,"ib-has-error":this.error,"ib-checkbox-filled":this.checked,"ib-checkbox-disabled":this.disabled,"ib-checkbox-readonly":this.readonly,"ib-checkbox-indeterminate":this.indeterminate}},indeterminate(){return this.isChecked===null},attrs(){const t={...Ar({...this.$attrs})};return delete t.class,t.class=this.classes,t}},components:{IbIcon:Le},inheritAttrs:!1},Md=["aria-checked"],Bd=["for","tabindex"],Ld=["name","id","value","disabled","required"],Rd={class:"ib-checkbox-body"},jd={key:0,class:"required"},Vd={class:"ib-checkbox-input"},Fd={key:1,class:"ib-checkbox-label"},qd={key:0,class:"required"};function Hd(t,n,e,i,a,r){var s;const l=o.resolveComponent("ib-icon");return o.openBlock(),o.createElementBlock("div",{role:"checkbox",class:o.normalizeClass(["ib-checkbox-wrapper",this.$attrs.class]),"aria-checked":!!a.checked},[o.createElementVNode("label",o.mergeProps(r.attrs,{for:e.id,tabindex:e.disabled|e.disableFocus?-1:0,onClick:n[2]||(n[2]=o.withModifiers((...c)=>r.onChange&&r.onChange(...c),["prevent","stop"])),onKeypress:n[3]||(n[3]=o.withModifiers((...c)=>r.onChange&&r.onChange(...c),["prevent"]))}),[o.withDirectives(o.createElementVNode("input",{tabindex:"-1",type:"checkbox",name:e.name,id:e.id,value:e.value,disabled:e.disabled,required:e.required,"onUpdate:modelValue":n[0]||(n[0]=c=>a.checked=c),onClick:n[1]||(n[1]=(...c)=>r.onChange&&r.onChange(...c))},null,8,Ld),[[o.vModelCheckbox,a.checked]]),o.createElementVNode("div",Rd,[e.labelPosition==="left"&&e.label.length?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass(["ib-checkbox-label",{"ib-checkbox-label-left":e.labelPosition==="left"}])},[e.required?(o.openBlock(),o.createElementBlock("span",jd,"*")):o.createCommentVNode("",!0),o.createTextVNode(" "+o.toDisplayString(e.label),1)],2)):o.createCommentVNode("",!0),o.createElementVNode("span",Vd,[o.withDirectives(o.createVNode(l,{name:"checkmark-sharp"},null,512),[[o.vShow,a.checked&&!r.indeterminate]]),o.withDirectives(o.createVNode(l,{class:o.normalizeClass("checkbox-undeterminate-icon"),name:"remove-sharp"},null,512),[[o.vShow,r.indeterminate]])]),e.labelPosition==="right"&&((s=e.label)!=null&&s.length)?(o.openBlock(),o.createElementBlock("span",Fd,[e.required?(o.openBlock(),o.createElementBlock("span",qd,"*")):o.createCommentVNode("",!0),o.createTextVNode(" "+o.toDisplayString(e.label),1)])):o.createCommentVNode("",!0)])],16,Bd)],10,Md)}const Vr=_e(Pd,[["render",Hd],["__scopeId","data-v-d0930a45"]]),W0="",zd={name:"IbToggle",model:{prop:"isChecked",event:"input"},props:{isChecked:{type:Boolean,required:!1},id:{type:String,default:()=>mt()},disabled:{type:Boolean,default:!1},name:{type:String,default:"active"},label:{type:String,default:""},error:{type:Boolean,default:!1},labelPosition:{type:String,default:"right"},helpMessage:{type:String,default:""},helpMessageOff:{type:String,default:""}},watch:{isChecked(t){this.checked=t}},data(){return{checked:this.isChecked}},methods:{onChange(){this.disabled||(this.checked=!this.checked,this.$emit("input",this.checked))}},computed:{classes(){return{"ib-toggle-container":!0,"has-error":this.error,"toggle-on":this.checked,"toggle-disabled":this.disabled,"label-position-left":this.labelPosition==="left"}}},components:{IbIcon:Le,IbTooltip:an}},Ud=["aria-checked","tabindex"],Kd={class:"toggle-wrapper",ref:"wrapper"},Gd={class:"toggle",ref:"toggle"},Wd=["name","checked","id","disabled"],Yd=o.createElementVNode("span",{class:"toggle-slider round"},null,-1),Zd={key:0,class:"toggle-label"};function Jd(t,n,e,i,a,r){const l=o.resolveComponent("ib-icon"),s=o.resolveComponent("ib-tooltip");return o.openBlock(),o.createElementBlock("label",{role:"switch","aria-checked":a.checked,tabindex:e.disabled?-1:0,class:o.normalizeClass(r.classes),onKeypress:[n[2]||(n[2]=o.withKeys(o.withModifiers((...c)=>r.onChange&&r.onChange(...c),["prevent"]),["space"])),n[3]||(n[3]=o.withKeys(o.withModifiers((...c)=>r.onChange&&r.onChange(...c),["prevent"]),["enter"]))]},[o.createElementVNode("div",Kd,[o.createElementVNode("div",Gd,[o.createElementVNode("input",{tabindex:"-1",type:"checkbox",value:"1",name:e.name,checked:a.checked,id:e.id,disabled:e.disabled,onClick:n[0]||(n[0]=(...c)=>r.onChange&&r.onChange(...c)),onInput:n[1]||(n[1]=o.withModifiers(()=>{},["stop"]))},null,40,Wd),Yd,o.createVNode(l,{class:"checked-icon",name:"checkmark"}),o.createVNode(l,{class:"unchecked-icon",name:"close"})],512)],512),e.label.length?(o.openBlock(),o.createElementBlock("span",Zd,o.toDisplayString(e.label),1)):o.createCommentVNode("",!0),e.helpMessage.length?(o.openBlock(),o.createBlock(s,{key:1,text:a.checked?e.helpMessage:e.helpMessageOff.length?e.helpMessageOff:e.helpMessage},null,8,["text"])):o.createCommentVNode("",!0)],42,Ud)}const ko=_e(zd,[["render",Jd]]);function Co(t){return t.scrollHeight>t.clientHeight}const Y0="",Xd={name:"select-option",props:{option:{type:Object},name:String,parentAutoCheck:{type:Boolean,default:!1},isMultiple:{type:Boolean,default:!0},uid:{type:String,default:""},onlyEndNodes:{type:Boolean,default:!1},htmlTitle:{type:Boolean,default:!1},showInput:{type:Boolean,default:!0},isBookmarkable:{type:Boolean,default:!1},isBookmarked:{type:Boolean,default:!1},isToggle:{type:Boolean,default:!1}},mounted(){this.option.hasOwnProperty("children")&&this.option.children&&this.checkParent()},updated(){this.$nextTick(()=>{Co(this.$el.querySelector(".option-label"))&&(this.showTooltip=!0)})},data(){return{showTooltip:!1}},methods:{onKeydown(t){t.keyCode===ho&&(t.preventDefault(),this.onChange()),this.hasVisibleChildren&&(t.keyCode===hs&&(this.option.isChildrenVisible=!0),t.keyCode===fs&&(this.option.isChildrenVisible=!1))},onChange(){var t,n;!this.isMultiple&&!this.isChecked(this.option)&&((t=this.$refs.component)==null||t.onChange()),this.isMultiple&&((n=this.$refs.component)==null||n.onChange())},toggle(t,n=!0){this.check(this.option,t,!0,n)},check(t,n,e,i){this.$emit("check",t,n,e),i&&t.children&&t.children.forEach(a=>{this.check(a,n,!1,!0)})},toggleChildrenVisibility(){this.option.isChildrenVisible=!this.option.isChildrenVisible},checkChildren(t,n,e){e&&this.isMultiple&&this.$nextTick(()=>{this.checkParent()}),this.$emit("check",t,n,!1)},checkParent(){const t=this.option.children.filter(e=>e.checked).length,n=t>=this.option.children.length;(!this.option.checked&&n&&this.parentAutoCheck||this.option.checked&&!n)&&this.toggle(!this.option.checked,!1)},calculateChildren(t,n,e=!1){let i=0;return t.children&&t.children.forEach(a=>{(!n||n(a))&&i++,e&&(i+=this.calculateChildren(a,n,e))}),i},isChecked(t){if(this.hasChildren)if(this.childrenSelectedCount){if(this.childrenSelectedCount>0&&this.countOfAllChildren>this.childrenSelectedCount)return null}else return!1;return t.checked?!0:t.isIndeterminate?null:!1}},computed:{component(){return this.isMultiple&&this.isToggle?ko:Vr},hasChildren(){return!!(this.option.children&&this.option.children.length)},hasVisibleChildren(){return this.calculateChildren(this.option,t=>t.visible)},iconName(){return this.option.isChildrenVisible?"chevron-down":"chevron-forward"},id(){return this.uid+"_"+this.option.id},actualName(){return this.onlyEndNodes&&this.option.children&&this.option.children.length?"":this.name},childrenSelectedCount(){return this.calculateChildren(this.option,t=>t.checked,!0)},countOfAllChildren(){return this.calculateChildren(this.option,()=>!0,!0)}},components:{IbIcon:Le,List:Br,IbIconButton:ht},directives:{Tooltip:nr}},Qd=["aria-selected","aria-label","id"],ec={key:0,class:"option-label"},tc={key:1,class:"option-label"},nc=["innerHTML"],rc=["innerHTML"],ic={key:2,class:"option-label"};function oc(t,n,e,i,a,r){const l=o.resolveComponent("ib-icon"),s=o.resolveComponent("ib-icon-button"),c=o.resolveComponent("select-option"),h=o.resolveComponent("list"),p=o.resolveDirective("tooltip");return o.openBlock(),o.createElementBlock("li",null,[o.withDirectives((o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["tree-select-option",{"tree-select-option-checked":r.isChecked(e.option),"tree-select-option-margin":r.hasVisibleChildren,active:e.option.isChildrenVisible,"is-multiple":e.isMultiple,"is-not-multiple":!e.isMultiple,"tree-select-option-toggle":this.isToggle&&this.isMultiple}]),tabindex:"0",role:"option","aria-selected":r.isChecked(e.option),"aria-label":e.option.title,id:"option-"+r.id,onKeydown:n[3]||(n[3]=o.withModifiers((...f)=>r.onKeydown&&r.onKeydown(...f),["self"])),onFocus:n[4]||(n[4]=f=>t.$emit("onFocus",`option-${r.id}`))},[o.withDirectives(o.createVNode(s,{"disabled-focus":!0,kind:"ghost",class:"toggle-children",onClick:r.toggleChildrenVisibility},{default:o.withCtx(()=>[o.createVNode(l,{name:r.iconName},null,8,["name"])]),_:1},8,["onClick"]),[[o.vShow,r.hasVisibleChildren]]),o.createElementVNode("div",{onClick:n[1]||(n[1]=o.withModifiers((...f)=>r.onChange&&r.onChange(...f),["prevent"])),class:o.normalizeClass({disabled:e.option.isDisabled,"tree-select-option-label":!0,"tree-select-option-has-children":r.hasVisibleChildren,active:!e.showInput&&e.option.checked})},[o.withDirectives((o.openBlock(),o.createBlock(o.resolveDynamicComponent(r.component),{ref:"component",tabindex:"-1","disable-focus":"","aria-label":e.option.title,name:r.actualName,value:e.option.id,id:"input"+r.id,"is-checked":r.isChecked(e.option),disabled:e.option.isDisabled,readonly:e.option.readonly,autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false",onInput:r.toggle},null,40,["aria-label","name","value","id","is-checked","disabled","readonly","onInput"])),[[o.vShow,e.showInput]]),e.isBookmarkable?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass("bookmarkable-option-title "+(e.isBookmarked?"bookmarked":""))},[r.hasChildren?(o.openBlock(),o.createElementBlock("span",tc,o.toDisplayString(e.option.title),1)):(o.openBlock(),o.createElementBlock("span",ec,[o.createTextVNode(o.toDisplayString(e.option.title)+" ",1),o.createVNode(l,{name:"star",onClick:n[0]||(n[0]=o.withModifiers(f=>t.$emit("toggle-bookmark",e.option),["stop","prevent"]))})]))],2)):e.htmlTitle?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[r.hasChildren?(o.openBlock(),o.createElementBlock("span",{key:1,class:"option-label",innerHTML:e.option.title},null,8,rc)):(o.openBlock(),o.createElementBlock("span",{key:0,class:"option-label",innerHTML:e.option.title},null,8,nc))],64)):(o.openBlock(),o.createElementBlock("span",ic,o.toDisplayString(e.option.title),1))],2),r.hasChildren?o.withDirectives((o.openBlock(),o.createBlock(h,{key:0},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.option.children,f=>o.withDirectives((o.openBlock(),o.createBlock(c,{key:f.value,option:f,name:e.name,"parent-auto-check":e.parentAutoCheck,"is-multiple":e.isMultiple,"show-input":e.showInput,onCheck:r.checkChildren,onToggleBookmark:n[2]||(n[2]=d=>t.$emit("toggle-bookmark",d)),uid:e.uid,"is-bookmarkable":e.isBookmarkable},null,8,["option","name","parent-auto-check","is-multiple","show-input","onCheck","uid","is-bookmarkable"])),[[o.vShow,f.visible]])),128))]),_:1},512)),[[o.vShow,r.hasVisibleChildren&&e.option.isChildrenVisible]]):o.createCommentVNode("",!0)],42,Qd)),[[p,a.showTooltip?e.option.title:""]])])}const ac=_e(Xd,[["render",oc]]);var Fe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function rr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Oo={exports:{}};/*!***************************************************
22
+ top: ${i-p+f-5}px!important`;break}return d}getClassList(n){return n?bo[n]:bo.topCenter}}const Gt=new _o,cd=(t,n)=>{var a;Gt.getTooltipContainer()&&Gt.destroyTooltip();const e=Object.keys(n.modifiers)[0]||n.arg,i={title:((a=n.value)==null?void 0:a.title)||"",text:typeof n.value=="object"?n.value.text:n.value};Gt.createTooltip(t,i,e)},ud=(t,n)=>{const e=Gt.getId();if(n.getAttribute("aria-describedby")!==e)return;const i=Gt.getTooltipContainer(),a=n!==t.target&&!n.contains(t.target),r=i!==t.target&&!(i!=null&&i.contains(t.target));a&&r&&Gt.destroyTooltip(n)},$o=(t,n)=>{t.__tooltip_create=()=>cd(t,n),t.__tooltip_destroy=e=>ud(e,t),t.addEventListener("mouseenter",t.__tooltip_create),document.addEventListener("mousemove",t.__tooltip_destroy)},wo=t=>{Gt.destroyTooltip(t),t.removeEventListener("mouseenter",t.__tooltip_create),document.removeEventListener("mousemove",t.__tooltip_destroy)},nr={mounted(t,n){$o(t,n)},updated(t,n){wo(t),$o(t,n)},beforeUnmount(t){wo(t)}},H0="",fd={name:"IbSorting",props:{tooltipTitle:{type:String,default:""},hideSortingButton:{type:Boolean,default:!1},tooltipText:{type:String},tooltipPosition:{type:String},tooltipIconPosition:{type:String},tooltipIconSorting:{type:String},toggleTipTitle:{type:String},title:{type:String,default:""},sort:{type:String,default:null},view:{type:String,required:!0},disable:{type:Boolean,default:!1},tableName:{type:String,required:!0}},mounted(){this.$globalEvents.$on(`sorting:update:${this.tableName}`,t=>{this.$el.contains(t.$el)||(this.currentTypeSort=null)})},data(){return{isOpenToggleTip:!1,sortingTypes:dd,sortingTypesView:sd,currentTypeSort:this.sort}},methods:{clickHandler(){this.currentTypeSort?this.currentTypeSort===this.sortingTypes.TYPE_ASC?this.currentTypeSort=this.sortingTypes.TYPE_DESC:this.currentTypeSort=null:this.currentTypeSort=this.sortingTypes.TYPE_ASC,this.updateTypeSorting()},updateTypeSorting(){this.$globalEvents.$emit(`sorting:update:${this.tableName}`,this),this.$emit("update-sorting",this.currentTypeSort)}},computed:{iconType(){return this.currentTypeSort===this.sortingTypes.TYPE_ASC?"arrow-up":this.currentTypeSort===this.sortingTypes.TYPE_DESC?"arrow-down":this.view!==this.sortingTypesView.GRID_VIEW?"swap-vertical":null},sortingTooltipPosition(){return this.hasToggleTip?"bottomCenter":this.tooltipPosition},sortingTooltipContent(){var t;return this.hasToggleTip?lang("click_to_view_details",(t=this.langComponents)==null?void 0:t.COMPONENT_SYSTEM):this.tooltipContent},tooltipIconText(){var t,n,e;return this.currentTypeSort===this.sortingTypes.TYPE_ASC?lang("sort_descending",(t=this.langComponents)==null?void 0:t.COMPONENT_SELECT):this.currentTypeSort===this.sortingTypes.TYPE_DESC?lang("reset_sorting",(n=this.langComponents)==null?void 0:n.COMPONENT_SELECT):this.view!==this.sortingTypesView.GRID_VIEW?lang("sort_ascending",(e=this.langComponents)==null?void 0:e.COMPONENT_SELECT):""},tooltipContent(){return this.tooltipTitle.length?{title:this.tooltipTitle,text:this.tooltipText}:this.tooltipText},hasToggleTip(){return this.toggleTipTitle&&this.$slots.toggleTipBody&&this.$slots.toggleTipButtons}},directives:{Tooltip:nr},components:{IbIcon:Le,IbIconButton:ht,IbToggleTip:fo}},hd={class:"sorting-wrapper"},pd=["name"],md=["aria-label"];function gd(t,n,e,i,a,r){var p;const l=o.resolveComponent("ib-toggle-tip"),s=o.resolveComponent("ib-icon-button"),c=o.resolveComponent("ib-icon"),h=o.resolveDirective("tooltip");return o.openBlock(),o.createElementBlock("div",hd,[e.view===a.sortingTypesView.TABLE_VIEW?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(["table-sorting-wrapper",{active:a.currentTypeSort,disabled:e.disable}])},[o.createElementVNode("div",null,[o.withDirectives((o.openBlock(),o.createElementBlock("button",{class:o.normalizeClass(["sorting-label",{"sorting-label-active":a.isOpenToggleTip&&r.hasToggleTip,"has-action":((p=e.tooltipText)==null?void 0:p.length)||r.hasToggleTip}]),type:"button",onClick:n[0]||(n[0]=f=>a.isOpenToggleTip=!a.isOpenToggleTip)},[o.createTextVNode(o.toDisplayString(e.title),1)],2)),[[h,r.sortingTooltipContent,r.sortingTooltipPosition]]),r.hasToggleTip?(o.openBlock(),o.createBlock(l,{key:0,position:"bottom-center","is-open":a.isOpenToggleTip,title:e.toggleTipTitle,onClose:n[1]||(n[1]=f=>a.isOpenToggleTip=!1)},{buttons:o.withCtx(()=>[o.renderSlot(t.$slots,"toggleTipButtons",{},void 0,!0)]),default:o.withCtx(()=>[o.renderSlot(t.$slots,"toggleTipBody",{},void 0,!0)]),_:3},8,["is-open","title"])):o.createCommentVNode("",!0)]),e.hideSortingButton?o.createCommentVNode("",!0):o.withDirectives((o.openBlock(),o.createBlock(s,{key:0,kind:"white",size:"s",onClick:r.clickHandler},{default:o.withCtx(()=>[o.createElementVNode("ion-icon",{name:r.iconType},null,8,pd)]),_:1},8,["onClick"])),[[h,r.tooltipIconText,e.tooltipIconPosition]])],2)):o.withDirectives((o.openBlock(),o.createElementBlock("button",{key:1,class:o.normalizeClass(["sorting-button",{active:a.currentTypeSort,disabled:e.disable}]),type:"button",onClick:n[2]||(n[2]=(...f)=>r.clickHandler&&r.clickHandler(...f)),"aria-label":e.sort},[o.createTextVNode(o.toDisplayString(e.title)+" ",1),r.iconType?(o.openBlock(),o.createBlock(c,{key:0,name:r.iconType},null,8,["name"])):o.createCommentVNode("",!0)],10,md)),[[h,e.tooltipText,e.tooltipPosition]])])}const yd=_e(fd,[["render",gd],["__scopeId","data-v-a4394881"]]),z0="",vd={name:"IbBreadcrumbs",props:{items:{type:Array,default:()=>[]},tooltipTextContext:{type:String}},computed:{last(){return this.items.length?this.items.length-1:null},initContextMenu(){return this.items.length>4},setItemsContextMenu(){return this.items.slice(0,-3)}},components:{IbIcon:Le,IbIconButton:ht,IbDropdownItem:Lr,IbDropdownList:tr,IbTooltip:an}},bd={"aria-label":"breadcrumb"},_d={class:"breadcrumb"},$d=["href"],wd={key:1},kd=["href"];function Cd(t,n,e,i,a,r){const l=o.resolveComponent("ib-icon"),s=o.resolveComponent("ib-tooltip"),c=o.resolveComponent("ib-icon-button"),h=o.resolveComponent("ib-dropdown-item"),p=o.resolveComponent("ib-dropdown-list");return o.openBlock(),o.createElementBlock("nav",bd,[o.createElementVNode("ul",_d,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.items,(f,d)=>(o.openBlock(),o.createElementBlock("li",{class:o.normalizeClass(["breadcrumb-item",d===r.last?"active":""]),"aria-current":"page",key:d},[d!==r.last&&d>e.items.length-4||d===0?(o.openBlock(),o.createElementBlock("a",{key:0,class:"ib-link",href:f.url},o.toDisplayString(f.title),9,$d)):o.createCommentVNode("",!0),d===r.last?(o.openBlock(),o.createElementBlock("p",wd,o.toDisplayString(f.title),1)):o.createCommentVNode("",!0),r.initContextMenu&&d===e.items.length-4?(o.openBlock(),o.createBlock(p,{key:2,horizontal:"center"},{trigger:o.withCtx(()=>[o.createVNode(c,{kind:"ghost"},{default:o.withCtx(()=>[o.createVNode(l,{name:"ellipsis-horizontal-sharp"}),e.tooltipTextContext?(o.openBlock(),o.createBlock(s,{key:0,text:e.tooltipTextContext},null,8,["text"])):o.createCommentVNode("",!0)]),_:1})]),body:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.setItemsContextMenu,(u,_)=>(o.openBlock(),o.createBlock(h,{key:_},{default:o.withCtx(()=>[o.createElementVNode("a",{class:"context-breadcrums",href:u.url},o.toDisplayString(u.title),9,kd)]),_:2},1024))),128))]),_:2},1024)):o.createCommentVNode("",!0),d!==r.last&&d>e.items.length-5||d===0?(o.openBlock(),o.createBlock(l,{key:3,name:"chevron-forward-outline"})):o.createCommentVNode("",!0)],2))),128))])])}const Od=_e(vd,[["render",Cd],["__scopeId","data-v-5ef772a9"]]),U0="",Ed={name:"IbLabel",props:{for:{type:String},required:{type:Boolean,default:!1},infoText:{type:String,default:""},tooltipPosition:{type:String}},mounted(){this.$globalEvents.$on(`label:disabled:${this.for}`,t=>{this.disabled=t})},data(){return{disabled:!1}},computed:{classes(){const t=["ib-label"];return this.infoText.length&&t.push("has-info-text"),this.disabled&&t.push("label-disabled"),t}},components:{IbIconButton:ht,IbIcon:Le},directives:{Tooltip:nr}},Sd=["for"],xd={key:0,class:"required"};function Td(t,n,e,i,a,r){const l=o.resolveComponent("ib-icon"),s=o.resolveComponent("ib-icon-button"),c=o.resolveDirective("tooltip");return o.openBlock(),o.createElementBlock("label",{class:o.normalizeClass(r.classes),for:e.for},[e.required?(o.openBlock(),o.createElementBlock("span",xd,"* ")):o.createCommentVNode("",!0),o.renderSlot(t.$slots,"default",{},void 0,!0),e.infoText.length?o.withDirectives((o.openBlock(),o.createBlock(s,{key:1,size:"xs",class:"info-button",kind:"ghost",type:"button"},{default:o.withCtx(()=>[o.createVNode(l,{name:"information-circle-outline"})]),_:1})),[[c,e.infoText,e.tooltipPosition]]):o.createCommentVNode("",!0)],10,Sd)}const wn=_e(Ed,[["render",Td],["__scopeId","data-v-524ad0fb"]]),Rr={text:"text",password:"password",email:"email",number:"number"},K0="",Nd={name:"IbInput",props:{type:{type:String,default:Rr.text,validator:t=>Object.keys(Rr).includes(t)},disabled:{type:Boolean,required:!1,default:!1},error:{type:Boolean,default:!1},errorMessage:{type:String,default:""},id:{type:[String],default(){return mt()}},debounce:{type:[Number,String]},showIcon:{type:Boolean,default:!1},showClearButton:{type:Boolean,default:!0},clearButtonMessage:{type:String,default:""},settingsButtonMessage:{type:String,default:""},showPasswordMessage:{type:String,default:""},hidePasswordMessage:{type:String,default:""},value:{type:[String,Number],default:""},modelValue:{type:[String,Number]},settingsVerticalPosition:{type:String,default:Qn.bottom},settingsHorizontalPosition:{type:String,default:$n.right},readonly:{type:Boolean,default:!1},autocomplete:{type:String}},data(){return{actualValue:this.modelValue||this.value,showPassword:!1}},mounted(){setTimeout(()=>{this.$globalEvents.$emit(`label:disabled:${this.id}`,this.disabled)},10)},methods:{toggleShowPassword(){this.showPassword=!this.showPassword},clearInput(){this.actualValue="",this.$emit("update:modelValue",this.actualValue),this.$emit("input",this.actualValue),this.$emit("clear")},onBlur(){this.$emit("blur",this.actualValue)},onFocus(){this.$emit("focus",this.actualValue)},onInput(){this.debounce?this.delayedInput(this.actualValue):(this.$emit("update:modelValue",this.actualValue),this.$emit("input",this.actualValue))},delayedInput(t){this.timer&&(clearTimeout(this.timer),this.timer=null),this.timer=setTimeout(()=>{this.$emit("update:modelValue",t),this.$emit("input",t)},this.debounce)},focus(){this.$refs.field.focus()}},computed:{hasSettings(){return!!this.$slots.settings},classes(){const t=["ib-input"];return this.hasErrorState&&t.push("ib-error"),this.showIcon&&t.push("ib-input-has-icon"),t},attrs(){let t=Ar({...this.$attrs},["onInput","onBlur"]);return t.type=this.type===Rr.password?this.showPassword?"text":"password":this.type,t},hasErrorState(){return this.error||this.errorMessage.length}},watch:{value(t){this.actualValue=t},modelValue(t){this.actualValue=t},disabled(t){this.$globalEvents.$emit(`label:disabled:${this.id}`,t)}},emits:["input","blur","focus","clear","update:modelValue",`label:disabled:${globalThis==null?void 0:globalThis.id}`],components:{IbAlert:qt,IbIconButton:ht,IbIcon:Le,IbDropdown:er},inheritAttrs:!1},Ad=["aria-invalid","readonly","disabled","id","autocomplete"],Dd={class:"settings-wrapper"};function Id(t,n,e,i,a,r){var p,f;const l=o.resolveComponent("ib-alert"),s=o.resolveComponent("ib-icon"),c=o.resolveComponent("ib-icon-button"),h=o.resolveComponent("ib-dropdown");return o.openBlock(),o.createElementBlock("div",null,[e.errorMessage?(o.openBlock(),o.createBlock(l,{key:0},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(e.errorMessage),1)]),_:1})):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(["ib-input-wrapper",{"has-settings":r.hasSettings}])},[e.showIcon?(o.openBlock(),o.createBlock(s,{key:0,class:"icon-search",name:"search-outline"})):o.createCommentVNode("",!0),o.withDirectives(o.createElementVNode("input",o.mergeProps(r.attrs,{"onUpdate:modelValue":n[0]||(n[0]=d=>a.actualValue=d),ref:"field","aria-invalid":!!r.hasErrorState,readonly:e.readonly,disabled:e.disabled,id:e.id,autocomplete:e.autocomplete,class:r.classes,onInput:n[1]||(n[1]=d=>r.onInput(d)),onBlur:n[2]||(n[2]=d=>r.onBlur(d)),onFocus:n[3]||(n[3]=d=>r.onFocus(d))}),null,16,Ad),[[o.vModelDynamic,a.actualValue]]),e.type!=="password"&&e.showClearButton?o.withDirectives((o.openBlock(),o.createBlock(c,{key:1,kind:"ghost",class:"button-clear",disabled:e.readonly||e.disabled,"help-text":e.clearButtonMessage,"prevent-default":"",type:"button",onClick:r.clearInput,onKeypress:o.withKeys(r.clearInput,["enter"])},{default:o.withCtx(()=>[o.createVNode(s,{name:"close-outline"})]),_:1},8,["disabled","help-text","onClick","onKeypress"])),[[o.vShow,(p=a.actualValue)==null?void 0:p.length]]):o.createCommentVNode("",!0),e.type==="password"?o.withDirectives((o.openBlock(),o.createBlock(c,{key:2,kind:"ghost",class:"toggle-password","prevent-default":"",type:"button",disabled:e.readonly||e.disabled,"help-text":a.showPassword?e.hidePasswordMessage:e.showPasswordMessage,onClick:o.withModifiers(r.toggleShowPassword,["prevent"])},{default:o.withCtx(()=>[o.createVNode(s,{name:a.showPassword?"eye-off-outline":"eye-outline"},null,8,["name"])]),_:1},8,["disabled","help-text","onClick"])),[[o.vShow,(f=a.actualValue)==null?void 0:f.length]]):o.createCommentVNode("",!0),r.hasSettings?(o.openBlock(),o.createBlock(h,{key:3,class:"settings-dropdown-wrapper",horizontal:e.settingsHorizontalPosition,vertical:e.settingsVerticalPosition},{trigger:o.withCtx(()=>[o.createVNode(c,{"prevent-default":"","help-text":e.settingsButtonMessage,class:"options-trigger",kind:"ghost"},{default:o.withCtx(()=>[o.createVNode(s,{name:"options"})]),_:1},8,["help-text"])]),body:o.withCtx(()=>[o.createElementVNode("div",Dd,[o.renderSlot(t.$slots,"settings",{},void 0,!0)])]),_:3},8,["horizontal","vertical"])):o.createCommentVNode("",!0)],2)])}const jr=_e(Nd,[["render",Id],["__scopeId","data-v-2abf13f4"]]),G0="",Pd={name:"IbCheckbox",model:{event:"input"},props:{label:String,error:{type:[Boolean,null],default:!1},name:String,id:{type:String,default(){return mt()}},value:{default:1},modelValue:{type:Boolean},isChecked:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},disableFocus:{type:Boolean,default:!1},required:{type:Boolean,default:!1},labelPosition:{type:String,default:"right"}},watch:{isChecked(t){this.checked=t},modelValue(t){this.$emit("update:modelValue",this.modelValue),this.checked=t}},data(){return{checked:this.modelValue?this.modelValue:this.isChecked}},methods:{onChange(t){this.disabled||this.readonly||(this.checked=!this.checked,this.$emit("update:modelValue",this.checked),this.$emit("input",this.checked))}},computed:{classes(){return{"ib-checkbox":!0,"ib-has-error":this.error,"ib-checkbox-filled":this.checked,"ib-checkbox-disabled":this.disabled,"ib-checkbox-readonly":this.readonly,"ib-checkbox-indeterminate":this.indeterminate}},indeterminate(){return this.isChecked===null},attrs(){const t={...Ar({...this.$attrs})};return delete t.class,t.class=this.classes,t}},components:{IbIcon:Le},inheritAttrs:!1},Md=["aria-checked"],Bd=["for","tabindex"],Ld=["name","id","value","disabled","required"],Rd={class:"ib-checkbox-body"},jd={key:0,class:"required"},Vd={class:"ib-checkbox-input"},Fd={key:1,class:"ib-checkbox-label"},qd={key:0,class:"required"};function Hd(t,n,e,i,a,r){var s;const l=o.resolveComponent("ib-icon");return o.openBlock(),o.createElementBlock("div",{role:"checkbox",class:o.normalizeClass(["ib-checkbox-wrapper",this.$attrs.class]),"aria-checked":!!a.checked},[o.createElementVNode("label",o.mergeProps(r.attrs,{for:e.id,tabindex:e.disabled|e.disableFocus?-1:0,onClick:n[2]||(n[2]=o.withModifiers((...c)=>r.onChange&&r.onChange(...c),["prevent","stop"])),onKeypress:n[3]||(n[3]=o.withModifiers((...c)=>r.onChange&&r.onChange(...c),["prevent"]))}),[o.withDirectives(o.createElementVNode("input",{tabindex:"-1",type:"checkbox",name:e.name,id:e.id,value:e.value,disabled:e.disabled,required:e.required,"onUpdate:modelValue":n[0]||(n[0]=c=>a.checked=c),onClick:n[1]||(n[1]=(...c)=>r.onChange&&r.onChange(...c))},null,8,Ld),[[o.vModelCheckbox,a.checked]]),o.createElementVNode("div",Rd,[e.labelPosition==="left"&&e.label.length?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass(["ib-checkbox-label",{"ib-checkbox-label-left":e.labelPosition==="left"}])},[e.required?(o.openBlock(),o.createElementBlock("span",jd,"*")):o.createCommentVNode("",!0),o.createTextVNode(" "+o.toDisplayString(e.label),1)],2)):o.createCommentVNode("",!0),o.createElementVNode("span",Vd,[o.withDirectives(o.createVNode(l,{name:"checkmark-sharp"},null,512),[[o.vShow,a.checked&&!r.indeterminate]]),o.withDirectives(o.createVNode(l,{class:o.normalizeClass("checkbox-undeterminate-icon"),name:"remove-sharp"},null,512),[[o.vShow,r.indeterminate]])]),e.labelPosition==="right"&&((s=e.label)!=null&&s.length)?(o.openBlock(),o.createElementBlock("span",Fd,[e.required?(o.openBlock(),o.createElementBlock("span",qd,"*")):o.createCommentVNode("",!0),o.createTextVNode(" "+o.toDisplayString(e.label),1)])):o.createCommentVNode("",!0)])],16,Bd)],10,Md)}const Vr=_e(Pd,[["render",Hd],["__scopeId","data-v-d0930a45"]]),W0="",zd={name:"IbToggle",model:{prop:"isChecked",event:"input"},props:{isChecked:{type:Boolean,required:!1},id:{type:String,default:()=>mt()},disabled:{type:Boolean,default:!1},name:{type:String,default:"active"},label:{type:String,default:""},error:{type:Boolean,default:!1},labelPosition:{type:String,default:"right"},helpMessage:{type:String,default:""},helpMessageOff:{type:String,default:""}},watch:{isChecked(t){this.checked=t}},data(){return{checked:this.isChecked}},methods:{onChange(){this.disabled||(this.checked=!this.checked,this.$emit("input",this.checked))}},computed:{classes(){return{"ib-toggle-container":!0,"has-error":this.error,"toggle-on":this.checked,"toggle-disabled":this.disabled,"label-position-left":this.labelPosition==="left"}}},components:{IbIcon:Le,IbTooltip:an}},Ud=["aria-checked","tabindex"],Kd={class:"toggle-wrapper",ref:"wrapper"},Gd={class:"toggle",ref:"toggle"},Wd=["name","checked","id","disabled"],Yd=o.createElementVNode("span",{class:"toggle-slider round"},null,-1),Zd={key:0,class:"toggle-label"};function Jd(t,n,e,i,a,r){const l=o.resolveComponent("ib-icon"),s=o.resolveComponent("ib-tooltip");return o.openBlock(),o.createElementBlock("label",{role:"switch","aria-checked":a.checked,tabindex:e.disabled?-1:0,class:o.normalizeClass(r.classes),onKeypress:[n[2]||(n[2]=o.withKeys(o.withModifiers((...c)=>r.onChange&&r.onChange(...c),["prevent"]),["space"])),n[3]||(n[3]=o.withKeys(o.withModifiers((...c)=>r.onChange&&r.onChange(...c),["prevent"]),["enter"]))]},[o.createElementVNode("div",Kd,[o.createElementVNode("div",Gd,[o.createElementVNode("input",{tabindex:"-1",type:"checkbox",value:"1",name:e.name,checked:a.checked,id:e.id,disabled:e.disabled,onClick:n[0]||(n[0]=(...c)=>r.onChange&&r.onChange(...c)),onInput:n[1]||(n[1]=o.withModifiers(()=>{},["stop"]))},null,40,Wd),Yd,o.createVNode(l,{class:"checked-icon",name:"checkmark"}),o.createVNode(l,{class:"unchecked-icon",name:"close"})],512)],512),e.label.length?(o.openBlock(),o.createElementBlock("span",Zd,o.toDisplayString(e.label),1)):o.createCommentVNode("",!0),e.helpMessage.length?(o.openBlock(),o.createBlock(s,{key:1,text:a.checked?e.helpMessage:e.helpMessageOff.length?e.helpMessageOff:e.helpMessage},null,8,["text"])):o.createCommentVNode("",!0)],42,Ud)}const ko=_e(zd,[["render",Jd]]);function Co(t){return t.scrollHeight>t.clientHeight}const Y0="",Xd={name:"select-option",props:{option:{type:Object},name:String,parentAutoCheck:{type:Boolean,default:!1},isMultiple:{type:Boolean,default:!0},uid:{type:String,default:""},onlyEndNodes:{type:Boolean,default:!1},htmlTitle:{type:Boolean,default:!1},showInput:{type:Boolean,default:!0},isBookmarkable:{type:Boolean,default:!1},isBookmarked:{type:Boolean,default:!1},isToggle:{type:Boolean,default:!1}},mounted(){this.option.hasOwnProperty("children")&&this.option.children&&this.checkParent()},updated(){this.$nextTick(()=>{Co(this.$el.querySelector(".option-label"))&&(this.showTooltip=!0)})},data(){return{showTooltip:!1}},methods:{onKeydown(t){t.keyCode===ho&&(t.preventDefault(),this.onChange()),this.hasVisibleChildren&&(t.keyCode===hs&&(this.option.isChildrenVisible=!0),t.keyCode===fs&&(this.option.isChildrenVisible=!1))},onChange(){var t,n;!this.isMultiple&&!this.isChecked(this.option)&&((t=this.$refs.component)==null||t.onChange()),this.isMultiple&&((n=this.$refs.component)==null||n.onChange())},toggle(t,n=!0){this.check(this.option,t,!0,n)},check(t,n,e,i){this.$emit("check",t,n,e),i&&t.children&&t.children.forEach(a=>{this.check(a,n,!1,!0)})},toggleChildrenVisibility(){this.option.isChildrenVisible=!this.option.isChildrenVisible},checkChildren(t,n,e){e&&this.isMultiple&&this.$nextTick(()=>{this.checkParent()}),this.$emit("check",t,n,!1)},checkParent(){const t=this.option.children.filter(e=>e.checked).length,n=t>=this.option.children.length;(!this.option.checked&&n&&this.parentAutoCheck||this.option.checked&&!n)&&this.toggle(!this.option.checked,!1)},calculateChildren(t,n,e=!1){let i=0;return t.children&&t.children.forEach(a=>{(!n||n(a))&&i++,e&&(i+=this.calculateChildren(a,n,e))}),i},isChecked(t){if(this.hasChildren)if(this.childrenSelectedCount){if(this.childrenSelectedCount>0&&this.countOfAllChildren>this.childrenSelectedCount)return null}else return!1;return t.checked?!0:t.isIndeterminate?null:!1}},computed:{component(){return this.isMultiple&&this.isToggle?ko:Vr},hasChildren(){return!!(this.option.children&&this.option.children.length)},hasVisibleChildren(){return this.calculateChildren(this.option,t=>t.visible)},iconName(){return this.option.isChildrenVisible?"chevron-down":"chevron-forward"},id(){return this.uid+"_"+this.option.id},actualName(){return this.onlyEndNodes&&this.option.children&&this.option.children.length?"":this.name},childrenSelectedCount(){return this.calculateChildren(this.option,t=>t.checked,!0)},countOfAllChildren(){return this.calculateChildren(this.option,()=>!0,!0)}},components:{IbIcon:Le,List:Br,IbIconButton:ht},directives:{Tooltip:nr}},Qd=["aria-selected","aria-label","id"],ec={key:0,class:"option-label"},tc={key:1,class:"option-label"},nc=["innerHTML"],rc=["innerHTML"],ic={key:2,class:"option-label"};function oc(t,n,e,i,a,r){const l=o.resolveComponent("ib-icon"),s=o.resolveComponent("ib-icon-button"),c=o.resolveComponent("select-option"),h=o.resolveComponent("list"),p=o.resolveDirective("tooltip");return o.openBlock(),o.createElementBlock("li",null,[o.withDirectives((o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["tree-select-option",{"tree-select-option-checked":r.isChecked(e.option),"tree-select-option-margin":r.hasVisibleChildren,active:e.option.isChildrenVisible,"is-multiple":e.isMultiple,"is-not-multiple":!e.isMultiple,"tree-select-option-toggle":this.isToggle&&this.isMultiple}]),tabindex:"0",role:"option","aria-selected":r.isChecked(e.option),"aria-label":e.option.title,id:"option-"+r.id,onKeydown:n[3]||(n[3]=o.withModifiers((...f)=>r.onKeydown&&r.onKeydown(...f),["self"])),onFocus:n[4]||(n[4]=f=>t.$emit("onFocus",`option-${r.id}`))},[o.withDirectives(o.createVNode(s,{"disabled-focus":!0,kind:"ghost",class:"toggle-children",onClick:r.toggleChildrenVisibility},{default:o.withCtx(()=>[o.createVNode(l,{name:r.iconName},null,8,["name"])]),_:1},8,["onClick"]),[[o.vShow,r.hasVisibleChildren]]),o.createElementVNode("div",{onClick:n[1]||(n[1]=o.withModifiers((...f)=>r.onChange&&r.onChange(...f),["prevent"])),class:o.normalizeClass({disabled:e.option.isDisabled,"tree-select-option-label":!0,"tree-select-option-has-children":r.hasVisibleChildren,active:!e.showInput&&e.option.checked})},[o.withDirectives((o.openBlock(),o.createBlock(o.resolveDynamicComponent(r.component),{ref:"component",tabindex:"-1","disable-focus":"","aria-label":e.option.title,name:r.actualName,value:e.option.id,id:"input"+r.id,"is-checked":r.isChecked(e.option),disabled:e.option.isDisabled,readonly:e.option.readonly,autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false",onInput:r.toggle},null,40,["aria-label","name","value","id","is-checked","disabled","readonly","onInput"])),[[o.vShow,e.showInput]]),e.isBookmarkable?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass("bookmarkable-option-title "+(e.isBookmarked?"bookmarked":""))},[r.hasChildren?(o.openBlock(),o.createElementBlock("span",tc,o.toDisplayString(e.option.title),1)):(o.openBlock(),o.createElementBlock("span",ec,[o.createTextVNode(o.toDisplayString(e.option.title)+" ",1),o.createVNode(l,{name:"star",onClick:n[0]||(n[0]=o.withModifiers(f=>t.$emit("toggle-bookmark",e.option),["stop","prevent"]))})]))],2)):e.htmlTitle?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[r.hasChildren?(o.openBlock(),o.createElementBlock("span",{key:1,class:"option-label",innerHTML:e.option.title},null,8,rc)):(o.openBlock(),o.createElementBlock("span",{key:0,class:"option-label",innerHTML:e.option.title},null,8,nc))],64)):(o.openBlock(),o.createElementBlock("span",ic,o.toDisplayString(e.option.title),1))],2),r.hasChildren?o.withDirectives((o.openBlock(),o.createBlock(h,{key:0},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.option.children,f=>o.withDirectives((o.openBlock(),o.createBlock(c,{key:f.value,option:f,name:e.name,"parent-auto-check":e.parentAutoCheck,"is-multiple":e.isMultiple,"show-input":e.showInput,onCheck:r.checkChildren,onToggleBookmark:n[2]||(n[2]=d=>t.$emit("toggle-bookmark",d)),uid:e.uid,"is-bookmarkable":e.isBookmarkable},null,8,["option","name","parent-auto-check","is-multiple","show-input","onCheck","uid","is-bookmarkable"])),[[o.vShow,f.visible]])),128))]),_:1},512)),[[o.vShow,r.hasVisibleChildren&&e.option.isChildrenVisible]]):o.createCommentVNode("",!0)],42,Qd)),[[p,a.showTooltip?e.option.title:""]])])}const ac=_e(Xd,[["render",oc]]);var Fe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function rr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Oo={exports:{}};/*!***************************************************
23
23
  * mark.js v8.11.1
24
24
  * https://markjs.io/
25
25
  * Copyright (c) 2014–2018, Julian Kühnel
26
26
  * Released under the MIT license https://git.io/vwTVl
27
- *****************************************************/(function(t,n){(function(e,i){t.exports=i()})(Fe,function(){class e{constructor(r,l=!0,s=[],c=5e3){this.ctx=r,this.iframes=l,this.exclude=s,this.iframesTimeout=c}static matches(r,l){const s=typeof l=="string"?[l]:l,c=r.matches||r.matchesSelector||r.msMatchesSelector||r.mozMatchesSelector||r.oMatchesSelector||r.webkitMatchesSelector;if(c){let h=!1;return s.every(p=>!c.call(r,p)||(h=!0,!1)),h}return!1}getContexts(){let r=[];return(this.ctx!==void 0&&this.ctx?NodeList.prototype.isPrototypeOf(this.ctx)?Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?this.ctx:typeof this.ctx=="string"?Array.prototype.slice.call(document.querySelectorAll(this.ctx)):[this.ctx]:[]).forEach(l=>{const s=r.filter(c=>c.contains(l)).length>0;r.indexOf(l)!==-1||s||r.push(l)}),r}getIframeContents(r,l,s=()=>{}){let c;try{const h=r.contentWindow;if(c=h.document,!h||!c)throw new Error("iframe inaccessible")}catch{s()}c&&l(c)}isIframeBlank(r){const l="about:blank",s=r.getAttribute("src").trim();return r.contentWindow.location.href===l&&s!==l&&s}observeIframeLoad(r,l,s){let c=!1,h=null;const p=()=>{if(!c){c=!0,clearTimeout(h);try{this.isIframeBlank(r)||(r.removeEventListener("load",p),this.getIframeContents(r,l,s))}catch{s()}}};r.addEventListener("load",p),h=setTimeout(p,this.iframesTimeout)}onIframeReady(r,l,s){try{r.contentWindow.document.readyState==="complete"?this.isIframeBlank(r)?this.observeIframeLoad(r,l,s):this.getIframeContents(r,l,s):this.observeIframeLoad(r,l,s)}catch{s()}}waitForIframes(r,l){let s=0;this.forEachIframe(r,()=>!0,c=>{s++,this.waitForIframes(c.querySelector("html"),()=>{--s||l()})},c=>{c||l()})}forEachIframe(r,l,s,c=()=>{}){let h=r.querySelectorAll("iframe"),p=h.length,f=0;h=Array.prototype.slice.call(h);const d=()=>{--p<=0&&c(f)};p||d(),h.forEach(u=>{e.matches(u,this.exclude)?d():this.onIframeReady(u,_=>{l(u)&&(f++,s(_)),d()},d)})}createIterator(r,l,s){return document.createNodeIterator(r,l,s,!1)}createInstanceOnIframe(r){return new e(r.querySelector("html"),this.iframes)}compareNodeIframe(r,l,s){const c=r.compareDocumentPosition(s),h=Node.DOCUMENT_POSITION_PRECEDING;return!!(c&h&&(l===null||l.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING))}getIteratorNode(r){const l=r.previousNode();return{prevNode:l,node:(l===null||r.nextNode())&&r.nextNode()}}checkIframeFilter(r,l,s,c){let h=!1,p=!1;return c.forEach((f,d)=>{f.val===s&&(h=d,p=f.handled)}),this.compareNodeIframe(r,l,s)?(h!==!1||p?h===!1||p||(c[h].handled=!0):c.push({val:s,handled:!0}),!0):(h===!1&&c.push({val:s,handled:!1}),!1)}handleOpenIframes(r,l,s,c){r.forEach(h=>{h.handled||this.getIframeContents(h.val,p=>{this.createInstanceOnIframe(p).forEachNode(l,s,c)})})}iterateThroughNodes(r,l,s,c,h){const p=this.createIterator(l,r,c);let f,d,u=[],_=[],v=()=>({prevNode:d,node:f}=this.getIteratorNode(p),f);for(;v();)this.iframes&&this.forEachIframe(l,b=>this.checkIframeFilter(f,d,b,u),b=>{this.createInstanceOnIframe(b).forEachNode(r,g=>_.push(g),c)}),_.push(f);_.forEach(b=>{s(b)}),this.iframes&&this.handleOpenIframes(u,r,s,c),h()}forEachNode(r,l,s,c=()=>{}){const h=this.getContexts();let p=h.length;p||c(),h.forEach(f=>{const d=()=>{this.iterateThroughNodes(r,f,l,s,()=>{--p<=0&&c()})};this.iframes?this.waitForIframes(f,d):d()})}}class i{constructor(r){this.ctx=r,this.ie=!1;const l=window.navigator.userAgent;(l.indexOf("MSIE")>-1||l.indexOf("Trident")>-1)&&(this.ie=!0)}set opt(r){this._opt=Object.assign({},{element:"",className:"",exclude:[],iframes:!1,iframesTimeout:5e3,separateWordSearch:!0,diacritics:!0,synonyms:{},accuracy:"partially",acrossElements:!1,caseSensitive:!1,ignoreJoiners:!1,ignoreGroups:0,ignorePunctuation:[],wildcards:"disabled",each:()=>{},noMatch:()=>{},filter:()=>!0,done:()=>{},debug:!1,log:window.console},r)}get opt(){return this._opt}get iterator(){return new e(this.ctx,this.opt.iframes,this.opt.exclude,this.opt.iframesTimeout)}log(r,l="debug"){const s=this.opt.log;this.opt.debug&&typeof s=="object"&&typeof s[l]=="function"&&s[l](`mark.js: ${r}`)}escapeStr(r){return r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}createRegExp(r){return this.opt.wildcards!=="disabled"&&(r=this.setupWildcardsRegExp(r)),r=this.escapeStr(r),Object.keys(this.opt.synonyms).length&&(r=this.createSynonymsRegExp(r)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(r=this.setupIgnoreJoinersRegExp(r)),this.opt.diacritics&&(r=this.createDiacriticsRegExp(r)),r=this.createMergedBlanksRegExp(r),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(r=this.createJoinersRegExp(r)),this.opt.wildcards!=="disabled"&&(r=this.createWildcardsRegExp(r)),r=this.createAccuracyRegExp(r)}createSynonymsRegExp(r){const l=this.opt.synonyms,s=this.opt.caseSensitive?"":"i",c=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(let h in l)if(l.hasOwnProperty(h)){const p=l[h],f=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(h):this.escapeStr(h),d=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(p):this.escapeStr(p);f!==""&&d!==""&&(r=r.replace(new RegExp(`(${this.escapeStr(f)}|${this.escapeStr(d)})`,`gm${s}`),c+`(${this.processSynomyms(f)}|${this.processSynomyms(d)})`+c))}return r}processSynomyms(r){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(r=this.setupIgnoreJoinersRegExp(r)),r}setupWildcardsRegExp(r){return(r=r.replace(/(?:\\)*\?/g,l=>l.charAt(0)==="\\"?"?":"")).replace(/(?:\\)*\*/g,l=>l.charAt(0)==="\\"?"*":"")}createWildcardsRegExp(r){let l=this.opt.wildcards==="withSpaces";return r.replace(/\u0001/g,l?"[\\S\\s]?":"\\S?").replace(/\u0002/g,l?"[\\S\\s]*?":"\\S*")}setupIgnoreJoinersRegExp(r){return r.replace(/[^(|)\\]/g,(l,s,c)=>{let h=c.charAt(s+1);return/[(|)\\]/.test(h)||h===""?l:l+"\0"})}createJoinersRegExp(r){let l=[];const s=this.opt.ignorePunctuation;return Array.isArray(s)&&s.length&&l.push(this.escapeStr(s.join(""))),this.opt.ignoreJoiners&&l.push("\\u00ad\\u200b\\u200c\\u200d"),l.length?r.split(/\u0000+/).join(`[${l.join("")}]*`):r}createDiacriticsRegExp(r){const l=this.opt.caseSensitive?"":"i",s=this.opt.caseSensitive?["aàáảãạăằắẳẵặâầấẩẫậäåāą","AÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćč","CÇĆČ","dđď","DĐĎ","eèéẻẽẹêềếểễệëěēę","EÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïī","IÌÍỈĨỊÎÏĪ","lł","LŁ","nñňń","NÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøō","OÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rř","RŘ","sšśșş","SŠŚȘŞ","tťțţ","TŤȚŢ","uùúủũụưừứửữựûüůū","UÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿ","YÝỲỶỸỴŸ","zžżź","ZŽŻŹ"]:["aàáảãạăằắẳẵặâầấẩẫậäåāąAÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćčCÇĆČ","dđďDĐĎ","eèéẻẽẹêềếểễệëěēęEÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïīIÌÍỈĨỊÎÏĪ","lłLŁ","nñňńNÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøōOÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rřRŘ","sšśșşSŠŚȘŞ","tťțţTŤȚŢ","uùúủũụưừứửữựûüůūUÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿYÝỲỶỸỴŸ","zžżźZŽŻŹ"];let c=[];return r.split("").forEach(h=>{s.every(p=>{if(p.indexOf(h)!==-1){if(c.indexOf(p)>-1)return!1;r=r.replace(new RegExp(`[${p}]`,`gm${l}`),`[${p}]`),c.push(p)}return!0})}),r}createMergedBlanksRegExp(r){return r.replace(/[\s]+/gim,"[\\s]+")}createAccuracyRegExp(r){const l="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿";let s=this.opt.accuracy,c=typeof s=="string"?s:s.value,h=typeof s=="string"?[]:s.limiters,p="";switch(h.forEach(f=>{p+=`|${this.escapeStr(f)}`}),c){case"partially":default:return`()(${r})`;case"complementary":return`()([^${p="\\s"+(p||this.escapeStr(l))}]*${r}[^${p}]*)`;case"exactly":return`(^|\\s${p})(${r})(?=$|\\s${p})`}}getSeparatedKeywords(r){let l=[];return r.forEach(s=>{this.opt.separateWordSearch?s.split(" ").forEach(c=>{c.trim()&&l.indexOf(c)===-1&&l.push(c)}):s.trim()&&l.indexOf(s)===-1&&l.push(s)}),{keywords:l.sort((s,c)=>c.length-s.length),length:l.length}}isNumeric(r){return Number(parseFloat(r))==r}checkRanges(r){if(!Array.isArray(r)||Object.prototype.toString.call(r[0])!=="[object Object]")return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(r),[];const l=[];let s=0;return r.sort((c,h)=>c.start-h.start).forEach(c=>{let{start:h,end:p,valid:f}=this.callNoMatchOnInvalidRanges(c,s);f&&(c.start=h,c.length=p-h,l.push(c),s=p)}),l}callNoMatchOnInvalidRanges(r,l){let s,c,h=!1;return r&&r.start!==void 0?(c=(s=parseInt(r.start,10))+parseInt(r.length,10),this.isNumeric(r.start)&&this.isNumeric(r.length)&&c-l>0&&c-s>0?h=!0:(this.log(`Ignoring invalid or overlapping range: ${JSON.stringify(r)}`),this.opt.noMatch(r))):(this.log(`Ignoring invalid range: ${JSON.stringify(r)}`),this.opt.noMatch(r)),{start:s,end:c,valid:h}}checkWhitespaceRanges(r,l,s){let c,h=!0,p=s.length,f=l-p,d=parseInt(r.start,10)-f;return(c=(d=d>p?p:d)+parseInt(r.length,10))>p&&(c=p,this.log(`End range automatically set to the max value of ${p}`)),d<0||c-d<0||d>p||c>p?(h=!1,this.log(`Invalid range: ${JSON.stringify(r)}`),this.opt.noMatch(r)):s.substring(d,c).replace(/\s+/g,"")===""&&(h=!1,this.log("Skipping whitespace only range: "+JSON.stringify(r)),this.opt.noMatch(r)),{start:d,end:c,valid:h}}getTextNodes(r){let l="",s=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,c=>{s.push({start:l.length,end:(l+=c.textContent).length,node:c})},c=>this.matchesExclude(c.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT,()=>{r({value:l,nodes:s})})}matchesExclude(r){return e.matches(r,this.opt.exclude.concat(["script","style","title","head","html"]))}wrapRangeInTextNode(r,l,s){const c=this.opt.element?this.opt.element:"mark",h=r.splitText(l),p=h.splitText(s-l);let f=document.createElement(c);return f.setAttribute("data-markjs","true"),this.opt.className&&f.setAttribute("class",this.opt.className),f.textContent=h.textContent,h.parentNode.replaceChild(f,h),p}wrapRangeInMappedTextNode(r,l,s,c,h){r.nodes.every((p,f)=>{const d=r.nodes[f+1];if(d===void 0||d.start>l){if(!c(p.node))return!1;const u=l-p.start,_=(s>p.end?p.end:s)-p.start,v=r.value.substr(0,p.start),b=r.value.substr(_+p.start);if(p.node=this.wrapRangeInTextNode(p.node,u,_),r.value=v+b,r.nodes.forEach((g,y)=>{y>=f&&(r.nodes[y].start>0&&y!==f&&(r.nodes[y].start-=_),r.nodes[y].end-=_)}),s-=_,h(p.node.previousSibling,p.start),!(s>p.end))return!1;l=p.end}return!0})}wrapMatches(r,l,s,c,h){const p=l===0?0:l+1;this.getTextNodes(f=>{f.nodes.forEach(d=>{let u;for(d=d.node;(u=r.exec(d.textContent))!==null&&u[p]!=="";){if(!s(u[p],d))continue;let _=u.index;if(p!==0)for(let v=1;v<p;v++)_+=u[v].length;d=this.wrapRangeInTextNode(d,_,_+u[p].length),c(d.previousSibling),r.lastIndex=0}}),h()})}wrapMatchesAcrossElements(r,l,s,c,h){const p=l===0?0:l+1;this.getTextNodes(f=>{let d;for(;(d=r.exec(f.value))!==null&&d[p]!=="";){let u=d.index;if(p!==0)for(let v=1;v<p;v++)u+=d[v].length;const _=u+d[p].length;this.wrapRangeInMappedTextNode(f,u,_,v=>s(d[p],v),(v,b)=>{r.lastIndex=b,c(v)})}h()})}wrapRangeFromIndex(r,l,s,c){this.getTextNodes(h=>{const p=h.value.length;r.forEach((f,d)=>{let{start:u,end:_,valid:v}=this.checkWhitespaceRanges(f,p,h.value);v&&this.wrapRangeInMappedTextNode(h,u,_,b=>l(b,f,h.value.substring(u,_),d),b=>{s(b,f)})}),c()})}unwrapMatches(r){const l=r.parentNode;let s=document.createDocumentFragment();for(;r.firstChild;)s.appendChild(r.removeChild(r.firstChild));l.replaceChild(s,r),this.ie?this.normalizeTextNode(l):l.normalize()}normalizeTextNode(r){if(r){if(r.nodeType===3)for(;r.nextSibling&&r.nextSibling.nodeType===3;)r.nodeValue+=r.nextSibling.nodeValue,r.parentNode.removeChild(r.nextSibling);else this.normalizeTextNode(r.firstChild);this.normalizeTextNode(r.nextSibling)}}markRegExp(r,l){this.opt=l,this.log(`Searching with expression "${r}"`);let s=0,c="wrapMatches";const h=p=>{s++,this.opt.each(p)};this.opt.acrossElements&&(c="wrapMatchesAcrossElements"),this[c](r,this.opt.ignoreGroups,(p,f)=>this.opt.filter(f,p,s),h,()=>{s===0&&this.opt.noMatch(r),this.opt.done(s)})}mark(r,l){this.opt=l;let s=0,c="wrapMatches";const{keywords:h,length:p}=this.getSeparatedKeywords(typeof r=="string"?[r]:r),f=this.opt.caseSensitive?"":"i",d=u=>{let _=new RegExp(this.createRegExp(u),`gm${f}`),v=0;this.log(`Searching with expression "${_}"`),this[c](_,1,(b,g)=>this.opt.filter(g,u,s,v),b=>{v++,s++,this.opt.each(b)},()=>{v===0&&this.opt.noMatch(u),h[p-1]===u?this.opt.done(s):d(h[h.indexOf(u)+1])})};this.opt.acrossElements&&(c="wrapMatchesAcrossElements"),p===0?this.opt.done(s):d(h[0])}markRanges(r,l){this.opt=l;let s=0,c=this.checkRanges(r);c&&c.length?(this.log("Starting to mark with the following ranges: "+JSON.stringify(c)),this.wrapRangeFromIndex(c,(h,p,f,d)=>this.opt.filter(h,p,f,d),(h,p)=>{s++,this.opt.each(h,p)},()=>{this.opt.done(s)})):this.opt.done(s)}unmark(r){this.opt=r;let l=this.opt.element?this.opt.element:"*";l+="[data-markjs]",this.opt.className&&(l+=`.${this.opt.className}`),this.log(`Removal selector "${l}"`),this.iterator.forEachNode(NodeFilter.SHOW_ELEMENT,s=>{this.unwrapMatches(s)},s=>{const c=e.matches(s,l),h=this.matchesExclude(s);return!c||h?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},this.opt.done)}}return function(a){const r=new i(a);return this.mark=(l,s)=>(r.mark(l,s),this),this.markRegExp=(l,s)=>(r.markRegExp(l,s),this),this.markRanges=(l,s)=>(r.markRanges(l,s),this),this.unmark=l=>(r.unmark(l),this),this}})})(Oo);var lc=Oo.exports;const sc=rr(lc),Z0="";function Eo(t){return JSON.parse(JSON.stringify(t))}const dc={name:"IbTreeSelect",inject:["LANG_COMPONENTS"],props:{classList:[String,Array],placeholder:{type:String,default:""},searchPlaceholderText:{type:String,default:""},clearButtonMessage:{type:String,default:""},showClearButton:{type:Boolean,default:!0},isResizable:{type:Boolean,default:!1},menuSize:{type:[String,Number]},initialSize:{left:0,right:0},ariaLabel:{type:String,default:""},name:String,id:{type:String,default(){return mt()}},options:{default(){return[]}},modelValue:{type:[Number,String,Array]},value:{type:[Number,String,Array],default(){return[]}},maxSelectedNames:{type:Number,default:2},isMultiple:{type:Boolean,default:!0},parentAutoCheck:{type:Boolean,default:!0},strings:{type:Object,default(){return{}}},onlyEndNodes:{type:Boolean,default:!1},isRequired:{type:Boolean,default:!0},htmlOptionTitle:{type:Boolean,default:!1},isBookmarkable:{type:Boolean,default:!1},initBookmarks:{type:Array,default:()=>[]},showInputs:{type:Boolean,default(t){return t.isMultiple}},dependency:{type:String},filterId:{type:String,default(){return mt()}},staticPlaceholder:{type:Boolean,default:!1},useSearch:{type:Boolean,default:!1},isWatching:{type:Boolean,default:!1},vertical:{type:String},emptyMessage:{type:String,default:""},errorMessage:{type:String,default:""},allOptions:{type:Boolean,default:!0},watchClearValue:{type:Boolean,default:!1},isToggle:{type:Boolean,default:!1},alphabetSort:{type:Boolean,default:!1}},emits:["close","input","blur","search","resize","submit","clearValue","update:modelValue"],watch:{value(t){this.val=t,(!Array.isArray(t)||t.join(",")!==Object.keys(this.selected).join(","))&&this.setPreparedValues(this.actualOptions,!1)},modelValue:{handler(t){this.val=t,this.actualOptions=[],this.setPreparedValues()},deep:!0},val(t){this.watchClearValue&&(!t||Array.isArray(t)&&!t.length)&&this.setPreparedValues(this.actualOptions).then(()=>{const n=Object.keys(this.selected);this.$globalEvents.$emit("select-"+this.filterId+":update",{values:n,filter:this.filterId})})},options:{handler(t){this.initialOptions=Eo(t)},deep:!0},initialOptions(t){let n=!0;if(typeof t=="function")n=!1;else{const e=[],i=t;Array.prototype.forEach.call(i,a=>{a.id!==void 0&&e.push(a.id)}),n=JSON.stringify(e)===JSON.stringify(this.optionsIdsWatch),this.optionsIdsWatch=e}(this.isInitialized&&!n||this.isWatching)&&this.setPreparedValues().then(()=>{const e=Object.keys(this.selected);this.$globalEvents.$emit("select-"+this.filterId+":update",{values:e,filter:this.filterId})})},dependency(t,n){this.$nextTick(()=>{this.registerDependency(n)})},initBookmarks(){this.actualBookmarkedOptions={},this.setBookmarkedOptions(this.actualOptions)}},mounted(){this.marker=new sc(this.$refs.list.$el),this.registerDependency(),this.$globalEvents.$on("select:refresh",()=>{this.setPreparedValues()}),document.addEventListener("mousemove",this.onResize),document.addEventListener("mouseup",this.endResizing)},data(){var t,n,e,i,a,r,l,s;return this.defaultFilter=c=>{this.marker.unmark();const h=this.filterString.toLowerCase().trim();this.filterFunc.call(this,c,h),h&&this.marker.mark(h)},{initialOptions:Eo(this.options),val:this.modelValue?this.modelValue:this.value,size:{left:this.initialSize&&this.initialSize.left||0,right:this.initialSize&&this.initialSize.right||0},resizingProp:null,isInitialized:!1,optionsIdsWatch:[],isLoading:!1,actualName:this.isMultiple?this.name+"[]":this.name,filterString:"",actualOptions:[],actualBookmarkedOptions:{},selected:[],isOpen:!1,verticalVal:this.vertical??"bottom",allOptionsIsChecked:!0,hasTreeChildren:!1,uid:`f${(~~(Math.random()*1e8)).toString(16)}`,focusedOptionId:"",actualStrings:{searchPlaceholder:lang(this.searchPlaceholderText.length?this.searchPlaceholderText:"search_placeholder",(t=this.LANG_COMPONENTS)==null?void 0:t.COMPONENT_SELECT),emptyTitle:lang("empty_title",(n=this.LANG_COMPONENTS)==null?void 0:n.COMPONENT_SELECT),selectAllOptions:lang("all_options",(e=this.LANG_COMPONENTS)==null?void 0:e.COMPONENT_SELECT),allSelected:lang("all_selected",(i=this.LANG_COMPONENTS)==null?void 0:i.COMPONENT_SELECT),loading:lang("loading",(a=this.LANG_COMPONENTS)==null?void 0:a.COMPONENT_SELECT)+"...",selectedCount:lang("selected_count",(r=this.LANG_COMPONENTS)==null?void 0:r.COMPONENT_SELECT),buttonTitle:this.buttonTitle||lang("button_title",(l=this.LANG_COMPONENTS)==null?void 0:l.COMPONENT_SELECT),requiredDependencyNotFilled:this.requiredDependencyNotFilled||lang("required_dependency_are_not_filled",(s=this.LANG_COMPONENTS)==null?void 0:s.COMPONENT_SELECT),...this.strings},dependencyValue:null}},methods:{onBlur(){setTimeout(()=>{this.isOpen||this.$emit("blur")},200)},inputKeyupDown(){this.focusOnFirstOptions()},comboboxKeyupDown(){if(this.showSearch){this.$refs.search.focus();return}this.focusOnFirstOptions()},focus(){this.$refs.combobox.focus()},focusOnFirstOptions(){this.$refs.list.$el.querySelector("[tabindex]:not(hidden)").focus()},startResizing(t){this.resizingProp=t},endResizing(){this.resizingProp&&(this.resizingProp=null,this.$emit("resize",this.size))},onResize(t){switch(this.resizingProp){case"left":this.size.left=Math.max(this.size.left-t.movementX,0);break;case"right":this.size.right=Math.max(this.size.right+t.movementX,0);break}},registerDependency(t){this.dependency?(this.$globalEvents.$on("select-"+this.dependency+":update",n=>{this.clear(),this.dependencyValue=n,this.dependencyValue&&this.dependencyValue.values&&(!Array.isArray(this.dependencyValue.values)||this.dependencyValue.values.length)&&this.setPreparedValues()}),this.isLoading=!1):(this.$globalEvents.$off("select-"+t+":update"),this.setPreparedValues().then(()=>{const n=Object.keys(this.selected);this.$globalEvents.$emit("select-"+this.filterId+":update",{values:n,filter:this.filterId})}))},filter(t,n){this.filterString=t,this.$emit("search",{search:this.filterString}),this.defaultFilter(n)},setPreparedValues(t){let n=t||this.initialOptions;return this.alphabetSort&&(n=n.sort((e,i)=>e.title.toLowerCase().localeCompare(i.title.toLowerCase()))),this.prepare(n).then(([e,i])=>{this.actualOptions=e,this.allOptionsIsChecked=this.checkIfOptionsChecked(e),this.isInitialized=!0,this.selected=i,this.setBookmarkedOptions(e)})},clear(){this.setPreparedValues(),this.allOptionsIsChecked=!1,this.selected=[],this.isMultiple?(this.$emit("update:modelValue",null),this.$emit("input",null),this.$emit("clear-value",null)):(this.$emit("update:modelValue",[]),this.$emit("input",[]),this.$emit("clear-value",[])),this.setPreparedValues()},clearValue(){this.clear(),this.setPreparedValues()},prepare(t){return new Promise(n=>{const e={},i=[];let a=Promise.resolve();typeof t=="function"?(this.isLoading=!0,this.dependency&&(t=t.bind(null,this.dependencyValue)),a=a.then(t)):a=a.then(()=>t),a.then(r=>(this.isLoading=!1,r.forEach(l=>{l.initiallyVisible=typeof l.visible>"u"?!0:l.visible,l.visible=l.initiallyVisible,l.readonly=!!l.readonly,l.isDisabled=!1,l.checked=this.isMultiple?this.val!==null&&this.val.findIndex(s=>l.id==s)>-1:this.val!==null&&this.val==l.id,l.checked&&(!this.onlyEndNodes||!l.children)&&(e[l.id]=l),l.children&&(this.hasTreeChildren=!0,l.isChildrenVisible=!1),i.push(new Promise(s=>{l.children?this.prepare(l.children).then(([c,h])=>{l.children=c,Object.assign(e,h),s(l)}):s(l)}))}),Promise.all(i).then(l=>{n([l,e])}))).catch(r=>{throw this.isLoading=!1,r})})},filterFunc(t,n){let e=0;return t.forEach(i=>{let a=i.initiallyVisible&&i.title&&i.title.toString().toLowerCase().includes(n)&&!this.actualBookmarkedOptions[i.id];if(i.children&&i.children.length){let r=this.filterFunc(i.children,n);e+=r,r&&(i.isChildrenVisible=!!n||!!Object.keys(this.actualBookmarkedOptions).length,i.isDisabled=r<i.children.length&&!this.isBookmarkable),a?r||(a=!1):a=!!r}i.visible=a,a&&e++}),e},submit(){this.change();const t=Object.keys(this.selected);this.$globalEvents.$emit("select-"+this.filterId+":submit",{values:t,filter:this.filterId}),this.$emit("submit")},change(){const t=Object.keys(this.selected);this.isMultiple?(this.$emit("update:modelValue",t),this.$emit("input",t)):(this.$emit("update:modelValue",t[0]),this.$emit("input",t[0])),this.$globalEvents.$emit("select-"+this.filterId+":update",{values:t,filter:this.filterId}),this.$refs.dropdown.close()},checkIfOptionsChecked(t){return t.every(n=>n.checked||n.readonly)},registerCheck(t,n,e){if(n)if(t.checked=!0,this.isMultiple)this.onlyEndNodes&&t.children&&t.children.length||(this.selected[t.id]=t,this.$emit("update:modelValue",Object.keys(this.selected)),this.$emit("input",Object.keys(this.selected)));else{const i=Object.keys(this.selected)[0];i&&(this.selected[i].checked=!1),this.selected={[t.id]:t},this.change()}else delete this.selected[t.id],t.checked=!1,this.$emit("update:modelValue",Object.keys(this.selected)),this.$emit("input",Object.keys(this.selected));this.toggleDuplicateOptions(this.actualOptions,t.id,n),e&&(this.allOptionsIsChecked=this.checkIfOptionsChecked(this.actualOptions))},toggleDuplicateOptions(t,n,e){for(let i of t)i.id===n&&(i.checked=e),i.children&&this.toggleDuplicateOptions(i.children,n,e)},manageAll(){this.allOptionsIsChecked=!this.allOptionsIsChecked,this.traverseTree(this.actualOptions,t=>{t.readonly||this.registerCheck(t,this.allOptionsIsChecked,!1)})},traverseTree(t,n){t.forEach(e=>{n(e),e.children&&e.children.length&&this.traverseTree(e.children,n)})},getArrayOptions(t){let n=[];for(let e of t)n.push(e),e.children&&(n=n.concat(this.getArrayOptions(e.children)));return n},toggleBookmark(t){this.actualBookmarkedOptions[t.id]?delete this.actualBookmarkedOptions[t.id]:this.actualBookmarkedOptions[t.id]=t,this.$emit("toggle-bookmarked-option",t.id),this.filter(this.filterString,this.actualOptions)},setBookmarkedOptions(t){t.forEach(n=>{n.children&&n.children.length?this.setBookmarkedOptions(n.children):this.initBookmarks.includes(n.id)&&(this.actualBookmarkedOptions[n.id]=n)}),this.filter(this.filterString,t)},onClose(){this.isOpen=!1,this.filter("",this.actualOptions),this.isMultiple?this.$emit("close",Object.keys(this.selected)):this.$emit("close",Object.keys(this.selected)[0]),this.$emit("blur"),this.verticalVal=this.vertical??"bottom"},onOpen(){const t=document.documentElement.scrollHeight;this.isOpen=!0,this.vertical!=="bottom"&&this.$nextTick(()=>{document.documentElement.scrollHeight>t&&(this.verticalVal="top")})}},computed:{hasTrigger(){return!!this.$slots.trigger},hasTriggerContent(){return!!this.$slots.triggerContent},hasEmptyMessage(){return!!this.$slots.emptyMessage},treeDropPos(){return this.menuSize?{width:this.menuSize+"px",maxWidth:this.menuSize+"px",minWidth:this.menuSize+"px"}:{width:"auto",position:"absolute",left:-this.size.left+"px",right:-this.size.right+"px"}},hasHierarchy(){return this.actualOptions.some(t=>t.children)},selectedKeys(){return Object.keys(this.selected).filter(t=>{if(!this.onlyEndNodes||!this.selected[t].children)return!0})},selectStatus(){return this.staticPlaceholder?this.placeholder:this.isLoading?this.actualStrings.loading:this.selectedKeys.length?this.selectedKeys.length<this.maxSelectedNames?this.selectedKeys.map(t=>this.selected[t].title).join(","):this.selectedKeys.length<this.optionsCount?this.actualStrings.selectedCount.replace("{selected}",this.selectedKeys.length).replace("{all}",this.optionsCount):this.actualStrings.allSelected:this.emptyMessage},isEmpty(){return Array.isArray(this.value)?!this.value.length:!this.value},requiredDependencyNotFilled(){return this.dependency&&(!this.dependencyValue||!this.dependencyValue.values||!this.dependencyValue.values.length)},showSearch(){return this.useSearch||this.optionsCount>10},arrayOfOptions(){return this.getArrayOptions(this.actualOptions)},optionsCount(){let t=[];for(let n of this.arrayOfOptions)(!this.onlyEndNodes||!n.children)&&!t.includes(n.id)&&t.push(n.id);return t.length},visibleOptionsCount(){let t=[];return this.traverseTree(this.actualOptions,n=>{(!this.onlyEndNodes||!n.children)&&!t.includes(n.id)&&n.visible&&t.push(n.id)}),t.length+(this.isBookmarkable?Object.keys(this.actualBookmarkedOptions).length:0)}},components:{IbAlert:qt,IbIconButton:ht,IbIcon:Le,IbDropdown:er,IbInput:jr,List:Br,"select-option":ac},beforeUnmount(){document.removeEventListener("mousemove",this.onResize),document.removeEventListener("mouseup",this.endResizing)}},cc={key:0,class:"tree-select-empty"},uc={key:1,class:"tree-select-default-empty tree-select-empty"};function fc(t,n,e,i,a,r){const l=o.resolveComponent("ib-alert"),s=o.resolveComponent("ib-icon"),c=o.resolveComponent("ib-icon-button"),h=o.resolveComponent("select-option"),p=o.resolveComponent("list"),f=o.resolveComponent("ib-input"),d=o.resolveComponent("ib-dropdown");return o.openBlock(),o.createElementBlock(o.Fragment,null,[e.errorMessage?(o.openBlock(),o.createBlock(l,{key:0,class:"tree-select-error"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(e.errorMessage),1)]),_:1})):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(["tree-select",{...e.classList,"tree-select-custom-trigger-content":r.hasTriggerContent}])},[o.createVNode(d,{disabled:a.isLoading,"is-resizable":e.isResizable,vertical:a.verticalVal,ref:"dropdown",onClose:r.onClose,onOpen:r.onOpen},o.createSlots({body:o.withCtx(()=>[o.createElementVNode("div",{class:o.normalizeClass(["tree-drop",{"not-tree-child":!a.hasTreeChildren}]),style:o.normalizeStyle(r.treeDropPos)},[e.isResizable?(o.openBlock(),o.createElementBlock("div",{key:0,class:"ib-dropdown-resizer ib-dropdown-resizer-left",onMousedown:n[6]||(n[6]=u=>r.startResizing("left"))},null,32)):o.createCommentVNode("",!0),e.isResizable?(o.openBlock(),o.createElementBlock("div",{key:1,class:"ib-dropdown-resizer ib-dropdown-resizer-right",onMousedown:n[7]||(n[7]=u=>r.startResizing("right"))},null,32)):o.createCommentVNode("",!0),Object.keys(a.actualBookmarkedOptions).length>0?(o.openBlock(),o.createBlock(p,{key:2,class:o.normalizeClass({"has-hierarchy":r.hasHierarchy})},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.actualBookmarkedOptions,u=>(o.openBlock(),o.createBlock(h,{key:"bookmark"+u.id,option:u,"parent-auto-check":!1,"is-multiple":e.isMultiple,"is-bookmarkable":!0,"is-bookmarked":!0,onCheck:r.registerCheck,onToggleBookmark:r.toggleBookmark,uid:a.uid,"only-end-nodes":e.onlyEndNodes,"html-title":e.htmlOptionTitle,"show-input":e.showInputs},null,8,["option","is-multiple","onCheck","onToggleBookmark","uid","only-end-nodes","html-title","show-input"]))),128))]),_:1},8,["class"])):o.createCommentVNode("",!0),r.showSearch?(o.openBlock(),o.createBlock(f,{key:3,class:"tree-search",ref:"search","show-icon":!0,value:a.filterString,"aria-label":e.searchPlaceholderText?e.searchPlaceholderText:a.actualStrings.searchPlaceholder,placeholder:e.searchPlaceholderText?e.searchPlaceholderText:a.actualStrings.searchPlaceholder,onInput:n[8]||(n[8]=u=>r.filter(u,a.actualOptions)),onKeyup:o.withKeys(r.inputKeyupDown,["down"])},null,8,["value","aria-label","placeholder","onKeyup"])):o.createCommentVNode("",!0),o.createVNode(p,{ref:"list",role:"listbox",class:o.normalizeClass({"tree-select-list":!0,"has-hierarchy":r.hasHierarchy})},{default:o.withCtx(()=>[!r.requiredDependencyNotFilled&&!r.visibleOptionsCount&&r.hasEmptyMessage?(o.openBlock(),o.createElementBlock("div",cc,[o.renderSlot(t.$slots,"emptyMessage")])):!r.requiredDependencyNotFilled&&!r.visibleOptionsCount?(o.openBlock(),o.createElementBlock("div",uc,o.toDisplayString(a.actualStrings.emptyTitle),1)):o.createCommentVNode("",!0),o.withDirectives(o.createElementVNode("div",{class:"tree-select-empty"},o.toDisplayString(a.actualStrings.requiredDependencyNotFilled),513),[[o.vShow,r.requiredDependencyNotFilled]]),!e.isMultiple&&!e.isRequired&&a.actualOptions.length>0?(o.openBlock(),o.createBlock(h,{key:2,option:{title:t.lang("none","select"),id:null,checked:r.isEmpty},name:a.actualName,"parent-auto-check":e.parentAutoCheck,"is-multiple":e.isMultiple,onCheck:r.registerCheck,onToggleBookmark:r.toggleBookmark,uid:a.uid,"only-end-nodes":e.onlyEndNodes,"show-input":e.showInputs},null,8,["option","name","parent-auto-check","is-multiple","onCheck","onToggleBookmark","uid","only-end-nodes","show-input"])):o.createCommentVNode("",!0),r.requiredDependencyNotFilled?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:3},[e.allOptions&&e.isMultiple&&r.visibleOptionsCount&&!r.requiredDependencyNotFilled?(o.openBlock(),o.createBlock(h,{key:0,option:{title:a.actualStrings.selectAllOptions,id:"!all!",initiallyVisible:!0,visible:!0,isDisabled:r.visibleOptionsCount<r.optionsCount,checked:a.allOptionsIsChecked,isIndeterminate:!!Object.keys(a.selected).length},"is-toggle":e.isToggle,name:a.actualName,"parent-auto-check":!1,"is-multiple":e.isMultiple,"is-bookmarkable":!1,uid:a.uid,"only-end-nodes":e.onlyEndNodes,"show-input":e.showInputs,onCheck:r.manageAll,onOnFocus:n[9]||(n[9]=u=>a.focusedOptionId=u)},null,8,["option","is-toggle","name","is-multiple","uid","only-end-nodes","show-input","onCheck"])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.actualOptions,u=>o.renderSlot(t.$slots,a.actualName,{key:e.name+u.value,option:u,parentAutoCheck:e.parentAutoCheck,isMultiple:e.isMultiple,uid:a.uid,onlyEndNodes:e.onlyEndNodes,htmlTitle:e.htmlOptionTitle,showInput:e.showInputs},()=>[o.withDirectives(o.createVNode(h,{option:u,"is-toggle":e.isToggle,name:a.actualName,"parent-auto-check":e.parentAutoCheck,"is-multiple":e.isMultiple,"is-bookmarkable":e.isBookmarkable,uid:a.uid,"only-end-nodes":e.onlyEndNodes,"html-title":e.htmlOptionTitle,"show-input":e.showInputs,onCheck:r.registerCheck,onToggleBookmark:r.toggleBookmark,onOnFocus:n[10]||(n[10]=_=>a.focusedOptionId=_)},null,8,["option","is-toggle","name","parent-auto-check","is-multiple","is-bookmarkable","uid","only-end-nodes","html-title","show-input","onCheck","onToggleBookmark"]),[[o.vShow,u.visible]])])),128))],64))]),_:3},8,["class"])],6)]),_:2},[r.hasTrigger?{name:"trigger",fn:o.withCtx(()=>[o.renderSlot(t.$slots,"trigger",{selectedCount:r.selectedKeys.length})]),key:"0"}:{name:"trigger",fn:o.withCtx(({isOpened:u})=>[o.createElementVNode("div",{role:"combobox",tabindex:"0",class:o.normalizeClass(["tree-choice",{"tree-choice-opened":u,"has-clear-button":e.showClearButton,"tree-choice-error":e.errorMessage}]),ref:"combobox",onClick:n[2]||(n[2]=o.withModifiers(()=>{},["prevent"])),onBlur:n[3]||(n[3]=(..._)=>r.onBlur&&r.onBlur(..._)),onKeyup:[n[4]||(n[4]=o.withKeys((..._)=>r.comboboxKeyupDown&&r.comboboxKeyupDown(..._),["down"])),n[5]||(n[5]=o.withKeys((..._)=>r.comboboxKeyupDown&&r.comboboxKeyupDown(..._),["up"]))],"aria-label":e.ariaLabel,"aria-activedescendant":a.focusedOptionId},[r.hasTriggerContent?o.renderSlot(t.$slots,"triggerContent",{key:0,selectedCount:r.selectedKeys.length}):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[e.htmlOptionTitle?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass({placeholder:!r.selectStatus}),innerHTML:r.selectStatus||e.placeholder},null,10,["innerHTML"])):(o.openBlock(),o.createElementBlock("span",{key:1,class:o.normalizeClass({placeholder:!r.selectStatus})},o.toDisplayString(r.selectStatus||e.placeholder),3))],64)),e.showClearButton?o.withDirectives((o.openBlock(),o.createBlock(c,{key:2,kind:"ghost",class:"button-clear",onClick:o.withModifiers(r.clearValue,["prevent"]),onKeypress:n[0]||(n[0]=o.withKeys(o.withModifiers(()=>{},["stop","prevent"]),["enter"])),onKeydown:n[1]||(n[1]=o.withKeys(o.withModifiers(()=>{},["stop","prevent"]),["enter"])),onKeyup:o.withKeys(o.withModifiers(r.clearValue,["prevent"]),["enter"]),"help-text":e.clearButtonMessage},{default:o.withCtx(()=>[o.createVNode(s,{name:"close-outline"})]),_:1},8,["onClick","onKeyup","help-text"])),[[o.vShow,Object.keys(a.selected).length]]):o.createCommentVNode("",!0),o.createVNode(s,{name:u?"chevron-up-outline":"chevron-down-outline",classes:"tree-select-caret"},null,8,["name"])],42,["aria-label","aria-activedescendant"])]),key:"1"}]),1032,["disabled","is-resizable","vertical","onClose","onOpen"])],2)],64)}const So=_e(dc,[["render",fc]]),J0="",hc={name:"IbLimitSelector",props:{labelSelect:{type:String,required:!0},value:{type:Number},options:{type:Array,default:()=>[10,25,50,100]}},watch(t){this.selected=t},data(){return{selected:this.value}},methods:{selectItem(t){this.selected=t,this.onChange(t)},onChange(t){Number.isInteger(+t)&&this.$emit("select",+t)}},computed:{prepareOptions(){return this.options.map(t=>({id:t,title:t}))}},components:{IbLabel:wn,IbSelect:So}},pc={class:"report-limit-selector"};function mc(t,n,e,i,a,r){const l=o.resolveComponent("ib-label"),s=o.resolveComponent("ib-select");return o.openBlock(),o.createElementBlock("div",pc,[o.createVNode(l,null,{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(e.labelSelect),1)]),_:1}),o.createVNode(s,{classList:"report-limit-selector-select",value:e.value,options:r.prepareOptions,"is-multiple":!1,"show-clear-button":!1,onInput:r.selectItem},null,8,["value","options","onInput"])])}const xo=_e(hc,[["render",mc]]),X0="",gc={name:"IbPagination",props:{tooltipTextPrev:{type:String},tooltipTextNext:{type:String},labelInput:{type:String},labelSelect:{type:String,required:!0},countRows:{type:Number,required:!0},pageCount:{type:Number,default:null},current:{type:Number,default:1},limitSelector:{type:Number,default:10},showPaginationInput:{type:Boolean,default:!0}},data(){return{currentPage:this.current,indexSpaceLeft:null,indexSpaceRight:null,limitValue:this.limitSelector}},watch:{current(t){this.onSelect(t)},limitSelector(t){this.limitValue=t},limitValue(){this.currentPage=1}},methods:{changeLimit(t){Number.isInteger(t)&&(this.limitValue=t,this.$emit("set-limit",t))},onInput(t){if(t<1){this.onSelect(1);return}if(t>this.countPagePagination){this.onSelect(this.countPagePagination);return}this.onSelect(Number(t))},onSelect(t){Number.isInteger(t)&&(this.currentPage=t,this.$emit("select",t))},showItem(t){if(this.countPagePagination<=5)return this.indexSpaceLeft=null,this.indexSpaceRight=null,!0;if(t===1||t===this.countPagePagination)return!0;if(this.countPagePagination>=7){if(this.currentPage<=3&&t<=5)return this.indexSpaceLeft=this.countPagePagination,this.indexSpaceRight=null,!0;if(this.currentPage>=this.countPagePagination-2&&t>=this.countPagePagination-4)return this.indexSpaceLeft=null,this.indexSpaceRight=1,!0;if(3<this.currentPage<this.countPagePagination-3&&(t===this.currentPage+1||t===this.currentPage-1||t===this.currentPage))return this.indexSpaceLeft=this.countPagePagination,this.indexSpaceRight=1,!0}else return!0;return!1}},computed:{setCountOfRows(){return this.currentPage===1||this.countPagePagination===1?"1 - "+(this.countPagePagination>1?this.limitValue:this.countRows):this.countPagePagination===this.currentPage?(this.currentPage-1)*this.limitValue+" - "+this.countRows:(this.currentPage-1)*this.limitValue+1+" - "+this.currentPage*this.limitValue},countPagePagination(){return Math.ceil(this.countRows/this.limitValue)}},components:{IbIconButton:ht,IbIcon:Le,IbInput:jr,IbLabel:wn,IbLimitSelector:xo,IbTooltip:an}},yc={class:"report-controls"},vc={class:"repot-pagination"},bc={class:"pagination-input"},_c={class:"row-count"},$c={class:"pagination-wrapper"},wc=["onClick"];function kc(t,n,e,i,a,r){const l=o.resolveComponent("ib-limit-selector"),s=o.resolveComponent("ib-label"),c=o.resolveComponent("ib-input"),h=o.resolveComponent("ib-icon"),p=o.resolveComponent("ib-tooltip"),f=o.resolveComponent("ib-icon-button");return o.openBlock(),o.createElementBlock("div",yc,[o.createVNode(l,{onSelect:r.changeLimit,value:a.limitValue,"label-select":e.labelSelect},null,8,["onSelect","value","label-select"]),o.createElementVNode("div",vc,[e.showPaginationInput?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createVNode(s,null,{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(e.labelInput),1)]),_:1}),o.createElementVNode("div",bc,[o.createVNode(c,{type:"number",debounce:500,onInput:r.onInput},null,8,["onInput"])])],64)):o.createCommentVNode("",!0),o.createElementVNode("div",_c,o.toDisplayString(r.setCountOfRows+" of "+e.countRows),1),o.createVNode(f,{kind:"tertiary",size:"m",class:"toggle-children button-prev",disabled:a.currentPage===1,onClick:n[0]||(n[0]=d=>r.onSelect(a.currentPage-1))},{default:o.withCtx(()=>[o.createVNode(h,{name:"chevron-back-outline"}),e.tooltipTextPrev?(o.openBlock(),o.createBlock(p,{key:0,text:e.tooltipTextPrev},null,8,["text"])):o.createCommentVNode("",!0)]),_:1},8,["disabled"]),o.createElementVNode("ul",$c,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.countPagePagination,(d,u)=>o.withDirectives((o.openBlock(),o.createElementBlock("li",{key:u,class:o.normalizeClass(["pagination-item",{active:u+1===a.currentPage,"dots-left":a.indexSpaceLeft===u+1,"dots-right":a.indexSpaceRight===u+1}]),onClick:_=>r.onSelect(u+1)},[o.createElementVNode("button",null,o.toDisplayString(u+1),1)],10,wc)),[[o.vShow,r.showItem(u+1)]])),128))]),o.createVNode(f,{kind:"tertiary",size:"m",class:"toggle-children button-next",disabled:a.currentPage===r.countPagePagination,onClick:n[1]||(n[1]=d=>r.onSelect(a.currentPage+1))},{default:o.withCtx(()=>[o.createVNode(h,{name:"chevron-forward-outline"}),e.tooltipTextNext?(o.openBlock(),o.createBlock(p,{key:0,text:e.tooltipTextNext},null,8,["text"])):o.createCommentVNode("",!0)]),_:1},8,["disabled"])])])}const Cc=_e(gc,[["render",kc]]),kn={PROGRESS:"progress",SUCCESS:"success",FAILED:"failed",CANCELING:"canceling",CANCELED:"canceled"},Q0="",Oc={props:{states:{type:String,default:kn.PROGRESS},progress:{type:[String,Number],default:0},ariaLabel:{type:String,required:!0}},computed:{classes(){const t=["ib-progress-bar"];return t.push(`progress-bar-${this.states}`),t},iconName(){return this.states===kn.SUCCESS?"checkmark-circle":this.states===kn.FAILED||this.states===kn.CANCELING||this.states===kn.CANCELED?"close-circle":""}},components:{IbIcon:Le}},To=t=>(o.pushScopeId("data-v-a0217859"),t=t(),o.popScopeId(),t),Ec={class:"ib-progress-bar-wrapper"},Sc=["aria-label","aria-valuenow"],xc=[To(()=>o.createElementVNode("div",{class:"gradient"},null,-1))],Tc=To(()=>o.createElementVNode("div",null,null,-1));function Nc(t,n,e,i,a,r){const l=o.resolveComponent("ib-icon");return o.openBlock(),o.createElementBlock("div",Ec,[o.createElementVNode("div",{class:o.normalizeClass(r.classes)},[o.createElementVNode("div",{class:"progress",role:"meter","aria-label":e.ariaLabel,"aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":e.progress,style:o.normalizeStyle({width:e.progress+"%"})},xc,12,Sc),Tc],2),o.withDirectives(o.createVNode(l,{class:"status-icon",name:r.iconName},null,8,["name"]),[[o.vShow,r.iconName.length]])])}const Ac=_e(Oc,[["render",Nc],["__scopeId","data-v-a0217859"]]),Dc={new:`<svg width="11" height="11" viewBox="0 0 11 11" fill="none" xmlns="http://www.w3.org/2000/svg">
27
+ *****************************************************/(function(t,n){(function(e,i){t.exports=i()})(Fe,function(){class e{constructor(r,l=!0,s=[],c=5e3){this.ctx=r,this.iframes=l,this.exclude=s,this.iframesTimeout=c}static matches(r,l){const s=typeof l=="string"?[l]:l,c=r.matches||r.matchesSelector||r.msMatchesSelector||r.mozMatchesSelector||r.oMatchesSelector||r.webkitMatchesSelector;if(c){let h=!1;return s.every(p=>!c.call(r,p)||(h=!0,!1)),h}return!1}getContexts(){let r=[];return(this.ctx!==void 0&&this.ctx?NodeList.prototype.isPrototypeOf(this.ctx)?Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?this.ctx:typeof this.ctx=="string"?Array.prototype.slice.call(document.querySelectorAll(this.ctx)):[this.ctx]:[]).forEach(l=>{const s=r.filter(c=>c.contains(l)).length>0;r.indexOf(l)!==-1||s||r.push(l)}),r}getIframeContents(r,l,s=()=>{}){let c;try{const h=r.contentWindow;if(c=h.document,!h||!c)throw new Error("iframe inaccessible")}catch{s()}c&&l(c)}isIframeBlank(r){const l="about:blank",s=r.getAttribute("src").trim();return r.contentWindow.location.href===l&&s!==l&&s}observeIframeLoad(r,l,s){let c=!1,h=null;const p=()=>{if(!c){c=!0,clearTimeout(h);try{this.isIframeBlank(r)||(r.removeEventListener("load",p),this.getIframeContents(r,l,s))}catch{s()}}};r.addEventListener("load",p),h=setTimeout(p,this.iframesTimeout)}onIframeReady(r,l,s){try{r.contentWindow.document.readyState==="complete"?this.isIframeBlank(r)?this.observeIframeLoad(r,l,s):this.getIframeContents(r,l,s):this.observeIframeLoad(r,l,s)}catch{s()}}waitForIframes(r,l){let s=0;this.forEachIframe(r,()=>!0,c=>{s++,this.waitForIframes(c.querySelector("html"),()=>{--s||l()})},c=>{c||l()})}forEachIframe(r,l,s,c=()=>{}){let h=r.querySelectorAll("iframe"),p=h.length,f=0;h=Array.prototype.slice.call(h);const d=()=>{--p<=0&&c(f)};p||d(),h.forEach(u=>{e.matches(u,this.exclude)?d():this.onIframeReady(u,_=>{l(u)&&(f++,s(_)),d()},d)})}createIterator(r,l,s){return document.createNodeIterator(r,l,s,!1)}createInstanceOnIframe(r){return new e(r.querySelector("html"),this.iframes)}compareNodeIframe(r,l,s){const c=r.compareDocumentPosition(s),h=Node.DOCUMENT_POSITION_PRECEDING;return!!(c&h&&(l===null||l.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING))}getIteratorNode(r){const l=r.previousNode();return{prevNode:l,node:(l===null||r.nextNode())&&r.nextNode()}}checkIframeFilter(r,l,s,c){let h=!1,p=!1;return c.forEach((f,d)=>{f.val===s&&(h=d,p=f.handled)}),this.compareNodeIframe(r,l,s)?(h!==!1||p?h===!1||p||(c[h].handled=!0):c.push({val:s,handled:!0}),!0):(h===!1&&c.push({val:s,handled:!1}),!1)}handleOpenIframes(r,l,s,c){r.forEach(h=>{h.handled||this.getIframeContents(h.val,p=>{this.createInstanceOnIframe(p).forEachNode(l,s,c)})})}iterateThroughNodes(r,l,s,c,h){const p=this.createIterator(l,r,c);let f,d,u=[],_=[],v=()=>({prevNode:d,node:f}=this.getIteratorNode(p),f);for(;v();)this.iframes&&this.forEachIframe(l,b=>this.checkIframeFilter(f,d,b,u),b=>{this.createInstanceOnIframe(b).forEachNode(r,g=>_.push(g),c)}),_.push(f);_.forEach(b=>{s(b)}),this.iframes&&this.handleOpenIframes(u,r,s,c),h()}forEachNode(r,l,s,c=()=>{}){const h=this.getContexts();let p=h.length;p||c(),h.forEach(f=>{const d=()=>{this.iterateThroughNodes(r,f,l,s,()=>{--p<=0&&c()})};this.iframes?this.waitForIframes(f,d):d()})}}class i{constructor(r){this.ctx=r,this.ie=!1;const l=window.navigator.userAgent;(l.indexOf("MSIE")>-1||l.indexOf("Trident")>-1)&&(this.ie=!0)}set opt(r){this._opt=Object.assign({},{element:"",className:"",exclude:[],iframes:!1,iframesTimeout:5e3,separateWordSearch:!0,diacritics:!0,synonyms:{},accuracy:"partially",acrossElements:!1,caseSensitive:!1,ignoreJoiners:!1,ignoreGroups:0,ignorePunctuation:[],wildcards:"disabled",each:()=>{},noMatch:()=>{},filter:()=>!0,done:()=>{},debug:!1,log:window.console},r)}get opt(){return this._opt}get iterator(){return new e(this.ctx,this.opt.iframes,this.opt.exclude,this.opt.iframesTimeout)}log(r,l="debug"){const s=this.opt.log;this.opt.debug&&typeof s=="object"&&typeof s[l]=="function"&&s[l](`mark.js: ${r}`)}escapeStr(r){return r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}createRegExp(r){return this.opt.wildcards!=="disabled"&&(r=this.setupWildcardsRegExp(r)),r=this.escapeStr(r),Object.keys(this.opt.synonyms).length&&(r=this.createSynonymsRegExp(r)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(r=this.setupIgnoreJoinersRegExp(r)),this.opt.diacritics&&(r=this.createDiacriticsRegExp(r)),r=this.createMergedBlanksRegExp(r),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(r=this.createJoinersRegExp(r)),this.opt.wildcards!=="disabled"&&(r=this.createWildcardsRegExp(r)),r=this.createAccuracyRegExp(r)}createSynonymsRegExp(r){const l=this.opt.synonyms,s=this.opt.caseSensitive?"":"i",c=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(let h in l)if(l.hasOwnProperty(h)){const p=l[h],f=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(h):this.escapeStr(h),d=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(p):this.escapeStr(p);f!==""&&d!==""&&(r=r.replace(new RegExp(`(${this.escapeStr(f)}|${this.escapeStr(d)})`,`gm${s}`),c+`(${this.processSynomyms(f)}|${this.processSynomyms(d)})`+c))}return r}processSynomyms(r){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(r=this.setupIgnoreJoinersRegExp(r)),r}setupWildcardsRegExp(r){return(r=r.replace(/(?:\\)*\?/g,l=>l.charAt(0)==="\\"?"?":"")).replace(/(?:\\)*\*/g,l=>l.charAt(0)==="\\"?"*":"")}createWildcardsRegExp(r){let l=this.opt.wildcards==="withSpaces";return r.replace(/\u0001/g,l?"[\\S\\s]?":"\\S?").replace(/\u0002/g,l?"[\\S\\s]*?":"\\S*")}setupIgnoreJoinersRegExp(r){return r.replace(/[^(|)\\]/g,(l,s,c)=>{let h=c.charAt(s+1);return/[(|)\\]/.test(h)||h===""?l:l+"\0"})}createJoinersRegExp(r){let l=[];const s=this.opt.ignorePunctuation;return Array.isArray(s)&&s.length&&l.push(this.escapeStr(s.join(""))),this.opt.ignoreJoiners&&l.push("\\u00ad\\u200b\\u200c\\u200d"),l.length?r.split(/\u0000+/).join(`[${l.join("")}]*`):r}createDiacriticsRegExp(r){const l=this.opt.caseSensitive?"":"i",s=this.opt.caseSensitive?["aàáảãạăằắẳẵặâầấẩẫậäåāą","AÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćč","CÇĆČ","dđď","DĐĎ","eèéẻẽẹêềếểễệëěēę","EÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïī","IÌÍỈĨỊÎÏĪ","lł","LŁ","nñňń","NÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøō","OÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rř","RŘ","sšśșş","SŠŚȘŞ","tťțţ","TŤȚŢ","uùúủũụưừứửữựûüůū","UÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿ","YÝỲỶỸỴŸ","zžżź","ZŽŻŹ"]:["aàáảãạăằắẳẵặâầấẩẫậäåāąAÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćčCÇĆČ","dđďDĐĎ","eèéẻẽẹêềếểễệëěēęEÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïīIÌÍỈĨỊÎÏĪ","lłLŁ","nñňńNÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøōOÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rřRŘ","sšśșşSŠŚȘŞ","tťțţTŤȚŢ","uùúủũụưừứửữựûüůūUÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿYÝỲỶỸỴŸ","zžżźZŽŻŹ"];let c=[];return r.split("").forEach(h=>{s.every(p=>{if(p.indexOf(h)!==-1){if(c.indexOf(p)>-1)return!1;r=r.replace(new RegExp(`[${p}]`,`gm${l}`),`[${p}]`),c.push(p)}return!0})}),r}createMergedBlanksRegExp(r){return r.replace(/[\s]+/gim,"[\\s]+")}createAccuracyRegExp(r){const l="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿";let s=this.opt.accuracy,c=typeof s=="string"?s:s.value,h=typeof s=="string"?[]:s.limiters,p="";switch(h.forEach(f=>{p+=`|${this.escapeStr(f)}`}),c){case"partially":default:return`()(${r})`;case"complementary":return`()([^${p="\\s"+(p||this.escapeStr(l))}]*${r}[^${p}]*)`;case"exactly":return`(^|\\s${p})(${r})(?=$|\\s${p})`}}getSeparatedKeywords(r){let l=[];return r.forEach(s=>{this.opt.separateWordSearch?s.split(" ").forEach(c=>{c.trim()&&l.indexOf(c)===-1&&l.push(c)}):s.trim()&&l.indexOf(s)===-1&&l.push(s)}),{keywords:l.sort((s,c)=>c.length-s.length),length:l.length}}isNumeric(r){return Number(parseFloat(r))==r}checkRanges(r){if(!Array.isArray(r)||Object.prototype.toString.call(r[0])!=="[object Object]")return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(r),[];const l=[];let s=0;return r.sort((c,h)=>c.start-h.start).forEach(c=>{let{start:h,end:p,valid:f}=this.callNoMatchOnInvalidRanges(c,s);f&&(c.start=h,c.length=p-h,l.push(c),s=p)}),l}callNoMatchOnInvalidRanges(r,l){let s,c,h=!1;return r&&r.start!==void 0?(c=(s=parseInt(r.start,10))+parseInt(r.length,10),this.isNumeric(r.start)&&this.isNumeric(r.length)&&c-l>0&&c-s>0?h=!0:(this.log(`Ignoring invalid or overlapping range: ${JSON.stringify(r)}`),this.opt.noMatch(r))):(this.log(`Ignoring invalid range: ${JSON.stringify(r)}`),this.opt.noMatch(r)),{start:s,end:c,valid:h}}checkWhitespaceRanges(r,l,s){let c,h=!0,p=s.length,f=l-p,d=parseInt(r.start,10)-f;return(c=(d=d>p?p:d)+parseInt(r.length,10))>p&&(c=p,this.log(`End range automatically set to the max value of ${p}`)),d<0||c-d<0||d>p||c>p?(h=!1,this.log(`Invalid range: ${JSON.stringify(r)}`),this.opt.noMatch(r)):s.substring(d,c).replace(/\s+/g,"")===""&&(h=!1,this.log("Skipping whitespace only range: "+JSON.stringify(r)),this.opt.noMatch(r)),{start:d,end:c,valid:h}}getTextNodes(r){let l="",s=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,c=>{s.push({start:l.length,end:(l+=c.textContent).length,node:c})},c=>this.matchesExclude(c.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT,()=>{r({value:l,nodes:s})})}matchesExclude(r){return e.matches(r,this.opt.exclude.concat(["script","style","title","head","html"]))}wrapRangeInTextNode(r,l,s){const c=this.opt.element?this.opt.element:"mark",h=r.splitText(l),p=h.splitText(s-l);let f=document.createElement(c);return f.setAttribute("data-markjs","true"),this.opt.className&&f.setAttribute("class",this.opt.className),f.textContent=h.textContent,h.parentNode.replaceChild(f,h),p}wrapRangeInMappedTextNode(r,l,s,c,h){r.nodes.every((p,f)=>{const d=r.nodes[f+1];if(d===void 0||d.start>l){if(!c(p.node))return!1;const u=l-p.start,_=(s>p.end?p.end:s)-p.start,v=r.value.substr(0,p.start),b=r.value.substr(_+p.start);if(p.node=this.wrapRangeInTextNode(p.node,u,_),r.value=v+b,r.nodes.forEach((g,y)=>{y>=f&&(r.nodes[y].start>0&&y!==f&&(r.nodes[y].start-=_),r.nodes[y].end-=_)}),s-=_,h(p.node.previousSibling,p.start),!(s>p.end))return!1;l=p.end}return!0})}wrapMatches(r,l,s,c,h){const p=l===0?0:l+1;this.getTextNodes(f=>{f.nodes.forEach(d=>{let u;for(d=d.node;(u=r.exec(d.textContent))!==null&&u[p]!=="";){if(!s(u[p],d))continue;let _=u.index;if(p!==0)for(let v=1;v<p;v++)_+=u[v].length;d=this.wrapRangeInTextNode(d,_,_+u[p].length),c(d.previousSibling),r.lastIndex=0}}),h()})}wrapMatchesAcrossElements(r,l,s,c,h){const p=l===0?0:l+1;this.getTextNodes(f=>{let d;for(;(d=r.exec(f.value))!==null&&d[p]!=="";){let u=d.index;if(p!==0)for(let v=1;v<p;v++)u+=d[v].length;const _=u+d[p].length;this.wrapRangeInMappedTextNode(f,u,_,v=>s(d[p],v),(v,b)=>{r.lastIndex=b,c(v)})}h()})}wrapRangeFromIndex(r,l,s,c){this.getTextNodes(h=>{const p=h.value.length;r.forEach((f,d)=>{let{start:u,end:_,valid:v}=this.checkWhitespaceRanges(f,p,h.value);v&&this.wrapRangeInMappedTextNode(h,u,_,b=>l(b,f,h.value.substring(u,_),d),b=>{s(b,f)})}),c()})}unwrapMatches(r){const l=r.parentNode;let s=document.createDocumentFragment();for(;r.firstChild;)s.appendChild(r.removeChild(r.firstChild));l.replaceChild(s,r),this.ie?this.normalizeTextNode(l):l.normalize()}normalizeTextNode(r){if(r){if(r.nodeType===3)for(;r.nextSibling&&r.nextSibling.nodeType===3;)r.nodeValue+=r.nextSibling.nodeValue,r.parentNode.removeChild(r.nextSibling);else this.normalizeTextNode(r.firstChild);this.normalizeTextNode(r.nextSibling)}}markRegExp(r,l){this.opt=l,this.log(`Searching with expression "${r}"`);let s=0,c="wrapMatches";const h=p=>{s++,this.opt.each(p)};this.opt.acrossElements&&(c="wrapMatchesAcrossElements"),this[c](r,this.opt.ignoreGroups,(p,f)=>this.opt.filter(f,p,s),h,()=>{s===0&&this.opt.noMatch(r),this.opt.done(s)})}mark(r,l){this.opt=l;let s=0,c="wrapMatches";const{keywords:h,length:p}=this.getSeparatedKeywords(typeof r=="string"?[r]:r),f=this.opt.caseSensitive?"":"i",d=u=>{let _=new RegExp(this.createRegExp(u),`gm${f}`),v=0;this.log(`Searching with expression "${_}"`),this[c](_,1,(b,g)=>this.opt.filter(g,u,s,v),b=>{v++,s++,this.opt.each(b)},()=>{v===0&&this.opt.noMatch(u),h[p-1]===u?this.opt.done(s):d(h[h.indexOf(u)+1])})};this.opt.acrossElements&&(c="wrapMatchesAcrossElements"),p===0?this.opt.done(s):d(h[0])}markRanges(r,l){this.opt=l;let s=0,c=this.checkRanges(r);c&&c.length?(this.log("Starting to mark with the following ranges: "+JSON.stringify(c)),this.wrapRangeFromIndex(c,(h,p,f,d)=>this.opt.filter(h,p,f,d),(h,p)=>{s++,this.opt.each(h,p)},()=>{this.opt.done(s)})):this.opt.done(s)}unmark(r){this.opt=r;let l=this.opt.element?this.opt.element:"*";l+="[data-markjs]",this.opt.className&&(l+=`.${this.opt.className}`),this.log(`Removal selector "${l}"`),this.iterator.forEachNode(NodeFilter.SHOW_ELEMENT,s=>{this.unwrapMatches(s)},s=>{const c=e.matches(s,l),h=this.matchesExclude(s);return!c||h?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},this.opt.done)}}return function(a){const r=new i(a);return this.mark=(l,s)=>(r.mark(l,s),this),this.markRegExp=(l,s)=>(r.markRegExp(l,s),this),this.markRanges=(l,s)=>(r.markRanges(l,s),this),this.unmark=l=>(r.unmark(l),this),this}})})(Oo);var lc=Oo.exports;const sc=rr(lc),Z0="";function Eo(t){return JSON.parse(JSON.stringify(t))}const dc={name:"IbTreeSelect",inject:["LANG_COMPONENTS"],props:{classList:[String,Array],placeholder:{type:String,default:""},searchPlaceholderText:{type:String,default:""},clearButtonMessage:{type:String,default:""},showClearButton:{type:Boolean,default:!0},isResizable:{type:Boolean,default:!1},menuSize:{type:[String,Number]},initialSize:{left:0,right:0},ariaLabel:{type:String,default:""},name:String,id:{type:String,default(){return mt()}},options:{default(){return[]}},modelValue:{type:[Number,String,Array]},value:{type:[Number,String,Array],default(){return[]}},maxSelectedNames:{type:Number,default:2},isMultiple:{type:Boolean,default:!0},parentAutoCheck:{type:Boolean,default:!0},strings:{type:Object,default(){return{}}},onlyEndNodes:{type:Boolean,default:!1},isRequired:{type:Boolean,default:!0},htmlOptionTitle:{type:Boolean,default:!1},isBookmarkable:{type:Boolean,default:!1},initBookmarks:{type:Array,default:()=>[]},showInputs:{type:Boolean,default(t){return t.isMultiple}},dependency:{type:String},filterId:{type:String,default(){return mt()}},staticPlaceholder:{type:Boolean,default:!1},useSearch:{type:Boolean,default:!1},isWatching:{type:Boolean,default:!1},vertical:{type:String},emptyMessage:{type:String,default:""},errorMessage:{type:String,default:""},allOptions:{type:Boolean,default:!0},watchClearValue:{type:Boolean,default:!1},isToggle:{type:Boolean,default:!1},alphabetSort:{type:Boolean,default:!1}},emits:["close","input","blur","search","resize","submit","clearValue","update:modelValue"],watch:{value(t){this.val=t,(!Array.isArray(t)||t.join(",")!==Object.keys(this.selected).join(","))&&this.setPreparedValues(this.actualOptions,!1)},modelValue:{handler(t){this.val=t,this.actualOptions=[],this.setPreparedValues()},deep:!0},val(t){this.watchClearValue&&(!t||Array.isArray(t)&&!t.length)&&this.setPreparedValues(this.actualOptions).then(()=>{const n=Object.keys(this.selected);this.$globalEvents.$emit("select-"+this.filterId+":update",{values:n,filter:this.filterId})})},options:{handler(t){this.initialOptions=Eo(t)},deep:!0},initialOptions(t){let n=!0;if(typeof t=="function")n=!1;else{const e=[],i=t;Array.prototype.forEach.call(i,a=>{a.id!==void 0&&e.push(a.id)}),n=JSON.stringify(e)===JSON.stringify(this.optionsIdsWatch),this.optionsIdsWatch=e}(this.isInitialized&&!n||this.isWatching)&&this.setPreparedValues().then(()=>{const e=Object.keys(this.selected);this.$globalEvents.$emit("select-"+this.filterId+":update",{values:e,filter:this.filterId})})},dependency(t,n){this.$nextTick(()=>{this.registerDependency(n)})},initBookmarks(){this.actualBookmarkedOptions={},this.setBookmarkedOptions(this.actualOptions)}},mounted(){this.marker=new sc(this.$refs.list.$el),this.registerDependency(),this.$globalEvents.$on("select:refresh",()=>{this.setPreparedValues()}),document.addEventListener("mousemove",this.onResize),document.addEventListener("mouseup",this.endResizing)},data(){var t,n,e,i,a,r,l,s;return this.defaultFilter=c=>{this.marker.unmark();const h=this.filterString.toLowerCase().trim();this.filterFunc.call(this,c,h),h&&this.marker.mark(h)},{initialOptions:Eo(this.options),val:this.modelValue?this.modelValue:this.value,size:{left:this.initialSize&&this.initialSize.left||0,right:this.initialSize&&this.initialSize.right||0},resizingProp:null,isInitialized:!1,optionsIdsWatch:[],isLoading:!1,actualName:this.isMultiple?this.name+"[]":this.name,filterString:"",actualOptions:[],actualBookmarkedOptions:{},selected:[],isOpen:!1,verticalVal:this.vertical??"bottom",allOptionsIsChecked:!0,hasTreeChildren:!1,uid:`f${(~~(Math.random()*1e8)).toString(16)}`,focusedOptionId:"",actualStrings:{searchPlaceholder:lang(this.searchPlaceholderText.length?this.searchPlaceholderText:"search_placeholder",(t=this.LANG_COMPONENTS)==null?void 0:t.COMPONENT_SELECT),emptyTitle:lang("empty_title",(n=this.LANG_COMPONENTS)==null?void 0:n.COMPONENT_SELECT),selectAllOptions:lang("all_options",(e=this.LANG_COMPONENTS)==null?void 0:e.COMPONENT_SELECT),allSelected:lang("all_selected",(i=this.LANG_COMPONENTS)==null?void 0:i.COMPONENT_SELECT),loading:lang("loading",(a=this.LANG_COMPONENTS)==null?void 0:a.COMPONENT_SELECT)+"...",selectedCount:lang("selected_count",(r=this.LANG_COMPONENTS)==null?void 0:r.COMPONENT_SELECT),buttonTitle:this.buttonTitle||lang("button_title",(l=this.LANG_COMPONENTS)==null?void 0:l.COMPONENT_SELECT),requiredDependencyNotFilled:this.requiredDependencyNotFilled||lang("required_dependency_are_not_filled",(s=this.LANG_COMPONENTS)==null?void 0:s.COMPONENT_SELECT),...this.strings},dependencyValue:null}},methods:{onBlur(){setTimeout(()=>{this.isOpen||this.$emit("blur")},200)},inputKeyupDown(){this.focusOnFirstOptions()},comboboxKeyupDown(){if(this.showSearch){this.$refs.search.focus();return}this.focusOnFirstOptions()},focus(){this.$refs.combobox.focus()},focusOnFirstOptions(){this.$refs.list.$el.querySelector("[tabindex]:not(hidden)").focus()},startResizing(t){this.resizingProp=t},endResizing(){this.resizingProp&&(this.resizingProp=null,this.$emit("resize",this.size))},onResize(t){switch(this.resizingProp){case"left":this.size.left=Math.max(this.size.left-t.movementX,0);break;case"right":this.size.right=Math.max(this.size.right+t.movementX,0);break}},registerDependency(t){this.dependency?(this.$globalEvents.$on("select-"+this.dependency+":update",n=>{this.clear(),this.dependencyValue=n,this.dependencyValue&&this.dependencyValue.values&&(!Array.isArray(this.dependencyValue.values)||this.dependencyValue.values.length)&&this.setPreparedValues()}),this.isLoading=!1):(this.$globalEvents.$off("select-"+t+":update"),this.setPreparedValues().then(()=>{const n=Object.keys(this.selected);this.$globalEvents.$emit("select-"+this.filterId+":update",{values:n,filter:this.filterId})}))},filter(t,n){this.filterString=t,this.$emit("search",{search:this.filterString}),this.defaultFilter(n)},setPreparedValues(t){let n=t||this.initialOptions;return this.alphabetSort&&(n=n.sort((e,i)=>e.title.toLowerCase().localeCompare(i.title.toLowerCase()))),this.prepare(n).then(([e,i])=>{this.actualOptions=e,this.allOptionsIsChecked=this.checkIfOptionsChecked(e),this.isInitialized=!0,this.selected=i,this.setBookmarkedOptions(e)})},clear(){this.setPreparedValues(),this.allOptionsIsChecked=!1,this.selected=[],this.isMultiple?(this.$emit("update:modelValue",null),this.$emit("input",null),this.$emit("clear-value",null)):(this.$emit("update:modelValue",[]),this.$emit("input",[]),this.$emit("clear-value",[])),this.setPreparedValues()},clearValue(){this.clear(),this.setPreparedValues()},prepare(t){return new Promise(n=>{const e={},i=[];let a=Promise.resolve();typeof t=="function"?(this.isLoading=!0,this.dependency&&(t=t.bind(null,this.dependencyValue)),a=a.then(t)):a=a.then(()=>t),a.then(r=>(this.isLoading=!1,r.forEach(l=>{l.initiallyVisible=typeof l.visible>"u"?!0:l.visible,l.visible=l.initiallyVisible,l.readonly=!!l.readonly,l.isDisabled=!1,l.checked=this.isMultiple?this.val!==null&&this.val.findIndex(s=>l.id==s)>-1:this.val!==null&&this.val==l.id,l.checked&&(!this.onlyEndNodes||!l.children)&&(e[l.id]=l),l.children&&(this.hasTreeChildren=!0,l.isChildrenVisible=!1),i.push(new Promise(s=>{l.children?this.prepare(l.children).then(([c,h])=>{l.children=c,Object.assign(e,h),s(l)}):s(l)}))}),Promise.all(i).then(l=>{n([l,e])}))).catch(r=>{throw this.isLoading=!1,r})})},filterFunc(t,n){let e=0;return t.forEach(i=>{let a=i.initiallyVisible&&i.title&&i.title.toString().toLowerCase().includes(n)&&!this.actualBookmarkedOptions[i.id];if(i.children&&i.children.length){let r=this.filterFunc(i.children,n);e+=r,r&&(i.isChildrenVisible=!!n||!!Object.keys(this.actualBookmarkedOptions).length,i.isDisabled=r<i.children.length&&!this.isBookmarkable),a?r||(a=!1):a=!!r}i.visible=a,a&&e++}),e},submit(){this.change();const t=Object.keys(this.selected);this.$globalEvents.$emit("select-"+this.filterId+":submit",{values:t,filter:this.filterId}),this.$emit("submit")},change(){const t=Object.keys(this.selected);this.isMultiple?(this.$emit("update:modelValue",t),this.$emit("input",t)):(this.$emit("update:modelValue",t[0]),this.$emit("input",t[0])),this.$globalEvents.$emit("select-"+this.filterId+":update",{values:t,filter:this.filterId}),this.$refs.dropdown.close()},checkIfOptionsChecked(t){return t.every(n=>n.checked||n.readonly)},registerCheck(t,n,e){if(n)if(t.checked=!0,this.isMultiple)this.onlyEndNodes&&t.children&&t.children.length||(this.selected[t.id]=t,this.$emit("update:modelValue",Object.keys(this.selected)),this.$emit("input",Object.keys(this.selected)));else{const i=Object.keys(this.selected)[0];i&&(this.selected[i].checked=!1),this.selected={[t.id]:t},this.change()}else delete this.selected[t.id],t.checked=!1,this.$emit("update:modelValue",Object.keys(this.selected)),this.$emit("input",Object.keys(this.selected));this.toggleDuplicateOptions(this.actualOptions,t.id,n),e&&(this.allOptionsIsChecked=this.checkIfOptionsChecked(this.actualOptions))},toggleDuplicateOptions(t,n,e){for(let i of t)i.id===n&&(i.checked=e),i.children&&this.toggleDuplicateOptions(i.children,n,e)},manageAll(){this.allOptionsIsChecked=!this.allOptionsIsChecked,this.traverseTree(this.actualOptions,t=>{t.readonly||this.registerCheck(t,this.allOptionsIsChecked,!1)})},traverseTree(t,n){t.forEach(e=>{n(e),e.children&&e.children.length&&this.traverseTree(e.children,n)})},getArrayOptions(t){let n=[];for(let e of t)n.push(e),e.children&&(n=n.concat(this.getArrayOptions(e.children)));return n},toggleBookmark(t){this.actualBookmarkedOptions[t.id]?delete this.actualBookmarkedOptions[t.id]:this.actualBookmarkedOptions[t.id]=t,this.$emit("toggle-bookmarked-option",t.id),this.filter(this.filterString,this.actualOptions)},setBookmarkedOptions(t){t.forEach(n=>{n.children&&n.children.length?this.setBookmarkedOptions(n.children):this.initBookmarks.includes(n.id)&&(this.actualBookmarkedOptions[n.id]=n)}),this.filter(this.filterString,t)},onClose(){this.isOpen=!1,this.filter("",this.actualOptions),this.isMultiple?this.$emit("close",Object.keys(this.selected)):this.$emit("close",Object.keys(this.selected)[0]),this.$emit("blur"),this.verticalVal=this.vertical??"bottom"},onOpen(){const t=document.documentElement.scrollHeight;this.isOpen=!0,this.vertical!=="bottom"&&this.$nextTick(()=>{document.documentElement.scrollHeight>t&&(this.verticalVal="top")})}},computed:{hasTrigger(){return!!this.$slots.trigger},hasTriggerContent(){return!!this.$slots.triggerContent},hasEmptyMessage(){return!!this.$slots.emptyMessage},treeDropPos(){return this.menuSize?{width:this.menuSize+"px",maxWidth:this.menuSize+"px",minWidth:this.menuSize+"px"}:{width:"auto",position:"absolute",left:-this.size.left+"px",right:-this.size.right+"px"}},hasHierarchy(){return this.actualOptions.some(t=>t.children)},selectedKeys(){return Object.keys(this.selected).filter(t=>{if(!this.onlyEndNodes||!this.selected[t].children)return!0})},selectStatus(){return this.staticPlaceholder?this.placeholder:this.isLoading?this.actualStrings.loading:this.selectedKeys.length?this.selectedKeys.length<this.maxSelectedNames?this.selectedKeys.map(t=>this.selected[t].title).join(","):this.selectedKeys.length<this.optionsCount?this.actualStrings.selectedCount.replace("{selected}",this.selectedKeys.length).replace("{all}",this.optionsCount):this.actualStrings.allSelected:this.emptyMessage},isEmpty(){return Array.isArray(this.value)?!this.value.length:!this.value},requiredDependencyNotFilled(){return this.dependency&&(!this.dependencyValue||!this.dependencyValue.values||!this.dependencyValue.values.length)},showSearch(){return this.useSearch||this.optionsCount>10},arrayOfOptions(){return this.getArrayOptions(this.actualOptions)},optionsCount(){let t=[];for(let n of this.arrayOfOptions)(!this.onlyEndNodes||!n.children)&&!t.includes(n.id)&&t.push(n.id);return t.length},visibleOptionsCount(){let t=[];return this.traverseTree(this.actualOptions,n=>{(!this.onlyEndNodes||!n.children)&&!t.includes(n.id)&&n.visible&&t.push(n.id)}),t.length+(this.isBookmarkable?Object.keys(this.actualBookmarkedOptions).length:0)}},components:{IbAlert:qt,IbIconButton:ht,IbIcon:Le,IbDropdown:er,IbInput:jr,List:Br,"select-option":ac},beforeUnmount(){document.removeEventListener("mousemove",this.onResize),document.removeEventListener("mouseup",this.endResizing)}},cc={key:0,class:"tree-select-empty"},uc={key:1,class:"tree-select-default-empty tree-select-empty"};function fc(t,n,e,i,a,r){const l=o.resolveComponent("ib-alert"),s=o.resolveComponent("ib-icon"),c=o.resolveComponent("ib-icon-button"),h=o.resolveComponent("select-option"),p=o.resolveComponent("list"),f=o.resolveComponent("ib-input"),d=o.resolveComponent("ib-dropdown");return o.openBlock(),o.createElementBlock(o.Fragment,null,[e.errorMessage?(o.openBlock(),o.createBlock(l,{key:0,class:"tree-select-error"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(e.errorMessage),1)]),_:1})):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(["tree-select",{...e.classList,"tree-select-custom-trigger-content":r.hasTriggerContent}])},[o.createVNode(d,{disabled:a.isLoading,"is-resizable":e.isResizable,vertical:a.verticalVal,ref:"dropdown",onClose:r.onClose,onOpen:r.onOpen},o.createSlots({body:o.withCtx(()=>[o.createElementVNode("div",{class:o.normalizeClass(["tree-drop",{"not-tree-child":!a.hasTreeChildren}]),style:o.normalizeStyle(r.treeDropPos)},[e.isResizable?(o.openBlock(),o.createElementBlock("div",{key:0,class:"ib-dropdown-resizer ib-dropdown-resizer-left",onMousedown:n[6]||(n[6]=u=>r.startResizing("left"))},null,32)):o.createCommentVNode("",!0),e.isResizable?(o.openBlock(),o.createElementBlock("div",{key:1,class:"ib-dropdown-resizer ib-dropdown-resizer-right",onMousedown:n[7]||(n[7]=u=>r.startResizing("right"))},null,32)):o.createCommentVNode("",!0),Object.keys(a.actualBookmarkedOptions).length>0?(o.openBlock(),o.createBlock(p,{key:2,class:o.normalizeClass({"has-hierarchy":r.hasHierarchy})},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.actualBookmarkedOptions,u=>(o.openBlock(),o.createBlock(h,{key:"bookmark"+u.id,option:u,"parent-auto-check":!1,"is-multiple":e.isMultiple,"is-bookmarkable":!0,"is-bookmarked":!0,onCheck:r.registerCheck,onToggleBookmark:r.toggleBookmark,uid:a.uid,"only-end-nodes":e.onlyEndNodes,"html-title":e.htmlOptionTitle,"show-input":e.showInputs},null,8,["option","is-multiple","onCheck","onToggleBookmark","uid","only-end-nodes","html-title","show-input"]))),128))]),_:1},8,["class"])):o.createCommentVNode("",!0),r.showSearch?(o.openBlock(),o.createBlock(f,{key:3,class:"tree-search",ref:"search","show-icon":!0,autocomplete:"off",value:a.filterString,"aria-label":e.searchPlaceholderText?e.searchPlaceholderText:a.actualStrings.searchPlaceholder,placeholder:e.searchPlaceholderText?e.searchPlaceholderText:a.actualStrings.searchPlaceholder,onInput:n[8]||(n[8]=u=>r.filter(u,a.actualOptions)),onKeyup:o.withKeys(r.inputKeyupDown,["down"])},null,8,["value","aria-label","placeholder","onKeyup"])):o.createCommentVNode("",!0),o.createVNode(p,{ref:"list",role:"listbox",class:o.normalizeClass({"tree-select-list":!0,"has-hierarchy":r.hasHierarchy})},{default:o.withCtx(()=>[!r.requiredDependencyNotFilled&&!r.visibleOptionsCount&&r.hasEmptyMessage?(o.openBlock(),o.createElementBlock("div",cc,[o.renderSlot(t.$slots,"emptyMessage")])):!r.requiredDependencyNotFilled&&!r.visibleOptionsCount?(o.openBlock(),o.createElementBlock("div",uc,o.toDisplayString(a.actualStrings.emptyTitle),1)):o.createCommentVNode("",!0),o.withDirectives(o.createElementVNode("div",{class:"tree-select-empty"},o.toDisplayString(a.actualStrings.requiredDependencyNotFilled),513),[[o.vShow,r.requiredDependencyNotFilled]]),!e.isMultiple&&!e.isRequired&&a.actualOptions.length>0?(o.openBlock(),o.createBlock(h,{key:2,option:{title:t.lang("none","select"),id:null,checked:r.isEmpty},name:a.actualName,"parent-auto-check":e.parentAutoCheck,"is-multiple":e.isMultiple,onCheck:r.registerCheck,onToggleBookmark:r.toggleBookmark,uid:a.uid,"only-end-nodes":e.onlyEndNodes,"show-input":e.showInputs},null,8,["option","name","parent-auto-check","is-multiple","onCheck","onToggleBookmark","uid","only-end-nodes","show-input"])):o.createCommentVNode("",!0),r.requiredDependencyNotFilled?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:3},[e.allOptions&&e.isMultiple&&r.visibleOptionsCount&&!r.requiredDependencyNotFilled?(o.openBlock(),o.createBlock(h,{key:0,option:{title:a.actualStrings.selectAllOptions,id:"!all!",initiallyVisible:!0,visible:!0,isDisabled:r.visibleOptionsCount<r.optionsCount,checked:a.allOptionsIsChecked,isIndeterminate:!!Object.keys(a.selected).length},"is-toggle":e.isToggle,name:a.actualName,"parent-auto-check":!1,"is-multiple":e.isMultiple,"is-bookmarkable":!1,uid:a.uid,"only-end-nodes":e.onlyEndNodes,"show-input":e.showInputs,onCheck:r.manageAll,onOnFocus:n[9]||(n[9]=u=>a.focusedOptionId=u)},null,8,["option","is-toggle","name","is-multiple","uid","only-end-nodes","show-input","onCheck"])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.actualOptions,u=>o.renderSlot(t.$slots,a.actualName,{key:e.name+u.value,option:u,parentAutoCheck:e.parentAutoCheck,isMultiple:e.isMultiple,uid:a.uid,onlyEndNodes:e.onlyEndNodes,htmlTitle:e.htmlOptionTitle,showInput:e.showInputs},()=>[o.withDirectives(o.createVNode(h,{option:u,"is-toggle":e.isToggle,name:a.actualName,"parent-auto-check":e.parentAutoCheck,"is-multiple":e.isMultiple,"is-bookmarkable":e.isBookmarkable,uid:a.uid,"only-end-nodes":e.onlyEndNodes,"html-title":e.htmlOptionTitle,"show-input":e.showInputs,onCheck:r.registerCheck,onToggleBookmark:r.toggleBookmark,onOnFocus:n[10]||(n[10]=_=>a.focusedOptionId=_)},null,8,["option","is-toggle","name","parent-auto-check","is-multiple","is-bookmarkable","uid","only-end-nodes","html-title","show-input","onCheck","onToggleBookmark"]),[[o.vShow,u.visible]])])),128))],64))]),_:3},8,["class"])],6)]),_:2},[r.hasTrigger?{name:"trigger",fn:o.withCtx(()=>[o.renderSlot(t.$slots,"trigger",{selectedCount:r.selectedKeys.length})]),key:"0"}:{name:"trigger",fn:o.withCtx(({isOpened:u})=>[o.createElementVNode("div",{role:"combobox",tabindex:"0",class:o.normalizeClass(["tree-choice",{"tree-choice-opened":u,"has-clear-button":e.showClearButton,"tree-choice-error":e.errorMessage}]),ref:"combobox",onClick:n[2]||(n[2]=o.withModifiers(()=>{},["prevent"])),onBlur:n[3]||(n[3]=(..._)=>r.onBlur&&r.onBlur(..._)),onKeyup:[n[4]||(n[4]=o.withKeys((..._)=>r.comboboxKeyupDown&&r.comboboxKeyupDown(..._),["down"])),n[5]||(n[5]=o.withKeys((..._)=>r.comboboxKeyupDown&&r.comboboxKeyupDown(..._),["up"]))],"aria-label":e.ariaLabel,"aria-activedescendant":a.focusedOptionId},[r.hasTriggerContent?o.renderSlot(t.$slots,"triggerContent",{key:0,selectedCount:r.selectedKeys.length}):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[e.htmlOptionTitle?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass({placeholder:!r.selectStatus}),innerHTML:r.selectStatus||e.placeholder},null,10,["innerHTML"])):(o.openBlock(),o.createElementBlock("span",{key:1,class:o.normalizeClass({placeholder:!r.selectStatus})},o.toDisplayString(r.selectStatus||e.placeholder),3))],64)),e.showClearButton?o.withDirectives((o.openBlock(),o.createBlock(c,{key:2,kind:"ghost",class:"button-clear",onClick:o.withModifiers(r.clearValue,["prevent"]),onKeypress:n[0]||(n[0]=o.withKeys(o.withModifiers(()=>{},["stop","prevent"]),["enter"])),onKeydown:n[1]||(n[1]=o.withKeys(o.withModifiers(()=>{},["stop","prevent"]),["enter"])),onKeyup:o.withKeys(o.withModifiers(r.clearValue,["prevent"]),["enter"]),"help-text":e.clearButtonMessage},{default:o.withCtx(()=>[o.createVNode(s,{name:"close-outline"})]),_:1},8,["onClick","onKeyup","help-text"])),[[o.vShow,Object.keys(a.selected).length]]):o.createCommentVNode("",!0),o.createVNode(s,{name:u?"chevron-up-outline":"chevron-down-outline",classes:"tree-select-caret"},null,8,["name"])],42,["aria-label","aria-activedescendant"])]),key:"1"}]),1032,["disabled","is-resizable","vertical","onClose","onOpen"])],2)],64)}const So=_e(dc,[["render",fc]]),J0="",hc={name:"IbLimitSelector",props:{labelSelect:{type:String,required:!0},value:{type:Number},options:{type:Array,default:()=>[10,25,50,100]}},watch(t){this.selected=t},data(){return{selected:this.value}},methods:{selectItem(t){this.selected=t,this.onChange(t)},onChange(t){Number.isInteger(+t)&&this.$emit("select",+t)}},computed:{prepareOptions(){return this.options.map(t=>({id:t,title:t}))}},components:{IbLabel:wn,IbSelect:So}},pc={class:"report-limit-selector"};function mc(t,n,e,i,a,r){const l=o.resolveComponent("ib-label"),s=o.resolveComponent("ib-select");return o.openBlock(),o.createElementBlock("div",pc,[o.createVNode(l,null,{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(e.labelSelect),1)]),_:1}),o.createVNode(s,{classList:"report-limit-selector-select",value:e.value,options:r.prepareOptions,"is-multiple":!1,"show-clear-button":!1,onInput:r.selectItem},null,8,["value","options","onInput"])])}const xo=_e(hc,[["render",mc]]),X0="",gc={name:"IbPagination",props:{tooltipTextPrev:{type:String},tooltipTextNext:{type:String},labelInput:{type:String},labelSelect:{type:String,required:!0},countRows:{type:Number,required:!0},pageCount:{type:Number,default:null},current:{type:Number,default:1},limitSelector:{type:Number,default:10},showPaginationInput:{type:Boolean,default:!0}},data(){return{currentPage:this.current,indexSpaceLeft:null,indexSpaceRight:null,limitValue:this.limitSelector}},watch:{current(t){this.onSelect(t)},limitSelector(t){this.limitValue=t},limitValue(){this.currentPage=1}},methods:{changeLimit(t){Number.isInteger(t)&&(this.limitValue=t,this.$emit("set-limit",t))},onInput(t){if(t<1){this.onSelect(1);return}if(t>this.countPagePagination){this.onSelect(this.countPagePagination);return}this.onSelect(Number(t))},onSelect(t){Number.isInteger(t)&&(this.currentPage=t,this.$emit("select",t))},showItem(t){if(this.countPagePagination<=5)return this.indexSpaceLeft=null,this.indexSpaceRight=null,!0;if(t===1||t===this.countPagePagination)return!0;if(this.countPagePagination>=7){if(this.currentPage<=3&&t<=5)return this.indexSpaceLeft=this.countPagePagination,this.indexSpaceRight=null,!0;if(this.currentPage>=this.countPagePagination-2&&t>=this.countPagePagination-4)return this.indexSpaceLeft=null,this.indexSpaceRight=1,!0;if(3<this.currentPage<this.countPagePagination-3&&(t===this.currentPage+1||t===this.currentPage-1||t===this.currentPage))return this.indexSpaceLeft=this.countPagePagination,this.indexSpaceRight=1,!0}else return!0;return!1}},computed:{setCountOfRows(){return this.currentPage===1||this.countPagePagination===1?"1 - "+(this.countPagePagination>1?this.limitValue:this.countRows):this.countPagePagination===this.currentPage?(this.currentPage-1)*this.limitValue+" - "+this.countRows:(this.currentPage-1)*this.limitValue+1+" - "+this.currentPage*this.limitValue},countPagePagination(){return Math.ceil(this.countRows/this.limitValue)}},components:{IbIconButton:ht,IbIcon:Le,IbInput:jr,IbLabel:wn,IbLimitSelector:xo,IbTooltip:an}},yc={class:"report-controls"},vc={class:"repot-pagination"},bc={class:"pagination-input"},_c={class:"row-count"},$c={class:"pagination-wrapper"},wc=["onClick"];function kc(t,n,e,i,a,r){const l=o.resolveComponent("ib-limit-selector"),s=o.resolveComponent("ib-label"),c=o.resolveComponent("ib-input"),h=o.resolveComponent("ib-icon"),p=o.resolveComponent("ib-tooltip"),f=o.resolveComponent("ib-icon-button");return o.openBlock(),o.createElementBlock("div",yc,[o.createVNode(l,{onSelect:r.changeLimit,value:a.limitValue,"label-select":e.labelSelect},null,8,["onSelect","value","label-select"]),o.createElementVNode("div",vc,[e.showPaginationInput?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createVNode(s,null,{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(e.labelInput),1)]),_:1}),o.createElementVNode("div",bc,[o.createVNode(c,{type:"number",debounce:500,onInput:r.onInput},null,8,["onInput"])])],64)):o.createCommentVNode("",!0),o.createElementVNode("div",_c,o.toDisplayString(r.setCountOfRows+" of "+e.countRows),1),o.createVNode(f,{kind:"tertiary",size:"m",class:"toggle-children button-prev",disabled:a.currentPage===1,onClick:n[0]||(n[0]=d=>r.onSelect(a.currentPage-1))},{default:o.withCtx(()=>[o.createVNode(h,{name:"chevron-back-outline"}),e.tooltipTextPrev?(o.openBlock(),o.createBlock(p,{key:0,text:e.tooltipTextPrev},null,8,["text"])):o.createCommentVNode("",!0)]),_:1},8,["disabled"]),o.createElementVNode("ul",$c,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.countPagePagination,(d,u)=>o.withDirectives((o.openBlock(),o.createElementBlock("li",{key:u,class:o.normalizeClass(["pagination-item",{active:u+1===a.currentPage,"dots-left":a.indexSpaceLeft===u+1,"dots-right":a.indexSpaceRight===u+1}]),onClick:_=>r.onSelect(u+1)},[o.createElementVNode("button",null,o.toDisplayString(u+1),1)],10,wc)),[[o.vShow,r.showItem(u+1)]])),128))]),o.createVNode(f,{kind:"tertiary",size:"m",class:"toggle-children button-next",disabled:a.currentPage===r.countPagePagination,onClick:n[1]||(n[1]=d=>r.onSelect(a.currentPage+1))},{default:o.withCtx(()=>[o.createVNode(h,{name:"chevron-forward-outline"}),e.tooltipTextNext?(o.openBlock(),o.createBlock(p,{key:0,text:e.tooltipTextNext},null,8,["text"])):o.createCommentVNode("",!0)]),_:1},8,["disabled"])])])}const Cc=_e(gc,[["render",kc]]),kn={PROGRESS:"progress",SUCCESS:"success",FAILED:"failed",CANCELING:"canceling",CANCELED:"canceled"},Q0="",Oc={props:{states:{type:String,default:kn.PROGRESS},progress:{type:[String,Number],default:0},ariaLabel:{type:String,required:!0}},computed:{classes(){const t=["ib-progress-bar"];return t.push(`progress-bar-${this.states}`),t},iconName(){return this.states===kn.SUCCESS?"checkmark-circle":this.states===kn.FAILED||this.states===kn.CANCELING||this.states===kn.CANCELED?"close-circle":""}},components:{IbIcon:Le}},To=t=>(o.pushScopeId("data-v-a0217859"),t=t(),o.popScopeId(),t),Ec={class:"ib-progress-bar-wrapper"},Sc=["aria-label","aria-valuenow"],xc=[To(()=>o.createElementVNode("div",{class:"gradient"},null,-1))],Tc=To(()=>o.createElementVNode("div",null,null,-1));function Nc(t,n,e,i,a,r){const l=o.resolveComponent("ib-icon");return o.openBlock(),o.createElementBlock("div",Ec,[o.createElementVNode("div",{class:o.normalizeClass(r.classes)},[o.createElementVNode("div",{class:"progress",role:"meter","aria-label":e.ariaLabel,"aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":e.progress,style:o.normalizeStyle({width:e.progress+"%"})},xc,12,Sc),Tc],2),o.withDirectives(o.createVNode(l,{class:"status-icon",name:r.iconName},null,8,["name"]),[[o.vShow,r.iconName.length]])])}const Ac=_e(Oc,[["render",Nc],["__scopeId","data-v-a0217859"]]),Dc={new:`<svg width="11" height="11" viewBox="0 0 11 11" fill="none" xmlns="http://www.w3.org/2000/svg">
28
28
  <circle id="Ellipse" cx="5.5" cy="5.5" r="5" fill="#0369E8"/>
29
29
  </svg>
30
30
  `,success:`