primevue
Version:
PrimeVue is an open source UI library for Vue featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeBloc
2 lines (1 loc) • 33.1 kB
JavaScript
this.primevue=this.primevue||{},this.primevue.utils=function(t){"use strict";function e(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=s(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return l=t.done,t},e:function(t){a=!0,o=t},f:function(){try{l||null==n.return||n.return()}finally{if(a)throw o}}}}function n(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function r(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function i(t){if(Array.isArray(t))return u(t)}function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function l(t,e){return f(t)||c(t,e)||s(t,e)||a()}function a(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(t,e){if(t){if("string"==typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function c(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,l,a=[],s=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(a.push(r.value),a.length!==e);s=!0);}catch(t){u=!0,i=t}finally{try{if(!s&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw i}}return a}}function f(t){if(Array.isArray(t))return t}var d={innerWidth:function(t){if(t){var e=t.offsetWidth,n=getComputedStyle(t);return e+=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)}return 0},width:function(t){if(t){var e=t.offsetWidth,n=getComputedStyle(t);return e-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),e}return 0},getWindowScrollTop:function(){var t=document.documentElement;return(window.pageYOffset||t.scrollTop)-(t.clientTop||0)},getWindowScrollLeft:function(){var t=document.documentElement;return(window.pageXOffset||t.scrollLeft)-(t.clientLeft||0)},getOuterWidth:function(t,e){if(t){var n=t.offsetWidth;if(e){var r=getComputedStyle(t);n+=parseFloat(r.marginLeft)+parseFloat(r.marginRight)}return n}return 0},getOuterHeight:function(t,e){if(t){var n=t.offsetHeight;if(e){var r=getComputedStyle(t);n+=parseFloat(r.marginTop)+parseFloat(r.marginBottom)}return n}return 0},getClientHeight:function(t,e){if(t){var n=t.clientHeight;if(e){var r=getComputedStyle(t);n+=parseFloat(r.marginTop)+parseFloat(r.marginBottom)}return n}return 0},getViewport:function(){var t=window,e=document,n=e.documentElement,r=e.getElementsByTagName("body")[0];return{width:t.innerWidth||n.clientWidth||r.clientWidth,height:t.innerHeight||n.clientHeight||r.clientHeight}},getOffset:function(t){if(t){var e=t.getBoundingClientRect();return{top:e.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:e.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}return{top:"auto",left:"auto"}},index:function(t){if(t)for(var e,n=null===(e=this.getParentNode(t))||void 0===e?void 0:e.childNodes,r=0,i=0;i<n.length;i++){if(n[i]===t)return r;1===n[i].nodeType&&r++}return-1},addMultipleClasses:function(t,e){var n=this;t&&e&&[e].flat().filter(Boolean).forEach((function(e){return e.split(" ").forEach((function(e){return n.addClass(t,e)}))}))},removeMultipleClasses:function(t,e){var n=this;t&&e&&[e].flat().filter(Boolean).forEach((function(e){return e.split(" ").forEach((function(e){return n.removeClass(t,e)}))}))},addClass:function(t,e){t&&e&&!this.hasClass(t,e)&&(t.classList?t.classList.add(e):t.className+=" "+e)},removeClass:function(t,e){t&&e&&(t.classList?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\b)"+e.split(" ").join("|")+"(\\b|$)","gi")," "))},hasClass:function(t,e){return!!t&&(t.classList?t.classList.contains(e):new RegExp("(^| )"+e+"( |$)","gi").test(t.className))},addStyles:function(t){t&&Object.entries(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).forEach((function(e){var n=l(e,2);return t.style[n[0]]=n[1]}))},find:function(t,e){return this.isElement(t)?t.querySelectorAll(e):[]},findSingle:function(t,e){return this.isElement(t)?t.querySelector(e):null},createElement:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t){var n=document.createElement(t);this.setAttributes(n,e);for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return n.append.apply(n,i),n}},setAttribute:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0;this.isElement(t)&&null!=n&&t.setAttribute(e,n)},setAttributes:function(t){var e=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.isElement(t)){var u=function e(n,r){var i,a,s=null!=t&&null!==(i=t.$attrs)&&void 0!==i&&i[n]?[null==t||null===(a=t.$attrs)||void 0===a?void 0:a[n]]:[];return[r].flat().reduce((function(t,r){if(null!=r){var i=o(r);if("string"===i||"number"===i)t.push(r);else if("object"===i){var a=Array.isArray(r)?e(n,r):Object.entries(r).map((function(t){var e=l(t,2),r=e[0],i=e[1];return"style"!==n||!i&&0!==i?i?r:void 0:"".concat(r.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),":").concat(i)}));t=a.length?t.concat(a.filter((function(t){return!!t}))):t}}return t}),s)};Object.entries(a).forEach((function(o){var a,c=l(o,2),f=c[0],d=c[1];if(null!=d){var h=f.match(/^on(.+)/);h?t.addEventListener(h[1].toLowerCase(),d):"p-bind"===f?e.setAttributes(t,d):(d="class"===f?(a=new Set(u("class",d)),i(a)||r(a)||s(a)||n()).join(" ").trim():"style"===f?u("style",d).join(";").trim():d,(t.$attrs=t.$attrs||{})&&(t.$attrs[f]=d),t.setAttribute(f,d))}}))}},getAttribute:function(t,e){if(this.isElement(t)){var n=t.getAttribute(e);return isNaN(n)?"true"===n||"false"===n?"true"===n:n:+n}},isAttributeEquals:function(t,e,n){return!!this.isElement(t)&&this.getAttribute(t,e)===n},isAttributeNotEquals:function(t,e,n){return!this.isAttributeEquals(t,e,n)},getHeight:function(t){if(t){var e=t.offsetHeight,n=getComputedStyle(t);return e-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)+parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth)}return 0},getWidth:function(t){if(t){var e=t.offsetWidth,n=getComputedStyle(t);return e-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)+parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth)}return 0},absolutePosition:function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(t){var r,i,o=t.offsetParent?{width:t.offsetWidth,height:t.offsetHeight}:this.getHiddenElementDimensions(t),l=o.height,a=o.width,s=e.offsetHeight,u=e.offsetWidth,c=e.getBoundingClientRect(),f=this.getWindowScrollTop(),d=this.getWindowScrollLeft(),h=this.getViewport(),p="top";c.top+s+l>h.height?(p="bottom",(r=c.top+f-l)<0&&(r=f)):r=s+c.top+f,i=c.left+a>h.width?Math.max(0,c.left+d+u-a):c.left+d,t.style.top=r+"px",t.style.left=i+"px",t.style.transformOrigin=p,n&&(t.style.marginTop="bottom"===p?"calc(var(--p-anchor-gutter) * -1)":"calc(var(--p-anchor-gutter))")}},relativePosition:function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(t){var r,i,o=t.offsetParent?{width:t.offsetWidth,height:t.offsetHeight}:this.getHiddenElementDimensions(t),l=e.offsetHeight,a=e.getBoundingClientRect(),s=this.getViewport(),u="top";a.top+l+o.height>s.height?(u="bottom",a.top+(r=-1*o.height)<0&&(r=-1*a.top)):r=l,i=o.width>s.width?-1*a.left:a.left+o.width>s.width?-1*(a.left+o.width-s.width):0,t.style.top=r+"px",t.style.left=i+"px",t.style.transformOrigin=u,n&&(t.style.marginTop="bottom"===u?"calc(var(--p-anchor-gutter) * -1)":"calc(var(--p-anchor-gutter))")}},nestedPosition:function(t,e){if(t){var n,r=t.parentElement,i=this.getOffset(r),o=this.getViewport(),l=t.offsetParent?t.offsetWidth:this.getHiddenElementOuterWidth(t),a=this.getOuterWidth(r.children[0]);parseInt(i.left,10)+a+l>o.width-this.calculateScrollbarWidth()?parseInt(i.left,10)<l?e%2==1?n=parseInt(i.left,10)?"-"+parseInt(i.left,10)+"px":"100%":e%2==0&&(n=o.width-l-this.calculateScrollbarWidth()+"px"):n="-100%":n="100%",t.style.top="0px",t.style.left=n}},getParentNode:function(t){var e=null==t?void 0:t.parentNode;return e&&e instanceof ShadowRoot&&e.host&&(e=e.host),e},getParents:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=this.getParentNode(t);return null===n?e:this.getParents(n,e.concat([n]))},getScrollableParents:function(t){var n=[];if(t){var r,i=this.getParents(t),o=/(auto|scroll)/,l=function(t){try{var e=window.getComputedStyle(t,null);return o.test(e.getPropertyValue("overflow"))||o.test(e.getPropertyValue("overflowX"))||o.test(e.getPropertyValue("overflowY"))}catch(t){return!1}},a=e(i);try{for(a.s();!(r=a.n()).done;){var s=r.value,u=1===s.nodeType&&s.dataset.scrollselectors;if(u){var c,f=e(u.split(","));try{for(f.s();!(c=f.n()).done;){var d=this.findSingle(s,c.value);d&&l(d)&&n.push(d)}}catch(t){f.e(t)}finally{f.f()}}9!==s.nodeType&&l(s)&&n.push(s)}}catch(t){a.e(t)}finally{a.f()}}return n},getHiddenElementOuterHeight:function(t){if(t){t.style.visibility="hidden",t.style.display="block";var e=t.offsetHeight;return t.style.display="none",t.style.visibility="visible",e}return 0},getHiddenElementOuterWidth:function(t){if(t){t.style.visibility="hidden",t.style.display="block";var e=t.offsetWidth;return t.style.display="none",t.style.visibility="visible",e}return 0},getHiddenElementDimensions:function(t){if(t){var e={};return t.style.visibility="hidden",t.style.display="block",e.width=t.offsetWidth,e.height=t.offsetHeight,t.style.display="none",t.style.visibility="visible",e}return 0},fadeIn:function(t,e){if(t){t.style.opacity=0;var n=+new Date,r=0;!function i(){r=+t.style.opacity+((new Date).getTime()-n)/e,t.style.opacity=r,n=+new Date,+r<1&&(window.requestAnimationFrame&&requestAnimationFrame(i)||setTimeout(i,16))}()}},fadeOut:function(t,e){if(t)var n=1,r=50/e,i=setInterval((function(){(n-=r)<=0&&(n=0,clearInterval(i)),t.style.opacity=n}),50)},getUserAgent:function(){return navigator.userAgent},appendChild:function(t,e){if(this.isElement(e))e.appendChild(t);else{if(!e.el||!e.elElement)throw new Error("Cannot append "+e+" to "+t);e.elElement.appendChild(t)}},isElement:function(t){return"object"===("undefined"==typeof HTMLElement?"undefined":o(HTMLElement))?t instanceof HTMLElement:t&&"object"===o(t)&&null!==t&&1===t.nodeType&&"string"==typeof t.nodeName},scrollInView:function(t,e){var n=getComputedStyle(t).getPropertyValue("borderTopWidth"),r=n?parseFloat(n):0,i=getComputedStyle(t).getPropertyValue("paddingTop"),o=i?parseFloat(i):0,l=t.getBoundingClientRect(),a=e.getBoundingClientRect().top+document.body.scrollTop-(l.top+document.body.scrollTop)-r-o,s=t.scrollTop,u=t.clientHeight,c=this.getOuterHeight(e);a<0?t.scrollTop=s+a:a+c>u&&(t.scrollTop=s+a-u+c)},clearSelection:function(){if(window.getSelection)window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().rangeCount>0&&window.getSelection().getRangeAt(0).getClientRects().length>0&&window.getSelection().removeAllRanges();else if(document.selection&&document.selection.empty)try{document.selection.empty()}catch(t){}},getSelection:function(){return window.getSelection?window.getSelection().toString():document.getSelection?document.getSelection().toString():document.selection?document.selection.createRange().text:null},calculateScrollbarWidth:function(){if(null!=this.calculatedScrollbarWidth)return this.calculatedScrollbarWidth;var t=document.createElement("div");this.addStyles(t,{width:"100px",height:"100px",overflow:"scroll",position:"absolute",top:"-9999px"}),document.body.appendChild(t);var e=t.offsetWidth-t.clientWidth;return document.body.removeChild(t),this.calculatedScrollbarWidth=e,e},calculateBodyScrollbarWidth:function(){return window.innerWidth-document.documentElement.offsetWidth},getBrowser:function(){if(!this.browser){var t=this.resolveUserAgent();this.browser={},t.browser&&(this.browser[t.browser]=!0,this.browser.version=t.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser},resolveUserAgent:function(){var t=navigator.userAgent.toLowerCase(),e=/(chrome)[ ]([\w.]+)/.exec(t)||/(webkit)[ ]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ ]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t)||[];return{browser:e[1]||"",version:e[2]||"0"}},isVisible:function(t){return t&&null!=t.offsetParent},invokeElementMethod:function(t,e,n){t[e].apply(t,n)},isExist:function(t){return!(null==t||!t.nodeName||!this.getParentNode(t))},isClient:function(){return!("undefined"==typeof window||!window.document||!window.document.createElement)},focus:function(t,e){t&&document.activeElement!==t&&t.focus(e)},isFocusableElement:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return!!this.isElement(t)&&t.matches('button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])'.concat(e,',\n [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(e,',\n input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(e,',\n select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(e,',\n textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(e,',\n [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(e,',\n [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(e))},getFocusableElements:function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=[],o=e(this.find(t,'button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])'.concat(r,',\n [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(r,',\n input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(r,',\n select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(r,',\n textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(r,',\n [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(r,',\n [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(r)));try{for(o.s();!(n=o.n()).done;){var l=n.value;"none"!=getComputedStyle(l).display&&"hidden"!=getComputedStyle(l).visibility&&i.push(l)}}catch(t){o.e(t)}finally{o.f()}return i},getFirstFocusableElement:function(t,e){var n=this.getFocusableElements(t,e);return n.length>0?n[0]:null},getLastFocusableElement:function(t,e){var n=this.getFocusableElements(t,e);return n.length>0?n[n.length-1]:null},getNextFocusableElement:function(t,e,n){var r=this.getFocusableElements(t,n),i=r.length>0?r.findIndex((function(t){return t===e})):-1,o=i>-1&&r.length>=i+1?i+1:-1;return o>-1?r[o]:null},getPreviousElementSibling:function(t,e){for(var n=t.previousElementSibling;n;){if(n.matches(e))return n;n=n.previousElementSibling}return null},getNextElementSibling:function(t,e){for(var n=t.nextElementSibling;n;){if(n.matches(e))return n;n=n.nextElementSibling}return null},isClickable:function(t){if(t){var e=t.nodeName,n=t.parentElement&&t.parentElement.nodeName;return"INPUT"===e||"TEXTAREA"===e||"BUTTON"===e||"A"===e||"INPUT"===n||"TEXTAREA"===n||"BUTTON"===n||"A"===n||!!t.closest(".p-button, .p-checkbox, .p-radiobutton")}return!1},applyStyle:function(t,e){if("string"==typeof e)t.style.cssText=e;else for(var n in e)t.style[n]=e[n]},isIOS:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream},isAndroid:function(){return/(android)/i.test(navigator.userAgent)},isTouchDevice:function(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0},hasCSSAnimation:function(t){if(t){var e=getComputedStyle(t);return parseFloat(e.getPropertyValue("animation-duration")||"0")>0}return!1},hasCSSTransition:function(t){if(t){var e=getComputedStyle(t);return parseFloat(e.getPropertyValue("transition-duration")||"0")>0}return!1},exportCSV:function(t,e){var n=new Blob([t],{type:"application/csv;charset=utf-8;"});if(window.navigator.msSaveOrOpenBlob)navigator.msSaveOrOpenBlob(n,e+".csv");else{var r=document.createElement("a");void 0!==r.download?(r.setAttribute("href",URL.createObjectURL(n)),r.setAttribute("download",e+".csv"),r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r)):(t="data:text/csv;charset=utf-8,"+t,window.open(encodeURI(t)))}},blockBodyScroll:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"p-overflow-hidden";document.body.style.setProperty("--scrollbar-width",this.calculateBodyScrollbarWidth()+"px"),this.addClass(document.body,t)},unblockBodyScroll:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"p-overflow-hidden";document.body.style.removeProperty("--scrollbar-width"),this.removeClass(document.body,t)}};function h(t){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h(t)}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function y(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,g(r.key),r)}}function g(t){var e=v(t,"string");return"symbol"==h(e)?e:String(e)}function v(t,e){if("object"!=h(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=h(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var m=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};p(this,t),this.element=e,this.listener=n}var e,n,r;return e=t,(n=[{key:"bindScrollListener",value:function(){this.scrollableParents=d.getScrollableParents(this.element);for(var t=0;t<this.scrollableParents.length;t++)this.scrollableParents[t].addEventListener("scroll",this.listener)}},{key:"unbindScrollListener",value:function(){if(this.scrollableParents)for(var t=0;t<this.scrollableParents.length;t++)this.scrollableParents[t].removeEventListener("scroll",this.listener)}},{key:"destroy",value:function(){this.unbindScrollListener(),this.element=null,this.listener=null,this.scrollableParents=null}}])&&y(e.prototype,n),r&&y(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function b(t,e){return E(t)||S(t,e)||T(t,e)||w()}function w(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function S(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,l,a=[],s=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(a.push(r.value),a.length!==e);s=!0);}catch(t){u=!0,i=t}finally{try{if(!s&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw i}}return a}}function E(t){if(Array.isArray(t))return t}function x(t){return O(t)||C(t)||T(t)||A()}function A(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function C(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function O(t){if(Array.isArray(t))return I(t)}function j(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=T(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return l=t.done,t},e:function(t){a=!0,o=t},f:function(){try{l||null==n.return||n.return()}finally{if(a)throw o}}}}function T(t,e){if(t){if("string"==typeof t)return I(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?I(t,e):void 0}}function I(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function F(t){return F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},F(t)}var P={equals:function(t,e,n){return n?this.resolveFieldData(t,n)===this.resolveFieldData(e,n):this.deepEquals(t,e)},deepEquals:function(t,e){if(t===e)return!0;if(t&&e&&"object"==F(t)&&"object"==F(e)){var n,r,i,o=Array.isArray(t),l=Array.isArray(e);if(o&&l){if((r=t.length)!=e.length)return!1;for(n=r;0!=n--;)if(!this.deepEquals(t[n],e[n]))return!1;return!0}if(o!=l)return!1;var a=t instanceof Date,s=e instanceof Date;if(a!=s)return!1;if(a&&s)return t.getTime()==e.getTime();var u=t instanceof RegExp,c=e instanceof RegExp;if(u!=c)return!1;if(u&&c)return t.toString()==e.toString();var f=Object.keys(t);if((r=f.length)!==Object.keys(e).length)return!1;for(n=r;0!=n--;)if(!Object.prototype.hasOwnProperty.call(e,f[n]))return!1;for(n=r;0!=n--;)if(!this.deepEquals(t[i=f[n]],e[i]))return!1;return!0}return t!=t&&e!=e},resolveFieldData:function(t,e){if(!t||!e)return null;try{var n=t[e];if(this.isNotEmpty(n))return n}catch(t){}if(Object.keys(t).length){if(this.isFunction(e))return e(t);if(-1===e.indexOf("."))return t[e];for(var r=e.split("."),i=t,o=0,l=r.length;o<l;++o){if(null==i)return null;i=i[r[o]]}return i}return null},getItemValue:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return this.isFunction(t)?t.apply(void 0,n):t},filter:function(t,e,n){var r=[];if(t){var i,o=j(t);try{for(o.s();!(i=o.n()).done;){var l,a=i.value,s=j(e);try{for(s.s();!(l=s.n()).done;){if(String(this.resolveFieldData(a,l.value)).toLowerCase().indexOf(n.toLowerCase())>-1){r.push(a);break}}}catch(t){s.e(t)}finally{s.f()}}}catch(t){o.e(t)}finally{o.f()}}return r},reorderArray:function(t,e,n){t&&e!==n&&(n>=t.length&&(n%=t.length,e%=t.length),t.splice(n,0,t.splice(e,1)[0]))},findIndexInList:function(t,e){var n=-1;if(e)for(var r=0;r<e.length;r++)if(e[r]===t){n=r;break}return n},contains:function(t,e){if(null!=t&&e&&e.length){var n,r=j(e);try{for(r.s();!(n=r.n()).done;){if(this.equals(t,n.value))return!0}}catch(t){r.e(t)}finally{r.f()}}return!1},insertIntoOrderedArray:function(t,e,n,r){if(n.length>0){for(var i=!1,o=0;o<n.length;o++){if(this.findIndexInList(n[o],r)>e){n.splice(o,0,t),i=!0;break}}i||n.push(t)}else n.push(t)},removeAccents:function(t){return t&&t.search(/[\xC0-\xFF]/g)>-1&&(t=t.replace(/[\xC0-\xC5]/g,"A").replace(/[\xC6]/g,"AE").replace(/[\xC7]/g,"C").replace(/[\xC8-\xCB]/g,"E").replace(/[\xCC-\xCF]/g,"I").replace(/[\xD0]/g,"D").replace(/[\xD1]/g,"N").replace(/[\xD2-\xD6\xD8]/g,"O").replace(/[\xD9-\xDC]/g,"U").replace(/[\xDD]/g,"Y").replace(/[\xDE]/g,"P").replace(/[\xE0-\xE5]/g,"a").replace(/[\xE6]/g,"ae").replace(/[\xE7]/g,"c").replace(/[\xE8-\xEB]/g,"e").replace(/[\xEC-\xEF]/g,"i").replace(/[\xF1]/g,"n").replace(/[\xF2-\xF6\xF8]/g,"o").replace(/[\xF9-\xFC]/g,"u").replace(/[\xFE]/g,"p").replace(/[\xFD\xFF]/g,"y")),t},getVNodeProp:function(t,e){if(t){var n=t.props;if(n){var r=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=Object.prototype.hasOwnProperty.call(n,r)?r:e;return t.type.extends.props[e].type===Boolean&&""===n[i]||n[i]}}return null},toFlatCase:function(t){return this.isString(t)?t.replace(/(-|_)/g,"").toLowerCase():t},toKebabCase:function(t){return this.isString(t)?t.replace(/(_)/g,"-").replace(/[A-Z]/g,(function(t,e){return 0===e?t:"-"+t.toLowerCase()})).toLowerCase():t},toCapitalCase:function(t){return this.isString(t,{empty:!1})?t[0].toUpperCase()+t.slice(1):t},isEmpty:function(t){return null==t||""===t||Array.isArray(t)&&0===t.length||!(t instanceof Date)&&"object"===F(t)&&0===Object.keys(t).length},isNotEmpty:function(t){return!this.isEmpty(t)},isFunction:function(t){return!!(t&&t.constructor&&t.call&&t.apply)},isObject:function(t){return t instanceof Object&&t.constructor===Object&&(!(arguments.length>1&&void 0!==arguments[1])||arguments[1]||0!==Object.keys(t).length)},isDate:function(t){return t instanceof Date&&t.constructor===Date},isArray:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Array.isArray(t)&&(e||0!==t.length)},isString:function(t){return"string"==typeof t&&(!(arguments.length>1&&void 0!==arguments[1])||arguments[1]||""!==t)},isPrintableCharacter:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.isNotEmpty(t)&&1===t.length&&t.match(/\S| /)},findLast:function(t,e){var n;if(this.isNotEmpty(t))try{n=t.findLast(e)}catch(r){n=x(t).reverse().find(e)}return n},findLastIndex:function(t,e){var n=-1;if(this.isNotEmpty(t))try{n=t.findLastIndex(e)}catch(r){n=t.lastIndexOf(x(t).reverse().find(e))}return n},sort:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,i=this.compare(t,e,arguments.length>3?arguments[3]:void 0,n),o=n;return(this.isEmpty(t)||this.isEmpty(e))&&(o=1===r?n:r),o*i},compare:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=this.isEmpty(t),o=this.isEmpty(e);return i&&o?0:i?r:o?-r:"string"==typeof t&&"string"==typeof e?n(t,e):t<e?-1:t>e?1:0},localeComparator:function(){return new Intl.Collator(void 0,{numeric:!0}).compare},nestedKeys:function(){var t=this,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object.entries(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).reduce((function(n,r){var i=b(r,2),o=i[0],l=i[1],a=e?"".concat(e,".").concat(o):o;return t.isObject(l)?n=n.concat(t.nestedKeys(l,a)):n.push(a),n}),[])},stringify:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=" ".repeat(r),o=" ".repeat(r+n);return this.isArray(t)?"["+t.map((function(t){return e.stringify(t,n,r+n)})).join(", ")+"]":this.isDate(t)?t.toISOString():this.isFunction(t)?t.toString():this.isObject(t)?"{\n"+Object.entries(t).map((function(t){var i=b(t,2),l=i[0],a=i[1];return"".concat(o).concat(l,": ").concat(e.stringify(a,n,r+n))})).join(",\n")+"\n".concat(i)+"}":JSON.stringify(t)}};function L(t){return L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},L(t)}function W(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function k(t,e){if(t){if("string"==typeof t)return D(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D(t,e):void 0}}function N(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function H(t){if(Array.isArray(t))return D(t)}function D(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function B(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function R(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,M(r.key),r)}}function U(t,e,n){return(e=M(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function M(t){var e=V(t,"string");return"symbol"==L(e)?e:String(e)}function V(t,e){if("object"!=L(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=L(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var $=function(){function t(e){var n=e.init,r=e.type;B(this,t),U(this,"helpers",void 0),U(this,"type",void 0),this.helpers=new Set(n),this.type=r}var e,n,r;return e=t,n=[{key:"add",value:function(t){this.helpers.add(t)}},{key:"update",value:function(){}},{key:"delete",value:function(t){this.helpers.delete(t)}},{key:"clear",value:function(){this.helpers.clear()}},{key:"get",value:function(t,e){var n,r=this._get(t,e),i=r?this._recursive(H(n=this.helpers)||N(n)||k(n)||W(),r):null;return P.isNotEmpty(i)?i:null}},{key:"_isMatched",value:function(t,e){var n,r=null==t?void 0:t.parent;return(null==r||null===(n=r.vnode)||void 0===n?void 0:n.key)===e||r&&this._isMatched(r,e)||!1}},{key:"_get",value:function(t,e){var n,r;return(null===(n=e||(null==t?void 0:t.$slots))||void 0===n||null===(r=n.default)||void 0===r?void 0:r.call(n))||null}},{key:"_recursive",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).forEach((function(r){r.children instanceof Array?n=n.concat(t._recursive(n,r.children)):r.type.name===t.type?n.push(r):P.isNotEmpty(r.key)&&(n=n.concat(e.filter((function(e){return t._isMatched(e,r.key)})).map((function(t){return t.vnode}))))})),n}}],n&&R(e.prototype,n),r&&R(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),q=0;function _(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function z(t,e){if(t){if("string"==typeof t)return Z(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Z(t,e):void 0}}function X(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function Y(t){if(Array.isArray(t))return Z(t)}function Z(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var K,J,G,Q,tt,et=(K=[],J=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:999,r=Q(t,e,n),i=r.value+(r.key===t?0:n)+1;return K.push({key:t,value:i}),i},G=function(t,e){return Q(t,e).value},Q=function(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return(n=K,Y(n)||X(n)||z(n)||_()).reverse().find((function(n){return!!e||n.key===t}))||{key:t,value:r}},{get:tt=function(t){return t&&parseInt(t.style.zIndex,10)||0},set:function(t,e,n){e&&(e.style.zIndex=String(J(t,!0,n)))},clear:function(t){var e;t&&(e=tt(t),K=K.filter((function(t){return t.value!==e})),t.style.zIndex="")},getCurrent:function(t){return G(t,!0)}});return t.ConnectedOverlayScrollHandler=m,t.DomHandler=d,t.EventBus=function(){var t=new Map;return{on:function(e,n){var r=t.get(e);r?r.push(n):r=[n],t.set(e,r)},off:function(e,n){var r=t.get(e);r&&r.splice(r.indexOf(n)>>>0,1)},emit:function(e,n){var r=t.get(e);r&&r.slice().map((function(t){t(n)}))}}},t.HelperSet=$,t.ObjectUtils=P,t.UniqueComponentId=function(){return q++,"".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"pv_id_").concat(q)},t.ZIndexUtils=et,Object.defineProperty(t,"__esModule",{value:!0}),t}({});