@avakhula/ui 0.0.505-alpha.91 → 0.0.505-alpha.92

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
@@ -3394,10 +3394,10 @@ function kd(t, n, e, r, o, i) {
3394
3394
  var l;
3395
3395
  const a = ce("ib-icon");
3396
3396
  return G(), te("div", {
3397
- role: "checkbox",
3398
3397
  class: ge(["ib-checkbox-wrapper", this.$attrs.class])
3399
3398
  }, [
3400
3399
  ae("label", St(i.attrs, {
3400
+ role: "checkbox",
3401
3401
  for: e.id,
3402
3402
  tabindex: e.disabled | e.disableFocus ? -1 : 0,
3403
3403
  "aria-checked": !!o.checked,
@@ -3452,7 +3452,7 @@ function kd(t, n, e, r, o, i) {
3452
3452
  ], 16, md)
3453
3453
  ], 2);
3454
3454
  }
3455
- const Ha = /* @__PURE__ */ Se(gd, [["render", kd], ["__scopeId", "data-v-cb198d37"]]);
3455
+ const Ha = /* @__PURE__ */ Se(gd, [["render", kd], ["__scopeId", "data-v-83ac97df"]]);
3456
3456
  const Cd = {
3457
3457
  name: "IbToggle",
3458
3458
  model: {
@@ -4897,7 +4897,8 @@ function Jd(t, n, e, r, o, i) {
4897
4897
  body: ye(() => [
4898
4898
  ae("div", {
4899
4899
  class: ge(["tree-drop", { "not-tree-child": !o.hasTreeChildren }]),
4900
- style: di(i.treeDropPos)
4900
+ style: di(i.treeDropPos),
4901
+ role: "listbox"
4901
4902
  }, [
4902
4903
  e.isResizable ? (G(), te("div", {
4903
4904
  key: 0,
@@ -4955,6 +4956,7 @@ function Jd(t, n, e, r, o, i) {
4955
4956
  name: o.actualName,
4956
4957
  "parent-auto-check": e.parentAutoCheck,
4957
4958
  "is-multiple": e.isMultiple,
4959
+ role: "option",
4958
4960
  onCheck: i.registerCheck,
4959
4961
  onToggleBookmark: i.toggleBookmark,
4960
4962
  uid: o.uid,
@@ -4969,6 +4971,7 @@ function Jd(t, n, e, r, o, i) {
4969
4971
  "is-multiple": e.isMultiple,
4970
4972
  "is-bookmarkable": !0,
4971
4973
  "is-bookmarked": !0,
4974
+ role: "option",
4972
4975
  onCheck: i.registerCheck,
4973
4976
  onToggleBookmark: i.toggleBookmark,
4974
4977
  uid: o.uid,
@@ -4997,6 +5000,7 @@ function Jd(t, n, e, r, o, i) {
4997
5000
  "only-end-nodes": e.onlyEndNodes,
4998
5001
  "show-input": e.showInputs,
4999
5002
  "alphabetic-style": e.alphabeticStyle,
5003
+ role: "option",
5000
5004
  onCheck: i.manageAll,
5001
5005
  onOnFocus: n[9] || (n[9] = (y) => o.focusedOptionId = y)
5002
5006
  }, null, 8, ["option", "is-toggle", "name", "is-multiple", "uid", "only-end-nodes", "show-input", "alphabetic-style", "onCheck"])) : ue("", !0),
@@ -5014,6 +5018,7 @@ function Jd(t, n, e, r, o, i) {
5014
5018
  option: y,
5015
5019
  "is-toggle": e.isToggle,
5016
5020
  name: o.actualName,
5021
+ role: "option",
5017
5022
  "parent-auto-check": e.parentAutoCheck,
5018
5023
  "is-multiple": e.isMultiple,
5019
5024
  "is-bookmarkable": e.isBookmarkable,
@@ -5058,6 +5063,7 @@ function Jd(t, n, e, r, o, i) {
5058
5063
  "tree-choice-error": e.errorMessage
5059
5064
  }]),
5060
5065
  ref: "combobox",
5066
+ "aria-expanded": y,
5061
5067
  onClick: n[2] || (n[2] = ot(() => {
5062
5068
  }, ["prevent"])),
5063
5069
  onBlur: n[3] || (n[3] = (...p) => i.onBlur && i.onBlur(...p)),
@@ -5105,7 +5111,7 @@ function Jd(t, n, e, r, o, i) {
5105
5111
  name: y ? "chevron-up-outline" : "chevron-down-outline",
5106
5112
  classes: "tree-select-caret"
5107
5113
  }, null, 8, ["name"])
5108
- ], 42, ["aria-label", "aria-activedescendant"])
5114
+ ], 42, ["aria-expanded", "aria-label", "aria-activedescendant"])
5109
5115
  ]),
5110
5116
  key: "1"
5111
5117
  }
@@ -5174,6 +5180,7 @@ function tc(t, n, e, r, o, i) {
5174
5180
  options: i.prepareOptions,
5175
5181
  "is-multiple": !1,
5176
5182
  "show-clear-button": !1,
5183
+ "aria-label": "Pagination",
5177
5184
  onInput: i.selectItem
5178
5185
  }, null, 8, ["value", "vertical", "options", "onInput"])
5179
5186
  ]);
@@ -19,12 +19,12 @@
19
19
  top: ${a-p-u/2+f+12}px!important`;break;case"rightCenter":d=d+`left: ${l+5}px!important;
20
20
  top: ${a+f-p/2-u/2}px!important;`;break;case"rightBottom":d=d+`left: ${l+5}px!important;
21
21
  top: ${a+f-u/2-12}px!important`;break;default:d=d+`left: ${r+s/2-c/2}px!important;
