@avakhula/ui 0.0.163 → 0.0.165
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 +16 -22
- package/dist/index.umd.cjs +1 -1
- package/package.json +1 -1
- package/src/components/TreeSelect/Select.vue +10 -19
package/dist/index.js
CHANGED
|
@@ -3355,11 +3355,7 @@ const eu = {
|
|
|
3355
3355
|
return this.defaultFilter = (d) => {
|
|
3356
3356
|
this.marker.unmark();
|
|
3357
3357
|
const f = this.filterString.toLowerCase().trim();
|
|
3358
|
-
this.
|
|
3359
|
-
this,
|
|
3360
|
-
d,
|
|
3361
|
-
f
|
|
3362
|
-
), f && this.marker.mark(f);
|
|
3358
|
+
this.filterFunc.call(this, d, f), f && this.marker.mark(f);
|
|
3363
3359
|
}, {
|
|
3364
3360
|
val: this.modelValue ? this.modelValue : this.value,
|
|
3365
3361
|
size: {
|
|
@@ -3376,7 +3372,6 @@ const eu = {
|
|
|
3376
3372
|
actualBookmarkedOptions: {},
|
|
3377
3373
|
selected: [],
|
|
3378
3374
|
allOptionsIsChecked: !0,
|
|
3379
|
-
countVisibleChildren: 0,
|
|
3380
3375
|
hasTreeChildren: !1,
|
|
3381
3376
|
uid: `f${(~~(Math.random() * 1e8)).toString(16)}`,
|
|
3382
3377
|
actualStrings: {
|
|
@@ -3453,11 +3448,11 @@ const eu = {
|
|
|
3453
3448
|
return this.alphabetSort && (n = n.sort(
|
|
3454
3449
|
(e, i) => e.title.toLowerCase().localeCompare(i.title.toLowerCase())
|
|
3455
3450
|
)), this.prepare(n).then(([e, i]) => {
|
|
3456
|
-
this.actualOptions = e, this.allOptionsIsChecked = this.checkIfOptionsChecked(e), this.
|
|
3451
|
+
this.actualOptions = e, this.allOptionsIsChecked = this.checkIfOptionsChecked(e), this.isInitialized = !0, this.selected = i, this.setBookmarkedOptions(e);
|
|
3457
3452
|
});
|
|
3458
3453
|
},
|
|
3459
3454
|
clear() {
|
|
3460
|
-
this.actualOptions = [], this.allOptionsIsChecked = !1, this.
|
|
3455
|
+
this.actualOptions = [], this.allOptionsIsChecked = !1, this.selected = [], this.$emit("update:modelValue", null);
|
|
3461
3456
|
},
|
|
3462
3457
|
clearValue() {
|
|
3463
3458
|
this.clear(), this.setPreparedValues();
|
|
@@ -3484,18 +3479,17 @@ const eu = {
|
|
|
3484
3479
|
});
|
|
3485
3480
|
},
|
|
3486
3481
|
filterFunc(t, n) {
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
i.children,
|
|
3482
|
+
t.forEach((e) => {
|
|
3483
|
+
let i = e.initiallyVisible && e.title.toString().toLowerCase().includes(n) && !this.actualBookmarkedOptions[e.id];
|
|
3484
|
+
if (e.children && e.children.length) {
|
|
3485
|
+
let o = this.filterFunc(
|
|
3486
|
+
e.children,
|
|
3493
3487
|
n
|
|
3494
3488
|
);
|
|
3495
|
-
|
|
3489
|
+
o && (e.isChildrenVisible = !!n || !!Object.keys(this.actualBookmarkedOptions).length, e.isDisabled = o < e.children.length && !this.isBookmarkable), i ? o || (i = !1) : i = !!o;
|
|
3496
3490
|
}
|
|
3497
|
-
|
|
3498
|
-
})
|
|
3491
|
+
e.visible = i;
|
|
3492
|
+
});
|
|
3499
3493
|
},
|
|
3500
3494
|
submit() {
|
|
3501
3495
|
this.change();
|
|
@@ -3518,13 +3512,13 @@ const eu = {
|
|
|
3518
3512
|
registerCheck(t, n, e) {
|
|
3519
3513
|
if (n)
|
|
3520
3514
|
if (t.checked = !0, this.isMultiple)
|
|
3521
|
-
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))
|
|
3515
|
+
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)));
|
|
3522
3516
|
else {
|
|
3523
3517
|
const i = Object.keys(this.selected)[0];
|
|
3524
3518
|
i && (this.selected[i].checked = !1), this.selected = { [t.id]: t }, this.change();
|
|
3525
3519
|
}
|
|
3526
3520
|
else
|
|
3527
|
-
delete this.selected[t.id], t.checked = !1, this.$emit("update:modelValue", Object.keys(this.selected)), this.$emit("input", Object.keys(this.selected))
|
|
3521
|
+
delete this.selected[t.id], t.checked = !1, this.$emit("update:modelValue", Object.keys(this.selected)), this.$emit("input", Object.keys(this.selected));
|
|
3528
3522
|
this.toggleDuplicateOptions(this.actualOptions, t.id, n), e && (this.allOptionsIsChecked = this.checkIfOptionsChecked(
|
|
3529
3523
|
this.actualOptions
|
|
3530
3524
|
));
|
|
@@ -3701,9 +3695,9 @@ function ru(t, n, e, i, o, r) {
|
|
|
3701
3695
|
class: ve({ "tree-select-list": !0, "has-hierarchy": r.hasHierarchy })
|
|
3702
3696
|
}, {
|
|
3703
3697
|
default: be(() => [
|
|
3704
|
-
!r.requiredDependencyNotFilled && !
|
|
3698
|
+
!r.requiredDependencyNotFilled && !r.visibleOptionsCount && r.hasEmptyMessage ? (G(), ne("div", tu, [
|
|
3705
3699
|
Te(t.$slots, "emptyMessage")
|
|
3706
|
-
])) : !r.requiredDependencyNotFilled && !
|
|
3700
|
+
])) : !r.requiredDependencyNotFilled && !r.visibleOptionsCount ? (G(), ne("div", nu, we(o.actualStrings.emptyTitle), 1)) : he("", !0),
|
|
3707
3701
|
Ve(ae("div", { class: "tree-select-empty" }, we(o.actualStrings.requiredDependencyNotFilled), 513), [
|
|
3708
3702
|
[Ye, r.requiredDependencyNotFilled]
|
|
3709
3703
|
]),
|
|
@@ -3724,7 +3718,7 @@ function ru(t, n, e, i, o, r) {
|
|
|
3724
3718
|
"show-input": e.showInputs
|
|
3725
3719
|
}, null, 8, ["option", "name", "parent-auto-check", "is-multiple", "onCheck", "onToggleBookmark", "uid", "only-end-nodes", "show-input"])) : he("", !0),
|
|
3726
3720
|
r.requiredDependencyNotFilled ? he("", !0) : (G(), ne(rt, { key: 3 }, [
|
|
3727
|
-
e.allOptions && e.isMultiple &&
|
|
3721
|
+
e.allOptions && e.isMultiple && r.visibleOptionsCount && !r.requiredDependencyNotFilled ? (G(), $e(f, {
|
|
3728
3722
|
key: 0,
|
|
3729
3723
|
option: {
|
|
3730
3724
|
title: o.actualStrings.selectAllOptions,
|
package/dist/index.umd.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* https://markjs.io/
|
|
4
4
|
* Copyright (c) 2014–2018, Julian Kühnel
|
|
5
5
|
* Released under the MIT license https://git.io/vwTVl
|
|
6
|
-
*****************************************************/(function(t,n){(function(e,o){t.exports=o()})(qe,function(){class e{constructor(r,s=!0,l=[],u=5e3){this.ctx=r,this.iframes=s,this.exclude=l,this.iframesTimeout=u}static matches(r,s){const l=typeof s=="string"?[s]:s,u=r.matches||r.matchesSelector||r.msMatchesSelector||r.mozMatchesSelector||r.oMatchesSelector||r.webkitMatchesSelector;if(u){let h=!1;return l.every(p=>!u.call(r,p)||(h=!0,!1)),h}return!1}getContexts(){let r=[];return(this.ctx!==void 0&&this.ctx?NodeList.prototype.isPrototypeOf(this.ctx)?Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?this.ctx:typeof this.ctx=="string"?Array.prototype.slice.call(document.querySelectorAll(this.ctx)):[this.ctx]:[]).forEach(s=>{const l=r.filter(u=>u.contains(s)).length>0;r.indexOf(s)!==-1||l||r.push(s)}),r}getIframeContents(r,s,l=()=>{}){let u;try{const h=r.contentWindow;if(u=h.document,!h||!u)throw new Error("iframe inaccessible")}catch{l()}u&&s(u)}isIframeBlank(r){const s="about:blank",l=r.getAttribute("src").trim();return r.contentWindow.location.href===s&&l!==s&&l}observeIframeLoad(r,s,l){let u=!1,h=null;const p=()=>{if(!u){u=!0,clearTimeout(h);try{this.isIframeBlank(r)||(r.removeEventListener("load",p),this.getIframeContents(r,s,l))}catch{l()}}};r.addEventListener("load",p),h=setTimeout(p,this.iframesTimeout)}onIframeReady(r,s,l){try{r.contentWindow.document.readyState==="complete"?this.isIframeBlank(r)?this.observeIframeLoad(r,s,l):this.getIframeContents(r,s,l):this.observeIframeLoad(r,s,l)}catch{l()}}waitForIframes(r,s){let l=0;this.forEachIframe(r,()=>!0,u=>{l++,this.waitForIframes(u.querySelector("html"),()=>{--l||s()})},u=>{u||s()})}forEachIframe(r,s,l,u=()=>{}){let h=r.querySelectorAll("iframe"),p=h.length,f=0;h=Array.prototype.slice.call(h);const d=()=>{--p<=0&&u(f)};p||d(),h.forEach(c=>{e.matches(c,this.exclude)?d():this.onIframeReady(c,$=>{s(c)&&(f++,l($)),d()},d)})}createIterator(r,s,l){return document.createNodeIterator(r,s,l,!1)}createInstanceOnIframe(r){return new e(r.querySelector("html"),this.iframes)}compareNodeIframe(r,s,l){const u=r.compareDocumentPosition(l),h=Node.DOCUMENT_POSITION_PRECEDING;return!!(u&h&&(s===null||s.compareDocumentPosition(l)&Node.DOCUMENT_POSITION_FOLLOWING))}getIteratorNode(r){const s=r.previousNode();return{prevNode:s,node:(s===null||r.nextNode())&&r.nextNode()}}checkIframeFilter(r,s,l,u){let h=!1,p=!1;return u.forEach((f,d)=>{f.val===l&&(h=d,p=f.handled)}),this.compareNodeIframe(r,s,l)?(h!==!1||p?h===!1||p||(u[h].handled=!0):u.push({val:l,handled:!0}),!0):(h===!1&&u.push({val:l,handled:!1}),!1)}handleOpenIframes(r,s,l,u){r.forEach(h=>{h.handled||this.getIframeContents(h.val,p=>{this.createInstanceOnIframe(p).forEachNode(s,l,u)})})}iterateThroughNodes(r,s,l,u,h){const p=this.createIterator(s,r,u);let f,d,c=[],$=[],v=()=>({prevNode:d,node:f}=this.getIteratorNode(p),f);for(;v();)this.iframes&&this.forEachIframe(s,b=>this.checkIframeFilter(f,d,b,c),b=>{this.createInstanceOnIframe(b).forEachNode(r,g=>$.push(g),u)}),$.push(f);$.forEach(b=>{l(b)}),this.iframes&&this.handleOpenIframes(c,r,l,u),h()}forEachNode(r,s,l,u=()=>{}){const h=this.getContexts();let p=h.length;p||u(),h.forEach(f=>{const d=()=>{this.iterateThroughNodes(r,f,s,l,()=>{--p<=0&&u()})};this.iframes?this.waitForIframes(f,d):d()})}}class o{constructor(r){this.ctx=r,this.ie=!1;const s=window.navigator.userAgent;(s.indexOf("MSIE")>-1||s.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,s="debug"){const l=this.opt.log;this.opt.debug&&typeof l=="object"&&typeof l[s]=="function"&&l[s](`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 s=this.opt.synonyms,l=this.opt.caseSensitive?"":"i",u=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(let h in s)if(s.hasOwnProperty(h)){const p=s[h],f=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(h):this.escapeStr(h),d=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(p):this.escapeStr(p);f!==""&&d!==""&&(r=r.replace(new RegExp(`(${this.escapeStr(f)}|${this.escapeStr(d)})`,`gm${l}`),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,s=>s.charAt(0)==="\\"?"?":"")).replace(/(?:\\)*\*/g,s=>s.charAt(0)==="\\"?"*":"")}createWildcardsRegExp(r){let s=this.opt.wildcards==="withSpaces";return r.replace(/\u0001/g,s?"[\\S\\s]?":"\\S?").replace(/\u0002/g,s?"[\\S\\s]*?":"\\S*")}setupIgnoreJoinersRegExp(r){return r.replace(/[^(|)\\]/g,(s,l,u)=>{let h=u.charAt(l+1);return/[(|)\\]/.test(h)||h===""?s:s+"\0"})}createJoinersRegExp(r){let s=[];const l=this.opt.ignorePunctuation;return Array.isArray(l)&&l.length&&s.push(this.escapeStr(l.join(""))),this.opt.ignoreJoiners&&s.push("\\u00ad\\u200b\\u200c\\u200d"),s.length?r.split(/\u0000+/).join(`[${s.join("")}]*`):r}createDiacriticsRegExp(r){const s=this.opt.caseSensitive?"":"i",l=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(h=>{l.every(p=>{if(p.indexOf(h)!==-1){if(u.indexOf(p)>-1)return!1;r=r.replace(new RegExp(`[${p}]`,`gm${s}`),`[${p}]`),u.push(p)}return!0})}),r}createMergedBlanksRegExp(r){return r.replace(/[\s]+/gim,"[\\s]+")}createAccuracyRegExp(r){const s="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿";let l=this.opt.accuracy,u=typeof l=="string"?l:l.value,h=typeof l=="string"?[]:l.limiters,p="";switch(h.forEach(f=>{p+=`|${this.escapeStr(f)}`}),u){case"partially":default:return`()(${r})`;case"complementary":return`()([^${p="\\s"+(p||this.escapeStr(s))}]*${r}[^${p}]*)`;case"exactly":return`(^|\\s${p})(${r})(?=$|\\s${p})`}}getSeparatedKeywords(r){let s=[];return r.forEach(l=>{this.opt.separateWordSearch?l.split(" ").forEach(u=>{u.trim()&&s.indexOf(u)===-1&&s.push(u)}):l.trim()&&s.indexOf(l)===-1&&s.push(l)}),{keywords:s.sort((l,u)=>u.length-l.length),length:s.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 s=[];let l=0;return r.sort((u,h)=>u.start-h.start).forEach(u=>{let{start:h,end:p,valid:f}=this.callNoMatchOnInvalidRanges(u,l);f&&(u.start=h,u.length=p-h,s.push(u),l=p)}),s}callNoMatchOnInvalidRanges(r,s){let l,u,h=!1;return r&&r.start!==void 0?(u=(l=parseInt(r.start,10))+parseInt(r.length,10),this.isNumeric(r.start)&&this.isNumeric(r.length)&&u-s>0&&u-l>0?h=!0:(this.log(`Ignoring invalid or overlapping range: ${JSON.stringify(r)}`),this.opt.noMatch(r))):(this.log(`Ignoring invalid range: ${JSON.stringify(r)}`),this.opt.noMatch(r)),{start:l,end:u,valid:h}}checkWhitespaceRanges(r,s,l){let u,h=!0,p=l.length,f=s-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?(h=!1,this.log(`Invalid range: ${JSON.stringify(r)}`),this.opt.noMatch(r)):l.substring(d,u).replace(/\s+/g,"")===""&&(h=!1,this.log("Skipping whitespace only range: "+JSON.stringify(r)),this.opt.noMatch(r)),{start:d,end:u,valid:h}}getTextNodes(r){let s="",l=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,u=>{l.push({start:s.length,end:(s+=u.textContent).length,node:u})},u=>this.matchesExclude(u.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT,()=>{r({value:s,nodes:l})})}matchesExclude(r){return e.matches(r,this.opt.exclude.concat(["script","style","title","head","html"]))}wrapRangeInTextNode(r,s,l){const u=this.opt.element?this.opt.element:"mark",h=r.splitText(s),p=h.splitText(l-s);let f=document.createElement(u);return f.setAttribute("data-markjs","true"),this.opt.className&&f.setAttribute("class",this.opt.className),f.textContent=h.textContent,h.parentNode.replaceChild(f,h),p}wrapRangeInMappedTextNode(r,s,l,u,h){r.nodes.every((p,f)=>{const d=r.nodes[f+1];if(d===void 0||d.start>s){if(!u(p.node))return!1;const c=s-p.start,$=(l>p.end?p.end:l)-p.start,v=r.value.substr(0,p.start),b=r.value.substr($+p.start);if(p.node=this.wrapRangeInTextNode(p.node,c,$),r.value=v+b,r.nodes.forEach((g,y)=>{y>=f&&(r.nodes[y].start>0&&y!==f&&(r.nodes[y].start-=$),r.nodes[y].end-=$)}),l-=$,h(p.node.previousSibling,p.start),!(l>p.end))return!1;s=p.end}return!0})}wrapMatches(r,s,l,u,h){const p=s===0?0:s+1;this.getTextNodes(f=>{f.nodes.forEach(d=>{let c;for(d=d.node;(c=r.exec(d.textContent))!==null&&c[p]!=="";){if(!l(c[p],d))continue;let $=c.index;if(p!==0)for(let v=1;v<p;v++)$+=c[v].length;d=this.wrapRangeInTextNode(d,$,$+c[p].length),u(d.previousSibling),r.lastIndex=0}}),h()})}wrapMatchesAcrossElements(r,s,l,u,h){const p=s===0?0:s+1;this.getTextNodes(f=>{let d;for(;(d=r.exec(f.value))!==null&&d[p]!=="";){let c=d.index;if(p!==0)for(let v=1;v<p;v++)c+=d[v].length;const $=c+d[p].length;this.wrapRangeInMappedTextNode(f,c,$,v=>l(d[p],v),(v,b)=>{r.lastIndex=b,u(v)})}h()})}wrapRangeFromIndex(r,s,l,u){this.getTextNodes(h=>{const p=h.value.length;r.forEach((f,d)=>{let{start:c,end:$,valid:v}=this.checkWhitespaceRanges(f,p,h.value);v&&this.wrapRangeInMappedTextNode(h,c,$,b=>s(b,f,h.value.substring(c,$),d),b=>{l(b,f)})}),u()})}unwrapMatches(r){const s=r.parentNode;let l=document.createDocumentFragment();for(;r.firstChild;)l.appendChild(r.removeChild(r.firstChild));s.replaceChild(l,r),this.ie?this.normalizeTextNode(s):s.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,s){this.opt=s,this.log(`Searching with expression "${r}"`);let l=0,u="wrapMatches";const h=p=>{l++,this.opt.each(p)};this.opt.acrossElements&&(u="wrapMatchesAcrossElements"),this[u](r,this.opt.ignoreGroups,(p,f)=>this.opt.filter(f,p,l),h,()=>{l===0&&this.opt.noMatch(r),this.opt.done(l)})}mark(r,s){this.opt=s;let l=0,u="wrapMatches";const{keywords:h,length:p}=this.getSeparatedKeywords(typeof r=="string"?[r]:r),f=this.opt.caseSensitive?"":"i",d=c=>{let $=new RegExp(this.createRegExp(c),`gm${f}`),v=0;this.log(`Searching with expression "${$}"`),this[u]($,1,(b,g)=>this.opt.filter(g,c,l,v),b=>{v++,l++,this.opt.each(b)},()=>{v===0&&this.opt.noMatch(c),h[p-1]===c?this.opt.done(l):d(h[h.indexOf(c)+1])})};this.opt.acrossElements&&(u="wrapMatchesAcrossElements"),p===0?this.opt.done(l):d(h[0])}markRanges(r,s){this.opt=s;let l=0,u=this.checkRanges(r);u&&u.length?(this.log("Starting to mark with the following ranges: "+JSON.stringify(u)),this.wrapRangeFromIndex(u,(h,p,f,d)=>this.opt.filter(h,p,f,d),(h,p)=>{l++,this.opt.each(h,p)},()=>{this.opt.done(l)})):this.opt.done(l)}unmark(r){this.opt=r;let s=this.opt.element?this.opt.element:"*";s+="[data-markjs]",this.opt.className&&(s+=`.${this.opt.className}`),this.log(`Removal selector "${s}"`),this.iterator.forEachNode(NodeFilter.SHOW_ELEMENT,l=>{this.unwrapMatches(l)},l=>{const u=e.matches(l,s),h=this.matchesExclude(l);return!u||h?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},this.opt.done)}}return function(a){const r=new o(a);return this.mark=(s,l)=>(r.mark(s,l),this),this.markRegExp=(s,l)=>(r.markRegExp(s,l),this),this.markRanges=(s,l)=>(r.markRanges(s,l),this),this.unmark=s=>(r.unmark(s),this),this}})})(Ni);var Ts=Ni.exports;const As=jn(Ts),c1="",Ds={name:"IbTreeSelect",inject:["LANG_COMPONENTS"],props:{classList:[String,Array],placeholder:{type:String,default:""},searchPlaceholderText:{type:String,default:""},clearButtonMessage:{type:String,default:""},showClearButton:{type:Boolean,default:!0},isResizable:{type:Boolean,default:!1},initialSize:{left:0,right:0},ariaLabel:{type:String,default:""},name:String,id:{type:String,default(){return mt()}},options:{default(){return[]}},modelValue:{type:[Number,String,Array]},value:{type:[Number,String,Array],default(){return[]}},maxSelectedNames:{type:Number,default:2},isMultiple:{type:Boolean,default:!0},parentAutoCheck:{type:Boolean,default:!0},strings:{type:Object,default(){return{}}},onlyEndNodes:{type:Boolean,default:!1},isRequired:{type:Boolean,default:!0},htmlOptionTitle:{type:Boolean,default:!1},isBookmarkable:{type:Boolean,default:!1},initBookmarks:{type:Array,default:()=>[]},showInputs:{type:Boolean,default(t){return t.isMultiple}},dependency:{type:String},filterId:{type:String,default(){return mt()}},staticPlaceholder:{type:Boolean,default:!1},useSearch:{type:Boolean,default:!1},isWatching:{type:Boolean,default:!1},vertical:{type:String},emptyMessage:{type:String,default:""},errorMessage:{type:String,default:""},allOptions:{type:Boolean,default:!0},watchClearValue:{type:Boolean,default:!1},isToggle:{type:Boolean,default:!1},alphabetSort:{type:Boolean,default:!1}},emits:["close","input","search","resize","submit","update:modelValue"],watch:{value(t){this.val=t,this.setPreparedValues()},modelValue(t){this.val=t,this.actualOptions=[],this.setPreparedValues()},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(){let t=!0;if(typeof this.options=="function")t=!1;else{const n=[],e=this.options;Array.prototype.forEach.call(e,o=>{o.id!==void 0&&n.push(o.id)}),t=JSON.stringify(n)===JSON.stringify(this.optionsIdsWatch),this.optionsIdsWatch=n}(this.isInitialized&&!t||this.isWatching)&&this.setPreparedValues().then(()=>{const n=Object.keys(this.selected);this.$globalEvents.$emit("select-"+this.filterId+":update",{values:n,filter:this.filterId})})},dependency(t,n){this.$nextTick(()=>{this.registerDependency(n)})},initBookmarks(){this.actualBookmarkedOptions={},this.setBookmarkedOptions(this.actualOptions)}},mounted(){this.marker=new As(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,s,l;return this.defaultFilter=u=>{this.marker.unmark();const h=this.filterString.toLowerCase().trim();this.countVisibleChildren=this.filterFunc.call(this,u,h),h&&this.marker.mark(h)},{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:[],allOptionsIsChecked:!0,countVisibleChildren:0,hasTreeChildren:!1,uid:`f${(~~(Math.random()*1e8)).toString(16)}`,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",(s=this.LANG_COMPONENTS)==null?void 0:s.COMPONENT_SELECT),requiredDependencyNotFilled:this.requiredDependencyNotFilled||lang("required_dependency_are_not_filled",(l=this.LANG_COMPONENTS)==null?void 0:l.COMPONENT_SELECT),...this.strings},dependencyValue:null}},methods:{startResizing(t){this.resizingProp=t},endResizing(){this.resizingProp&&(this.resizingProp=null,this.$emit("resize",this.size))},onResize(t){switch(this.resizingProp){case"left":this.size.left=Math.max(this.size.left-t.movementX,0);break;case"right":this.size.right=Math.max(this.size.right+t.movementX,0);break}},registerDependency(t){this.dependency?(this.$globalEvents.$on("select-"+this.dependency+":update",n=>{this.clear(),this.dependencyValue=n,this.dependencyValue&&this.dependencyValue.values&&(!Array.isArray(this.dependencyValue.values)||this.dependencyValue.values.length)&&this.setPreparedValues()}),this.isLoading=!1):(this.$globalEvents.$off("select-"+t+":update"),this.setPreparedValues().then(()=>{const n=Object.keys(this.selected);this.$globalEvents.$emit("select-"+this.filterId+":update",{values:n,filter:this.filterId})}))},filter(t,n){this.filterString=t,this.$emit("search",{search:this.filterString}),this.defaultFilter(n)},setPreparedValues(t){let n=t||this.options;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.countVisibleChildren=e.length,this.isInitialized=!0,this.selected=o,this.setBookmarkedOptions(e)})},clear(){this.actualOptions=[],this.allOptionsIsChecked=!1,this.countVisibleChildren=0,this.selected=[],this.$emit("update:modelValue",null)},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(s=>{s.initiallyVisible=typeof s.visible>"u"?!0:s.visible,s.visible=s.initiallyVisible,s.isDisabled=!1,s.checked=this.isMultiple?this.val!==null&&this.val.findIndex(l=>s.id==l)>-1:this.val!==null&&this.val==s.id,s.checked&&(!this.onlyEndNodes||!s.children)&&(e[s.id]=s),s.children&&(this.hasTreeChildren=!0,s.isChildrenVisible=!1),o.push(new Promise(l=>{s.children?this.prepare(s.children).then(([u,h])=>{s.children=u,Object.assign(e,h),l(s)}):l(s)}))}),Promise.all(o).then(s=>{n([s,e])}))).catch(r=>{throw this.isLoading=!1,r})})},filterFunc(t,n){let e=0;return t.forEach(o=>{let a=o.initiallyVisible&&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.isChildrenVisible=!!n||!!Object.keys(this.actualBookmarkedOptions).length,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)},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)),console.log("test 1"));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)),console.log("test 2");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=>{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.filter("",this.options),this.isMultiple?this.$emit("close",Object.keys(this.selected)):this.$emit("close",Object.keys(this.selected)[0])}},computed:{hasTrigger(){return!!this.$slots.trigger},hasEmptyMessage(){return!!this.$slots.emptyMessage},hasHierarchy(){return this.actualOptions.some(t=>t.children)},selectedKeys(){return Object.keys(this.selected).filter(t=>{if(!this.onlyEndNodes||!this.selected[t].children)return!0})},selectStatus(){return this.staticPlaceholder?this.placeholder:this.isLoading?this.actualStrings.loading:this.selectedKeys.length?this.selectedKeys.length<this.maxSelectedNames?this.selectedKeys.map(t=>this.selected[t].title).join(","):this.selectedKeys.length<this.optionsCount?this.actualStrings.selectedCount.replace("{selected}",this.selectedKeys.length).replace("{all}",this.optionsCount):this.actualStrings.allSelected:this.emptyMessage},isEmpty(){return Array.isArray(this.value)?!this.value.length:!this.value},requiredDependencyNotFilled(){return this.dependency&&(!this.dependencyValue||!this.dependencyValue.values||!this.dependencyValue.values.length)},showSearch(){return this.useSearch||this.optionsCount>10},arrayOfOptions(){return this.getArrayOptions(this.actualOptions)},optionsCount(){let t=[];for(let n of this.arrayOfOptions)(!this.onlyEndNodes||!n.children)&&!t.includes(n.id)&&t.push(n.id);return t.length},visibleOptionsCount(){let t=[];return this.traverseTree(this.actualOptions,n=>{(!this.onlyEndNodes||!n.children)&&!t.includes(n.id)&&n.visible&&t.push(n.id)}),t.length+(this.isBookmarkable?Object.keys(this.actualBookmarkedOptions).length:0)}},components:{IbAlert:Mt,IbIconButton:ut,IbIcon:Le,IbDropdown:Ln,IbInput:yr,List:pr,"select-option":xs},beforeUnmount(){document.removeEventListener("mousemove",this.onResize),document.removeEventListener("mouseup",this.endResizing)}},Is={key:0,class:"tree-select-empty"},Ms={key:1,class:"tree-select-default-empty tree-select-empty"};function Ps(t,n,e,o,a,r){const s=i.resolveComponent("ib-alert"),l=i.resolveComponent("ib-icon"),u=i.resolveComponent("ib-icon-button"),h=i.resolveComponent("select-option"),p=i.resolveComponent("list"),f=i.resolveComponent("ib-input"),d=i.resolveComponent("ib-dropdown");return i.openBlock(),i.createElementBlock(i.Fragment,null,[e.errorMessage?(i.openBlock(),i.createBlock(s,{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])},[i.createVNode(d,{disabled:a.isLoading,"is-resizable":e.isResizable,vertical:e.vertical,onClose:r.onClose,ref:"dropdown"},i.createSlots({body:i.withCtx(()=>[i.createElementVNode("div",{class:i.normalizeClass(["tree-drop",{"not-tree-child":!a.hasTreeChildren}]),style:i.normalizeStyle({width:"auto",position:"absolute",left:-a.size.left+"px",right:-a.size.right+"px"})},[e.isResizable?(i.openBlock(),i.createElementBlock("div",{key:0,class:"ib-dropdown-resizer ib-dropdown-resizer-left",onMousedown:n[1]||(n[1]=c=>r.startResizing("left"))},null,32)):i.createCommentVNode("",!0),e.isResizable?(i.openBlock(),i.createElementBlock("div",{key:1,class:"ib-dropdown-resizer ib-dropdown-resizer-right",onMousedown:n[2]||(n[2]=c=>r.startResizing("right"))},null,32)):i.createCommentVNode("",!0),Object.keys(a.actualBookmarkedOptions).length>0?(i.openBlock(),i.createBlock(p,{key:2,class:i.normalizeClass({"has-hierarchy":r.hasHierarchy})},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.actualBookmarkedOptions,c=>(i.openBlock(),i.createBlock(h,{key:"bookmark"+c.id,option:c,"parent-auto-check":!1,"is-multiple":e.isMultiple,"is-bookmarkable":!0,"is-bookmarked":!0,onCheck:r.registerCheck,onToggleBookmark:r.toggleBookmark,uid:a.uid,"only-end-nodes":e.onlyEndNodes,"html-title":e.htmlOptionTitle,"show-input":e.showInputs},null,8,["option","is-multiple","onCheck","onToggleBookmark","uid","only-end-nodes","html-title","show-input"]))),128))]),_:1},8,["class"])):i.createCommentVNode("",!0),r.showSearch?(i.openBlock(),i.createBlock(f,{key:3,class:"tree-search","show-icon":!0,value:a.filterString,placeholder:e.searchPlaceholderText?e.searchPlaceholderText:a.actualStrings.searchPlaceholder,onInput:n[3]||(n[3]=c=>r.filter(c,a.actualOptions))},null,8,["value","placeholder"])):i.createCommentVNode("",!0),i.createVNode(p,{ref:"list",class:i.normalizeClass({"tree-select-list":!0,"has-hierarchy":r.hasHierarchy})},{default:i.withCtx(()=>[!r.requiredDependencyNotFilled&&!a.countVisibleChildren&&r.hasEmptyMessage?(i.openBlock(),i.createElementBlock("div",Is,[i.renderSlot(t.$slots,"emptyMessage")])):!r.requiredDependencyNotFilled&&!a.countVisibleChildren?(i.openBlock(),i.createElementBlock("div",Ms,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(h,{key:2,option:{title:t.lang("none","select"),id:null,checked:r.isEmpty},name:a.actualName,"parent-auto-check":e.parentAutoCheck,"is-multiple":e.isMultiple,onCheck:r.registerCheck,onToggleBookmark:r.toggleBookmark,uid:a.uid,"only-end-nodes":e.onlyEndNodes,"show-input":e.showInputs},null,8,["option","name","parent-auto-check","is-multiple","onCheck","onToggleBookmark","uid","only-end-nodes","show-input"])):i.createCommentVNode("",!0),r.requiredDependencyNotFilled?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock(i.Fragment,{key:3},[e.allOptions&&e.isMultiple&&a.countVisibleChildren&&!r.requiredDependencyNotFilled?(i.openBlock(),i.createBlock(h,{key:0,option:{title:a.actualStrings.selectAllOptions,id:"!all!",initiallyVisible:!0,visible:!0,isDisabled:r.visibleOptionsCount<r.optionsCount,checked:a.allOptionsIsChecked,isIndeterminate:!!Object.keys(a.selected).length},"is-toggle":e.isToggle,name:a.actualName,"parent-auto-check":!1,"is-multiple":e.isMultiple,"is-bookmarkable":!1,onCheck:r.manageAll,uid:a.uid,"only-end-nodes":e.onlyEndNodes,"show-input":e.showInputs},null,8,["option","is-toggle","name","is-multiple","onCheck","uid","only-end-nodes","show-input"])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.actualOptions,c=>i.renderSlot(t.$slots,a.actualName,{key:e.name+c.value,option:c,parentAutoCheck:e.parentAutoCheck,isMultiple:e.isMultiple,uid:a.uid,onlyEndNodes:e.onlyEndNodes,htmlTitle:e.htmlOptionTitle,showInput:e.showInputs},()=>[i.withDirectives(i.createVNode(h,{option:c,"is-toggle":e.isToggle,name:a.actualName,"parent-auto-check":e.parentAutoCheck,"is-multiple":e.isMultiple,"is-bookmarkable":e.isBookmarkable,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-toggle","name","parent-auto-check","is-multiple","is-bookmarkable","onCheck","onToggleBookmark","uid","only-end-nodes","html-title","show-input"]),[[i.vShow,c.visible]])])),128))],64))]),_: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:c})=>[i.createElementVNode("div",{role:"combobox",tabindex:"0",class:i.normalizeClass(["tree-choice",{"tree-choice-opened":c,"has-clear-button":!e.showClearButton,"tree-choice-error":e.errorMessage}]),onClick:n[0]||(n[0]=i.withModifiers(()=>{},["prevent"])),"aria-label":e.ariaLabel,"aria-expanded":c},[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))],10,["aria-label","aria-expanded"]),e.showClearButton?i.withDirectives((i.openBlock(),i.createBlock(u,{key:0,kind:"ghost",class:"button-clear",onClick:i.withModifiers(r.clearValue,["prevent"]),"help-text":e.clearButtonMessage},{default:i.withCtx(()=>[i.createVNode(l,{name:"close-outline"})]),_:1},8,["onClick","help-text"])),[[i.vShow,Object.keys(a.selected).length]]):i.createCommentVNode("",!0),i.createVNode(l,{name:c?"chevron-up-outline":"chevron-down-outline",classes:"tree-select-caret"},null,8,["name"])]),key:"1"}]),1032,["disabled","is-resizable","vertical","onClose"])],2)],64)}const xi=_e(Ds,[["render",Ps]]),u1="",Bs={name:"IbLimitSelector",props:{labelSelect:{type:String,required:!0},value:{type:Number},options:{type:Array,default:()=>[10,25,50,100]}},watch(t){this.selected=t},data(){return{selected:this.value}},methods:{selectItem(t){this.selected=t,this.onChange(t)},onChange(t){Number.isInteger(+t)&&this.$emit("select",+t)}},computed:{prepareOptions(){return this.options.map(t=>({id:t,title:t}))}},components:{IbLabel:dn,IbSelect:xi}},Ls={class:"report-limit-selector"};function Rs(t,n,e,o,a,r){const s=i.resolveComponent("ib-label"),l=i.resolveComponent("ib-select");return i.openBlock(),i.createElementBlock("div",Ls,[i.createVNode(s,null,{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.labelSelect),1)]),_:1}),i.createVNode(l,{classList:"report-limit-selector-select",value:e.value,options:r.prepareOptions,"is-multiple":!1,"show-clear-button":!1,onInput:r.selectItem},null,8,["value","options","onInput"])])}const Ti=_e(Bs,[["render",Rs]]),f1="",js={name:"IbPagination",props:{tooltipTextPrev:{type:String},tooltipTextNext:{type:String},labelInput:{type:String},labelSelect:{type:String,required:!0},countRows:{type:Number,required:!0},pageCount:{type:Number,default:null},current:{type:Number,default:1},limitSelector:{type:Number,default:10},showPaginationInput:{type:Boolean,default:!0}},data(){return{currentPage:this.current,indexSpaceLeft:null,indexSpaceRight:null,limitValue:this.limitSelector}},watch:{current(t){this.onSelect(t)},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:yr,IbLabel:dn,IbLimitSelector:Ti,IbTooltip:Ot}},Vs={class:"report-controls"},qs={class:"repot-pagination"},Fs={class:"pagination-input"},Hs={class:"row-count"},zs={class:"pagination-wrapper"},Us=["onClick"];function Ks(t,n,e,o,a,r){const s=i.resolveComponent("ib-limit-selector"),l=i.resolveComponent("ib-label"),u=i.resolveComponent("ib-input"),h=i.resolveComponent("ib-icon"),p=i.resolveComponent("ib-tooltip"),f=i.resolveComponent("ib-icon-button");return i.openBlock(),i.createElementBlock("div",Vs,[i.createVNode(s,{onSelect:r.changeLimit,value:a.limitValue,"label-select":e.labelSelect},null,8,["onSelect","value","label-select"]),i.createElementVNode("div",qs,[e.showPaginationInput?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createVNode(l,null,{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.labelInput),1)]),_:1}),i.createElementVNode("div",Fs,[i.createVNode(u,{type:"number",debounce:500,onInput:r.onInput},null,8,["onInput"])])],64)):i.createCommentVNode("",!0),i.createElementVNode("div",Hs,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(h,{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",zs,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.countPagePagination,(d,c)=>i.withDirectives((i.openBlock(),i.createElementBlock("li",{key:c,class:i.normalizeClass(["pagination-item",{active:c+1===a.currentPage,"dots-left":a.indexSpaceLeft===c+1,"dots-right":a.indexSpaceRight===c+1}]),onClick:$=>r.onSelect(c+1)},[i.createElementVNode("button",null,i.toDisplayString(c+1),1)],10,Us)),[[i.vShow,r.showItem(c+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(h,{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 Gs=_e(js,[["render",Ks]]),cn={PROGRESS:"progress",SUCCESS:"success",FAILED:"failed",CANCELING:"canceling",CANCELED:"canceled"},h1="",Ys={props:{states:{type:String,default:cn.PROGRESS},progress:{type:[String,Number],default:0}},computed:{classes(){const t=["ib-progress-bar"];return t.push(`progress-bar-${this.states}`),t},iconName(){return this.states===cn.SUCCESS?"checkmark-circle":this.states===cn.FAILED||this.states===cn.CANCELING||this.states===cn.CANCELED?"close-circle":""}},components:{IbIcon:Le}},Ai=t=>(i.pushScopeId("data-v-2737cf5e"),t=t(),i.popScopeId(),t),Ws={class:"ib-progress-bar-wrapper"},Zs=[Ai(()=>i.createElementVNode("div",{class:"gradient"},null,-1))],Js=Ai(()=>i.createElementVNode("div",null,null,-1));function Xs(t,n,e,o,a,r){const s=i.resolveComponent("ib-icon");return i.openBlock(),i.createElementBlock("div",Ws,[i.createElementVNode("div",{class:i.normalizeClass(r.classes)},[i.createElementVNode("div",{class:"progress",style:i.normalizeStyle({width:e.progress+"%"})},Zs,4),Js],2),i.withDirectives(i.createVNode(s,{class:"status-icon",name:r.iconName},null,8,["name"]),[[i.vShow,r.iconName.length]])])}const Qs=_e(Ys,[["render",Xs],["__scopeId","data-v-2737cf5e"]]),ed={new:`<svg width="11" height="11" viewBox="0 0 11 11" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
6
|
+
*****************************************************/(function(t,n){(function(e,o){t.exports=o()})(qe,function(){class e{constructor(r,s=!0,l=[],u=5e3){this.ctx=r,this.iframes=s,this.exclude=l,this.iframesTimeout=u}static matches(r,s){const l=typeof s=="string"?[s]:s,u=r.matches||r.matchesSelector||r.msMatchesSelector||r.mozMatchesSelector||r.oMatchesSelector||r.webkitMatchesSelector;if(u){let h=!1;return l.every(p=>!u.call(r,p)||(h=!0,!1)),h}return!1}getContexts(){let r=[];return(this.ctx!==void 0&&this.ctx?NodeList.prototype.isPrototypeOf(this.ctx)?Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?this.ctx:typeof this.ctx=="string"?Array.prototype.slice.call(document.querySelectorAll(this.ctx)):[this.ctx]:[]).forEach(s=>{const l=r.filter(u=>u.contains(s)).length>0;r.indexOf(s)!==-1||l||r.push(s)}),r}getIframeContents(r,s,l=()=>{}){let u;try{const h=r.contentWindow;if(u=h.document,!h||!u)throw new Error("iframe inaccessible")}catch{l()}u&&s(u)}isIframeBlank(r){const s="about:blank",l=r.getAttribute("src").trim();return r.contentWindow.location.href===s&&l!==s&&l}observeIframeLoad(r,s,l){let u=!1,h=null;const p=()=>{if(!u){u=!0,clearTimeout(h);try{this.isIframeBlank(r)||(r.removeEventListener("load",p),this.getIframeContents(r,s,l))}catch{l()}}};r.addEventListener("load",p),h=setTimeout(p,this.iframesTimeout)}onIframeReady(r,s,l){try{r.contentWindow.document.readyState==="complete"?this.isIframeBlank(r)?this.observeIframeLoad(r,s,l):this.getIframeContents(r,s,l):this.observeIframeLoad(r,s,l)}catch{l()}}waitForIframes(r,s){let l=0;this.forEachIframe(r,()=>!0,u=>{l++,this.waitForIframes(u.querySelector("html"),()=>{--l||s()})},u=>{u||s()})}forEachIframe(r,s,l,u=()=>{}){let h=r.querySelectorAll("iframe"),p=h.length,f=0;h=Array.prototype.slice.call(h);const d=()=>{--p<=0&&u(f)};p||d(),h.forEach(c=>{e.matches(c,this.exclude)?d():this.onIframeReady(c,$=>{s(c)&&(f++,l($)),d()},d)})}createIterator(r,s,l){return document.createNodeIterator(r,s,l,!1)}createInstanceOnIframe(r){return new e(r.querySelector("html"),this.iframes)}compareNodeIframe(r,s,l){const u=r.compareDocumentPosition(l),h=Node.DOCUMENT_POSITION_PRECEDING;return!!(u&h&&(s===null||s.compareDocumentPosition(l)&Node.DOCUMENT_POSITION_FOLLOWING))}getIteratorNode(r){const s=r.previousNode();return{prevNode:s,node:(s===null||r.nextNode())&&r.nextNode()}}checkIframeFilter(r,s,l,u){let h=!1,p=!1;return u.forEach((f,d)=>{f.val===l&&(h=d,p=f.handled)}),this.compareNodeIframe(r,s,l)?(h!==!1||p?h===!1||p||(u[h].handled=!0):u.push({val:l,handled:!0}),!0):(h===!1&&u.push({val:l,handled:!1}),!1)}handleOpenIframes(r,s,l,u){r.forEach(h=>{h.handled||this.getIframeContents(h.val,p=>{this.createInstanceOnIframe(p).forEachNode(s,l,u)})})}iterateThroughNodes(r,s,l,u,h){const p=this.createIterator(s,r,u);let f,d,c=[],$=[],v=()=>({prevNode:d,node:f}=this.getIteratorNode(p),f);for(;v();)this.iframes&&this.forEachIframe(s,b=>this.checkIframeFilter(f,d,b,c),b=>{this.createInstanceOnIframe(b).forEachNode(r,g=>$.push(g),u)}),$.push(f);$.forEach(b=>{l(b)}),this.iframes&&this.handleOpenIframes(c,r,l,u),h()}forEachNode(r,s,l,u=()=>{}){const h=this.getContexts();let p=h.length;p||u(),h.forEach(f=>{const d=()=>{this.iterateThroughNodes(r,f,s,l,()=>{--p<=0&&u()})};this.iframes?this.waitForIframes(f,d):d()})}}class o{constructor(r){this.ctx=r,this.ie=!1;const s=window.navigator.userAgent;(s.indexOf("MSIE")>-1||s.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,s="debug"){const l=this.opt.log;this.opt.debug&&typeof l=="object"&&typeof l[s]=="function"&&l[s](`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 s=this.opt.synonyms,l=this.opt.caseSensitive?"":"i",u=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(let h in s)if(s.hasOwnProperty(h)){const p=s[h],f=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(h):this.escapeStr(h),d=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(p):this.escapeStr(p);f!==""&&d!==""&&(r=r.replace(new RegExp(`(${this.escapeStr(f)}|${this.escapeStr(d)})`,`gm${l}`),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,s=>s.charAt(0)==="\\"?"?":"")).replace(/(?:\\)*\*/g,s=>s.charAt(0)==="\\"?"*":"")}createWildcardsRegExp(r){let s=this.opt.wildcards==="withSpaces";return r.replace(/\u0001/g,s?"[\\S\\s]?":"\\S?").replace(/\u0002/g,s?"[\\S\\s]*?":"\\S*")}setupIgnoreJoinersRegExp(r){return r.replace(/[^(|)\\]/g,(s,l,u)=>{let h=u.charAt(l+1);return/[(|)\\]/.test(h)||h===""?s:s+"\0"})}createJoinersRegExp(r){let s=[];const l=this.opt.ignorePunctuation;return Array.isArray(l)&&l.length&&s.push(this.escapeStr(l.join(""))),this.opt.ignoreJoiners&&s.push("\\u00ad\\u200b\\u200c\\u200d"),s.length?r.split(/\u0000+/).join(`[${s.join("")}]*`):r}createDiacriticsRegExp(r){const s=this.opt.caseSensitive?"":"i",l=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(h=>{l.every(p=>{if(p.indexOf(h)!==-1){if(u.indexOf(p)>-1)return!1;r=r.replace(new RegExp(`[${p}]`,`gm${s}`),`[${p}]`),u.push(p)}return!0})}),r}createMergedBlanksRegExp(r){return r.replace(/[\s]+/gim,"[\\s]+")}createAccuracyRegExp(r){const s="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿";let l=this.opt.accuracy,u=typeof l=="string"?l:l.value,h=typeof l=="string"?[]:l.limiters,p="";switch(h.forEach(f=>{p+=`|${this.escapeStr(f)}`}),u){case"partially":default:return`()(${r})`;case"complementary":return`()([^${p="\\s"+(p||this.escapeStr(s))}]*${r}[^${p}]*)`;case"exactly":return`(^|\\s${p})(${r})(?=$|\\s${p})`}}getSeparatedKeywords(r){let s=[];return r.forEach(l=>{this.opt.separateWordSearch?l.split(" ").forEach(u=>{u.trim()&&s.indexOf(u)===-1&&s.push(u)}):l.trim()&&s.indexOf(l)===-1&&s.push(l)}),{keywords:s.sort((l,u)=>u.length-l.length),length:s.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 s=[];let l=0;return r.sort((u,h)=>u.start-h.start).forEach(u=>{let{start:h,end:p,valid:f}=this.callNoMatchOnInvalidRanges(u,l);f&&(u.start=h,u.length=p-h,s.push(u),l=p)}),s}callNoMatchOnInvalidRanges(r,s){let l,u,h=!1;return r&&r.start!==void 0?(u=(l=parseInt(r.start,10))+parseInt(r.length,10),this.isNumeric(r.start)&&this.isNumeric(r.length)&&u-s>0&&u-l>0?h=!0:(this.log(`Ignoring invalid or overlapping range: ${JSON.stringify(r)}`),this.opt.noMatch(r))):(this.log(`Ignoring invalid range: ${JSON.stringify(r)}`),this.opt.noMatch(r)),{start:l,end:u,valid:h}}checkWhitespaceRanges(r,s,l){let u,h=!0,p=l.length,f=s-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?(h=!1,this.log(`Invalid range: ${JSON.stringify(r)}`),this.opt.noMatch(r)):l.substring(d,u).replace(/\s+/g,"")===""&&(h=!1,this.log("Skipping whitespace only range: "+JSON.stringify(r)),this.opt.noMatch(r)),{start:d,end:u,valid:h}}getTextNodes(r){let s="",l=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,u=>{l.push({start:s.length,end:(s+=u.textContent).length,node:u})},u=>this.matchesExclude(u.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT,()=>{r({value:s,nodes:l})})}matchesExclude(r){return e.matches(r,this.opt.exclude.concat(["script","style","title","head","html"]))}wrapRangeInTextNode(r,s,l){const u=this.opt.element?this.opt.element:"mark",h=r.splitText(s),p=h.splitText(l-s);let f=document.createElement(u);return f.setAttribute("data-markjs","true"),this.opt.className&&f.setAttribute("class",this.opt.className),f.textContent=h.textContent,h.parentNode.replaceChild(f,h),p}wrapRangeInMappedTextNode(r,s,l,u,h){r.nodes.every((p,f)=>{const d=r.nodes[f+1];if(d===void 0||d.start>s){if(!u(p.node))return!1;const c=s-p.start,$=(l>p.end?p.end:l)-p.start,v=r.value.substr(0,p.start),b=r.value.substr($+p.start);if(p.node=this.wrapRangeInTextNode(p.node,c,$),r.value=v+b,r.nodes.forEach((g,y)=>{y>=f&&(r.nodes[y].start>0&&y!==f&&(r.nodes[y].start-=$),r.nodes[y].end-=$)}),l-=$,h(p.node.previousSibling,p.start),!(l>p.end))return!1;s=p.end}return!0})}wrapMatches(r,s,l,u,h){const p=s===0?0:s+1;this.getTextNodes(f=>{f.nodes.forEach(d=>{let c;for(d=d.node;(c=r.exec(d.textContent))!==null&&c[p]!=="";){if(!l(c[p],d))continue;let $=c.index;if(p!==0)for(let v=1;v<p;v++)$+=c[v].length;d=this.wrapRangeInTextNode(d,$,$+c[p].length),u(d.previousSibling),r.lastIndex=0}}),h()})}wrapMatchesAcrossElements(r,s,l,u,h){const p=s===0?0:s+1;this.getTextNodes(f=>{let d;for(;(d=r.exec(f.value))!==null&&d[p]!=="";){let c=d.index;if(p!==0)for(let v=1;v<p;v++)c+=d[v].length;const $=c+d[p].length;this.wrapRangeInMappedTextNode(f,c,$,v=>l(d[p],v),(v,b)=>{r.lastIndex=b,u(v)})}h()})}wrapRangeFromIndex(r,s,l,u){this.getTextNodes(h=>{const p=h.value.length;r.forEach((f,d)=>{let{start:c,end:$,valid:v}=this.checkWhitespaceRanges(f,p,h.value);v&&this.wrapRangeInMappedTextNode(h,c,$,b=>s(b,f,h.value.substring(c,$),d),b=>{l(b,f)})}),u()})}unwrapMatches(r){const s=r.parentNode;let l=document.createDocumentFragment();for(;r.firstChild;)l.appendChild(r.removeChild(r.firstChild));s.replaceChild(l,r),this.ie?this.normalizeTextNode(s):s.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,s){this.opt=s,this.log(`Searching with expression "${r}"`);let l=0,u="wrapMatches";const h=p=>{l++,this.opt.each(p)};this.opt.acrossElements&&(u="wrapMatchesAcrossElements"),this[u](r,this.opt.ignoreGroups,(p,f)=>this.opt.filter(f,p,l),h,()=>{l===0&&this.opt.noMatch(r),this.opt.done(l)})}mark(r,s){this.opt=s;let l=0,u="wrapMatches";const{keywords:h,length:p}=this.getSeparatedKeywords(typeof r=="string"?[r]:r),f=this.opt.caseSensitive?"":"i",d=c=>{let $=new RegExp(this.createRegExp(c),`gm${f}`),v=0;this.log(`Searching with expression "${$}"`),this[u]($,1,(b,g)=>this.opt.filter(g,c,l,v),b=>{v++,l++,this.opt.each(b)},()=>{v===0&&this.opt.noMatch(c),h[p-1]===c?this.opt.done(l):d(h[h.indexOf(c)+1])})};this.opt.acrossElements&&(u="wrapMatchesAcrossElements"),p===0?this.opt.done(l):d(h[0])}markRanges(r,s){this.opt=s;let l=0,u=this.checkRanges(r);u&&u.length?(this.log("Starting to mark with the following ranges: "+JSON.stringify(u)),this.wrapRangeFromIndex(u,(h,p,f,d)=>this.opt.filter(h,p,f,d),(h,p)=>{l++,this.opt.each(h,p)},()=>{this.opt.done(l)})):this.opt.done(l)}unmark(r){this.opt=r;let s=this.opt.element?this.opt.element:"*";s+="[data-markjs]",this.opt.className&&(s+=`.${this.opt.className}`),this.log(`Removal selector "${s}"`),this.iterator.forEachNode(NodeFilter.SHOW_ELEMENT,l=>{this.unwrapMatches(l)},l=>{const u=e.matches(l,s),h=this.matchesExclude(l);return!u||h?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},this.opt.done)}}return function(a){const r=new o(a);return this.mark=(s,l)=>(r.mark(s,l),this),this.markRegExp=(s,l)=>(r.markRegExp(s,l),this),this.markRanges=(s,l)=>(r.markRanges(s,l),this),this.unmark=s=>(r.unmark(s),this),this}})})(Ni);var Ts=Ni.exports;const As=jn(Ts),c1="",Ds={name:"IbTreeSelect",inject:["LANG_COMPONENTS"],props:{classList:[String,Array],placeholder:{type:String,default:""},searchPlaceholderText:{type:String,default:""},clearButtonMessage:{type:String,default:""},showClearButton:{type:Boolean,default:!0},isResizable:{type:Boolean,default:!1},initialSize:{left:0,right:0},ariaLabel:{type:String,default:""},name:String,id:{type:String,default(){return mt()}},options:{default(){return[]}},modelValue:{type:[Number,String,Array]},value:{type:[Number,String,Array],default(){return[]}},maxSelectedNames:{type:Number,default:2},isMultiple:{type:Boolean,default:!0},parentAutoCheck:{type:Boolean,default:!0},strings:{type:Object,default(){return{}}},onlyEndNodes:{type:Boolean,default:!1},isRequired:{type:Boolean,default:!0},htmlOptionTitle:{type:Boolean,default:!1},isBookmarkable:{type:Boolean,default:!1},initBookmarks:{type:Array,default:()=>[]},showInputs:{type:Boolean,default(t){return t.isMultiple}},dependency:{type:String},filterId:{type:String,default(){return mt()}},staticPlaceholder:{type:Boolean,default:!1},useSearch:{type:Boolean,default:!1},isWatching:{type:Boolean,default:!1},vertical:{type:String},emptyMessage:{type:String,default:""},errorMessage:{type:String,default:""},allOptions:{type:Boolean,default:!0},watchClearValue:{type:Boolean,default:!1},isToggle:{type:Boolean,default:!1},alphabetSort:{type:Boolean,default:!1}},emits:["close","input","search","resize","submit","update:modelValue"],watch:{value(t){this.val=t,this.setPreparedValues()},modelValue(t){this.val=t,this.actualOptions=[],this.setPreparedValues()},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(){let t=!0;if(typeof this.options=="function")t=!1;else{const n=[],e=this.options;Array.prototype.forEach.call(e,o=>{o.id!==void 0&&n.push(o.id)}),t=JSON.stringify(n)===JSON.stringify(this.optionsIdsWatch),this.optionsIdsWatch=n}(this.isInitialized&&!t||this.isWatching)&&this.setPreparedValues().then(()=>{const n=Object.keys(this.selected);this.$globalEvents.$emit("select-"+this.filterId+":update",{values:n,filter:this.filterId})})},dependency(t,n){this.$nextTick(()=>{this.registerDependency(n)})},initBookmarks(){this.actualBookmarkedOptions={},this.setBookmarkedOptions(this.actualOptions)}},mounted(){this.marker=new As(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,s,l;return this.defaultFilter=u=>{this.marker.unmark();const h=this.filterString.toLowerCase().trim();this.filterFunc.call(this,u,h),h&&this.marker.mark(h)},{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:[],allOptionsIsChecked:!0,hasTreeChildren:!1,uid:`f${(~~(Math.random()*1e8)).toString(16)}`,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",(s=this.LANG_COMPONENTS)==null?void 0:s.COMPONENT_SELECT),requiredDependencyNotFilled:this.requiredDependencyNotFilled||lang("required_dependency_are_not_filled",(l=this.LANG_COMPONENTS)==null?void 0:l.COMPONENT_SELECT),...this.strings},dependencyValue:null}},methods:{startResizing(t){this.resizingProp=t},endResizing(){this.resizingProp&&(this.resizingProp=null,this.$emit("resize",this.size))},onResize(t){switch(this.resizingProp){case"left":this.size.left=Math.max(this.size.left-t.movementX,0);break;case"right":this.size.right=Math.max(this.size.right+t.movementX,0);break}},registerDependency(t){this.dependency?(this.$globalEvents.$on("select-"+this.dependency+":update",n=>{this.clear(),this.dependencyValue=n,this.dependencyValue&&this.dependencyValue.values&&(!Array.isArray(this.dependencyValue.values)||this.dependencyValue.values.length)&&this.setPreparedValues()}),this.isLoading=!1):(this.$globalEvents.$off("select-"+t+":update"),this.setPreparedValues().then(()=>{const n=Object.keys(this.selected);this.$globalEvents.$emit("select-"+this.filterId+":update",{values:n,filter:this.filterId})}))},filter(t,n){this.filterString=t,this.$emit("search",{search:this.filterString}),this.defaultFilter(n)},setPreparedValues(t){let n=t||this.options;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.actualOptions=[],this.allOptionsIsChecked=!1,this.selected=[],this.$emit("update:modelValue",null)},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(s=>{s.initiallyVisible=typeof s.visible>"u"?!0:s.visible,s.visible=s.initiallyVisible,s.isDisabled=!1,s.checked=this.isMultiple?this.val!==null&&this.val.findIndex(l=>s.id==l)>-1:this.val!==null&&this.val==s.id,s.checked&&(!this.onlyEndNodes||!s.children)&&(e[s.id]=s),s.children&&(this.hasTreeChildren=!0,s.isChildrenVisible=!1),o.push(new Promise(l=>{s.children?this.prepare(s.children).then(([u,h])=>{s.children=u,Object.assign(e,h),l(s)}):l(s)}))}),Promise.all(o).then(s=>{n([s,e])}))).catch(r=>{throw this.isLoading=!1,r})})},filterFunc(t,n){t.forEach(e=>{let o=e.initiallyVisible&&e.title.toString().toLowerCase().includes(n)&&!this.actualBookmarkedOptions[e.id];if(e.children&&e.children.length){let a=this.filterFunc(e.children,n);a&&(e.isChildrenVisible=!!n||!!Object.keys(this.actualBookmarkedOptions).length,e.isDisabled=a<e.children.length&&!this.isBookmarkable),o?a||(o=!1):o=!!a}e.visible=o})},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)},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=>{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.filter("",this.options),this.isMultiple?this.$emit("close",Object.keys(this.selected)):this.$emit("close",Object.keys(this.selected)[0])}},computed:{hasTrigger(){return!!this.$slots.trigger},hasEmptyMessage(){return!!this.$slots.emptyMessage},hasHierarchy(){return this.actualOptions.some(t=>t.children)},selectedKeys(){return Object.keys(this.selected).filter(t=>{if(!this.onlyEndNodes||!this.selected[t].children)return!0})},selectStatus(){return this.staticPlaceholder?this.placeholder:this.isLoading?this.actualStrings.loading:this.selectedKeys.length?this.selectedKeys.length<this.maxSelectedNames?this.selectedKeys.map(t=>this.selected[t].title).join(","):this.selectedKeys.length<this.optionsCount?this.actualStrings.selectedCount.replace("{selected}",this.selectedKeys.length).replace("{all}",this.optionsCount):this.actualStrings.allSelected:this.emptyMessage},isEmpty(){return Array.isArray(this.value)?!this.value.length:!this.value},requiredDependencyNotFilled(){return this.dependency&&(!this.dependencyValue||!this.dependencyValue.values||!this.dependencyValue.values.length)},showSearch(){return this.useSearch||this.optionsCount>10},arrayOfOptions(){return this.getArrayOptions(this.actualOptions)},optionsCount(){let t=[];for(let n of this.arrayOfOptions)(!this.onlyEndNodes||!n.children)&&!t.includes(n.id)&&t.push(n.id);return t.length},visibleOptionsCount(){let t=[];return this.traverseTree(this.actualOptions,n=>{(!this.onlyEndNodes||!n.children)&&!t.includes(n.id)&&n.visible&&t.push(n.id)}),t.length+(this.isBookmarkable?Object.keys(this.actualBookmarkedOptions).length:0)}},components:{IbAlert:Mt,IbIconButton:ut,IbIcon:Le,IbDropdown:Ln,IbInput:yr,List:pr,"select-option":xs},beforeUnmount(){document.removeEventListener("mousemove",this.onResize),document.removeEventListener("mouseup",this.endResizing)}},Is={key:0,class:"tree-select-empty"},Ms={key:1,class:"tree-select-default-empty tree-select-empty"};function Ps(t,n,e,o,a,r){const s=i.resolveComponent("ib-alert"),l=i.resolveComponent("ib-icon"),u=i.resolveComponent("ib-icon-button"),h=i.resolveComponent("select-option"),p=i.resolveComponent("list"),f=i.resolveComponent("ib-input"),d=i.resolveComponent("ib-dropdown");return i.openBlock(),i.createElementBlock(i.Fragment,null,[e.errorMessage?(i.openBlock(),i.createBlock(s,{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])},[i.createVNode(d,{disabled:a.isLoading,"is-resizable":e.isResizable,vertical:e.vertical,onClose:r.onClose,ref:"dropdown"},i.createSlots({body:i.withCtx(()=>[i.createElementVNode("div",{class:i.normalizeClass(["tree-drop",{"not-tree-child":!a.hasTreeChildren}]),style:i.normalizeStyle({width:"auto",position:"absolute",left:-a.size.left+"px",right:-a.size.right+"px"})},[e.isResizable?(i.openBlock(),i.createElementBlock("div",{key:0,class:"ib-dropdown-resizer ib-dropdown-resizer-left",onMousedown:n[1]||(n[1]=c=>r.startResizing("left"))},null,32)):i.createCommentVNode("",!0),e.isResizable?(i.openBlock(),i.createElementBlock("div",{key:1,class:"ib-dropdown-resizer ib-dropdown-resizer-right",onMousedown:n[2]||(n[2]=c=>r.startResizing("right"))},null,32)):i.createCommentVNode("",!0),Object.keys(a.actualBookmarkedOptions).length>0?(i.openBlock(),i.createBlock(p,{key:2,class:i.normalizeClass({"has-hierarchy":r.hasHierarchy})},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.actualBookmarkedOptions,c=>(i.openBlock(),i.createBlock(h,{key:"bookmark"+c.id,option:c,"parent-auto-check":!1,"is-multiple":e.isMultiple,"is-bookmarkable":!0,"is-bookmarked":!0,onCheck:r.registerCheck,onToggleBookmark:r.toggleBookmark,uid:a.uid,"only-end-nodes":e.onlyEndNodes,"html-title":e.htmlOptionTitle,"show-input":e.showInputs},null,8,["option","is-multiple","onCheck","onToggleBookmark","uid","only-end-nodes","html-title","show-input"]))),128))]),_:1},8,["class"])):i.createCommentVNode("",!0),r.showSearch?(i.openBlock(),i.createBlock(f,{key:3,class:"tree-search","show-icon":!0,value:a.filterString,placeholder:e.searchPlaceholderText?e.searchPlaceholderText:a.actualStrings.searchPlaceholder,onInput:n[3]||(n[3]=c=>r.filter(c,a.actualOptions))},null,8,["value","placeholder"])):i.createCommentVNode("",!0),i.createVNode(p,{ref:"list",class:i.normalizeClass({"tree-select-list":!0,"has-hierarchy":r.hasHierarchy})},{default:i.withCtx(()=>[!r.requiredDependencyNotFilled&&!r.visibleOptionsCount&&r.hasEmptyMessage?(i.openBlock(),i.createElementBlock("div",Is,[i.renderSlot(t.$slots,"emptyMessage")])):!r.requiredDependencyNotFilled&&!r.visibleOptionsCount?(i.openBlock(),i.createElementBlock("div",Ms,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(h,{key:2,option:{title:t.lang("none","select"),id:null,checked:r.isEmpty},name:a.actualName,"parent-auto-check":e.parentAutoCheck,"is-multiple":e.isMultiple,onCheck:r.registerCheck,onToggleBookmark:r.toggleBookmark,uid:a.uid,"only-end-nodes":e.onlyEndNodes,"show-input":e.showInputs},null,8,["option","name","parent-auto-check","is-multiple","onCheck","onToggleBookmark","uid","only-end-nodes","show-input"])):i.createCommentVNode("",!0),r.requiredDependencyNotFilled?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock(i.Fragment,{key:3},[e.allOptions&&e.isMultiple&&r.visibleOptionsCount&&!r.requiredDependencyNotFilled?(i.openBlock(),i.createBlock(h,{key:0,option:{title:a.actualStrings.selectAllOptions,id:"!all!",initiallyVisible:!0,visible:!0,isDisabled:r.visibleOptionsCount<r.optionsCount,checked:a.allOptionsIsChecked,isIndeterminate:!!Object.keys(a.selected).length},"is-toggle":e.isToggle,name:a.actualName,"parent-auto-check":!1,"is-multiple":e.isMultiple,"is-bookmarkable":!1,onCheck:r.manageAll,uid:a.uid,"only-end-nodes":e.onlyEndNodes,"show-input":e.showInputs},null,8,["option","is-toggle","name","is-multiple","onCheck","uid","only-end-nodes","show-input"])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.actualOptions,c=>i.renderSlot(t.$slots,a.actualName,{key:e.name+c.value,option:c,parentAutoCheck:e.parentAutoCheck,isMultiple:e.isMultiple,uid:a.uid,onlyEndNodes:e.onlyEndNodes,htmlTitle:e.htmlOptionTitle,showInput:e.showInputs},()=>[i.withDirectives(i.createVNode(h,{option:c,"is-toggle":e.isToggle,name:a.actualName,"parent-auto-check":e.parentAutoCheck,"is-multiple":e.isMultiple,"is-bookmarkable":e.isBookmarkable,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-toggle","name","parent-auto-check","is-multiple","is-bookmarkable","onCheck","onToggleBookmark","uid","only-end-nodes","html-title","show-input"]),[[i.vShow,c.visible]])])),128))],64))]),_: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:c})=>[i.createElementVNode("div",{role:"combobox",tabindex:"0",class:i.normalizeClass(["tree-choice",{"tree-choice-opened":c,"has-clear-button":!e.showClearButton,"tree-choice-error":e.errorMessage}]),onClick:n[0]||(n[0]=i.withModifiers(()=>{},["prevent"])),"aria-label":e.ariaLabel,"aria-expanded":c},[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))],10,["aria-label","aria-expanded"]),e.showClearButton?i.withDirectives((i.openBlock(),i.createBlock(u,{key:0,kind:"ghost",class:"button-clear",onClick:i.withModifiers(r.clearValue,["prevent"]),"help-text":e.clearButtonMessage},{default:i.withCtx(()=>[i.createVNode(l,{name:"close-outline"})]),_:1},8,["onClick","help-text"])),[[i.vShow,Object.keys(a.selected).length]]):i.createCommentVNode("",!0),i.createVNode(l,{name:c?"chevron-up-outline":"chevron-down-outline",classes:"tree-select-caret"},null,8,["name"])]),key:"1"}]),1032,["disabled","is-resizable","vertical","onClose"])],2)],64)}const xi=_e(Ds,[["render",Ps]]),u1="",Bs={name:"IbLimitSelector",props:{labelSelect:{type:String,required:!0},value:{type:Number},options:{type:Array,default:()=>[10,25,50,100]}},watch(t){this.selected=t},data(){return{selected:this.value}},methods:{selectItem(t){this.selected=t,this.onChange(t)},onChange(t){Number.isInteger(+t)&&this.$emit("select",+t)}},computed:{prepareOptions(){return this.options.map(t=>({id:t,title:t}))}},components:{IbLabel:dn,IbSelect:xi}},Ls={class:"report-limit-selector"};function Rs(t,n,e,o,a,r){const s=i.resolveComponent("ib-label"),l=i.resolveComponent("ib-select");return i.openBlock(),i.createElementBlock("div",Ls,[i.createVNode(s,null,{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.labelSelect),1)]),_:1}),i.createVNode(l,{classList:"report-limit-selector-select",value:e.value,options:r.prepareOptions,"is-multiple":!1,"show-clear-button":!1,onInput:r.selectItem},null,8,["value","options","onInput"])])}const Ti=_e(Bs,[["render",Rs]]),f1="",js={name:"IbPagination",props:{tooltipTextPrev:{type:String},tooltipTextNext:{type:String},labelInput:{type:String},labelSelect:{type:String,required:!0},countRows:{type:Number,required:!0},pageCount:{type:Number,default:null},current:{type:Number,default:1},limitSelector:{type:Number,default:10},showPaginationInput:{type:Boolean,default:!0}},data(){return{currentPage:this.current,indexSpaceLeft:null,indexSpaceRight:null,limitValue:this.limitSelector}},watch:{current(t){this.onSelect(t)},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:yr,IbLabel:dn,IbLimitSelector:Ti,IbTooltip:Ot}},Vs={class:"report-controls"},qs={class:"repot-pagination"},Fs={class:"pagination-input"},Hs={class:"row-count"},zs={class:"pagination-wrapper"},Us=["onClick"];function Ks(t,n,e,o,a,r){const s=i.resolveComponent("ib-limit-selector"),l=i.resolveComponent("ib-label"),u=i.resolveComponent("ib-input"),h=i.resolveComponent("ib-icon"),p=i.resolveComponent("ib-tooltip"),f=i.resolveComponent("ib-icon-button");return i.openBlock(),i.createElementBlock("div",Vs,[i.createVNode(s,{onSelect:r.changeLimit,value:a.limitValue,"label-select":e.labelSelect},null,8,["onSelect","value","label-select"]),i.createElementVNode("div",qs,[e.showPaginationInput?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createVNode(l,null,{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.labelInput),1)]),_:1}),i.createElementVNode("div",Fs,[i.createVNode(u,{type:"number",debounce:500,onInput:r.onInput},null,8,["onInput"])])],64)):i.createCommentVNode("",!0),i.createElementVNode("div",Hs,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(h,{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",zs,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.countPagePagination,(d,c)=>i.withDirectives((i.openBlock(),i.createElementBlock("li",{key:c,class:i.normalizeClass(["pagination-item",{active:c+1===a.currentPage,"dots-left":a.indexSpaceLeft===c+1,"dots-right":a.indexSpaceRight===c+1}]),onClick:$=>r.onSelect(c+1)},[i.createElementVNode("button",null,i.toDisplayString(c+1),1)],10,Us)),[[i.vShow,r.showItem(c+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(h,{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 Gs=_e(js,[["render",Ks]]),cn={PROGRESS:"progress",SUCCESS:"success",FAILED:"failed",CANCELING:"canceling",CANCELED:"canceled"},h1="",Ys={props:{states:{type:String,default:cn.PROGRESS},progress:{type:[String,Number],default:0}},computed:{classes(){const t=["ib-progress-bar"];return t.push(`progress-bar-${this.states}`),t},iconName(){return this.states===cn.SUCCESS?"checkmark-circle":this.states===cn.FAILED||this.states===cn.CANCELING||this.states===cn.CANCELED?"close-circle":""}},components:{IbIcon:Le}},Ai=t=>(i.pushScopeId("data-v-2737cf5e"),t=t(),i.popScopeId(),t),Ws={class:"ib-progress-bar-wrapper"},Zs=[Ai(()=>i.createElementVNode("div",{class:"gradient"},null,-1))],Js=Ai(()=>i.createElementVNode("div",null,null,-1));function Xs(t,n,e,o,a,r){const s=i.resolveComponent("ib-icon");return i.openBlock(),i.createElementBlock("div",Ws,[i.createElementVNode("div",{class:i.normalizeClass(r.classes)},[i.createElementVNode("div",{class:"progress",style:i.normalizeStyle({width:e.progress+"%"})},Zs,4),Js],2),i.withDirectives(i.createVNode(s,{class:"status-icon",name:r.iconName},null,8,["name"]),[[i.vShow,r.iconName.length]])])}const Qs=_e(Ys,[["render",Xs],["__scopeId","data-v-2737cf5e"]]),ed={new:`<svg width="11" height="11" viewBox="0 0 11 11" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
7
7
|
<circle id="Ellipse" cx="5.5" cy="5.5" r="5" fill="#0369E8"/>
|
|
8
8
|
</svg>
|
|
9
9
|
`,success:`
|
package/package.json
CHANGED
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
<div
|
|
121
121
|
v-if="
|
|
122
122
|
!requiredDependencyNotFilled &&
|
|
123
|
-
!
|
|
123
|
+
!visibleOptionsCount &&
|
|
124
124
|
hasEmptyMessage
|
|
125
125
|
"
|
|
126
126
|
class="tree-select-empty"
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
<slot name="emptyMessage"></slot>
|
|
129
129
|
</div>
|
|
130
130
|
<div
|
|
131
|
-
v-else-if="!requiredDependencyNotFilled && !
|
|
131
|
+
v-else-if="!requiredDependencyNotFilled && !visibleOptionsCount"
|
|
132
132
|
class="tree-select-default-empty tree-select-empty"
|
|
133
133
|
>
|
|
134
134
|
{{ actualStrings.emptyTitle }}
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
v-if="
|
|
163
163
|
allOptions &&
|
|
164
164
|
isMultiple &&
|
|
165
|
-
|
|
165
|
+
visibleOptionsCount &&
|
|
166
166
|
!requiredDependencyNotFilled
|
|
167
167
|
"
|
|
168
168
|
>
|
|
@@ -466,11 +466,7 @@ export default {
|
|
|
466
466
|
this.defaultFilter = (options) => {
|
|
467
467
|
this.marker.unmark();
|
|
468
468
|
const filterString = this.filterString.toLowerCase().trim();
|
|
469
|
-
this.
|
|
470
|
-
this,
|
|
471
|
-
options,
|
|
472
|
-
filterString
|
|
473
|
-
);
|
|
469
|
+
this.filterFunc.call(this, options, filterString);
|
|
474
470
|
|
|
475
471
|
if (filterString) {
|
|
476
472
|
this.marker.mark(filterString);
|
|
@@ -493,7 +489,6 @@ export default {
|
|
|
493
489
|
actualBookmarkedOptions: {},
|
|
494
490
|
selected: [],
|
|
495
491
|
allOptionsIsChecked: true,
|
|
496
|
-
countVisibleChildren: 0,
|
|
497
492
|
hasTreeChildren: false,
|
|
498
493
|
uid: `f${(~~(Math.random() * 1e8)).toString(16)}`,
|
|
499
494
|
actualStrings: {
|
|
@@ -604,7 +599,6 @@ export default {
|
|
|
604
599
|
return this.prepare(options).then(([options, selected]) => {
|
|
605
600
|
this.actualOptions = options;
|
|
606
601
|
this.allOptionsIsChecked = this.checkIfOptionsChecked(options);
|
|
607
|
-
this.countVisibleChildren = options.length;
|
|
608
602
|
this.isInitialized = true;
|
|
609
603
|
this.selected = selected;
|
|
610
604
|
this.setBookmarkedOptions(options);
|
|
@@ -613,7 +607,6 @@ export default {
|
|
|
613
607
|
clear() {
|
|
614
608
|
this.actualOptions = [];
|
|
615
609
|
this.allOptionsIsChecked = false;
|
|
616
|
-
this.countVisibleChildren = 0;
|
|
617
610
|
this.selected = [];
|
|
618
611
|
this.$emit("update:modelValue", null);
|
|
619
612
|
},
|
|
@@ -694,7 +687,7 @@ export default {
|
|
|
694
687
|
});
|
|
695
688
|
},
|
|
696
689
|
filterFunc(options, filterString) {
|
|
697
|
-
let visibleOptionsCount = 0;
|
|
690
|
+
// let visibleOptionsCount = 0;
|
|
698
691
|
|
|
699
692
|
options.forEach((option) => {
|
|
700
693
|
let isVisible =
|
|
@@ -707,7 +700,7 @@ export default {
|
|
|
707
700
|
option.children,
|
|
708
701
|
filterString
|
|
709
702
|
);
|
|
710
|
-
visibleOptionsCount += visibleChildrenCount;
|
|
703
|
+
// visibleOptionsCount += visibleChildrenCount;
|
|
711
704
|
|
|
712
705
|
if (visibleChildrenCount) {
|
|
713
706
|
option.isChildrenVisible =
|
|
@@ -727,12 +720,12 @@ export default {
|
|
|
727
720
|
|
|
728
721
|
option.visible = isVisible;
|
|
729
722
|
|
|
730
|
-
if (isVisible) {
|
|
731
|
-
|
|
732
|
-
}
|
|
723
|
+
// if (isVisible) {
|
|
724
|
+
// visibleOptionsCount++;
|
|
725
|
+
// }
|
|
733
726
|
});
|
|
734
727
|
|
|
735
|
-
return visibleOptionsCount;
|
|
728
|
+
// return visibleOptionsCount;
|
|
736
729
|
},
|
|
737
730
|
submit() {
|
|
738
731
|
this.change();
|
|
@@ -771,7 +764,6 @@ export default {
|
|
|
771
764
|
this.selected[option.id] = option;
|
|
772
765
|
this.$emit("update:modelValue", Object.keys(this.selected));
|
|
773
766
|
this.$emit("input", Object.keys(this.selected));
|
|
774
|
-
console.log('test 1');
|
|
775
767
|
}
|
|
776
768
|
} else {
|
|
777
769
|
const selectedOptionKey = Object.keys(this.selected)[0];
|
|
@@ -788,7 +780,6 @@ export default {
|
|
|
788
780
|
option.checked = false;
|
|
789
781
|
this.$emit("update:modelValue", Object.keys(this.selected));
|
|
790
782
|
this.$emit("input", Object.keys(this.selected));
|
|
791
|
-
console.log('test 2');
|
|
792
783
|
}
|
|
793
784
|
|
|
794
785
|
this.toggleDuplicateOptions(this.actualOptions, option.id, isChecked);
|