22
- top: ${o-p+f-5}px!important`;break}return d}getClassList(n){return n?wo[n]:wo.topCenter}}const Ht=new ko,hd=(t,n)=>{var a;Ht.getTooltipContainer()&&Ht.destroyTooltip();const e=Object.keys(n.modifiers)[0]||n.arg,o={title:((a=n.value)==null?void 0:a.title)||"",text:typeof n.value=="object"?n.value.text:n.value};Ht.createTooltip(t,o,e)},pd=(t,n)=>{const e=Ht.getId();if(n.getAttribute("aria-describedby")!==e)return;const o=Ht.getTooltipContainer();if(t.type==="blur"){n.contains(t.relatedTarget)||Ht.destroyTooltip(n);return}const a=n!==t.target&&!n.contains(t.target),r=o!==t.target&&!(o!=null&&o.contains(t.target));a&&r&&Ht.destroyTooltip(n)},Co=(t,n)=>{t.__tooltip_create=()=>hd(t,n),t.__tooltip_destroy=e=>pd(e,t),t.addEventListener("mouseenter",t.__tooltip_create),document.addEventListener("mousemove",t.__tooltip_destroy),t.addEventListener("focus",t.__tooltip_create),t.addEventListener("blur",t.__tooltip_destroy,!0)},Oo=t=>{Ht.destroyTooltip(t),t.removeEventListener("mouseenter",t.__tooltip_create),document.removeEventListener("mousemove",t.__tooltip_destroy),t.removeEventListener("focus",t.__tooltip_create),t.removeEventListener("blur",t.__tooltip_destroy,!0)},Wt={mounted(t,n){Co(t,n)},updated(t,n){Oo(t),Co(t,n)},beforeUnmount(t){Oo(t)}},hp="",md={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:fd,sortingTypesView:ud,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:Wt},components:{IbIcon:Le,IbIconButton:ut,IbToggleTip:mo}},gd={class:"sorting-wrapper"},yd=["name"],vd=["aria-label"];function bd(t,n,e,o,a,r){var p;const l=i.resolveComponent("ib-toggle-tip"),s=i.resolveComponent("ib-icon-button"),u=i.resolveComponent("ib-icon"),c=i.resolveDirective("tooltip");return i.openBlock(),i.createElementBlock("div",gd,[e.view===a.sortingTypesView.TABLE_VIEW?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["table-sorting-wrapper",{active:a.currentTypeSort,disabled:e.disable}])},[i.createElementVNode("div",null,[i.withDirectives((i.openBlock(),i.createElementBlock("button",{class:i.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)},[i.createTextVNode(i.toDisplayString(e.title),1)],2)),[[c,r.sortingTooltipContent,r.sortingTooltipPosition]]),r.hasToggleTip?(i.openBlock(),i.createBlock(l,{key:0,position:"bottom-center","is-open":a.isOpenToggleTip,title:e.toggleTipTitle,onClose:n[1]||(n[1]=f=>a.isOpenToggleTip=!1)},{buttons:i.withCtx(()=>[i.renderSlot(t.$slots,"toggleTipButtons",{},void 0,!0)]),default:i.withCtx(()=>[i.renderSlot(t.$slots,"toggleTipBody",{},void 0,!0)]),_:3},8,["is-open","title"])):i.createCommentVNode("",!0)]),e.hideSortingButton?i.createCommentVNode("",!0):i.withDirectives((i.openBlock(),i.createBlock(s,{key:0,kind:"white",size:"s",onClick:r.clickHandler},{default:i.withCtx(()=>[i.createElementVNode("ion-icon",{name:r.iconType},null,8,yd)]),_:1},8,["onClick"])),[[c,r.tooltipIconText,e.tooltipIconPosition]])],2)):i.withDirectives((i.openBlock(),i.createElementBlock("button",{key:1,class:i.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},[i.createTextVNode(i.toDisplayString(e.title)+" ",1),r.iconType?(i.openBlock(),i.createBlock(u,{key:0,name:r.iconType},null,8,["name"])):i.createCommentVNode("",!0)],10,vd)),[[c,e.tooltipText,e.tooltipPosition]])])}const _d=_e(md,[["render",bd],["__scopeId","data-v-a4394881"]]),pp="",$d={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:ut,IbDropdownItem:jr,IbDropdownList:or,IbTooltip:ln}},wd={"aria-label":"breadcrumb"},kd={class:"breadcrumb"},Cd=["href"],Od={key:1},Ed=["href"];function Sd(t,n,e,o,a,r){const l=i.resolveComponent("ib-icon"),s=i.resolveComponent("ib-tooltip"),u=i.resolveComponent("ib-icon-button"),c=i.resolveComponent("ib-dropdown-item"),p=i.resolveComponent("ib-dropdown-list");return i.openBlock(),i.createElementBlock("nav",wd,[i.createElementVNode("ul",kd,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.items,(f,d)=>(i.openBlock(),i.createElementBlock("li",{class:i.normalizeClass(["breadcrumb-item",d===r.last?"active":""]),"aria-current":"page",key:d},[d!==r.last&&d>e.items.length-4||d===0?(i.openBlock(),i.createElementBlock("a",{key:0,class:"ib-link",href:f.url},i.toDisplayString(f.title),9,Cd)):i.createCommentVNode("",!0),d===r.last?(i.openBlock(),i.createElementBlock("p",Od,i.toDisplayString(f.title),1)):i.createCommentVNode("",!0),r.initContextMenu&&d===e.items.length-4?(i.openBlock(),i.createBlock(p,{key:2,horizontal:"center"},{trigger:i.withCtx(()=>[i.createVNode(u,{kind:"ghost"},{default:i.withCtx(()=>[i.createVNode(l,{name:"ellipsis-horizontal-sharp"}),e.tooltipTextContext?(i.openBlock(),i.createBlock(s,{key:0,text:e.tooltipTextContext},null,8,["text"])):i.createCommentVNode("",!0)]),_:1})]),body:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.setItemsContextMenu,(h,b)=>(i.openBlock(),i.createBlock(c,{key:b},{default:i.withCtx(()=>[i.createElementVNode("a",{class:"context-breadcrums",href:h.url},i.toDisplayString(h.title),9,Ed)]),_:2},1024))),128))]),_:2},1024)):i.createCommentVNode("",!0),d!==r.last&&d>e.items.length-5||d===0?(i.openBlock(),i.createBlock(l,{key:3,name:"chevron-forward-outline"})):i.createCommentVNode("",!0)],2))),128))])])}const xd=_e($d,[["render",Sd],["__scopeId","data-v-5ef772a9"]]),mp="",Td={name:"IbLabel",props:{for:{type:String},required:{type:Boolean,default:!1},infoText:{type:[String,Object],default:""},tooltipPosition:{type:String},disabled:{type:Boolean,default:!1}},mounted(){this.$globalEvents.$on(`label:disabled:${this.for}`,t=>{this.idDisabled=t})},data(){return{idDisabled:this.disabled}},watch:{disabled(t){this.idDisabled=t}},computed:{classes(){const t=["ib-label"];return this.infoText.length&&t.push("has-info-text"),this.idDisabled&&t.push("label-disabled"),t}},components:{IbIconButton:ut,IbIcon:Le},directives:{Tooltip:Wt}},Nd=["for"],Ad={key:0,class:"required"};function Dd(t,n,e,o,a,r){const l=i.resolveComponent("ib-icon"),s=i.resolveComponent("ib-icon-button"),u=i.resolveDirective("tooltip");return i.openBlock(),i.createElementBlock("label",{class:i.normalizeClass(r.classes),for:e.for},[e.required?(i.openBlock(),i.createElementBlock("span",Ad,"* ")):i.createCommentVNode("",!0),i.renderSlot(t.$slots,"default",{},void 0,!0),e.infoText.length||Object.keys(e.infoText).length?i.withDirectives((i.openBlock(),i.createBlock(s,{key:1,size:"xs",class:"info-button",kind:"ghost",type:"button"},{default:i.withCtx(()=>[i.createVNode(l,{name:"information-circle-outline"})]),_:1})),[[u,e.infoText,e.tooltipPosition]]):i.createCommentVNode("",!0)],10,Nd)}const kn=_e(Td,[["render",Dd],["__scopeId","data-v-20191b6d"]]),Vr={text:"text",password:"password",email:"email",number:"number"},gp="",Pd={name:"IbInput",props:{type:{type:String,default:Vr.text,validator:t=>Object.keys(Vr).includes(t)},disabled:{type:Boolean,required:!1,default:!1},error:{type:Boolean,default:!1},errorMessage:{type:String,default:""},id:{type:[String],default(){return gt()}},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:rr.bottom},settingsHorizontalPosition:{type:String,default:wn.right},readonly:{type:Boolean,default:!1},autocomplete:{type:String},hideNumberActions:{type:Boolean,default:!1},decrementButtonMessage:{type:String,default:"Decrement"},incrementButtonMessage:{type:String,default:"Increment"},step:{type:Number,default:1},min:{type:Number,default:0},max:{type:Number,default:1/0}},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))},decrement(){this.actualValue>this.min&&(this.actualValue=+this.actualValue-this.step),this.$emit("update:modelValue",this.actualValue),this.$emit("input",this.actualValue),this.$emit("blur",this.actualValue)},increment(){this.actualValue<this.max&&(this.actualValue=+this.actualValue+this.step),this.$emit("update:modelValue",this.actualValue),this.$emit("input",this.actualValue),this.$emit("blur",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},hasValue(){var t;return(t=this.actualValue)==null?void 0:t.toString().length},classes(){const t=["ib-input"];return this.hasErrorState&&t.push("ib-error"),this.showIcon&&t.push("ib-input-has-icon"),t},attrs(){let t=Pr({...this.$attrs},["onInput","onBlur"]);return t.type=this.type===Vr.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:Ft,IbIconButton:ut,IbIcon:Le,IbDropdown:ir},directives:{Tooltip:Wt},inheritAttrs:!1},Id=["aria-invalid","readonly","disabled","id","autocomplete","min","max","step"],Md={key:2,class:"number-button-group"},Bd={class:"divider"},Ld={class:"settings-wrapper"};function Rd(t,n,e,o,a,r){const l=i.resolveComponent("ib-alert"),s=i.resolveComponent("ib-icon"),u=i.resolveComponent("ib-icon-button"),c=i.resolveComponent("ib-dropdown"),p=i.resolveDirective("tooltip");return i.openBlock(),i.createElementBlock("div",null,[e.errorMessage?(i.openBlock(),i.createBlock(l,{key:0},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.errorMessage),1)]),_:1})):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass(["ib-input-wrapper",{"has-settings":r.hasSettings,"numbers-type":e.type==="number"&&!e.hideNumberActions}])},[e.showIcon?(i.openBlock(),i.createBlock(s,{key:0,class:"icon-search",name:"search-outline"})):i.createCommentVNode("",!0),i.withDirectives(i.createElementVNode("input",i.mergeProps(r.attrs,{"onUpdate:modelValue":n[0]||(n[0]=f=>a.actualValue=f),ref:"field","aria-invalid":!!r.hasErrorState,readonly:e.readonly,disabled:e.disabled,id:e.id,autocomplete:e.autocomplete,class:r.classes,min:e.min,max:e.max,step:e.step,onInput:n[1]||(n[1]=f=>r.onInput(f)),onBlur:n[2]||(n[2]=f=>r.onBlur(f)),onFocus:n[3]||(n[3]=f=>r.onFocus(f))}),null,16,Id),[[i.vModelDynamic,a.actualValue,void 0,{trim:!0}]]),e.type!=="password"&&e.showClearButton?i.withDirectives((i.openBlock(),i.createBlock(u,{key:1,kind:"ghost",class:"button-clear",disabled:e.readonly||e.disabled,"help-text":e.clearButtonMessage,"prevent-default":"",type:"button",onClick:r.clearInput,onKeypress:i.withKeys(r.clearInput,["enter"])},{default:i.withCtx(()=>[i.createVNode(s,{name:"close-outline"})]),_:1},8,["disabled","help-text","onClick","onKeypress"])),[[i.vShow,r.hasValue]]):i.createCommentVNode("",!0),e.type==="number"&&!e.hideNumberActions?(i.openBlock(),i.createElementBlock("div",Md,[i.withDirectives(i.createElementVNode("div",Bd,null,512),[[i.vShow,r.hasValue]]),i.withDirectives((i.openBlock(),i.createBlock(u,{kind:"ghost",class:"button-decrement",disabled:e.readonly||e.disabled,"prevent-default":"",type:"button",onBlur:r.onBlur,onClick:r.decrement,onKeypress:i.withKeys(r.decrement,["enter"])},{default:i.withCtx(()=>[i.createVNode(s,{name:"remove-outline"})]),_:1},8,["disabled","onBlur","onClick","onKeypress"])),[[p,e.decrementButtonMessage]]),i.withDirectives((i.openBlock(),i.createBlock(u,{kind:"ghost",class:"button-increment",disabled:e.readonly||e.disabled,"prevent-default":"",type:"button",onBlur:r.onBlur,onClick:r.increment,onKeypress:i.withKeys(r.increment,["enter"])},{default:i.withCtx(()=>[i.createVNode(s,{name:"add-outline"})]),_:1},8,["disabled","onBlur","onClick","onKeypress"])),[[p,e.incrementButtonMessage]])])):i.createCommentVNode("",!0),e.type==="password"?i.withDirectives((i.openBlock(),i.createBlock(u,{key:3,kind:"ghost",class:"toggle-password","prevent-default":"",type:"button",disabled:e.disabled,"help-text":a.showPassword?e.hidePasswordMessage:e.showPasswordMessage,onClick:i.withModifiers(r.toggleShowPassword,["prevent"])},{default:i.withCtx(()=>[i.createVNode(s,{name:a.showPassword?"eye-off-outline":"eye-outline"},null,8,["name"])]),_:1},8,["disabled","help-text","onClick"])),[[i.vShow,r.hasValue]]):i.createCommentVNode("",!0),r.hasSettings?(i.openBlock(),i.createBlock(c,{key:4,class:"settings-dropdown-wrapper",horizontal:e.settingsHorizontalPosition,vertical:e.settingsVerticalPosition},{trigger:i.withCtx(()=>[i.createVNode(u,{"prevent-default":"","help-text":e.settingsButtonMessage,class:"options-trigger",kind:"ghost"},{default:i.withCtx(()=>[i.createVNode(s,{name:"options"})]),_:1},8,["help-text"])]),body:i.withCtx(()=>[i.createElementVNode("div",Ld,[i.renderSlot(t.$slots,"settings",{},void 0,!0)])]),_:3},8,["horizontal","vertical"])):i.createCommentVNode("",!0)],2)])}const qr=_e(Pd,[["render",Rd],["__scopeId","data-v-d8683396"]]),yp="",jd={name:"IbCheckbox",model:{event:"input"},props:{label:String,error:{type:[Boolean,null],default:!1},name:String,id:{type:String,default(){return gt()}},value:{type:[String,Number]},modelValue:{type:[Boolean,String]},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==="0"?!1:!!t}},data(){return{checked:this.modelValue?this.modelValue==="0"?!1:!!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={...Pr({...this.$attrs})};return delete t.class,t.class=this.classes,t}},components:{IbIcon:Le},inheritAttrs:!1},Vd=["for","tabindex","aria-checked"],qd=["name","id","value","disabled","required"],Fd=["name","disabled","required"],Hd={class:"ib-checkbox-body"},zd={key:0,class:"required"},Ud={class:"ib-checkbox-input"},Kd={key:1,class:"ib-checkbox-label"},Gd={key:0,class:"required"};function Wd(t,n,e,o,a,r){var s;const l=i.resolveComponent("ib-icon");return i.openBlock(),i.createElementBlock("div",{role:"checkbox",class:i.normalizeClass(["ib-checkbox-wrapper",this.$attrs.class])},[i.createElementVNode("label",i.mergeProps(r.attrs,{for:e.id,tabindex:e.disabled|e.disableFocus?-1:0,"aria-checked":!!a.checked,onClick:n[2]||(n[2]=i.withModifiers((...u)=>r.onChange&&r.onChange(...u),["prevent","stop"])),onKeypress:n[3]||(n[3]=i.withModifiers((...u)=>r.onChange&&r.onChange(...u),["prevent"]))}),[i.withDirectives(i.createElementVNode("input",{tabindex:"-1",type:"checkbox",name:e.name,id:e.id,value:e.value??1,disabled:e.disabled,required:e.required,"onUpdate:modelValue":n[0]||(n[0]=u=>a.checked=u),onClick:n[1]||(n[1]=(...u)=>r.onChange&&r.onChange(...u))},null,8,qd),[[i.vModelCheckbox,a.checked]]),!e.value&&!a.checked?(i.openBlock(),i.createElementBlock("input",{key:0,value:"0",type:"hidden",name:e.name,disabled:e.disabled,required:e.required},null,8,Fd)):i.createCommentVNode("",!0),i.createElementVNode("div",Hd,[e.labelPosition==="left"&&e.label.length?(i.openBlock(),i.createElementBlock("span",{key:0,class:i.normalizeClass(["ib-checkbox-label",{"ib-checkbox-label-left":e.labelPosition==="left"}])},[e.required?(i.openBlock(),i.createElementBlock("span",zd,"*")):i.createCommentVNode("",!0),i.createTextVNode(" "+i.toDisplayString(e.label),1)],2)):i.createCommentVNode("",!0),i.createElementVNode("span",Ud,[i.withDirectives(i.createVNode(l,{name:"checkmark-sharp"},null,512),[[i.vShow,a.checked&&!r.indeterminate]]),i.withDirectives(i.createVNode(l,{class:i.normalizeClass("checkbox-undeterminate-icon"),name:"remove-sharp"},null,512),[[i.vShow,r.indeterminate]])]),e.labelPosition==="right"&&((s=e.label)!=null&&s.length)?(i.openBlock(),i.createElementBlock("span",Kd,[e.required?(i.openBlock(),i.createElementBlock("span",Gd,"*")):i.createCommentVNode("",!0),i.createTextVNode(" "+i.toDisplayString(e.label),1)])):i.createCommentVNode("",!0)])],16,Vd)],2)}const Fr=_e(jd,[["render",Wd],["__scopeId","data-v-cb198d37"]]),vp="",Yd={name:"IbToggle",model:{prop:"isChecked",event:"input"},props:{isChecked:{type:Boolean,required:!1},id:{type:String,default:()=>gt()},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:ln}},Zd=["aria-checked","tabindex"],Jd={class:"toggle-wrapper",ref:"wrapper"},Xd={class:"toggle",ref:"toggle"},Qd=["name","checked","id","disabled"],ec=i.createElementVNode("span",{class:"toggle-slider round"},null,-1),tc={key:0,class:"toggle-label"};function nc(t,n,e,o,a,r){const l=i.resolveComponent("ib-icon"),s=i.resolveComponent("ib-tooltip");return i.openBlock(),i.createElementBlock("label",{role:"switch","aria-checked":a.checked,tabindex:e.disabled?-1:0,class:i.normalizeClass(r.classes),onKeypress:[n[2]||(n[2]=i.withKeys(i.withModifiers((...u)=>r.onChange&&r.onChange(...u),["prevent"]),["space"])),n[3]||(n[3]=i.withKeys(i.withModifiers((...u)=>r.onChange&&r.onChange(...u),["prevent"]),["enter"]))]},[i.createElementVNode("div",Jd,[i.createElementVNode("div",Xd,[i.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]=(...u)=>r.onChange&&r.onChange(...u)),onInput:n[1]||(n[1]=i.withModifiers(()=>{},["stop"]))},null,40,Qd),ec,i.createVNode(l,{class:"checked-icon",name:"checkmark"}),i.createVNode(l,{class:"unchecked-icon",name:"close"})],512)],512),e.label.length?(i.openBlock(),i.createElementBlock("span",tc,i.toDisplayString(e.label),1)):i.createCommentVNode("",!0),e.helpMessage.length?(i.openBlock(),i.createBlock(s,{key:1,text:a.checked?e.helpMessage:e.helpMessageOff.length?e.helpMessageOff:e.helpMessage},null,8,["text"])):i.createCommentVNode("",!0)],42,Zd)}const Eo=_e(Yd,[["render",nc]]);function So(t){return t.scrollHeight>t.clientHeight}const bp="",rc={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},alphabeticStyle:{type:Boolean,default:!1}},mounted(){this.option.hasOwnProperty("children")&&this.option.children&&this.checkParent(),this.option.showTooltipByDefault&&(this.showTooltip=!0)},updated(){this.$nextTick(()=>{this.option.showTooltipByDefault?this.showTooltip=!0:So(this.$el.querySelector(".option-label"))&&(this.showTooltip=!0)})},data(){return{showTooltip:!1}},methods:{onKeydown(t){t.keyCode===go&&(t.preventDefault(),this.onChange()),this.hasVisibleChildren&&(t.keyCode===ys&&(this.option.isChildrenVisible=!0),t.keyCode===gs&&(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,o){if(!this.isMultiple&&this.hasVisibleChildren){this.toggleChildrenVisibility();return}this.$emit("check",t,n,e),o&&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 o=0;return t.children&&t.children.forEach(a=>{(!n||n(a))&&o++,e&&(o+=this.calculateChildren(a,n,e))}),o},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?Eo:Fr},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:Rr,IbIconButton:ut},directives:{Tooltip:Wt}},ic=["aria-selected","aria-label","id"],oc={key:0,class:"bookmarkable-option-content"},ac={class:"option-label"},lc={key:1,class:"option-label"},sc=["innerHTML"],dc=["innerHTML"],cc={key:2,class:"option-label"};function uc(t,n,e,o,a,r){const l=i.resolveComponent("ib-icon"),s=i.resolveComponent("ib-icon-button"),u=i.resolveComponent("select-option"),c=i.resolveComponent("list"),p=i.resolveDirective("tooltip");return i.openBlock(),i.createElementBlock("li",null,[i.withDirectives((i.openBlock(),i.createElementBlock("div",{class:i.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,"has-icon":e.option.icon,"tree-select-option-toggle":this.isToggle&&this.isMultiple,"alphabetic-option":e.alphabeticStyle}]),tabindex:"0",role:"option","aria-selected":r.isChecked(e.option),"aria-label":e.option.title,id:"option-"+r.id,onKeydown:n[3]||(n[3]=i.withModifiers((...f)=>r.onKeydown&&r.onKeydown(...f),["self"])),onFocus:n[4]||(n[4]=f=>t.$emit("onFocus",`option-${r.id}`))},[i.withDirectives(i.createVNode(s,{"disabled-focus":!0,kind:"ghost",class:"toggle-children",onClick:r.toggleChildrenVisibility},{default:i.withCtx(()=>[i.createVNode(l,{name:r.iconName},null,8,["name"])]),_:1},8,["onClick"]),[[i.vShow,r.hasVisibleChildren]]),i.createElementVNode("div",{onClick:n[1]||(n[1]=i.withModifiers((...f)=>r.onChange&&r.onChange(...f),["prevent"])),class:i.normalizeClass({disabled:e.option.isDisabled,"tree-select-option-label":!0,"tree-select-option-has-children":r.hasVisibleChildren,active:!e.showInput&&e.option.checked})},[i.withDirectives((i.openBlock(),i.createBlock(i.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"])),[[i.vShow,e.showInput]]),e.isBookmarkable?(i.openBlock(),i.createElementBlock("span",{key:0,class:i.normalizeClass("bookmarkable-option-title "+(e.isBookmarked?"bookmarked":""))},[r.hasChildren?(i.openBlock(),i.createElementBlock("span",lc,i.toDisplayString(e.option.title),1)):(i.openBlock(),i.createElementBlock("div",oc,[i.createElementVNode("span",ac,i.toDisplayString(e.option.title),1),i.withDirectives((i.openBlock(),i.createBlock(s,{onClick:n[0]||(n[0]=i.withModifiers(f=>t.$emit("toggle-bookmark",e.option),["stop","prevent"])),kind:"ghost"},{default:i.withCtx(()=>[i.createVNode(l,{name:e.isBookmarked?"star":"star-outline"},null,8,["name"])]),_:1})),[[p,t.lang(e.isBookmarked?"unpin":"pin_to_top","select")]])]))],2)):e.htmlTitle?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[r.hasChildren?(i.openBlock(),i.createElementBlock("span",{key:1,class:"option-label",innerHTML:e.option.title},null,8,dc)):(i.openBlock(),i.createElementBlock("span",{key:0,class:"option-label",innerHTML:e.option.title},null,8,sc))],64)):(i.openBlock(),i.createElementBlock("span",cc,[e.option.icon?(i.openBlock(),i.createBlock(l,{key:0,name:e.option.icon},null,8,["name"])):i.createCommentVNode("",!0),i.createTextVNode(" "+i.toDisplayString(e.option.title),1)]))],2),r.hasChildren?i.withDirectives((i.openBlock(),i.createBlock(c,{key:0},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.option.children,f=>i.withDirectives((i.openBlock(),i.createBlock(u,{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"])),[[i.vShow,f.visible]])),128))]),_:1},512)),[[i.vShow,r.hasVisibleChildren&&e.option.isChildrenVisible]]):i.createCommentVNode("",!0)],42,ic)),[[p,a.showTooltip?e.option.isDisabled?e.option.disableTooltip:e.option.title:""]])])}const fc=_e(rc,[["render",uc]]);var je=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Cn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var xo={exports:{}};/*!***************************************************
22
+ top: ${o-p+f-5}px!important`;break}return d}getClassList(n){return n?wo[n]:wo.topCenter}}const Ht=new ko,hd=(t,n)=>{var a;Ht.getTooltipContainer()&&Ht.destroyTooltip();const e=Object.keys(n.modifiers)[0]||n.arg,o={title:((a=n.value)==null?void 0:a.title)||"",text:typeof n.value=="object"?n.value.text:n.value};Ht.createTooltip(t,o,e)},pd=(t,n)=>{const e=Ht.getId();if(n.getAttribute("aria-describedby")!==e)return;const o=Ht.getTooltipContainer();if(t.type==="blur"){n.contains(t.relatedTarget)||Ht.destroyTooltip(n);return}const a=n!==t.target&&!n.contains(t.target),r=o!==t.target&&!(o!=null&&o.contains(t.target));a&&r&&Ht.destroyTooltip(n)},Co=(t,n)=>{t.__tooltip_create=()=>hd(t,n),t.__tooltip_destroy=e=>pd(e,t),t.addEventListener("mouseenter",t.__tooltip_create),document.addEventListener("mousemove",t.__tooltip_destroy),t.addEventListener("focus",t.__tooltip_create),t.addEventListener("blur",t.__tooltip_destroy,!0)},Oo=t=>{Ht.destroyTooltip(t),t.removeEventListener("mouseenter",t.__tooltip_create),document.removeEventListener("mousemove",t.__tooltip_destroy),t.removeEventListener("focus",t.__tooltip_create),t.removeEventListener("blur",t.__tooltip_destroy,!0)},Wt={mounted(t,n){Co(t,n)},updated(t,n){Oo(t),Co(t,n)},beforeUnmount(t){Oo(t)}},hp="",md={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:fd,sortingTypesView:ud,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:Wt},components:{IbIcon:Le,IbIconButton:ut,IbToggleTip:mo}},gd={class:"sorting-wrapper"},yd=["name"],vd=["aria-label"];function bd(t,n,e,o,a,r){var p;const l=i.resolveComponent("ib-toggle-tip"),s=i.resolveComponent("ib-icon-button"),u=i.resolveComponent("ib-icon"),c=i.resolveDirective("tooltip");return i.openBlock(),i.createElementBlock("div",gd,[e.view===a.sortingTypesView.TABLE_VIEW?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["table-sorting-wrapper",{active:a.currentTypeSort,disabled:e.disable}])},[i.createElementVNode("div",null,[i.withDirectives((i.openBlock(),i.createElementBlock("button",{class:i.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)},[i.createTextVNode(i.toDisplayString(e.title),1)],2)),[[c,r.sortingTooltipContent,r.sortingTooltipPosition]]),r.hasToggleTip?(i.openBlock(),i.createBlock(l,{key:0,position:"bottom-center","is-open":a.isOpenToggleTip,title:e.toggleTipTitle,onClose:n[1]||(n[1]=f=>a.isOpenToggleTip=!1)},{buttons:i.withCtx(()=>[i.renderSlot(t.$slots,"toggleTipButtons",{},void 0,!0)]),default:i.withCtx(()=>[i.renderSlot(t.$slots,"toggleTipBody",{},void 0,!0)]),_:3},8,["is-open","title"])):i.createCommentVNode("",!0)]),e.hideSortingButton?i.createCommentVNode("",!0):i.withDirectives((i.openBlock(),i.createBlock(s,{key:0,kind:"white",size:"s",onClick:r.clickHandler},{default:i.withCtx(()=>[i.createElementVNode("ion-icon",{name:r.iconType},null,8,yd)]),_:1},8,["onClick"])),[[c,r.tooltipIconText,e.tooltipIconPosition]])],2)):i.withDirectives((i.openBlock(),i.createElementBlock("button",{key:1,class:i.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},[i.createTextVNode(i.toDisplayString(e.title)+" ",1),r.iconType?(i.openBlock(),i.createBlock(u,{key:0,name:r.iconType},null,8,["name"])):i.createCommentVNode("",!0)],10,vd)),[[c,e.tooltipText,e.tooltipPosition]])])}const _d=_e(md,[["render",bd],["__scopeId","data-v-a4394881"]]),pp="",$d={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:ut,IbDropdownItem:jr,IbDropdownList:or,IbTooltip:ln}},wd={"aria-label":"breadcrumb"},kd={class:"breadcrumb"},Cd=["href"],Od={key:1},Ed=["href"];function Sd(t,n,e,o,a,r){const l=i.resolveComponent("ib-icon"),s=i.resolveComponent("ib-tooltip"),u=i.resolveComponent("ib-icon-button"),c=i.resolveComponent("ib-dropdown-item"),p=i.resolveComponent("ib-dropdown-list");return i.openBlock(),i.createElementBlock("nav",wd,[i.createElementVNode("ul",kd,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.items,(f,d)=>(i.openBlock(),i.createElementBlock("li",{class:i.normalizeClass(["breadcrumb-item",d===r.last?"active":""]),"aria-current":"page",key:d},[d!==r.last&&d>e.items.length-4||d===0?(i.openBlock(),i.createElementBlock("a",{key:0,class:"ib-link",href:f.url},i.toDisplayString(f.title),9,Cd)):i.createCommentVNode("",!0),d===r.last?(i.openBlock(),i.createElementBlock("p",Od,i.toDisplayString(f.title),1)):i.createCommentVNode("",!0),r.initContextMenu&&d===e.items.length-4?(i.openBlock(),i.createBlock(p,{key:2,horizontal:"center"},{trigger:i.withCtx(()=>[i.createVNode(u,{kind:"ghost"},{default:i.withCtx(()=>[i.createVNode(l,{name:"ellipsis-horizontal-sharp"}),e.tooltipTextContext?(i.openBlock(),i.createBlock(s,{key:0,text:e.tooltipTextContext},null,8,["text"])):i.createCommentVNode("",!0)]),_:1})]),body:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.setItemsContextMenu,(h,b)=>(i.openBlock(),i.createBlock(c,{key:b},{default:i.withCtx(()=>[i.createElementVNode("a",{class:"context-breadcrums",href:h.url},i.toDisplayString(h.title),9,Ed)]),_:2},1024))),128))]),_:2},1024)):i.createCommentVNode("",!0),d!==r.last&&d>e.items.length-5||d===0?(i.openBlock(),i.createBlock(l,{key:3,name:"chevron-forward-outline"})):i.createCommentVNode("",!0)],2))),128))])])}const xd=_e($d,[["render",Sd],["__scopeId","data-v-5ef772a9"]]),mp="",Td={name:"IbLabel",props:{for:{type:String},required:{type:Boolean,default:!1},infoText:{type:[String,Object],default:""},tooltipPosition:{type:String},disabled:{type:Boolean,default:!1}},mounted(){this.$globalEvents.$on(`label:disabled:${this.for}`,t=>{this.idDisabled=t})},data(){return{idDisabled:this.disabled}},watch:{disabled(t){this.idDisabled=t}},computed:{classes(){const t=["ib-label"];return this.infoText.length&&t.push("has-info-text"),this.idDisabled&&t.push("label-disabled"),t}},components:{IbIconButton:ut,IbIcon:Le},directives:{Tooltip:Wt}},Nd=["for"],Ad={key:0,class:"required"};function Dd(t,n,e,o,a,r){const l=i.resolveComponent("ib-icon"),s=i.resolveComponent("ib-icon-button"),u=i.resolveDirective("tooltip");return i.openBlock(),i.createElementBlock("label",{class:i.normalizeClass(r.classes),for:e.for},[e.required?(i.openBlock(),i.createElementBlock("span",Ad,"* ")):i.createCommentVNode("",!0),i.renderSlot(t.$slots,"default",{},void 0,!0),e.infoText.length||Object.keys(e.infoText).length?i.withDirectives((i.openBlock(),i.createBlock(s,{key:1,size:"xs",class:"info-button",kind:"ghost",type:"button"},{default:i.withCtx(()=>[i.createVNode(l,{name:"information-circle-outline"})]),_:1})),[[u,e.infoText,e.tooltipPosition]]):i.createCommentVNode("",!0)],10,Nd)}const kn=_e(Td,[["render",Dd],["__scopeId","data-v-20191b6d"]]),Vr={text:"text",password:"password",email:"email",number:"number"},gp="",Pd={name:"IbInput",props:{type:{type:String,default:Vr.text,validator:t=>Object.keys(Vr).includes(t)},disabled:{type:Boolean,required:!1,default:!1},error:{type:Boolean,default:!1},errorMessage:{type:String,default:""},id:{type:[String],default(){return gt()}},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:rr.bottom},settingsHorizontalPosition:{type:String,default:wn.right},readonly:{type:Boolean,default:!1},autocomplete:{type:String},hideNumberActions:{type:Boolean,default:!1},decrementButtonMessage:{type:String,default:"Decrement"},incrementButtonMessage:{type:String,default:"Increment"},step:{type:Number,default:1},min:{type:Number,default:0},max:{type:Number,default:1/0}},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))},decrement(){this.actualValue>this.min&&(this.actualValue=+this.actualValue-this.step),this.$emit("update:modelValue",this.actualValue),this.$emit("input",this.actualValue),this.$emit("blur",this.actualValue)},increment(){this.actualValue<this.max&&(this.actualValue=+this.actualValue+this.step),this.$emit("update:modelValue",this.actualValue),this.$emit("input",this.actualValue),this.$emit("blur",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},hasValue(){var t;return(t=this.actualValue)==null?void 0:t.toString().length},classes(){const t=["ib-input"];return this.hasErrorState&&t.push("ib-error"),this.showIcon&&t.push("ib-input-has-icon"),t},attrs(){let t=Pr({...this.$attrs},["onInput","onBlur"]);return t.type=this.type===Vr.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:Ft,IbIconButton:ut,IbIcon:Le,IbDropdown:ir},directives:{Tooltip:Wt},inheritAttrs:!1},Id=["aria-invalid","readonly","disabled","id","autocomplete","min","max","step"],Md={key:2,class:"number-button-group"},Bd={class:"divider"},Ld={class:"settings-wrapper"};function Rd(t,n,e,o,a,r){const l=i.resolveComponent("ib-alert"),s=i.resolveComponent("ib-icon"),u=i.resolveComponent("ib-icon-button"),c=i.resolveComponent("ib-dropdown"),p=i.resolveDirective("tooltip");return i.openBlock(),i.createElementBlock("div",null,[e.errorMessage?(i.openBlock(),i.createBlock(l,{key:0},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.errorMessage),1)]),_:1})):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass(["ib-input-wrapper",{"has-settings":r.hasSettings,"numbers-type":e.type==="number"&&!e.hideNumberActions}])},[e.showIcon?(i.openBlock(),i.createBlock(s,{key:0,class:"icon-search",name:"search-outline"})):i.createCommentVNode("",!0),i.withDirectives(i.createElementVNode("input",i.mergeProps(r.attrs,{"onUpdate:modelValue":n[0]||(n[0]=f=>a.actualValue=f),ref:"field","aria-invalid":!!r.hasErrorState,readonly:e.readonly,disabled:e.disabled,id:e.id,autocomplete:e.autocomplete,class:r.classes,min:e.min,max:e.max,step:e.step,onInput:n[1]||(n[1]=f=>r.onInput(f)),onBlur:n[2]||(n[2]=f=>r.onBlur(f)),onFocus:n[3]||(n[3]=f=>r.onFocus(f))}),null,16,Id),[[i.vModelDynamic,a.actualValue,void 0,{trim:!0}]]),e.type!=="password"&&e.showClearButton?i.withDirectives((i.openBlock(),i.createBlock(u,{key:1,kind:"ghost",class:"button-clear",disabled:e.readonly||e.disabled,"help-text":e.clearButtonMessage,"prevent-default":"",type:"button",onClick:r.clearInput,onKeypress:i.withKeys(r.clearInput,["enter"])},{default:i.withCtx(()=>[i.createVNode(s,{name:"close-outline"})]),_:1},8,["disabled","help-text","onClick","onKeypress"])),[[i.vShow,r.hasValue]]):i.createCommentVNode("",!0),e.type==="number"&&!e.hideNumberActions?(i.openBlock(),i.createElementBlock("div",Md,[i.withDirectives(i.createElementVNode("div",Bd,null,512),[[i.vShow,r.hasValue]]),i.withDirectives((i.openBlock(),i.createBlock(u,{kind:"ghost",class:"button-decrement",disabled:e.readonly||e.disabled,"prevent-default":"",type:"button",onBlur:r.onBlur,onClick:r.decrement,onKeypress:i.withKeys(r.decrement,["enter"])},{default:i.withCtx(()=>[i.createVNode(s,{name:"remove-outline"})]),_:1},8,["disabled","onBlur","onClick","onKeypress"])),[[p,e.decrementButtonMessage]]),i.withDirectives((i.openBlock(),i.createBlock(u,{kind:"ghost",class:"button-increment",disabled:e.readonly||e.disabled,"prevent-default":"",type:"button",onBlur:r.onBlur,onClick:r.increment,onKeypress:i.withKeys(r.increment,["enter"])},{default:i.withCtx(()=>[i.createVNode(s,{name:"add-outline"})]),_:1},8,["disabled","onBlur","onClick","onKeypress"])),[[p,e.incrementButtonMessage]])])):i.createCommentVNode("",!0),e.type==="password"?i.withDirectives((i.openBlock(),i.createBlock(u,{key:3,kind:"ghost",class:"toggle-password","prevent-default":"",type:"button",disabled:e.disabled,"help-text":a.showPassword?e.hidePasswordMessage:e.showPasswordMessage,onClick:i.withModifiers(r.toggleShowPassword,["prevent"])},{default:i.withCtx(()=>[i.createVNode(s,{name:a.showPassword?"eye-off-outline":"eye-outline"},null,8,["name"])]),_:1},8,["disabled","help-text","onClick"])),[[i.vShow,r.hasValue]]):i.createCommentVNode("",!0),r.hasSettings?(i.openBlock(),i.createBlock(c,{key:4,class:"settings-dropdown-wrapper",horizontal:e.settingsHorizontalPosition,vertical:e.settingsVerticalPosition},{trigger:i.withCtx(()=>[i.createVNode(u,{"prevent-default":"","help-text":e.settingsButtonMessage,class:"options-trigger",kind:"ghost"},{default:i.withCtx(()=>[i.createVNode(s,{name:"options"})]),_:1},8,["help-text"])]),body:i.withCtx(()=>[i.createElementVNode("div",Ld,[i.renderSlot(t.$slots,"settings",{},void 0,!0)])]),_:3},8,["horizontal","vertical"])):i.createCommentVNode("",!0)],2)])}const qr=_e(Pd,[["render",Rd],["__scopeId","data-v-d8683396"]]),yp="",jd={name:"IbCheckbox",model:{event:"input"},props:{label:String,error:{type:[Boolean,null],default:!1},name:String,id:{type:String,default(){return gt()}},value:{type:[String,Number]},modelValue:{type:[Boolean,String]},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==="0"?!1:!!t}},data(){return{checked:this.modelValue?this.modelValue==="0"?!1:!!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={...Pr({...this.$attrs})};return delete t.class,t.class=this.classes,t}},components:{IbIcon:Le},inheritAttrs:!1},Vd=["for","tabindex","aria-checked"],qd=["name","id","value","disabled","required"],Fd=["name","disabled","required"],Hd={class:"ib-checkbox-body"},zd={key:0,class:"required"},Ud={class:"ib-checkbox-input"},Kd={key:1,class:"ib-checkbox-label"},Gd={key:0,class:"required"};function Wd(t,n,e,o,a,r){var s;const l=i.resolveComponent("ib-icon");return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["ib-checkbox-wrapper",this.$attrs.class])},[i.createElementVNode("label",i.mergeProps(r.attrs,{role:"checkbox",for:e.id,tabindex:e.disabled|e.disableFocus?-1:0,"aria-checked":!!a.checked,onClick:n[2]||(n[2]=i.withModifiers((...u)=>r.onChange&&r.onChange(...u),["prevent","stop"])),onKeypress:n[3]||(n[3]=i.withModifiers((...u)=>r.onChange&&r.onChange(...u),["prevent"]))}),[i.withDirectives(i.createElementVNode("input",{tabindex:"-1",type:"checkbox",name:e.name,id:e.id,value:e.value??1,disabled:e.disabled,required:e.required,"onUpdate:modelValue":n[0]||(n[0]=u=>a.checked=u),onClick:n[1]||(n[1]=(...u)=>r.onChange&&r.onChange(...u))},null,8,qd),[[i.vModelCheckbox,a.checked]]),!e.value&&!a.checked?(i.openBlock(),i.createElementBlock("input",{key:0,value:"0",type:"hidden",name:e.name,disabled:e.disabled,required:e.required},null,8,Fd)):i.createCommentVNode("",!0),i.createElementVNode("div",Hd,[e.labelPosition==="left"&&e.label.length?(i.openBlock(),i.createElementBlock("span",{key:0,class:i.normalizeClass(["ib-checkbox-label",{"ib-checkbox-label-left":e.labelPosition==="left"}])},[e.required?(i.openBlock(),i.createElementBlock("span",zd,"*")):i.createCommentVNode("",!0),i.createTextVNode(" "+i.toDisplayString(e.label),1)],2)):i.createCommentVNode("",!0),i.createElementVNode("span",Ud,[i.withDirectives(i.createVNode(l,{name:"checkmark-sharp"},null,512),[[i.vShow,a.checked&&!r.indeterminate]]),i.withDirectives(i.createVNode(l,{class:i.normalizeClass("checkbox-undeterminate-icon"),name:"remove-sharp"},null,512),[[i.vShow,r.indeterminate]])]),e.labelPosition==="right"&&((s=e.label)!=null&&s.length)?(i.openBlock(),i.createElementBlock("span",Kd,[e.required?(i.openBlock(),i.createElementBlock("span",Gd,"*")):i.createCommentVNode("",!0),i.createTextVNode(" "+i.toDisplayString(e.label),1)])):i.createCommentVNode("",!0)])],16,Vd)],2)}const Fr=_e(jd,[["render",Wd],["__scopeId","data-v-83ac97df"]]),vp="",Yd={name:"IbToggle",model:{prop:"isChecked",event:"input"},props:{isChecked:{type:Boolean,required:!1},id:{type:String,default:()=>gt()},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:ln}},Zd=["aria-checked","tabindex"],Jd={class:"toggle-wrapper",ref:"wrapper"},Xd={class:"toggle",ref:"toggle"},Qd=["name","checked","id","disabled"],ec=i.createElementVNode("span",{class:"toggle-slider round"},null,-1),tc={key:0,class:"toggle-label"};function nc(t,n,e,o,a,r){const l=i.resolveComponent("ib-icon"),s=i.resolveComponent("ib-tooltip");return i.openBlock(),i.createElementBlock("label",{role:"switch","aria-checked":a.checked,tabindex:e.disabled?-1:0,class:i.normalizeClass(r.classes),onKeypress:[n[2]||(n[2]=i.withKeys(i.withModifiers((...u)=>r.onChange&&r.onChange(...u),["prevent"]),["space"])),n[3]||(n[3]=i.withKeys(i.withModifiers((...u)=>r.onChange&&r.onChange(...u),["prevent"]),["enter"]))]},[i.createElementVNode("div",Jd,[i.createElementVNode("div",Xd,[i.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]=(...u)=>r.onChange&&r.onChange(...u)),onInput:n[1]||(n[1]=i.withModifiers(()=>{},["stop"]))},null,40,Qd),ec,i.createVNode(l,{class:"checked-icon",name:"checkmark"}),i.createVNode(l,{class:"unchecked-icon",name:"close"})],512)],512),e.label.length?(i.openBlock(),i.createElementBlock("span",tc,i.toDisplayString(e.label),1)):i.createCommentVNode("",!0),e.helpMessage.length?(i.openBlock(),i.createBlock(s,{key:1,text:a.checked?e.helpMessage:e.helpMessageOff.length?e.helpMessageOff:e.helpMessage},null,8,["text"])):i.createCommentVNode("",!0)],42,Zd)}const Eo=_e(Yd,[["render",nc]]);function So(t){return t.scrollHeight>t.clientHeight}const bp="",rc={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},alphabeticStyle:{type:Boolean,default:!1}},mounted(){this.option.hasOwnProperty("children")&&this.option.children&&this.checkParent(),this.option.showTooltipByDefault&&(this.showTooltip=!0)},updated(){this.$nextTick(()=>{this.option.showTooltipByDefault?this.showTooltip=!0:So(this.$el.querySelector(".option-label"))&&(this.showTooltip=!0)})},data(){return{showTooltip:!1}},methods:{onKeydown(t){t.keyCode===go&&(t.preventDefault(),this.onChange()),this.hasVisibleChildren&&(t.keyCode===ys&&(this.option.isChildrenVisible=!0),t.keyCode===gs&&(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,o){if(!this.isMultiple&&this.hasVisibleChildren){this.toggleChildrenVisibility();return}this.$emit("check",t,n,e),o&&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 o=0;return t.children&&t.children.forEach(a=>{(!n||n(a))&&o++,e&&(o+=this.calculateChildren(a,n,e))}),o},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?Eo:Fr},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:Rr,IbIconButton:ut},directives:{Tooltip:Wt}},ic=["aria-selected","aria-label","id"],oc={key:0,class:"bookmarkable-option-content"},ac={class:"option-label"},lc={key:1,class:"option-label"},sc=["innerHTML"],dc=["innerHTML"],cc={key:2,class:"option-label"};function uc(t,n,e,o,a,r){const l=i.resolveComponent("ib-icon"),s=i.resolveComponent("ib-icon-button"),u=i.resolveComponent("select-option"),c=i.resolveComponent("list"),p=i.resolveDirective("tooltip");return i.openBlock(),i.createElementBlock("li",null,[i.withDirectives((i.openBlock(),i.createElementBlock("div",{class:i.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,"has-icon":e.option.icon,"tree-select-option-toggle":this.isToggle&&this.isMultiple,"alphabetic-option":e.alphabeticStyle}]),tabindex:"0",role:"option","aria-selected":r.isChecked(e.option),"aria-label":e.option.title,id:"option-"+r.id,onKeydown:n[3]||(n[3]=i.withModifiers((...f)=>r.onKeydown&&r.onKeydown(...f),["self"])),onFocus:n[4]||(n[4]=f=>t.$emit("onFocus",`option-${r.id}`))},[i.withDirectives(i.createVNode(s,{"disabled-focus":!0,kind:"ghost",class:"toggle-children",onClick:r.toggleChildrenVisibility},{default:i.withCtx(()=>[i.createVNode(l,{name:r.iconName},null,8,["name"])]),_:1},8,["onClick"]),[[i.vShow,r.hasVisibleChildren]]),i.createElementVNode("div",{onClick:n[1]||(n[1]=i.withModifiers((...f)=>r.onChange&&r.onChange(...f),["prevent"])),class:i.normalizeClass({disabled:e.option.isDisabled,"tree-select-option-label":!0,"tree-select-option-has-children":r.hasVisibleChildren,active:!e.showInput&&e.option.checked})},[i.withDirectives((i.openBlock(),i.createBlock(i.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"])),[[i.vShow,e.showInput]]),e.isBookmarkable?(i.openBlock(),i.createElementBlock("span",{key:0,class:i.normalizeClass("bookmarkable-option-title "+(e.isBookmarked?"bookmarked":""))},[r.hasChildren?(i.openBlock(),i.createElementBlock("span",lc,i.toDisplayString(e.option.title),1)):(i.openBlock(),i.createElementBlock("div",oc,[i.createElementVNode("span",ac,i.toDisplayString(e.option.title),1),i.withDirectives((i.openBlock(),i.createBlock(s,{onClick:n[0]||(n[0]=i.withModifiers(f=>t.$emit("toggle-bookmark",e.option),["stop","prevent"])),kind:"ghost"},{default:i.withCtx(()=>[i.createVNode(l,{name:e.isBookmarked?"star":"star-outline"},null,8,["name"])]),_:1})),[[p,t.lang(e.isBookmarked?"unpin":"pin_to_top","select")]])]))],2)):e.htmlTitle?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[r.hasChildren?(i.openBlock(),i.createElementBlock("span",{key:1,class:"option-label",innerHTML:e.option.title},null,8,dc)):(i.openBlock(),i.createElementBlock("span",{key:0,class:"option-label",innerHTML:e.option.title},null,8,sc))],64)):(i.openBlock(),i.createElementBlock("span",cc,[e.option.icon?(i.openBlock(),i.createBlock(l,{key:0,name:e.option.icon},null,8,["name"])):i.createCommentVNode("",!0),i.createTextVNode(" "+i.toDisplayString(e.option.title),1)]))],2),r.hasChildren?i.withDirectives((i.openBlock(),i.createBlock(c,{key:0},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.option.children,f=>i.withDirectives((i.openBlock(),i.createBlock(u,{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"])),[[i.vShow,f.visible]])),128))]),_:1},512)),[[i.vShow,r.hasVisibleChildren&&e.option.isChildrenVisible]]):i.createCommentVNode("",!0)],42,ic)),[[p,a.showTooltip?e.option.isDisabled?e.option.disableTooltip:e.option.title:""]])])}const fc=_e(rc,[["render",uc]]);var je=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Cn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var xo={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,o){t.exports=o()})(je,function(){class e{constructor(r,l=!0,s=[],u=5e3){this.ctx=r,this.iframes=l,this.exclude=s,this.iframesTimeout=u}static matches(r,l){const s=typeof l=="string"?[l]:l,u=r.matches||r.matchesSelector||r.msMatchesSelector||r.mozMatchesSelector||r.oMatchesSelector||r.webkitMatchesSelector;if(u){let c=!1;return s.every(p=>!u.call(r,p)||(c=!0,!1)),c}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(u=>u.contains(l)).length>0;r.indexOf(l)!==-1||s||r.push(l)}),r}getIframeContents(r,l,s=()=>{}){let u;try{const c=r.contentWindow;if(u=c.document,!c||!u)throw new Error("iframe inaccessible")}catch{s()}u&&l(u)}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 u=!1,c=null;const p=()=>{if(!u){u=!0,clearTimeout(c);try{this.isIframeBlank(r)||(r.removeEventListener("load",p),this.getIframeContents(r,l,s))}catch{s()}}};r.addEventListener("load",p),c=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,u=>{s++,this.waitForIframes(u.querySelector("html"),()=>{--s||l()})},u=>{u||l()})}forEachIframe(r,l,s,u=()=>{}){let c=r.querySelectorAll("iframe"),p=c.length,f=0;c=Array.prototype.slice.call(c);const d=()=>{--p<=0&&u(f)};p||d(),c.forEach(h=>{e.matches(h,this.exclude)?d():this.onIframeReady(h,b=>{l(h)&&(f++,s(b)),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 u=r.compareDocumentPosition(s),c=Node.DOCUMENT_POSITION_PRECEDING;return!!(u&c&&(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,u){let c=!1,p=!1;return u.forEach((f,d)=>{f.val===s&&(c=d,p=f.handled)}),this.compareNodeIframe(r,l,s)?(c!==!1||p?c===!1||p||(u[c].handled=!0):u.push({val:s,handled:!0}),!0):(c===!1&&u.push({val:s,handled:!1}),!1)}handleOpenIframes(r,l,s,u){r.forEach(c=>{c.handled||this.getIframeContents(c.val,p=>{this.createInstanceOnIframe(p).forEachNode(l,s,u)})})}iterateThroughNodes(r,l,s,u,c){const p=this.createIterator(l,r,u);let f,d,h=[],b=[],m=()=>({prevNode:d,node:f}=this.getIteratorNode(p),f);for(;m();)this.iframes&&this.forEachIframe(l,_=>this.checkIframeFilter(f,d,_,h),_=>{this.createInstanceOnIframe(_).forEachNode(r,y=>b.push(y),u)}),b.push(f);b.forEach(_=>{s(_)}),this.iframes&&this.handleOpenIframes(h,r,s,u),c()}forEachNode(r,l,s,u=()=>{}){const c=this.getContexts();let p=c.length;p||u(),c.forEach(f=>{const d=()=>{this.iterateThroughNodes(r,f,l,s,()=>{--p<=0&&u()})};this.iframes?this.waitForIframes(f,d):d()})}}class o{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",u=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(let c in l)if(l.hasOwnProperty(c)){const p=l[c],f=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(c):this.escapeStr(c),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}`),u+`(${this.processSynomyms(f)}|${this.processSynomyms(d)})`+u))}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,u)=>{let c=u.charAt(s+1);return/[(|)\\]/.test(c)||c===""?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 u=[];return r.split("").forEach(c=>{s.every(p=>{if(p.indexOf(c)!==-1){if(u.indexOf(p)>-1)return!1;r=r.replace(new RegExp(`[${p}]`,`gm${l}`),`[${p}]`),u.push(p)}return!0})}),r}createMergedBlanksRegExp(r){return r.replace(/[\s]+/gim,"[\\s]+")}createAccuracyRegExp(r){const l="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿";let s=this.opt.accuracy,u=typeof s=="string"?s:s.value,c=typeof s=="string"?[]:s.limiters,p="";switch(c.forEach(f=>{p+=`|${this.escapeStr(f)}`}),u){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(u=>{u.trim()&&l.indexOf(u)===-1&&l.push(u)}):s.trim()&&l.indexOf(s)===-1&&l.push(s)}),{keywords:l.sort((s,u)=>u.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((u,c)=>u.start-c.start).forEach(u=>{let{start:c,end:p,valid:f}=this.callNoMatchOnInvalidRanges(u,s);f&&(u.start=c,u.length=p-c,l.push(u),s=p)}),l}callNoMatchOnInvalidRanges(r,l){let s,u,c=!1;return r&&r.start!==void 0?(u=(s=parseInt(r.start,10))+parseInt(r.length,10),this.isNumeric(r.start)&&this.isNumeric(r.length)&&u-l>0&&u-s>0?c=!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:u,valid:c}}checkWhitespaceRanges(r,l,s){let u,c=!0,p=s.length,f=l-p,d=parseInt(r.start,10)-f;return(u=(d=d>p?p:d)+parseInt(r.length,10))>p&&(u=p,this.log(`End range automatically set to the max value of ${p}`)),d<0||u-d<0||d>p||u>p?(c=!1,this.log(`Invalid range: ${JSON.stringify(r)}`),this.opt.noMatch(r)):s.substring(d,u).replace(/\s+/g,"")===""&&(c=!1,this.log("Skipping whitespace only range: "+JSON.stringify(r)),this.opt.noMatch(r)),{start:d,end:u,valid:c}}getTextNodes(r){let l="",s=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,u=>{s.push({start:l.length,end:(l+=u.textContent).length,node:u})},u=>this.matchesExclude(u.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 u=this.opt.element?this.opt.element:"mark",c=r.splitText(l),p=c.splitText(s-l);let f=document.createElement(u);return f.setAttribute("data-markjs","true"),this.opt.className&&f.setAttribute("class",this.opt.className),f.textContent=c.textContent,c.parentNode.replaceChild(f,c),p}wrapRangeInMappedTextNode(r,l,s,u,c){r.nodes.every((p,f)=>{const d=r.nodes[f+1];if(d===void 0||d.start>l){if(!u(p.node))return!1;const h=l-p.start,b=(s>p.end?p.end:s)-p.start,m=r.value.substr(0,p.start),_=r.value.substr(b+p.start);if(p.node=this.wrapRangeInTextNode(p.node,h,b),r.value=m+_,r.nodes.forEach((y,g)=>{g>=f&&(r.nodes[g].start>0&&g!==f&&(r.nodes[g].start-=b),r.nodes[g].end-=b)}),s-=b,c(p.node.previousSibling,p.start),!(s>p.end))return!1;l=p.end}return!0})}wrapMatches(r,l,s,u,c){const p=l===0?0:l+1;this.getTextNodes(f=>{f.nodes.forEach(d=>{let h;for(d=d.node;(h=r.exec(d.textContent))!==null&&h[p]!=="";){if(!s(h[p],d))continue;let b=h.index;if(p!==0)for(let m=1;m<p;m++)b+=h[m].length;d=this.wrapRangeInTextNode(d,b,b+h[p].length),u(d.previousSibling),r.lastIndex=0}}),c()})}wrapMatchesAcrossElements(r,l,s,u,c){const p=l===0?0:l+1;this.getTextNodes(f=>{let d;for(;(d=r.exec(f.value))!==null&&d[p]!=="";){let h=d.index;if(p!==0)for(let m=1;m<p;m++)h+=d[m].length;const b=h+d[p].length;this.wrapRangeInMappedTextNode(f,h,b,m=>s(d[p],m),(m,_)=>{r.lastIndex=_,u(m)})}c()})}wrapRangeFromIndex(r,l,s,u){this.getTextNodes(c=>{const p=c.value.length;r.forEach((f,d)=>{let{start:h,end:b,valid:m}=this.checkWhitespaceRanges(f,p,c.value);m&&this.wrapRangeInMappedTextNode(c,h,b,_=>l(_,f,c.value.substring(h,b),d),_=>{s(_,f)})}),u()})}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,u="wrapMatches";const c=p=>{s++,this.opt.each(p)};this.opt.acrossElements&&(u="wrapMatchesAcrossElements"),this[u](r,this.opt.ignoreGroups,(p,f)=>this.opt.filter(f,p,s),c,()=>{s===0&&this.opt.noMatch(r),this.opt.done(s)})}mark(r,l){this.opt=l;let s=0,u="wrapMatches";const{keywords:c,length:p}=this.getSeparatedKeywords(typeof r=="string"?[r]:r),f=this.opt.caseSensitive?"":"i",d=h=>{let b=new RegExp(this.createRegExp(h),`gm${f}`),m=0;this.log(`Searching with expression "${b}"`),this[u](b,1,(_,y)=>this.opt.filter(y,h,s,m),_=>{m++,s++,this.opt.each(_)},()=>{m===0&&this.opt.noMatch(h),c[p-1]===h?this.opt.done(s):d(c[c.indexOf(h)+1])})};this.opt.acrossElements&&(u="wrapMatchesAcrossElements"),p===0?this.opt.done(s):d(c[0])}markRanges(r,l){this.opt=l;let s=0,u=this.checkRanges(r);u&&u.length?(this.log("Starting to mark with the following ranges: "+JSON.stringify(u)),this.wrapRangeFromIndex(u,(c,p,f,d)=>this.opt.filter(c,p,f,d),(c,p)=>{s++,this.opt.each(c,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 u=e.matches(s,l),c=this.matchesExclude(s);return!u||c?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},this.opt.done)}}return function(a){const r=new o(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}})})(xo);var hc=xo.exports;const pc=Cn(hc),mc={props:{infiniteLoader:{type:Boolean,default:!0}},watch:{infiniteLoader(t){t||infiniteLoaderObserver.disconnect()}},data(){return{infiniteLoaderObserver:null}},mounted(){this.infiniteLoader&&(this.infiniteLoaderObserver=new IntersectionObserver(t=>{t.forEach(n=>{n.isIntersecting&&this.$emit("loadMoreOptions")})}),this.infiniteLoaderObserver.observe(this.$refs.infinityLoader))},beforeDestroy(){this.infiniteLoader&&(infiniteLoaderObserver==null||infiniteLoaderObserver.disconnect())},emits:["loadMoreOptions"]},_p="";function To(t){return JSON.parse(JSON.stringify(t))}const gc={name:"IbTreeSelect",inject:["LANG_COMPONENTS"],mixins:[mc],props:{classList:[String,Array],keywordHighlighter:{type:Boolean,default:!0},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 gt()}},options:{type:[Array,Function],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 gt()}},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},disable:{type:Boolean,default:!1},searchDebounce:{type:Number,default:0},alphabeticStyle:{type:Boolean,default:!1}},emits:["close","input","blur","search","resize","submit","clearValue","toggle-bookmarked-option","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=typeof t=="function"?t:To(t)},deep:!0},initialOptions(t){let n=!0;if(typeof t=="function")n=!1;else{const e=[],o=t;Array.prototype.forEach.call(o,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 pc(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,o,a,r,l,s;return this.defaultFilter=u=>{this.marker.unmark();const c=this.filterString.toLowerCase().trim();this.filterFunc.call(this,u,c),c&&this.keywordHighlighter&&this.marker.mark(c)},{initialOptions:typeof this.options=="function"?this.options:To(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",(o=this.LANG_COMPONENTS)==null?void 0:o.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",this.filterString),this.defaultFilter(n)},setPreparedValues(t){let n=t||this.initialOptions;return this.alphabetSort&&(n=n.sort((e,o)=>e.title.toLowerCase().localeCompare(o.title.toLowerCase()))),this.prepare(n).then(([e,o])=>{this.actualOptions=e,this.allOptionsIsChecked=this.checkIfOptionsChecked(e),this.isInitialized=!0,this.selected=o,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={},o=[];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.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),o.push(new Promise(s=>{l.children?this.prepare(l.children).then(([u,c])=>{l.children=u,Object.assign(e,c),s(l)}):s(l)}))}),Promise.all(o).then(l=>{n([l,e])}))).catch(r=>{throw this.isLoading=!1,r})})},filterFunc(t,n){let e=0;return t.forEach(o=>{let a=o.initiallyVisible&&o.title&&o.title.toString().toLowerCase().includes(n)&&!this.actualBookmarkedOptions[o.id];if(o.children&&o.children.length){let r=this.filterFunc(o.children,n);e+=r,r&&(o.isDisabled=r<o.children.length&&!this.isBookmarkable),a?r||(a=!1):a=!!r}o.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 o=Object.keys(this.selected)[0];o&&(this.selected[o].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 o of t)o.id===n&&(o.checked=e),o.children&&this.toggleDuplicateOptions(o.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&&!this.alphabeticStyle},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:Ft,IbIconButton:ut,IbIcon:Le,IbDropdown:ir,IbInput:qr,List:Rr,"select-option":fc},directives:{Tooltip:Wt},beforeUnmount(){document.removeEventListener("mousemove",this.onResize),document.removeEventListener("mouseup",this.endResizing)},inheritAttrs:!1},yc={key:0,class:"tree-select-empty"},vc={key:1,class:"tree-select-default-empty tree-select-empty"},bc={key:5,ref:"infinityLoader"};function _c(t,n,e,o,a,r){const l=i.resolveComponent("ib-alert"),s=i.resolveComponent("ib-icon"),u=i.resolveComponent("ib-icon-button"),c=i.resolveComponent("ib-input"),p=i.resolveComponent("select-option"),f=i.resolveComponent("list"),d=i.resolveComponent("ib-dropdown"),h=i.resolveDirective("tooltip");return i.openBlock(),i.createElementBlock(i.Fragment,null,[e.errorMessage?(i.openBlock(),i.createBlock(l,{key:0,class:"tree-select-error"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.errorMessage),1)]),_:1})):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass(["tree-select",{...e.classList,"tree-select-custom-trigger-content":r.hasTriggerContent}])},[i.createVNode(d,{disabled:a.isLoading||e.disable,"is-resizable":e.isResizable,vertical:a.verticalVal,class:i.normalizeClass({disable:e.disable}),ref:"dropdown",onClose:r.onClose,onOpen:r.onOpen},i.createSlots({body:i.withCtx(()=>[i.createElementVNode("div",{class:i.normalizeClass(["tree-drop",{"not-tree-child":!a.hasTreeChildren}]),style:i.normalizeStyle(r.treeDropPos)},[e.isResizable?(i.openBlock(),i.createElementBlock("div",{key:0,class:"ib-dropdown-resizer ib-dropdown-resizer-left",onMousedown:n[6]||(n[6]=b=>r.startResizing("left"))},null,32)):i.createCommentVNode("",!0),e.isResizable?i.withDirectives((i.openBlock(),i.createElementBlock("div",{key:1,class:"ib-dropdown-resizer ib-dropdown-resizer-right",onMousedown:n[7]||(n[7]=b=>r.startResizing("right"))},null,544)),[[h,t.lang("resize_list","select"),void 0,{rightCenter:!0}]]):i.createCommentVNode("",!0),r.showSearch?(i.openBlock(),i.createBlock(c,{key:2,class:"tree-search",ref:"search",autocomplete:"off","show-icon":!0,value:a.filterString,debounce:e.searchDebounce,"aria-label":e.searchPlaceholderText?e.searchPlaceholderText:a.actualStrings.searchPlaceholder,placeholder:e.searchPlaceholderText?e.searchPlaceholderText:a.actualStrings.searchPlaceholder,onInput:n[8]||(n[8]=b=>r.filter(b,a.actualOptions)),onKeyup:i.withKeys(r.inputKeyupDown,["down"])},null,8,["value","debounce","aria-label","placeholder","onKeyup"])):i.createCommentVNode("",!0),i.createVNode(f,{ref:"list",role:"listbox",class:i.normalizeClass({"tree-select-list":!0,"has-hierarchy":r.hasHierarchy,"alphabetic-list":e.alphabeticStyle})},{default:i.withCtx(()=>[!r.requiredDependencyNotFilled&&!r.visibleOptionsCount&&r.hasEmptyMessage?(i.openBlock(),i.createElementBlock("div",yc,[i.renderSlot(t.$slots,"emptyMessage")])):!r.requiredDependencyNotFilled&&!r.visibleOptionsCount?(i.openBlock(),i.createElementBlock("div",vc,i.toDisplayString(a.actualStrings.emptyTitle),1)):i.createCommentVNode("",!0),i.withDirectives(i.createElementVNode("div",{class:"tree-select-empty"},i.toDisplayString(a.actualStrings.requiredDependencyNotFilled),513),[[i.vShow,r.requiredDependencyNotFilled]]),!e.isMultiple&&!e.isRequired&&a.actualOptions.length>0?(i.openBlock(),i.createBlock(p,{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"])):i.createCommentVNode("",!0),Object.keys(a.actualBookmarkedOptions).length>0?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:3},i.renderList(a.actualBookmarkedOptions,b=>(i.openBlock(),i.createBlock(p,{key:"bookmark"+b.id,class:"bookmarked-option",option:b,"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)):i.createCommentVNode("",!0),r.requiredDependencyNotFilled?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock(i.Fragment,{key:4},[e.allOptions&&!e.alphabeticStyle&&e.isMultiple&&r.visibleOptionsCount&&!r.requiredDependencyNotFilled?(i.openBlock(),i.createBlock(p,{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,"alphabetic-style":e.alphabeticStyle,onCheck:r.manageAll,onOnFocus:n[9]||(n[9]=b=>a.focusedOptionId=b)},null,8,["option","is-toggle","name","is-multiple","uid","only-end-nodes","show-input","alphabetic-style","onCheck"])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.actualOptions,b=>i.renderSlot(t.$slots,a.actualName,{key:e.name+b.value,option:b,parentAutoCheck:e.parentAutoCheck,isMultiple:e.isMultiple,uid:a.uid,onlyEndNodes:e.onlyEndNodes,htmlTitle:e.htmlOptionTitle,showInput:e.showInputs},()=>[i.withDirectives(i.createVNode(p,{option:b,"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,"alphabetic-style":e.alphabeticStyle,onCheck:r.registerCheck,onToggleBookmark:r.toggleBookmark,onOnFocus:n[10]||(n[10]=m=>a.focusedOptionId=m)},null,8,["option","is-toggle","name","parent-auto-check","is-multiple","is-bookmarkable","uid","only-end-nodes","html-title","show-input","alphabetic-style","onCheck","onToggleBookmark"]),[[i.vShow,b.visible]])])),128))],64)),t.infiniteLoader?(i.openBlock(),i.createElementBlock("div",bc,null,512)):i.createCommentVNode("",!0)]),_:3},8,["class"])],6)]),_:2},[r.hasTrigger?{name:"trigger",fn:i.withCtx(()=>[i.renderSlot(t.$slots,"trigger",{selectedCount:r.selectedKeys.length})]),key:"0"}:{name:"trigger",fn:i.withCtx(({isOpened:b})=>[i.createElementVNode("div",{role:"combobox",tabindex:"0",class:i.normalizeClass(["tree-choice",{"tree-choice-opened":b,"has-clear-button":e.showClearButton,"tree-choice-error":e.errorMessage}]),ref:"combobox",onClick:n[2]||(n[2]=i.withModifiers(()=>{},["prevent"])),onBlur:n[3]||(n[3]=(...m)=>r.onBlur&&r.onBlur(...m)),onKeyup:[n[4]||(n[4]=i.withKeys((...m)=>r.comboboxKeyupDown&&r.comboboxKeyupDown(...m),["down"])),n[5]||(n[5]=i.withKeys((...m)=>r.comboboxKeyupDown&&r.comboboxKeyupDown(...m),["up"]))],"aria-label":e.ariaLabel,"aria-activedescendant":a.focusedOptionId},[r.hasTriggerContent?i.renderSlot(t.$slots,"triggerContent",{key:0,selectedCount:r.selectedKeys.length,isOpen:b}):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[e.htmlOptionTitle?(i.openBlock(),i.createElementBlock("span",{key:0,class:i.normalizeClass({placeholder:!r.selectStatus}),innerHTML:r.selectStatus||e.placeholder},null,10,["innerHTML"])):(i.openBlock(),i.createElementBlock("span",{key:1,class:i.normalizeClass({placeholder:!r.selectStatus})},i.toDisplayString(r.selectStatus||e.placeholder),3))],64)),e.showClearButton?i.withDirectives((i.openBlock(),i.createBlock(u,{key:2,kind:"ghost",class:"button-clear",onClick:i.withModifiers(r.clearValue,["prevent"]),onKeypress:n[0]||(n[0]=i.withKeys(i.withModifiers(()=>{},["stop","prevent"]),["enter"])),onKeydown:n[1]||(n[1]=i.withKeys(i.withModifiers(()=>{},["stop","prevent"]),["enter"])),onKeyup:i.withKeys(i.withModifiers(r.clearValue,["prevent"]),["enter"]),"help-text":e.clearButtonMessage},{default:i.withCtx(()=>[i.createVNode(s,{name:"close-outline"})]),_:1},8,["onClick","onKeyup","help-text"])),[[i.vShow,Object.keys(a.selected).length]]):i.createCommentVNode("",!0),i.createVNode(s,{name:b?"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","class","onClose","onOpen"])],2)],64)}const No=_e(gc,[["render",_c]]),$p="",$c={name:"IbLimitSelector",props:{labelSelect:{type:String,required:!0},value:{type:Number},vertical:{type:String},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:kn,IbSelect:No}},wc={class:"report-limit-selector"};function kc(t,n,e,o,a,r){const l=i.resolveComponent("ib-label"),s=i.resolveComponent("ib-select");return i.openBlock(),i.createElementBlock("div",wc,[i.createVNode(l,null,{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.labelSelect),1)]),_:1}),i.createVNode(s,{classList:"report-limit-selector-select",value:e.value,vertical:e.vertical,options:r.prepareOptions,"is-multiple":!1,"show-clear-button":!1,onInput:r.selectItem},null,8,["value","vertical","options","onInput"])])}const Ao=_e($c,[["render",kc]]),wp="",Cc={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},vertical:{type:String}},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:ut,IbIcon:Le,IbInput:qr,IbLabel:kn,IbLimitSelector:Ao,IbTooltip:ln}},Oc={class:"report-controls"},Ec={class:"repot-pagination"},Sc={class:"pagination-input"},xc={class:"row-count"},Tc={class:"pagination-wrapper"},Nc=["onClick"];function Ac(t,n,e,o,a,r){const l=i.resolveComponent("ib-limit-selector"),s=i.resolveComponent("ib-label"),u=i.resolveComponent("ib-input"),c=i.resolveComponent("ib-icon"),p=i.resolveComponent("ib-tooltip"),f=i.resolveComponent("ib-icon-button");return i.openBlock(),i.createElementBlock("div",Oc,[i.createVNode(l,{onSelect:r.changeLimit,value:a.limitValue,vertical:e.vertical,"label-select":e.labelSelect},null,8,["onSelect","value","vertical","label-select"]),i.createElementVNode("div",Ec,[e.showPaginationInput?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createVNode(s,{for:"goToPage"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.labelInput),1)]),_:1}),i.createElementVNode("div",Sc,[i.createVNode(u,{id:"goToPage",type:"number","hide-number-actions":"",debounce:500,onInput:r.onInput},null,8,["onInput"])])],64)):i.createCommentVNode("",!0),i.createElementVNode("div",xc,i.toDisplayString(r.setCountOfRows+" of "+e.countRows),1),i.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:i.withCtx(()=>[i.createVNode(c,{name:"chevron-back-outline"}),e.tooltipTextPrev?(i.openBlock(),i.createBlock(p,{key:0,text:e.tooltipTextPrev},null,8,["text"])):i.createCommentVNode("",!0)]),_:1},8,["disabled"]),i.createElementVNode("ul",Tc,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.countPagePagination,(d,h)=>i.withDirectives((i.openBlock(),i.createElementBlock("li",{key:h,class:i.normalizeClass(["pagination-item",{active:h+1===a.currentPage,"dots-left":a.indexSpaceLeft===h+1,"dots-right":a.indexSpaceRight===h+1}]),onClick:b=>r.onSelect(h+1)},[i.createElementVNode("button",null,i.toDisplayString(h+1),1)],10,Nc)),[[i.vShow,r.showItem(h+1)]])),128))]),i.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:i.withCtx(()=>[i.createVNode(c,{name:"chevron-forward-outline"}),e.tooltipTextNext?(i.openBlock(),i.createBlock(p,{key:0,text:e.tooltipTextNext},null,8,["text"])):i.createCommentVNode("",!0)]),_:1},8,["disabled"])])])}const Dc=_e(Cc,[["render",Ac]]),On={PROGRESS:"progress",SUCCESS:"success",FAILED:"failed",CANCELING:"canceling",CANCELED:"canceled"},kp="",Pc={props:{states:{type:String,default:On.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===On.SUCCESS?"checkmark-circle":this.states===On.FAILED||this.states===On.CANCELING||this.states===On.CANCELED?"close-circle":""}},components:{IbIcon:Le}},Do=t=>(i.pushScopeId("data-v-a0217859"),t=t(),i.popScopeId(),t),Ic={class:"ib-progress-bar-wrapper"},Mc=["aria-label","aria-valuenow"],Bc=[Do(()=>i.createElementVNode("div",{class:"gradient"},null,-1))],Lc=Do(()=>i.createElementVNode("div",null,null,-1));function Rc(t,n,e,o,a,r){const l=i.resolveComponent("ib-icon");return i.openBlock(),i.createElementBlock("div",Ic,[i.createElementVNode("div",{class:i.normalizeClass(r.classes)},[i.createElementVNode("div",{class:"progress",role:"meter","aria-label":e.ariaLabel,"aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":e.progress,style:i.normalizeStyle({width:e.progress+"%"})},Bc,12,Mc),Lc],2),i.withDirectives(i.createVNode(l,{class:"status-icon",name:r.iconName},null,8,["name"]),[[i.vShow,r.iconName.length]])])}const jc=_e(Pc,[["render",Rc],["__scopeId","data-v-a0217859"]]),Vc={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,o){t.exports=o()})(je,function(){class e{constructor(r,l=!0,s=[],u=5e3){this.ctx=r,this.iframes=l,this.exclude=s,this.iframesTimeout=u}static matches(r,l){const s=typeof l=="string"?[l]:l,u=r.matches||r.matchesSelector||r.msMatchesSelector||r.mozMatchesSelector||r.oMatchesSelector||r.webkitMatchesSelector;if(u){let c=!1;return s.every(p=>!u.call(r,p)||(c=!0,!1)),c}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(u=>u.contains(l)).length>0;r.indexOf(l)!==-1||s||r.push(l)}),r}getIframeContents(r,l,s=()=>{}){let u;try{const c=r.contentWindow;if(u=c.document,!c||!u)throw new Error("iframe inaccessible")}catch{s()}u&&l(u)}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 u=!1,c=null;const p=()=>{if(!u){u=!0,clearTimeout(c);try{this.isIframeBlank(r)||(r.removeEventListener("load",p),this.getIframeContents(r,l,s))}catch{s()}}};r.addEventListener("load",p),c=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,u=>{s++,this.waitForIframes(u.querySelector("html"),()=>{--s||l()})},u=>{u||l()})}forEachIframe(r,l,s,u=()=>{}){let c=r.querySelectorAll("iframe"),p=c.length,f=0;c=Array.prototype.slice.call(c);const d=()=>{--p<=0&&u(f)};p||d(),c.forEach(h=>{e.matches(h,this.exclude)?d():this.onIframeReady(h,b=>{l(h)&&(f++,s(b)),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 u=r.compareDocumentPosition(s),c=Node.DOCUMENT_POSITION_PRECEDING;return!!(u&c&&(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,u){let c=!1,p=!1;return u.forEach((f,d)=>{f.val===s&&(c=d,p=f.handled)}),this.compareNodeIframe(r,l,s)?(c!==!1||p?c===!1||p||(u[c].handled=!0):u.push({val:s,handled:!0}),!0):(c===!1&&u.push({val:s,handled:!1}),!1)}handleOpenIframes(r,l,s,u){r.forEach(c=>{c.handled||this.getIframeContents(c.val,p=>{this.createInstanceOnIframe(p).forEachNode(l,s,u)})})}iterateThroughNodes(r,l,s,u,c){const p=this.createIterator(l,r,u);let f,d,h=[],b=[],m=()=>({prevNode:d,node:f}=this.getIteratorNode(p),f);for(;m();)this.iframes&&this.forEachIframe(l,_=>this.checkIframeFilter(f,d,_,h),_=>{this.createInstanceOnIframe(_).forEachNode(r,y=>b.push(y),u)}),b.push(f);b.forEach(_=>{s(_)}),this.iframes&&this.handleOpenIframes(h,r,s,u),c()}forEachNode(r,l,s,u=()=>{}){const c=this.getContexts();let p=c.length;p||u(),c.forEach(f=>{const d=()=>{this.iterateThroughNodes(r,f,l,s,()=>{--p<=0&&u()})};this.iframes?this.waitForIframes(f,d):d()})}}class o{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",u=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(let c in l)if(l.hasOwnProperty(c)){const p=l[c],f=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(c):this.escapeStr(c),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}`),u+`(${this.processSynomyms(f)}|${this.processSynomyms(d)})`+u))}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,u)=>{let c=u.charAt(s+1);return/[(|)\\]/.test(c)||c===""?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 u=[];return r.split("").forEach(c=>{s.every(p=>{if(p.indexOf(c)!==-1){if(u.indexOf(p)>-1)return!1;r=r.replace(new RegExp(`[${p}]`,`gm${l}`),`[${p}]`),u.push(p)}return!0})}),r}createMergedBlanksRegExp(r){return r.replace(/[\s]+/gim,"[\\s]+")}createAccuracyRegExp(r){const l="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿";let s=this.opt.accuracy,u=typeof s=="string"?s:s.value,c=typeof s=="string"?[]:s.limiters,p="";switch(c.forEach(f=>{p+=`|${this.escapeStr(f)}`}),u){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(u=>{u.trim()&&l.indexOf(u)===-1&&l.push(u)}):s.trim()&&l.indexOf(s)===-1&&l.push(s)}),{keywords:l.sort((s,u)=>u.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((u,c)=>u.start-c.start).forEach(u=>{let{start:c,end:p,valid:f}=this.callNoMatchOnInvalidRanges(u,s);f&&(u.start=c,u.length=p-c,l.push(u),s=p)}),l}callNoMatchOnInvalidRanges(r,l){let s,u,c=!1;return r&&r.start!==void 0?(u=(s=parseInt(r.start,10))+parseInt(r.length,10),this.isNumeric(r.start)&&this.isNumeric(r.length)&&u-l>0&&u-s>0?c=!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:u,valid:c}}checkWhitespaceRanges(r,l,s){let u,c=!0,p=s.length,f=l-p,d=parseInt(r.start,10)-f;return(u=(d=d>p?p:d)+parseInt(r.length,10))>p&&(u=p,this.log(`End range automatically set to the max value of ${p}`)),d<0||u-d<0||d>p||u>p?(c=!1,this.log(`Invalid range: ${JSON.stringify(r)}`),this.opt.noMatch(r)):s.substring(d,u).replace(/\s+/g,"")===""&&(c=!1,this.log("Skipping whitespace only range: "+JSON.stringify(r)),this.opt.noMatch(r)),{start:d,end:u,valid:c}}getTextNodes(r){let l="",s=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,u=>{s.push({start:l.length,end:(l+=u.textContent).length,node:u})},u=>this.matchesExclude(u.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 u=this.opt.element?this.opt.element:"mark",c=r.splitText(l),p=c.splitText(s-l);let f=document.createElement(u);return f.setAttribute("data-markjs","true"),this.opt.className&&f.setAttribute("class",this.opt.className),f.textContent=c.textContent,c.parentNode.replaceChild(f,c),p}wrapRangeInMappedTextNode(r,l,s,u,c){r.nodes.every((p,f)=>{const d=r.nodes[f+1];if(d===void 0||d.start>l){if(!u(p.node))return!1;const h=l-p.start,b=(s>p.end?p.end:s)-p.start,m=r.value.substr(0,p.start),_=r.value.substr(b+p.start);if(p.node=this.wrapRangeInTextNode(p.node,h,b),r.value=m+_,r.nodes.forEach((y,g)=>{g>=f&&(r.nodes[g].start>0&&g!==f&&(r.nodes[g].start-=b),r.nodes[g].end-=b)}),s-=b,c(p.node.previousSibling,p.start),!(s>p.end))return!1;l=p.end}return!0})}wrapMatches(r,l,s,u,c){const p=l===0?0:l+1;this.getTextNodes(f=>{f.nodes.forEach(d=>{let h;for(d=d.node;(h=r.exec(d.textContent))!==null&&h[p]!=="";){if(!s(h[p],d))continue;let b=h.index;if(p!==0)for(let m=1;m<p;m++)b+=h[m].length;d=this.wrapRangeInTextNode(d,b,b+h[p].length),u(d.previousSibling),r.lastIndex=0}}),c()})}wrapMatchesAcrossElements(r,l,s,u,c){const p=l===0?0:l+1;this.getTextNodes(f=>{let d;for(;(d=r.exec(f.value))!==null&&d[p]!=="";){let h=d.index;if(p!==0)for(let m=1;m<p;m++)h+=d[m].length;const b=h+d[p].length;this.wrapRangeInMappedTextNode(f,h,b,m=>s(d[p],m),(m,_)=>{r.lastIndex=_,u(m)})}c()})}wrapRangeFromIndex(r,l,s,u){this.getTextNodes(c=>{const p=c.value.length;r.forEach((f,d)=>{let{start:h,end:b,valid:m}=this.checkWhitespaceRanges(f,p,c.value);m&&this.wrapRangeInMappedTextNode(c,h,b,_=>l(_,f,c.value.substring(h,b),d),_=>{s(_,f)})}),u()})}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,u="wrapMatches";const c=p=>{s++,this.opt.each(p)};this.opt.acrossElements&&(u="wrapMatchesAcrossElements"),this[u](r,this.opt.ignoreGroups,(p,f)=>this.opt.filter(f,p,s),c,()=>{s===0&&this.opt.noMatch(r),this.opt.done(s)})}mark(r,l){this.opt=l;let s=0,u="wrapMatches";const{keywords:c,length:p}=this.getSeparatedKeywords(typeof r=="string"?[r]:r),f=this.opt.caseSensitive?"":"i",d=h=>{let b=new RegExp(this.createRegExp(h),`gm${f}`),m=0;this.log(`Searching with expression "${b}"`),this[u](b,1,(_,y)=>this.opt.filter(y,h,s,m),_=>{m++,s++,this.opt.each(_)},()=>{m===0&&this.opt.noMatch(h),c[p-1]===h?this.opt.done(s):d(c[c.indexOf(h)+1])})};this.opt.acrossElements&&(u="wrapMatchesAcrossElements"),p===0?this.opt.done(s):d(c[0])}markRanges(r,l){this.opt=l;let s=0,u=this.checkRanges(r);u&&u.length?(this.log("Starting to mark with the following ranges: "+JSON.stringify(u)),this.wrapRangeFromIndex(u,(c,p,f,d)=>this.opt.filter(c,p,f,d),(c,p)=>{s++,this.opt.each(c,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 u=e.matches(s,l),c=this.matchesExclude(s);return!u||c?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},this.opt.done)}}return function(a){const r=new o(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}})})(xo);var hc=xo.exports;const pc=Cn(hc),mc={props:{infiniteLoader:{type:Boolean,default:!0}},watch:{infiniteLoader(t){t||infiniteLoaderObserver.disconnect()}},data(){return{infiniteLoaderObserver:null}},mounted(){this.infiniteLoader&&(this.infiniteLoaderObserver=new IntersectionObserver(t=>{t.forEach(n=>{n.isIntersecting&&this.$emit("loadMoreOptions")})}),this.infiniteLoaderObserver.observe(this.$refs.infinityLoader))},beforeDestroy(){this.infiniteLoader&&(infiniteLoaderObserver==null||infiniteLoaderObserver.disconnect())},emits:["loadMoreOptions"]},_p="";function To(t){return JSON.parse(JSON.stringify(t))}const gc={name:"IbTreeSelect",inject:["LANG_COMPONENTS"],mixins:[mc],props:{classList:[String,Array],keywordHighlighter:{type:Boolean,default:!0},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 gt()}},options:{type:[Array,Function],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 gt()}},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},disable:{type:Boolean,default:!1},searchDebounce:{type:Number,default:0},alphabeticStyle:{type:Boolean,default:!1}},emits:["close","input","blur","search","resize","submit","clearValue","toggle-bookmarked-option","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=typeof t=="function"?t:To(t)},deep:!0},initialOptions(t){let n=!0;if(typeof t=="function")n=!1;else{const e=[],o=t;Array.prototype.forEach.call(o,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 pc(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,o,a,r,l,s;return this.defaultFilter=u=>{this.marker.unmark();const c=this.filterString.toLowerCase().trim();this.filterFunc.call(this,u,c),c&&this.keywordHighlighter&&this.marker.mark(c)},{initialOptions:typeof this.options=="function"?this.options:To(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",(o=this.LANG_COMPONENTS)==null?void 0:o.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",this.filterString),this.defaultFilter(n)},setPreparedValues(t){let n=t||this.initialOptions;return this.alphabetSort&&(n=n.sort((e,o)=>e.title.toLowerCase().localeCompare(o.title.toLowerCase()))),this.prepare(n).then(([e,o])=>{this.actualOptions=e,this.allOptionsIsChecked=this.checkIfOptionsChecked(e),this.isInitialized=!0,this.selected=o,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={},o=[];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.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),o.push(new Promise(s=>{l.children?this.prepare(l.children).then(([u,c])=>{l.children=u,Object.assign(e,c),s(l)}):s(l)}))}),Promise.all(o).then(l=>{n([l,e])}))).catch(r=>{throw this.isLoading=!1,r})})},filterFunc(t,n){let e=0;return t.forEach(o=>{let a=o.initiallyVisible&&o.title&&o.title.toString().toLowerCase().includes(n)&&!this.actualBookmarkedOptions[o.id];if(o.children&&o.children.length){let r=this.filterFunc(o.children,n);e+=r,r&&(o.isDisabled=r<o.children.length&&!this.isBookmarkable),a?r||(a=!1):a=!!r}o.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 o=Object.keys(this.selected)[0];o&&(this.selected[o].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 o of t)o.id===n&&(o.checked=e),o.children&&this.toggleDuplicateOptions(o.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&&!this.alphabeticStyle},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:Ft,IbIconButton:ut,IbIcon:Le,IbDropdown:ir,IbInput:qr,List:Rr,"select-option":fc},directives:{Tooltip:Wt},beforeUnmount(){document.removeEventListener("mousemove",this.onResize),document.removeEventListener("mouseup",this.endResizing)},inheritAttrs:!1},yc={key:0,class:"tree-select-empty"},vc={key:1,class:"tree-select-default-empty tree-select-empty"},bc={key:5,ref:"infinityLoader"};function _c(t,n,e,o,a,r){const l=i.resolveComponent("ib-alert"),s=i.resolveComponent("ib-icon"),u=i.resolveComponent("ib-icon-button"),c=i.resolveComponent("ib-input"),p=i.resolveComponent("select-option"),f=i.resolveComponent("list"),d=i.resolveComponent("ib-dropdown"),h=i.resolveDirective("tooltip");return i.openBlock(),i.createElementBlock(i.Fragment,null,[e.errorMessage?(i.openBlock(),i.createBlock(l,{key:0,class:"tree-select-error"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.errorMessage),1)]),_:1})):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass(["tree-select",{...e.classList,"tree-select-custom-trigger-content":r.hasTriggerContent}])},[i.createVNode(d,{disabled:a.isLoading||e.disable,"is-resizable":e.isResizable,vertical:a.verticalVal,class:i.normalizeClass({disable:e.disable}),ref:"dropdown",onClose:r.onClose,onOpen:r.onOpen},i.createSlots({body:i.withCtx(()=>[i.createElementVNode("div",{class:i.normalizeClass(["tree-drop",{"not-tree-child":!a.hasTreeChildren}]),style:i.normalizeStyle(r.treeDropPos),role:"listbox"},[e.isResizable?(i.openBlock(),i.createElementBlock("div",{key:0,class:"ib-dropdown-resizer ib-dropdown-resizer-left",onMousedown:n[6]||(n[6]=b=>r.startResizing("left"))},null,32)):i.createCommentVNode("",!0),e.isResizable?i.withDirectives((i.openBlock(),i.createElementBlock("div",{key:1,class:"ib-dropdown-resizer ib-dropdown-resizer-right",onMousedown:n[7]||(n[7]=b=>r.startResizing("right"))},null,544)),[[h,t.lang("resize_list","select"),void 0,{rightCenter:!0}]]):i.createCommentVNode("",!0),r.showSearch?(i.openBlock(),i.createBlock(c,{key:2,class:"tree-search",ref:"search",autocomplete:"off","show-icon":!0,value:a.filterString,debounce:e.searchDebounce,"aria-label":e.searchPlaceholderText?e.searchPlaceholderText:a.actualStrings.searchPlaceholder,placeholder:e.searchPlaceholderText?e.searchPlaceholderText:a.actualStrings.searchPlaceholder,onInput:n[8]||(n[8]=b=>r.filter(b,a.actualOptions)),onKeyup:i.withKeys(r.inputKeyupDown,["down"])},null,8,["value","debounce","aria-label","placeholder","onKeyup"])):i.createCommentVNode("",!0),i.createVNode(f,{ref:"list",role:"listbox",class:i.normalizeClass({"tree-select-list":!0,"has-hierarchy":r.hasHierarchy,"alphabetic-list":e.alphabeticStyle})},{default:i.withCtx(()=>[!r.requiredDependencyNotFilled&&!r.visibleOptionsCount&&r.hasEmptyMessage?(i.openBlock(),i.createElementBlock("div",yc,[i.renderSlot(t.$slots,"emptyMessage")])):!r.requiredDependencyNotFilled&&!r.visibleOptionsCount?(i.openBlock(),i.createElementBlock("div",vc,i.toDisplayString(a.actualStrings.emptyTitle),1)):i.createCommentVNode("",!0),i.withDirectives(i.createElementVNode("div",{class:"tree-select-empty"},i.toDisplayString(a.actualStrings.requiredDependencyNotFilled),513),[[i.vShow,r.requiredDependencyNotFilled]]),!e.isMultiple&&!e.isRequired&&a.actualOptions.length>0?(i.openBlock(),i.createBlock(p,{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,role:"option",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"])):i.createCommentVNode("",!0),Object.keys(a.actualBookmarkedOptions).length>0?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:3},i.renderList(a.actualBookmarkedOptions,b=>(i.openBlock(),i.createBlock(p,{key:"bookmark"+b.id,class:"bookmarked-option",option:b,"parent-auto-check":!1,"is-multiple":e.isMultiple,"is-bookmarkable":!0,"is-bookmarked":!0,role:"option",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)):i.createCommentVNode("",!0),r.requiredDependencyNotFilled?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock(i.Fragment,{key:4},[e.allOptions&&!e.alphabeticStyle&&e.isMultiple&&r.visibleOptionsCount&&!r.requiredDependencyNotFilled?(i.openBlock(),i.createBlock(p,{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,"alphabetic-style":e.alphabeticStyle,role:"option",onCheck:r.manageAll,onOnFocus:n[9]||(n[9]=b=>a.focusedOptionId=b)},null,8,["option","is-toggle","name","is-multiple","uid","only-end-nodes","show-input","alphabetic-style","onCheck"])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.actualOptions,b=>i.renderSlot(t.$slots,a.actualName,{key:e.name+b.value,option:b,parentAutoCheck:e.parentAutoCheck,isMultiple:e.isMultiple,uid:a.uid,onlyEndNodes:e.onlyEndNodes,htmlTitle:e.htmlOptionTitle,showInput:e.showInputs},()=>[i.withDirectives(i.createVNode(p,{option:b,"is-toggle":e.isToggle,name:a.actualName,role:"option","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,"alphabetic-style":e.alphabeticStyle,onCheck:r.registerCheck,onToggleBookmark:r.toggleBookmark,onOnFocus:n[10]||(n[10]=m=>a.focusedOptionId=m)},null,8,["option","is-toggle","name","parent-auto-check","is-multiple","is-bookmarkable","uid","only-end-nodes","html-title","show-input","alphabetic-style","onCheck","onToggleBookmark"]),[[i.vShow,b.visible]])])),128))],64)),t.infiniteLoader?(i.openBlock(),i.createElementBlock("div",bc,null,512)):i.createCommentVNode("",!0)]),_:3},8,["class"])],6)]),_:2},[r.hasTrigger?{name:"trigger",fn:i.withCtx(()=>[i.renderSlot(t.$slots,"trigger",{selectedCount:r.selectedKeys.length})]),key:"0"}:{name:"trigger",fn:i.withCtx(({isOpened:b})=>[i.createElementVNode("div",{role:"combobox",tabindex:"0",class:i.normalizeClass(["tree-choice",{"tree-choice-opened":b,"has-clear-button":e.showClearButton,"tree-choice-error":e.errorMessage}]),ref:"combobox","aria-expanded":b,onClick:n[2]||(n[2]=i.withModifiers(()=>{},["prevent"])),onBlur:n[3]||(n[3]=(...m)=>r.onBlur&&r.onBlur(...m)),onKeyup:[n[4]||(n[4]=i.withKeys((...m)=>r.comboboxKeyupDown&&r.comboboxKeyupDown(...m),["down"])),n[5]||(n[5]=i.withKeys((...m)=>r.comboboxKeyupDown&&r.comboboxKeyupDown(...m),["up"]))],"aria-label":e.ariaLabel,"aria-activedescendant":a.focusedOptionId},[r.hasTriggerContent?i.renderSlot(t.$slots,"triggerContent",{key:0,selectedCount:r.selectedKeys.length,isOpen:b}):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[e.htmlOptionTitle?(i.openBlock(),i.createElementBlock("span",{key:0,class:i.normalizeClass({placeholder:!r.selectStatus}),innerHTML:r.selectStatus||e.placeholder},null,10,["innerHTML"])):(i.openBlock(),i.createElementBlock("span",{key:1,class:i.normalizeClass({placeholder:!r.selectStatus})},i.toDisplayString(r.selectStatus||e.placeholder),3))],64)),e.showClearButton?i.withDirectives((i.openBlock(),i.createBlock(u,{key:2,kind:"ghost",class:"button-clear",onClick:i.withModifiers(r.clearValue,["prevent"]),onKeypress:n[0]||(n[0]=i.withKeys(i.withModifiers(()=>{},["stop","prevent"]),["enter"])),onKeydown:n[1]||(n[1]=i.withKeys(i.withModifiers(()=>{},["stop","prevent"]),["enter"])),onKeyup:i.withKeys(i.withModifiers(r.clearValue,["prevent"]),["enter"]),"help-text":e.clearButtonMessage},{default:i.withCtx(()=>[i.createVNode(s,{name:"close-outline"})]),_:1},8,["onClick","onKeyup","help-text"])),[[i.vShow,Object.keys(a.selected).length]]):i.createCommentVNode("",!0),i.createVNode(s,{name:b?"chevron-up-outline":"chevron-down-outline",classes:"tree-select-caret"},null,8,["name"])],42,["aria-expanded","aria-label","aria-activedescendant"])]),key:"1"}]),1032,["disabled","is-resizable","vertical","class","onClose","onOpen"])],2)],64)}const No=_e(gc,[["render",_c]]),$p="",$c={name:"IbLimitSelector",props:{labelSelect:{type:String,required:!0},value:{type:Number},vertical:{type:String},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:kn,IbSelect:No}},wc={class:"report-limit-selector"};function kc(t,n,e,o,a,r){const l=i.resolveComponent("ib-label"),s=i.resolveComponent("ib-select");return i.openBlock(),i.createElementBlock("div",wc,[i.createVNode(l,null,{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.labelSelect),1)]),_:1}),i.createVNode(s,{classList:"report-limit-selector-select",value:e.value,vertical:e.vertical,options:r.prepareOptions,"is-multiple":!1,"show-clear-button":!1,"aria-label":"Pagination",onInput:r.selectItem},null,8,["value","vertical","options","onInput"])])}const Ao=_e($c,[["render",kc]]),wp="",Cc={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},vertical:{type:String}},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:ut,IbIcon:Le,IbInput:qr,IbLabel:kn,IbLimitSelector:Ao,IbTooltip:ln}},Oc={class:"report-controls"},Ec={class:"repot-pagination"},Sc={class:"pagination-input"},xc={class:"row-count"},Tc={class:"pagination-wrapper"},Nc=["onClick"];function Ac(t,n,e,o,a,r){const l=i.resolveComponent("ib-limit-selector"),s=i.resolveComponent("ib-label"),u=i.resolveComponent("ib-input"),c=i.resolveComponent("ib-icon"),p=i.resolveComponent("ib-tooltip"),f=i.resolveComponent("ib-icon-button");return i.openBlock(),i.createElementBlock("div",Oc,[i.createVNode(l,{onSelect:r.changeLimit,value:a.limitValue,vertical:e.vertical,"label-select":e.labelSelect},null,8,["onSelect","value","vertical","label-select"]),i.createElementVNode("div",Ec,[e.showPaginationInput?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createVNode(s,{for:"goToPage"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.labelInput),1)]),_:1}),i.createElementVNode("div",Sc,[i.createVNode(u,{id:"goToPage",type:"number","hide-number-actions":"",debounce:500,onInput:r.onInput},null,8,["onInput"])])],64)):i.createCommentVNode("",!0),i.createElementVNode("div",xc,i.toDisplayString(r.setCountOfRows+" of "+e.countRows),1),i.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:i.withCtx(()=>[i.createVNode(c,{name:"chevron-back-outline"}),e.tooltipTextPrev?(i.openBlock(),i.createBlock(p,{key:0,text:e.tooltipTextPrev},null,8,["text"])):i.createCommentVNode("",!0)]),_:1},8,["disabled"]),i.createElementVNode("ul",Tc,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.countPagePagination,(d,h)=>i.withDirectives((i.openBlock(),i.createElementBlock("li",{key:h,class:i.normalizeClass(["pagination-item",{active:h+1===a.currentPage,"dots-left":a.indexSpaceLeft===h+1,"dots-right":a.indexSpaceRight===h+1}]),onClick:b=>r.onSelect(h+1)},[i.createElementVNode("button",null,i.toDisplayString(h+1),1)],10,Nc)),[[i.vShow,r.showItem(h+1)]])),128))]),i.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:i.withCtx(()=>[i.createVNode(c,{name:"chevron-forward-outline"}),e.tooltipTextNext?(i.openBlock(),i.createBlock(p,{key:0,text:e.tooltipTextNext},null,8,["text"])):i.createCommentVNode("",!0)]),_:1},8,["disabled"])])])}const Dc=_e(Cc,[["render",Ac]]),On={PROGRESS:"progress",SUCCESS:"success",FAILED:"failed",CANCELING:"canceling",CANCELED:"canceled"},kp="",Pc={props:{states:{type:String,default:On.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===On.SUCCESS?"checkmark-circle":this.states===On.FAILED||this.states===On.CANCELING||this.states===On.CANCELED?"close-circle":""}},components:{IbIcon:Le}},Do=t=>(i.pushScopeId("data-v-a0217859"),t=t(),i.popScopeId(),t),Ic={class:"ib-progress-bar-wrapper"},Mc=["aria-label","aria-valuenow"],Bc=[Do(()=>i.createElementVNode("div",{class:"gradient"},null,-1))],Lc=Do(()=>i.createElementVNode("div",null,null,-1));function Rc(t,n,e,o,a,r){const l=i.resolveComponent("ib-icon");return i.openBlock(),i.createElementBlock("div",Ic,[i.createElementVNode("div",{class:i.normalizeClass(r.classes)},[i.createElementVNode("div",{class:"progress",role:"meter","aria-label":e.ariaLabel,"aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":e.progress,style:i.normalizeStyle({width:e.progress+"%"})},Bc,12,Mc),Lc],2),i.withDirectives(i.createVNode(l,{class:"status-icon",name:r.iconName},null,8,["name"]),[[i.vShow,r.iconName.length]])])}const jc=_e(Pc,[["render",Rc],["__scopeId","data-v-a0217859"]]),Vc={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:`