primereact 9.1.0 → 9.2.0
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/accordion/package.json +7 -0
- package/api/api.d.ts +2 -2
- package/api/package.json +7 -0
- package/autocomplete/autocomplete.cjs.js +1 -0
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +1 -0
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +1 -0
- package/autocomplete/autocomplete.min.js +1 -1
- package/autocomplete/package.json +7 -0
- package/avatar/avatar.cjs.js +2 -2
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.esm.js +2 -2
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +2 -2
- package/avatar/avatar.min.js +1 -1
- package/avatar/package.json +7 -0
- package/avatargroup/package.json +7 -0
- package/badge/package.json +7 -0
- package/blockui/package.json +7 -0
- package/breadcrumb/package.json +7 -0
- package/button/package.json +7 -0
- package/calendar/calendar.cjs.js +2 -2
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +2 -2
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +2 -2
- package/calendar/calendar.min.js +1 -1
- package/calendar/package.json +7 -0
- package/card/package.json +7 -0
- package/carousel/package.json +7 -0
- package/cascadeselect/package.json +7 -0
- package/chart/package.json +7 -0
- package/checkbox/package.json +7 -0
- package/chip/package.json +7 -0
- package/chips/package.json +7 -0
- package/colorpicker/package.json +7 -0
- package/column/package.json +7 -0
- package/columngroup/package.json +7 -0
- package/confirmdialog/package.json +7 -0
- package/confirmpopup/package.json +7 -0
- package/contextmenu/contextmenu.cjs.js +61 -18
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.d.ts +9 -0
- package/contextmenu/contextmenu.esm.js +63 -20
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +61 -18
- package/contextmenu/contextmenu.min.js +1 -1
- package/contextmenu/package.json +7 -0
- package/core/core.js +226 -115
- package/core/core.min.js +4 -4
- package/csstransition/package.json +7 -0
- package/datascroller/package.json +7 -0
- package/datatable/datatable.cjs.js +84 -79
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +2 -11
- package/datatable/datatable.esm.js +85 -80
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +84 -79
- package/datatable/datatable.min.css +1 -1
- package/datatable/datatable.min.js +1 -1
- package/datatable/package.json +7 -0
- package/dataview/package.json +7 -0
- package/deferredcontent/package.json +7 -0
- package/dialog/package.json +7 -0
- package/divider/package.json +7 -0
- package/dock/package.json +7 -0
- package/dropdown/dropdown.cjs.js +1 -0
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +1 -0
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +1 -0
- package/dropdown/dropdown.min.js +1 -1
- package/dropdown/package.json +7 -0
- package/editor/package.json +7 -0
- package/fieldset/package.json +7 -0
- package/fileupload/package.json +7 -0
- package/galleria/package.json +7 -0
- package/hooks/hooks.cjs.js +34 -2
- package/hooks/hooks.cjs.min.js +1 -1
- package/hooks/hooks.d.ts +13 -0
- package/hooks/hooks.esm.js +34 -3
- package/hooks/hooks.esm.min.js +1 -1
- package/hooks/hooks.js +34 -2
- package/hooks/hooks.min.js +1 -1
- package/hooks/package.json +7 -0
- package/image/package.json +7 -0
- package/inplace/package.json +7 -0
- package/inputmask/package.json +7 -0
- package/inputnumber/package.json +7 -0
- package/inputswitch/package.json +7 -0
- package/inputtext/inputtext.min.css +1 -1
- package/inputtext/package.json +7 -0
- package/inputtextarea/package.json +7 -0
- package/keyfilter/package.json +7 -0
- package/knob/package.json +7 -0
- package/listbox/listbox.cjs.js +5 -4
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +5 -4
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +5 -4
- package/listbox/listbox.min.js +1 -1
- package/listbox/package.json +7 -0
- package/megamenu/megamenu.cjs.js +91 -6
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.d.ts +9 -0
- package/megamenu/megamenu.esm.js +93 -8
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +91 -6
- package/megamenu/megamenu.min.css +1 -1
- package/megamenu/megamenu.min.js +1 -1
- package/megamenu/package.json +7 -0
- package/mention/package.json +7 -0
- package/menu/package.json +7 -0
- package/menubar/package.json +7 -0
- package/menuitem/package.json +4 -0
- package/message/package.json +7 -0
- package/messages/package.json +7 -0
- package/multiselect/multiselect.cjs.js +1 -0
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +1 -0
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +1 -0
- package/multiselect/multiselect.min.js +1 -1
- package/multiselect/package.json +7 -0
- package/multistatecheckbox/package.json +7 -0
- package/orderlist/package.json +7 -0
- package/organizationchart/package.json +7 -0
- package/overlaypanel/package.json +7 -0
- package/overlayservice/package.json +7 -0
- package/package.json +1 -1
- package/paginator/package.json +7 -0
- package/panel/package.json +7 -0
- package/panelmenu/package.json +7 -0
- package/password/package.json +7 -0
- package/picklist/package.json +7 -0
- package/portal/package.json +6 -0
- package/primereact.all.cjs.js +554 -244
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +554 -245
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +554 -244
- package/primereact.all.min.js +1 -1
- package/progressbar/package.json +7 -0
- package/progressspinner/package.json +7 -0
- package/radiobutton/package.json +7 -0
- package/rating/package.json +7 -0
- package/resources/primereact.css +781 -832
- package/resources/primereact.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +130 -2
- package/resources/themes/arya-green/theme.css +130 -2
- package/resources/themes/arya-orange/theme.css +130 -2
- package/resources/themes/arya-purple/theme.css +130 -2
- package/resources/themes/bootstrap4-dark-blue/theme.css +131 -2
- package/resources/themes/bootstrap4-dark-purple/theme.css +131 -2
- package/resources/themes/bootstrap4-light-blue/theme.css +131 -2
- package/resources/themes/bootstrap4-light-purple/theme.css +131 -2
- package/resources/themes/fluent-light/theme.css +131 -2
- package/resources/themes/lara-dark-blue/theme.css +131 -2
- package/resources/themes/lara-dark-indigo/theme.css +131 -2
- package/resources/themes/lara-dark-purple/theme.css +131 -2
- package/resources/themes/lara-dark-teal/theme.css +131 -2
- package/resources/themes/lara-light-blue/theme.css +131 -2
- package/resources/themes/lara-light-indigo/theme.css +131 -2
- package/resources/themes/lara-light-purple/theme.css +131 -2
- package/resources/themes/lara-light-teal/theme.css +131 -2
- package/resources/themes/luna-amber/theme.css +131 -2
- package/resources/themes/luna-blue/theme.css +131 -2
- package/resources/themes/luna-green/theme.css +131 -2
- package/resources/themes/luna-pink/theme.css +131 -2
- package/resources/themes/md-dark-deeppurple/theme.css +131 -2
- package/resources/themes/md-dark-indigo/theme.css +131 -2
- package/resources/themes/md-light-deeppurple/theme.css +131 -2
- package/resources/themes/md-light-indigo/theme.css +131 -2
- package/resources/themes/mdc-dark-deeppurple/theme.css +131 -2
- package/resources/themes/mdc-dark-indigo/theme.css +131 -2
- package/resources/themes/mdc-light-deeppurple/theme.css +131 -2
- package/resources/themes/mdc-light-indigo/theme.css +131 -2
- package/resources/themes/mira/theme.css +131 -2
- package/resources/themes/nano/theme.css +131 -2
- package/resources/themes/nova/theme.css +131 -2
- package/resources/themes/nova-accent/theme.css +131 -2
- package/resources/themes/nova-alt/theme.css +131 -2
- package/resources/themes/rhea/theme.css +131 -2
- package/resources/themes/saga-blue/theme.css +131 -2
- package/resources/themes/saga-green/theme.css +131 -2
- package/resources/themes/saga-orange/theme.css +131 -2
- package/resources/themes/saga-purple/theme.css +131 -2
- package/resources/themes/soho-dark/theme.css +131 -2
- package/resources/themes/soho-light/theme.css +131 -2
- package/resources/themes/tailwind-light/theme.css +131 -2
- package/resources/themes/vela-blue/theme.css +131 -2
- package/resources/themes/vela-green/theme.css +131 -2
- package/resources/themes/vela-orange/theme.css +131 -2
- package/resources/themes/vela-purple/theme.css +131 -2
- package/resources/themes/viva-dark/theme.css +131 -2
- package/resources/themes/viva-light/theme.css +131 -2
- package/ripple/package.json +7 -0
- package/row/package.json +7 -0
- package/scrollpanel/package.json +7 -0
- package/scrolltop/package.json +7 -0
- package/selectbutton/package.json +7 -0
- package/selectitem/package.json +4 -0
- package/sidebar/package.json +7 -0
- package/skeleton/package.json +7 -0
- package/slidemenu/package.json +7 -0
- package/slider/package.json +7 -0
- package/speeddial/package.json +7 -0
- package/splitbutton/package.json +7 -0
- package/splitter/package.json +7 -0
- package/steps/package.json +7 -0
- package/styleclass/package.json +7 -0
- package/tabmenu/package.json +7 -0
- package/tabview/package.json +7 -0
- package/tag/package.json +7 -0
- package/terminal/package.json +7 -0
- package/terminalservice/package.json +7 -0
- package/tieredmenu/package.json +7 -0
- package/tieredmenu/tieredmenu.cjs.js +69 -9
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.d.ts +9 -0
- package/tieredmenu/tieredmenu.esm.js +71 -11
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +69 -9
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/package.json +7 -0
- package/toast/package.json +7 -0
- package/toast/toast.min.css +1 -1
- package/togglebutton/package.json +7 -0
- package/toolbar/package.json +7 -0
- package/tooltip/package.json +7 -0
- package/tree/package.json +7 -0
- package/treenode/package.json +4 -0
- package/treeselect/package.json +7 -0
- package/treetable/package.json +7 -0
- package/treetable/treetable.cjs.js +12 -9
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +0 -5
- package/treetable/treetable.esm.js +12 -9
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +12 -9
- package/treetable/treetable.min.css +1 -1
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/package.json +7 -0
- package/utils/package.json +7 -0
- package/utils/utils.cjs.js +14 -9
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.esm.js +14 -9
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +14 -9
- package/utils/utils.min.js +1 -1
- package/virtualscroller/package.json +7 -0
- package/virtualscroller/virtualscroller.cjs.js +177 -104
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.d.ts +20 -0
- package/virtualscroller/virtualscroller.esm.js +177 -104
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +177 -104
- package/virtualscroller/virtualscroller.min.css +1 -1
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +1 -1
package/utils/utils.cjs.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function e(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("react"));function n(e){if(Array.isArray(e))return e}function r(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,l,a=[],u=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);u=!0);}catch(e){s=!0,i=e}finally{try{if(!u&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(s)throw i}}return a}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}function l(){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 a(e,t){return n(e)||r(e,t)||o(e,t)||l()}function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function s(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t){for(var r=[],i=0;i<t.length;i++){var o=t[i];if(o){var l=u(o);if("string"===l||"number"===l)r.push(o);else if("object"===l){var s=Array.isArray(o)?o:Object.entries(o).map((function(e){var t=a(e,2);return t[1]?t[0]:null}));r=s.length?r.concat(s.filter((function(e){return!!e}))):r}}}return r.join(" ")}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){if("object"!==u(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function d(e){var t=f(e,"string");return"symbol"===u(t)?t:String(t)}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,d(r.key),r)}}function g(e,t,n){return t&&p(e.prototype,t),n&&p(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function y(e,t,n){return(t=d(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=h(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){a=!0,o=e},f:function(){try{l||null==n.return||n.return()}finally{if(a)throw o}}}}function h(e,t){if(e){if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var b=function(){function e(){c(this,e)}return g(e,null,[{key:"innerWidth",value:function(e){if(e){var t=e.offsetWidth,n=getComputedStyle(e);return t+=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)}return 0}},{key:"width",value:function(e){if(e){var t=e.offsetWidth,n=getComputedStyle(e);return t-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),t}return 0}},{key:"getBrowserLanguage",value:function(){return navigator.userLanguage||navigator.languages&&navigator.languages.length&&navigator.languages[0]||navigator.language||navigator.browserLanguage||navigator.systemLanguage||"en"}},{key:"getWindowScrollTop",value:function(){var e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)}},{key:"getWindowScrollLeft",value:function(){var e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}},{key:"getOuterWidth",value:function(e,t){if(e){var n=e.offsetWidth||e.getBoundingClientRect().width;if(t){var r=getComputedStyle(e);n+=parseFloat(r.marginLeft)+parseFloat(r.marginRight)}return n}return 0}},{key:"getOuterHeight",value:function(e,t){if(e){var n=e.offsetHeight||e.getBoundingClientRect().height;if(t){var r=getComputedStyle(e);n+=parseFloat(r.marginTop)+parseFloat(r.marginBottom)}return n}return 0}},{key:"getClientHeight",value:function(e,t){if(e){var n=e.clientHeight;if(t){var r=getComputedStyle(e);n+=parseFloat(r.marginTop)+parseFloat(r.marginBottom)}return n}return 0}},{key:"getClientWidth",value:function(e,t){if(e){var n=e.clientWidth;if(t){var r=getComputedStyle(e);n+=parseFloat(r.marginLeft)+parseFloat(r.marginRight)}return n}return 0}},{key:"getViewport",value:function(){var e=window,t=document,n=t.documentElement,r=t.getElementsByTagName("body")[0];return{width:e.innerWidth||n.clientWidth||r.clientWidth,height:e.innerHeight||n.clientHeight||r.clientHeight}}},{key:"getOffset",value:function(e){if(e){var t=e.getBoundingClientRect();return{top:t.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:t.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}return{top:"auto",left:"auto"}}},{key:"index",value:function(e){if(e)for(var t=e.parentNode.childNodes,n=0,r=0;r<t.length;r++){if(t[r]===e)return n;1===t[r].nodeType&&n++}return-1}},{key:"addMultipleClasses",value:function(e,t){if(e&&t)if(e.classList)for(var n=t.split(" "),r=0;r<n.length;r++)e.classList.add(n[r]);else for(var i=t.split(" "),o=0;o<i.length;o++)e.className+=" "+i[o]}},{key:"removeMultipleClasses",value:function(e,t){if(e&&t)if(e.classList)for(var n=t.split(" "),r=0;r<n.length;r++)e.classList.remove(n[r]);else for(var i=t.split(" "),o=0;o<i.length;o++)e.className=e.className.replace(new RegExp("(^|\\b)"+i[o].split(" ").join("|")+"(\\b|$)","gi")," ")}},{key:"addClass",value:function(e,t){e&&t&&(e.classList?e.classList.add(t):e.className+=" "+t)}},{key:"removeClass",value:function(e,t){e&&t&&(e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," "))}},{key:"hasClass",value:function(e,t){return!!e&&(e.classList?e.classList.contains(t):new RegExp("(^| )"+t+"( |$)","gi").test(e.className))}},{key:"find",value:function(e,t){return e?Array.from(e.querySelectorAll(t)):[]}},{key:"findSingle",value:function(e,t){return e?e.querySelector(t):null}},{key:"getHeight",value:function(e){if(e){var t=e.offsetHeight,n=getComputedStyle(e);return t-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)+parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth)}return 0}},{key:"getWidth",value:function(e){if(e){var t=e.offsetWidth,n=getComputedStyle(e);return t-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)+parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth)}return 0}},{key:"alignOverlay",value:function(t,n,r){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];t&&n&&("self"===r?this.relativePosition(t,n):(i&&(t.style.minWidth=e.getOuterWidth(n)+"px"),this.absolutePosition(t,n)))}},{key:"absolutePosition",value:function(e,t){if(e){var n,r,i=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),o=i.height,l=i.width,a=t.offsetHeight,u=t.offsetWidth,s=t.getBoundingClientRect(),c=this.getWindowScrollTop(),f=this.getWindowScrollLeft(),d=this.getViewport();s.top+a+o>d.height?((n=s.top+c-o)<0&&(n=c),e.style.transformOrigin="bottom"):(n=a+s.top+c,e.style.transformOrigin="top"),r=s.left+u+l>d.width?Math.max(0,s.left+f+u-l):s.left+f,e.style.top=n+"px",e.style.left=r+"px"}}},{key:"relativePosition",value:function(e,t){if(e){var n,r,i=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),o=t.offsetHeight,l=t.getBoundingClientRect(),a=this.getViewport();l.top+o+i.height>a.height?(l.top+(n=-1*i.height)<0&&(n=-1*l.top),e.style.transformOrigin="bottom"):(n=o,e.style.transformOrigin="top"),r=i.width>a.width?-1*l.left:l.left+i.width>a.width?-1*(l.left+i.width-a.width):0,e.style.top=n+"px",e.style.left=r+"px"}}},{key:"flipfitCollision",value:function(t,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"left top",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"left bottom",l=arguments.length>4?arguments[4]:void 0;if(t&&n){var a=n.getBoundingClientRect(),u=this.getViewport(),s=i.split(" "),c=o.split(" "),f=function(e,t){return t?+e.substring(e.search(/(\+|-)/g))||0:e.substring(0,e.search(/(\+|-)/g))||e},d={my:{x:f(s[0]),y:f(s[1]||s[0]),offsetX:f(s[0],!0),offsetY:f(s[1]||s[0],!0)},at:{x:f(c[0]),y:f(c[1]||c[0]),offsetX:f(c[0],!0),offsetY:f(c[1]||c[0],!0)}},p={left:function(){return d.my.offsetX+d.at.offsetX+a.left+("left"===d.my.x?0:-1*("center"===d.my.x?r.getOuterWidth(t)/2:r.getOuterWidth(t)))},top:function(){return d.my.offsetY+d.at.offsetY+a.top+("top"===d.my.y?0:-1*("center"===d.my.y?r.getOuterHeight(t)/2:r.getOuterHeight(t)))}},g={count:{x:0,y:0},left:function(){var n=p.left(),r=e.getWindowScrollLeft();t.style.left=n+r+"px",2===this.count.x?(t.style.left=r+"px",this.count.x=0):n<0&&(this.count.x++,d.my.x="left",d.at.x="right",d.my.offsetX*=-1,d.at.offsetX*=-1,this.right())},right:function(){var r=p.left()+e.getOuterWidth(n),i=e.getWindowScrollLeft();t.style.left=r+i+"px",2===this.count.x?(t.style.left=u.width-e.getOuterWidth(t)+i+"px",this.count.x=0):r+e.getOuterWidth(t)>u.width&&(this.count.x++,d.my.x="right",d.at.x="left",d.my.offsetX*=-1,d.at.offsetX*=-1,this.left())},top:function(){var n=p.top(),r=e.getWindowScrollTop();t.style.top=n+r+"px",2===this.count.y?(t.style.left=r+"px",this.count.y=0):n<0&&(this.count.y++,d.my.y="top",d.at.y="bottom",d.my.offsetY*=-1,d.at.offsetY*=-1,this.bottom())},bottom:function(){var r=p.top()+e.getOuterHeight(n),i=e.getWindowScrollTop();t.style.top=r+i+"px",2===this.count.y?(t.style.left=u.height-e.getOuterHeight(t)+i+"px",this.count.y=0):r+e.getOuterHeight(n)>u.height&&(this.count.y++,d.my.y="bottom",d.at.y="top",d.my.offsetY*=-1,d.at.offsetY*=-1,this.top())},center:function(r){if("y"===r){var i=p.top()+e.getOuterHeight(n)/2;t.style.top=i+e.getWindowScrollTop()+"px",i<0?this.bottom():i+e.getOuterHeight(n)>u.height&&this.top()}else{var o=p.left()+e.getOuterWidth(n)/2;t.style.left=o+e.getWindowScrollLeft()+"px",o<0?this.left():o+e.getOuterWidth(t)>u.width&&this.right()}}};g[d.at.x]("x"),g[d.at.y]("y"),this.isFunction(l)&&l(d)}}},{key:"findCollisionPosition",value:function(e){if(e){var t="left"===e?"right":"left";return"top"===e||"bottom"===e?{axis:"y",my:"center ".concat("top"===e?"bottom":"top"),at:"center ".concat(e)}:{axis:"x",my:"".concat(t," center"),at:"".concat(e," center")}}}},{key:"getParents",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return null===e.parentNode?t:this.getParents(e.parentNode,t.concat([e.parentNode]))}},{key:"getScrollableParents",value:function(e){var t=[];if(e){var n,r=this.getParents(e),i=/(auto|scroll)/,o=function(e){var t=e?getComputedStyle(e):null;return t&&(i.test(t.getPropertyValue("overflow"))||i.test(t.getPropertyValue("overflowX"))||i.test(t.getPropertyValue("overflowY")))},l=v(r);try{for(l.s();!(n=l.n()).done;){var a=n.value,u=1===a.nodeType&&a.dataset.scrollselectors;if(u){var s,c=v(u.split(","));try{for(c.s();!(s=c.n()).done;){var f=this.findSingle(a,s.value);f&&o(f)&&t.push(f)}}catch(e){c.e(e)}finally{c.f()}}9!==a.nodeType&&o(a)&&t.push(a)}}catch(e){l.e(e)}finally{l.f()}}return t}},{key:"getHiddenElementOuterHeight",value:function(e){if(e){e.style.visibility="hidden",e.style.display="block";var t=e.offsetHeight;return e.style.display="none",e.style.visibility="visible",t}return 0}},{key:"getHiddenElementOuterWidth",value:function(e){if(e){e.style.visibility="hidden",e.style.display="block";var t=e.offsetWidth;return e.style.display="none",e.style.visibility="visible",t}return 0}},{key:"getHiddenElementDimensions",value:function(e){var t={};return e&&(e.style.visibility="hidden",e.style.display="block",t.width=e.offsetWidth,t.height=e.offsetHeight,e.style.display="none",e.style.visibility="visible"),t}},{key:"fadeIn",value:function(e,t){if(e){e.style.opacity=0;var n=+new Date,r=0;!function i(){r=+e.style.opacity+((new Date).getTime()-n)/t,e.style.opacity=r,n=+new Date,+r<1&&(window.requestAnimationFrame&&requestAnimationFrame(i)||setTimeout(i,16))}()}}},{key:"fadeOut",value:function(e,t){if(e)var n=1,r=50/t,i=setInterval((function(){(n-=r)<=0&&(n=0,clearInterval(i)),e.style.opacity=n}),50)}},{key:"getUserAgent",value:function(){return navigator.userAgent}},{key:"isIOS",value:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream}},{key:"isAndroid",value:function(){return/(android)/i.test(navigator.userAgent)}},{key:"isChrome",value:function(){return/(chrome)/i.test(navigator.userAgent)}},{key:"isTouchDevice",value:function(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}},{key:"isFunction",value:function(e){return!!(e&&e.constructor&&e.call&&e.apply)}},{key:"appendChild",value:function(e,t){if(this.isElement(t))t.appendChild(e);else{if(!t.el||!t.el.nativeElement)throw new Error("Cannot append "+t+" to "+e);t.el.nativeElement.appendChild(e)}}},{key:"removeChild",value:function(e,t){if(this.isElement(t))t.removeChild(e);else{if(!t.el||!t.el.nativeElement)throw new Error("Cannot remove "+e+" from "+t);t.el.nativeElement.removeChild(e)}}},{key:"isElement",value:function(e){return"object"===("undefined"==typeof HTMLElement?"undefined":u(HTMLElement))?e instanceof HTMLElement:e&&"object"===u(e)&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName}},{key:"scrollInView",value:function(e,t){var n=getComputedStyle(e).getPropertyValue("borderTopWidth"),r=n?parseFloat(n):0,i=getComputedStyle(e).getPropertyValue("paddingTop"),o=i?parseFloat(i):0,l=e.getBoundingClientRect(),a=t.getBoundingClientRect().top+document.body.scrollTop-(l.top+document.body.scrollTop)-r-o,u=e.scrollTop,s=e.clientHeight,c=this.getOuterHeight(t);a<0?e.scrollTop=u+a:a+c>s&&(e.scrollTop=u+a-s+c)}},{key:"clearSelection",value: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(e){}}},{key:"calculateScrollbarWidth",value:function(e){if(e){var t=getComputedStyle(e);return e.offsetWidth-e.clientWidth-parseFloat(t.borderLeftWidth)-parseFloat(t.borderRightWidth)}if(null!=this.calculatedScrollbarWidth)return this.calculatedScrollbarWidth;var n=document.createElement("div");n.className="p-scrollbar-measure",document.body.appendChild(n);var r=n.offsetWidth-n.clientWidth;return document.body.removeChild(n),this.calculatedScrollbarWidth=r,r}},{key:"getBrowser",value:function(){if(!this.browser){var e=this.resolveUserAgent();this.browser={},e.browser&&(this.browser[e.browser]=!0,this.browser.version=e.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser}},{key:"resolveUserAgent",value:function(){var e=navigator.userAgent.toLowerCase(),t=/(chrome)[ ]([\w.]+)/.exec(e)||/(webkit)[ ]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ ]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}}},{key:"isVisible",value:function(e){return e&&(0!==e.clientHeight||0!==e.getClientRects().length||"none"!==getComputedStyle(e).display)}},{key:"isExist",value:function(e){return!(null==e||!e.nodeName||!e.parentNode)}},{key:"hasDOM",value:function(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}},{key:"getFocusableElements",value:function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=e.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)),o=[],l=v(i);try{for(l.s();!(n=l.n()).done;){var a=n.value;"none"!==getComputedStyle(a).display&&"hidden"!==getComputedStyle(a).visibility&&o.push(a)}}catch(e){l.e(e)}finally{l.f()}return o}},{key:"getFirstFocusableElement",value:function(t,n){var r=e.getFocusableElements(t,n);return r.length>0?r[0]:null}},{key:"getLastFocusableElement",value:function(t,n){var r=e.getFocusableElements(t,n);return r.length>0?r[r.length-1]:null}},{key:"focus",value:function(e,t){e&&document.activeElement!==e&&e.focus({preventScroll:void 0===t||!t})}},{key:"focusFirstElement",value:function(t,n){if(t){var r=e.getFirstFocusableElement(t);return r&&e.focus(r,n),r}}},{key:"getCursorOffset",value:function(e,t,n,r){if(e){var i=getComputedStyle(e),o=document.createElement("div");o.style.position="absolute",o.style.top="0px",o.style.left="0px",o.style.visibility="hidden",o.style.pointerEvents="none",o.style.overflow=i.overflow,o.style.width=i.width,o.style.height=i.height,o.style.padding=i.padding,o.style.border=i.border,o.style.overflowWrap=i.overflowWrap,o.style.whiteSpace=i.whiteSpace,o.style.lineHeight=i.lineHeight,o.innerHTML=t.replace(/\r\n|\r|\n/g,"<br />");var l=document.createElement("span");l.textContent=r,o.appendChild(l);var a=document.createTextNode(n);o.appendChild(a),document.body.appendChild(o);var u=l.offsetLeft,s=l.offsetTop,c=l.clientHeight;return document.body.removeChild(o),{left:Math.abs(u-e.scrollLeft),top:Math.abs(s-e.scrollTop)+c}}return{top:"auto",left:"auto"}}},{key:"invokeElementMethod",value:function(e,t,n){e[t].apply(e,n)}},{key:"isClickable",value:function(e){var t=e.nodeName,n=e.parentElement&&e.parentElement.nodeName;return"INPUT"===t||"TEXTAREA"===t||"BUTTON"===t||"A"===t||"INPUT"===n||"TEXTAREA"===n||"BUTTON"===n||"A"===n||this.hasClass(e,"p-button")||this.hasClass(e.parentElement,"p-button")||this.hasClass(e.parentElement,"p-checkbox")||this.hasClass(e.parentElement,"p-radiobutton")}},{key:"applyStyle",value:function(e,t){if("string"==typeof t)e.style.cssText=this.style;else for(var n in this.style)e.style[n]=t[n]}},{key:"exportCSV",value:function(t,n){var r=new Blob([t],{type:"application/csv;charset=utf-8;"});window.navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(r,n+".csv"):e.saveAs({name:n+".csv",src:URL.createObjectURL(r)})||(t="data:text/csv;charset=utf-8,"+t,window.open(encodeURI(t)))}},{key:"saveAs",value:function(e){if(e){var t=document.createElement("a");if(void 0!==t.download){var n=e.name;return t.setAttribute("href",e.src),t.setAttribute("download",n),t.style.display="none",document.body.appendChild(t),t.click(),document.body.removeChild(t),!0}}return!1}},{key:"createInlineStyle",value:function(e){var t=document.createElement("style");try{e||(e=process.env.REACT_APP_CSS_NONCE)}catch(e){}return e&&t.setAttribute("nonce",e),document.head.appendChild(t),t}},{key:"removeInlineStyle",value:function(e){if(this.isExist(e)){try{document.head.removeChild(e)}catch(e){}e=null}return e}},{key:"getTargetElement",value:function(e){if(!e)return null;if("document"===e)return document;if("window"===e)return window;if("object"===u(e)&&e.hasOwnProperty("current"))return this.isExist(e.current)?e.current:null;var t,n=(t=e)&&t.constructor&&t.call&&t.apply?e():e;return n&&9===n.nodeType||this.isExist(n)?n:null}},{key:"getAttributeNames",value:function(e){var t,n,r;for(n=[],r=e.attributes,t=0;t<r.length;++t)n.push(r[t].nodeName);return n.sort(),n}},{key:"isEqualElement",value:function(t,n){var r,i,o,l,a;if(r=e.getAttributeNames(t),i=e.getAttributeNames(n),r.join(",")!==i.join(","))return!1;for(var u=0;u<r.length;++u)if("style"===(o=r[u]))for(var s=t.style,c=n.style,f=/^\d+$/,d=0,p=Object.keys(s);d<p.length;d++){var g=p[d];if(!f.test(g)&&s[g]!==c[g])return!1}else if(t.getAttribute(o)!==n.getAttribute(o))return!1;for(l=t.firstChild,a=n.firstChild;l&&a;l=l.nextSibling,a=a.nextSibling){if(l.nodeType!==a.nodeType)return!1;if(1===l.nodeType){if(!e.isEqualElement(l,a))return!1}else if(l.nodeValue!==a.nodeValue)return!1}return!l&&!a}}]),e}();y(b,"DATA_PROPS",["data-"]),y(b,"ARIA_PROPS",["aria","focus-target"]);var w=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};c(this,e),this.element=t,this.listener=n}return g(e,[{key:"bindScrollListener",value:function(){this.scrollableParents=b.getScrollableParents(this.element);for(var e=0;e<this.scrollableParents.length;e++)this.scrollableParents[e].addEventListener("scroll",this.listener)}},{key:"unbindScrollListener",value:function(){if(this.scrollableParents)for(var e=0;e<this.scrollableParents.length;e++)this.scrollableParents[e].removeEventListener("scroll",this.listener)}},{key:"destroy",value:function(){this.unbindScrollListener(),this.element=null,this.listener=null,this.scrollableParents=null}}]),e}();function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function x(e){if(Array.isArray(e))return i(e)}function O(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function C(){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 S(e){return x(e)||O(e)||o(e)||C()}var P=function(){function e(){c(this,e)}return g(e,null,[{key:"equals",value:function(e,t,n){return n&&e&&"object"===u(e)&&t&&"object"===u(t)?this.resolveFieldData(e,n)===this.resolveFieldData(t,n):this.deepEquals(e,t)}},{key:"deepEquals",value:function(e,t){if(e===t)return!0;if(e&&t&&"object"==u(e)&&"object"==u(t)){var n,r,i,o=Array.isArray(e),l=Array.isArray(t);if(o&&l){if((r=e.length)!==t.length)return!1;for(n=r;0!=n--;)if(!this.deepEquals(e[n],t[n]))return!1;return!0}if(o!==l)return!1;var a=e instanceof Date,s=t instanceof Date;if(a!==s)return!1;if(a&&s)return e.getTime()===t.getTime();var c=e instanceof RegExp,f=t instanceof RegExp;if(c!==f)return!1;if(c&&f)return e.toString()===t.toString();var d=Object.keys(e);if((r=d.length)!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!Object.prototype.hasOwnProperty.call(t,d[n]))return!1;for(n=r;0!=n--;)if(!this.deepEquals(e[i=d[n]],t[i]))return!1;return!0}return e!=e&&t!=t}},{key:"resolveFieldData",value:function(t,n){if(t&&Object.keys(t).length&&n){if(this.isFunction(n))return n(t);if(e.isNotEmpty(t[n]))return t[n];if(-1===n.indexOf("."))return t[n];for(var r=n.split("."),i=t,o=0,l=r.length;o<l;++o){if(null==i)return null;i=i[r[o]]}return i}return null}},{key:"isFunction",value:function(e){return!!(e&&e.constructor&&e.call&&e.apply)}},{key:"isLetter",value:function(e){return e&&(e.toUpperCase()!=e.toLowerCase()||e.codePointAt(0)>127)}},{key:"findDiffKeys",value:function(e,t){return e&&t?Object.keys(e).filter((function(e){return!t.hasOwnProperty(e)})).reduce((function(t,n){return t[n]=e[n],t}),{}):{}}},{key:"reduceKeys",value:function(e,t){var n={};return e&&t&&0!==t.length?(Object.keys(e).filter((function(e){return t.some((function(t){return e.startsWith(t)}))})).forEach((function(t){n[t]=e[t],delete e[t]})),n):n}},{key:"reorderArray",value:function(e,t,n){e&&t!==n&&(n>=e.length&&(n%=e.length,t%=e.length),e.splice(n,0,e.splice(t,1)[0]))}},{key:"findIndexInList",value:function(e,t,n){var r=this;return t?t.findIndex(n?function(t){return r.equals(t,e,n)}:function(t){return t===e}):-1}},{key:"getJSXElement",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return this.isFunction(e)?e.apply(void 0,n):e}},{key:"getProp",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e?e[t]:void 0;return void 0===r?n[t]:r}},{key:"getMergedProps",value:function(e,t){return Object.assign({},t,e)}},{key:"getDiffProps",value:function(e,t){return this.findDiffKeys(e,t)}},{key:"getPropValue",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=n;return n&&1===n.length&&(i=n[0]),this.isFunction(e)?e.apply(void 0,S(i)):e}},{key:"getComponentProp",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.isNotEmpty(e)?this.getProp(e.props,t,n):void 0}},{key:"getComponentProps",value:function(e,t){return this.isNotEmpty(e)?this.getMergedProps(e.props,t):void 0}},{key:"getComponentDiffProps",value:function(e,t){return this.isNotEmpty(e)?this.getDiffProps(e.props,t):void 0}},{key:"isValidChild",value:function(e,t,n){try{0}catch(e){}return!0}},{key:"getRefElement",value:function(e){return e?"object"===u(e)&&e.hasOwnProperty("current")?e.current:e:null}},{key:"combinedRefs",value:function(e,t){e&&t&&("function"==typeof t?t(e.current):t.current=e.current)}},{key:"removeAccents",value:function(e){return e&&e.search(/[\xC0-\xFF]/g)>-1&&(e=e.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")),e}},{key:"isEmpty",value:function(e){return null==e||""===e||Array.isArray(e)&&0===e.length||!(e instanceof Date)&&"object"===u(e)&&0===Object.keys(e).length}},{key:"isNotEmpty",value:function(e){return!this.isEmpty(e)}},{key:"sort",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,l=e.compare(t,n,i,r),a=r;return(e.isEmpty(t)||e.isEmpty(n))&&(a=1===o?r:o),a*l}},{key:"compare",value:function(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=e.isEmpty(t),l=e.isEmpty(n);return o&&l?0:o?i:l?-i:"string"==typeof t&&"string"==typeof n?t.localeCompare(n,r,{numeric:!0}):t<n?-1:t>n?1:0}}]),e}();function j(){return j=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},j.apply(this,arguments)}function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach((function(t){y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var F=function(){function e(){c(this,e)}return g(e,null,[{key:"getJSXIcon",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=null;if(null!==e){var o=u(e),l=s(n.className,"string"===o&&e);if(i=t.createElement("span",j({},n,{className:l})),"string"!==o){var a=T({iconProps:n,element:i},r);return P.getJSXElement(e,a)}}return i}}]),e}(),L=0;var W,D,R,H,N=(W=[],D=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:999,r=H(e,t,n),i=r.value+(r.key===e?0:n)+1;return W.push({key:e,value:i}),i},R=function(e,t){return H(e,t).value},H=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return S(W).reverse().find((function(n){return!!t||n.key===e}))||{key:e,value:n}},{get:function(e){return e&&parseInt(e.style.zIndex,10)||0},set:function(e,t,n,r){t&&(t.style.zIndex=String(D(e,n,r)))},clear:function(e){var t;e&&(t=N.get(e),W=W.filter((function(e){return e.value!==t})),e.style.zIndex="")},getCurrent:function(e,t){return R(e,t)}});exports.ConnectedOverlayScrollHandler=w,exports.DomHandler=b,exports.EventBus=function(){var e=new Map;return{on:function(t,n){var r=e.get(t);r?r.push(n):r=[n],e.set(t,r)},off:function(t,n){var r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)},emit:function(t,n){var r=e.get(t);r&&r.slice().forEach((function(e){return e(n)}))}}},exports.IconUtils=F,exports.ObjectUtils=P,exports.UniqueComponentId=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"pr_id_";return L++,"".concat(e).concat(L)},exports.ZIndexUtils=N,exports.classNames=s,exports.mask=function(e,t){var n,r,i,o,l,a,u,s,c,f,d,p;t=E(E({},{mask:null,slotChar:"_",autoClear:!0,unmask:!1,readOnly:!1,onComplete:null,onChange:null,onFocus:null,onBlur:null}),t);var g=function(t,n){var r,i,o;if(e.offsetParent&&e===document.activeElement)return"number"!=typeof t?(e.setSelectionRange?(i=e.selectionStart,o=e.selectionEnd):document.selection&&document.selection.createRange&&(o=(i=0-(r=document.selection.createRange()).duplicate().moveStart("character",-1e5))+r.text.length),{begin:i,end:o}):(i=t,o="number"==typeof n?n:i,void(e.setSelectionRange?e.setSelectionRange(i,o):e.createTextRange&&((r=e.createTextRange()).collapse(!0),r.moveEnd("character",o),r.moveStart("character",i),r.select())))},y=function(){for(var e=o;e<=u;e++)if(n[e]&&d[e]===v(e))return!1;return!0},v=function(e){return t.slotChar.charAt(e<t.slotChar.length?e:0)},h=function(){return t.unmask?D():e&&e.value},m=function(e){for(;++e<i&&!n[e];);return e},w=function(e){for(;--e>=0&&!n[e];);return e},k=function(e,t){var r,l;if(!(e<0)){for(r=e,l=m(t);r<i;r++)if(n[r]){if(!(l<i&&n[r].test(d[l])))break;d[r]=d[l],d[l]=v(l),l=m(l)}A(),g(Math.max(o,e))}},x=function(e){var t,r,o,l;for(t=e,r=v(e);t<i;t++)if(n[t]){if(o=m(t),l=d[t],d[t]=r,!(o<i&&n[o].test(l)))break;r=l}},O=function(r){var l=e.value,a=g();if(s&&s.length&&s.length>l.length){for(T(!0);a.begin>0&&!n[a.begin-1];)a.begin--;if(0===a.begin)for(;a.begin<o&&!n[a.begin];)a.begin++;g(a.begin,a.begin)}else{for(T(!0);a.begin<i&&!n[a.begin];)a.begin++;g(a.begin,a.begin)}t.onComplete&&y()&&t.onComplete({originalEvent:r,value:h()})},C=function(n){if(T(),t.onBlur&&t.onBlur(n),R(n),e.value!==c){var r=document.createEvent("HTMLEvents");r.initEvent("change",!0,!1),e.dispatchEvent(r)}},S=function(n){if(!t.readOnly){var r,i,o,l=n.which||n.keyCode;s=e.value,8===l||46===l||b.isIOS()&&127===l?((o=(r=g()).end)-(i=r.begin)==0&&(i=46!==l?w(i):o=m(i-1),o=46===l?m(o):o),j(i,o),k(i,o-1),R(n),n.preventDefault()):13===l?(C(n),R(n)):27===l&&(e.value=c,g(0,T()),R(n),n.preventDefault())}},P=function(e){if(!t.readOnly){var r,o,l,a,s=e.which||e.keyCode,c=g();if(!(e.ctrlKey||e.altKey||e.metaKey||s<32)){if(s&&13!==s){if(c.end-c.begin!=0&&(j(c.begin,c.end),k(c.begin,c.end-1)),(r=m(c.begin-1))<i&&(o=String.fromCharCode(s),n[r].test(o))){if(x(r),d[r]=o,A(),l=m(r),b.isAndroid()){setTimeout((function(){g(l)}),0)}else g(l);c.begin<=u&&(a=y())}e.preventDefault()}R(e),t.onComplete&&a&&t.onComplete({originalEvent:e,value:h()})}}},j=function(e,t){var r;for(r=e;r<t&&r<i;r++)n[r]&&(d[r]=v(r))},A=function(){e.value=d.join("")},T=function(l){var a,u,s,c=e.value,f=-1;for(a=0,s=0;a<i;a++)if(n[a]){for(d[a]=v(a);s++<c.length;)if(u=c.charAt(s-1),n[a].test(u)){d[a]=u,f=a;break}if(s>c.length){j(a+1,i);break}}else d[a]===c.charAt(s)&&s++,a<r&&(f=a);return l?A():f+1<r?t.autoClear||d.join("")===p?(e.value&&(e.value=""),j(0,i)):A():(A(),e.value=e.value.substring(0,f+1)),r?a:o},F=function(n){var r;t.readOnly||(clearTimeout(f),c=e.value,r=T(),f=setTimeout((function(){e===document.activeElement&&(A(),r===t.mask.replace("?","").length?g(0,r):g(r))}),10),t.onFocus&&t.onFocus(n))},L=function(e){a?O(e):W(e)},W=function(e){if(!t.readOnly){var n=T(!0);g(n),R(e),t.onComplete&&y()&&t.onComplete({originalEvent:e,value:h()})}},D=function(){for(var e=[],t=0;t<d.length;t++){var r=d[t];n[t]&&r!==v(t)&&e.push(r)}return e.join("")},R=function(e){if(t.onChange){var n=h().replace(t.slotChar,"");t.onChange({originalEvent:e,value:p!==n?n:""})}},H=function(){e.addEventListener("focus",F),e.addEventListener("blur",C),e.addEventListener("keydown",S),e.addEventListener("keypress",P),e.addEventListener("input",L),e.addEventListener("paste",W)},N=function(){n=[],r=t.mask.length,i=t.mask.length,o=null,l={9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},a=b.isChrome()&&b.isAndroid();for(var e=t.mask.split(""),s=0;s<e.length;s++){var c=e[s];"?"===c?(i--,r=s):l[c]?(n.push(new RegExp(l[c])),null===o&&(o=n.length-1),s<r&&(u=n.length-1)):n.push(null)}d=[];for(var f=0;f<e.length;f++){var g=e[f];"?"!==g&&d.push(l[g]?v(f):g)}p=d.join("")};return e&&t.mask&&(N(),H()),{init:N,bindEvents:H,unbindEvents:function(){e.removeEventListener("focus",F),e.removeEventListener("blur",C),e.removeEventListener("keydown",S),e.removeEventListener("keypress",P),e.removeEventListener("input",L),e.removeEventListener("paste",W)},updateModel:R,getValue:h}};
|
|
1
|
+
"use strict";function e(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("react"));function n(e){if(Array.isArray(e))return e}function r(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,l,a=[],u=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);u=!0);}catch(e){s=!0,i=e}finally{try{if(!u&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(s)throw i}}return a}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}function l(){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 a(e,t){return n(e)||r(e,t)||o(e,t)||l()}function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function s(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t){for(var r=[],i=0;i<t.length;i++){var o=t[i];if(o){var l=u(o);if("string"===l||"number"===l)r.push(o);else if("object"===l){var s=Array.isArray(o)?o:Object.entries(o).map((function(e){var t=a(e,2);return t[1]?t[0]:null}));r=s.length?r.concat(s.filter((function(e){return!!e}))):r}}}return r.join(" ")}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){if("object"!==u(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function d(e){var t=f(e,"string");return"symbol"===u(t)?t:String(t)}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,d(r.key),r)}}function g(e,t,n){return t&&p(e.prototype,t),n&&p(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function y(e,t,n){return(t=d(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=h(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){a=!0,o=e},f:function(){try{l||null==n.return||n.return()}finally{if(a)throw o}}}}function h(e,t){if(e){if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var b=function(){function e(){c(this,e)}return g(e,null,[{key:"innerWidth",value:function(e){if(e){var t=e.offsetWidth,n=getComputedStyle(e);return t+=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)}return 0}},{key:"width",value:function(e){if(e){var t=e.offsetWidth,n=getComputedStyle(e);return t-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),t}return 0}},{key:"getBrowserLanguage",value:function(){return navigator.userLanguage||navigator.languages&&navigator.languages.length&&navigator.languages[0]||navigator.language||navigator.browserLanguage||navigator.systemLanguage||"en"}},{key:"getWindowScrollTop",value:function(){var e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)}},{key:"getWindowScrollLeft",value:function(){var e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}},{key:"getOuterWidth",value:function(e,t){if(e){var n=e.getBoundingClientRect().width||e.offsetWidth;if(t){var r=getComputedStyle(e);n+=parseFloat(r.marginLeft)+parseFloat(r.marginRight)}return n}return 0}},{key:"getOuterHeight",value:function(e,t){if(e){var n=e.getBoundingClientRect().height||e.offsetHeight;if(t){var r=getComputedStyle(e);n+=parseFloat(r.marginTop)+parseFloat(r.marginBottom)}return n}return 0}},{key:"getClientHeight",value:function(e,t){if(e){var n=e.clientHeight;if(t){var r=getComputedStyle(e);n+=parseFloat(r.marginTop)+parseFloat(r.marginBottom)}return n}return 0}},{key:"getClientWidth",value:function(e,t){if(e){var n=e.clientWidth;if(t){var r=getComputedStyle(e);n+=parseFloat(r.marginLeft)+parseFloat(r.marginRight)}return n}return 0}},{key:"getViewport",value:function(){var e=window,t=document,n=t.documentElement,r=t.getElementsByTagName("body")[0];return{width:e.innerWidth||n.clientWidth||r.clientWidth,height:e.innerHeight||n.clientHeight||r.clientHeight}}},{key:"getOffset",value:function(e){if(e){var t=e.getBoundingClientRect();return{top:t.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:t.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}return{top:"auto",left:"auto"}}},{key:"index",value:function(e){if(e)for(var t=e.parentNode.childNodes,n=0,r=0;r<t.length;r++){if(t[r]===e)return n;1===t[r].nodeType&&n++}return-1}},{key:"addMultipleClasses",value:function(e,t){if(e&&t)if(e.classList)for(var n=t.split(" "),r=0;r<n.length;r++)e.classList.add(n[r]);else for(var i=t.split(" "),o=0;o<i.length;o++)e.className+=" "+i[o]}},{key:"removeMultipleClasses",value:function(e,t){if(e&&t)if(e.classList)for(var n=t.split(" "),r=0;r<n.length;r++)e.classList.remove(n[r]);else for(var i=t.split(" "),o=0;o<i.length;o++)e.className=e.className.replace(new RegExp("(^|\\b)"+i[o].split(" ").join("|")+"(\\b|$)","gi")," ")}},{key:"addClass",value:function(e,t){e&&t&&(e.classList?e.classList.add(t):e.className+=" "+t)}},{key:"removeClass",value:function(e,t){e&&t&&(e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," "))}},{key:"hasClass",value:function(e,t){return!!e&&(e.classList?e.classList.contains(t):new RegExp("(^| )"+t+"( |$)","gi").test(e.className))}},{key:"find",value:function(e,t){return e?Array.from(e.querySelectorAll(t)):[]}},{key:"findSingle",value:function(e,t){return e?e.querySelector(t):null}},{key:"getHeight",value:function(e){if(e){var t=e.offsetHeight,n=getComputedStyle(e);return t-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)+parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth)}return 0}},{key:"getWidth",value:function(e){if(e){var t=e.offsetWidth,n=getComputedStyle(e);return t-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)+parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth)}return 0}},{key:"alignOverlay",value:function(t,n,r){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];t&&n&&("self"===r?this.relativePosition(t,n):(i&&(t.style.minWidth=e.getOuterWidth(n)+"px"),this.absolutePosition(t,n)))}},{key:"absolutePosition",value:function(e,t){if(e&&t){var n,r,i=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),o=i.height,l=i.width,a=t.offsetHeight,u=t.offsetWidth,s=t.getBoundingClientRect(),c=this.getWindowScrollTop(),f=this.getWindowScrollLeft(),d=this.getViewport();s.top+a+o>d.height?((n=s.top+c-o)<0&&(n=c),e.style.transformOrigin="bottom"):(n=a+s.top+c,e.style.transformOrigin="top"),r=s.left+u+l>d.width?Math.max(0,s.left+f+u-l):s.left+f,e.style.top=n+"px",e.style.left=r+"px"}}},{key:"relativePosition",value:function(e,t){if(e&&t){var n,r,i=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),o=t.offsetHeight,l=t.getBoundingClientRect(),a=this.getViewport();l.top+o+i.height>a.height?(l.top+(n=-1*i.height)<0&&(n=-1*l.top),e.style.transformOrigin="bottom"):(n=o,e.style.transformOrigin="top"),r=i.width>a.width?-1*l.left:l.left+i.width>a.width?-1*(l.left+i.width-a.width):0,e.style.top=n+"px",e.style.left=r+"px"}}},{key:"flipfitCollision",value:function(t,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"left top",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"left bottom",l=arguments.length>4?arguments[4]:void 0;if(t&&n){var a=n.getBoundingClientRect(),u=this.getViewport(),s=i.split(" "),c=o.split(" "),f=function(e,t){return t?+e.substring(e.search(/(\+|-)/g))||0:e.substring(0,e.search(/(\+|-)/g))||e},d={my:{x:f(s[0]),y:f(s[1]||s[0]),offsetX:f(s[0],!0),offsetY:f(s[1]||s[0],!0)},at:{x:f(c[0]),y:f(c[1]||c[0]),offsetX:f(c[0],!0),offsetY:f(c[1]||c[0],!0)}},p={left:function(){return d.my.offsetX+d.at.offsetX+a.left+("left"===d.my.x?0:-1*("center"===d.my.x?r.getOuterWidth(t)/2:r.getOuterWidth(t)))},top:function(){return d.my.offsetY+d.at.offsetY+a.top+("top"===d.my.y?0:-1*("center"===d.my.y?r.getOuterHeight(t)/2:r.getOuterHeight(t)))}},g={count:{x:0,y:0},left:function(){var n=p.left(),r=e.getWindowScrollLeft();t.style.left=n+r+"px",2===this.count.x?(t.style.left=r+"px",this.count.x=0):n<0&&(this.count.x++,d.my.x="left",d.at.x="right",d.my.offsetX*=-1,d.at.offsetX*=-1,this.right())},right:function(){var r=p.left()+e.getOuterWidth(n),i=e.getWindowScrollLeft();t.style.left=r+i+"px",2===this.count.x?(t.style.left=u.width-e.getOuterWidth(t)+i+"px",this.count.x=0):r+e.getOuterWidth(t)>u.width&&(this.count.x++,d.my.x="right",d.at.x="left",d.my.offsetX*=-1,d.at.offsetX*=-1,this.left())},top:function(){var n=p.top(),r=e.getWindowScrollTop();t.style.top=n+r+"px",2===this.count.y?(t.style.left=r+"px",this.count.y=0):n<0&&(this.count.y++,d.my.y="top",d.at.y="bottom",d.my.offsetY*=-1,d.at.offsetY*=-1,this.bottom())},bottom:function(){var r=p.top()+e.getOuterHeight(n),i=e.getWindowScrollTop();t.style.top=r+i+"px",2===this.count.y?(t.style.left=u.height-e.getOuterHeight(t)+i+"px",this.count.y=0):r+e.getOuterHeight(n)>u.height&&(this.count.y++,d.my.y="bottom",d.at.y="top",d.my.offsetY*=-1,d.at.offsetY*=-1,this.top())},center:function(r){if("y"===r){var i=p.top()+e.getOuterHeight(n)/2;t.style.top=i+e.getWindowScrollTop()+"px",i<0?this.bottom():i+e.getOuterHeight(n)>u.height&&this.top()}else{var o=p.left()+e.getOuterWidth(n)/2;t.style.left=o+e.getWindowScrollLeft()+"px",o<0?this.left():o+e.getOuterWidth(t)>u.width&&this.right()}}};g[d.at.x]("x"),g[d.at.y]("y"),this.isFunction(l)&&l(d)}}},{key:"findCollisionPosition",value:function(e){if(e){var t="left"===e?"right":"left";return"top"===e||"bottom"===e?{axis:"y",my:"center ".concat("top"===e?"bottom":"top"),at:"center ".concat(e)}:{axis:"x",my:"".concat(t," center"),at:"".concat(e," center")}}}},{key:"getParents",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return null===e.parentNode?t:this.getParents(e.parentNode,t.concat([e.parentNode]))}},{key:"getScrollableParents",value:function(e){var t=[];if(e){var n,r=this.getParents(e),i=/(auto|scroll)/,o=function(e){var t=e?getComputedStyle(e):null;return t&&(i.test(t.getPropertyValue("overflow"))||i.test(t.getPropertyValue("overflowX"))||i.test(t.getPropertyValue("overflowY")))},l=v(r);try{for(l.s();!(n=l.n()).done;){var a=n.value,u=1===a.nodeType&&a.dataset.scrollselectors;if(u){var s,c=v(u.split(","));try{for(c.s();!(s=c.n()).done;){var f=this.findSingle(a,s.value);f&&o(f)&&t.push(f)}}catch(e){c.e(e)}finally{c.f()}}9!==a.nodeType&&o(a)&&t.push(a)}}catch(e){l.e(e)}finally{l.f()}}return t}},{key:"getHiddenElementOuterHeight",value:function(e){if(e){e.style.visibility="hidden",e.style.display="block";var t=e.offsetHeight;return e.style.display="none",e.style.visibility="visible",t}return 0}},{key:"getHiddenElementOuterWidth",value:function(e){if(e){e.style.visibility="hidden",e.style.display="block";var t=e.offsetWidth;return e.style.display="none",e.style.visibility="visible",t}return 0}},{key:"getHiddenElementDimensions",value:function(e){var t={};return e&&(e.style.visibility="hidden",e.style.display="block",t.width=e.offsetWidth,t.height=e.offsetHeight,e.style.display="none",e.style.visibility="visible"),t}},{key:"fadeIn",value:function(e,t){if(e){e.style.opacity=0;var n=+new Date,r=0;!function i(){r=+e.style.opacity+((new Date).getTime()-n)/t,e.style.opacity=r,n=+new Date,+r<1&&(window.requestAnimationFrame&&requestAnimationFrame(i)||setTimeout(i,16))}()}}},{key:"fadeOut",value:function(e,t){if(e)var n=1,r=50/t,i=setInterval((function(){(n-=r)<=0&&(n=0,clearInterval(i)),e.style.opacity=n}),50)}},{key:"getUserAgent",value:function(){return navigator.userAgent}},{key:"isIOS",value:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream}},{key:"isAndroid",value:function(){return/(android)/i.test(navigator.userAgent)}},{key:"isChrome",value:function(){return/(chrome)/i.test(navigator.userAgent)}},{key:"isTouchDevice",value:function(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}},{key:"isFunction",value:function(e){return!!(e&&e.constructor&&e.call&&e.apply)}},{key:"appendChild",value:function(e,t){if(this.isElement(t))t.appendChild(e);else{if(!t.el||!t.el.nativeElement)throw new Error("Cannot append "+t+" to "+e);t.el.nativeElement.appendChild(e)}}},{key:"removeChild",value:function(e,t){if(this.isElement(t))t.removeChild(e);else{if(!t.el||!t.el.nativeElement)throw new Error("Cannot remove "+e+" from "+t);t.el.nativeElement.removeChild(e)}}},{key:"isElement",value:function(e){return"object"===("undefined"==typeof HTMLElement?"undefined":u(HTMLElement))?e instanceof HTMLElement:e&&"object"===u(e)&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName}},{key:"scrollInView",value:function(e,t){var n=getComputedStyle(e).getPropertyValue("borderTopWidth"),r=n?parseFloat(n):0,i=getComputedStyle(e).getPropertyValue("paddingTop"),o=i?parseFloat(i):0,l=e.getBoundingClientRect(),a=t.getBoundingClientRect().top+document.body.scrollTop-(l.top+document.body.scrollTop)-r-o,u=e.scrollTop,s=e.clientHeight,c=this.getOuterHeight(t);a<0?e.scrollTop=u+a:a+c>s&&(e.scrollTop=u+a-s+c)}},{key:"clearSelection",value: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(e){}}},{key:"calculateScrollbarWidth",value:function(e){if(e){var t=getComputedStyle(e);return e.offsetWidth-e.clientWidth-parseFloat(t.borderLeftWidth)-parseFloat(t.borderRightWidth)}if(null!=this.calculatedScrollbarWidth)return this.calculatedScrollbarWidth;var n=document.createElement("div");n.className="p-scrollbar-measure",document.body.appendChild(n);var r=n.offsetWidth-n.clientWidth;return document.body.removeChild(n),this.calculatedScrollbarWidth=r,r}},{key:"getBrowser",value:function(){if(!this.browser){var e=this.resolveUserAgent();this.browser={},e.browser&&(this.browser[e.browser]=!0,this.browser.version=e.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser}},{key:"resolveUserAgent",value:function(){var e=navigator.userAgent.toLowerCase(),t=/(chrome)[ ]([\w.]+)/.exec(e)||/(webkit)[ ]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ ]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}}},{key:"isVisible",value:function(e){return e&&(0!==e.clientHeight||0!==e.getClientRects().length||"none"!==getComputedStyle(e).display)}},{key:"isExist",value:function(e){return!(null==e||!e.nodeName||!e.parentNode)}},{key:"hasDOM",value:function(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}},{key:"getFocusableElements",value:function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=e.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)),o=[],l=v(i);try{for(l.s();!(n=l.n()).done;){var a=n.value;"none"!==getComputedStyle(a).display&&"hidden"!==getComputedStyle(a).visibility&&o.push(a)}}catch(e){l.e(e)}finally{l.f()}return o}},{key:"getFirstFocusableElement",value:function(t,n){var r=e.getFocusableElements(t,n);return r.length>0?r[0]:null}},{key:"getLastFocusableElement",value:function(t,n){var r=e.getFocusableElements(t,n);return r.length>0?r[r.length-1]:null}},{key:"focus",value:function(e,t){e&&document.activeElement!==e&&e.focus({preventScroll:void 0===t||!t})}},{key:"focusFirstElement",value:function(t,n){if(t){var r=e.getFirstFocusableElement(t);return r&&e.focus(r,n),r}}},{key:"getCursorOffset",value:function(e,t,n,r){if(e){var i=getComputedStyle(e),o=document.createElement("div");o.style.position="absolute",o.style.top="0px",o.style.left="0px",o.style.visibility="hidden",o.style.pointerEvents="none",o.style.overflow=i.overflow,o.style.width=i.width,o.style.height=i.height,o.style.padding=i.padding,o.style.border=i.border,o.style.overflowWrap=i.overflowWrap,o.style.whiteSpace=i.whiteSpace,o.style.lineHeight=i.lineHeight,o.innerHTML=t.replace(/\r\n|\r|\n/g,"<br />");var l=document.createElement("span");l.textContent=r,o.appendChild(l);var a=document.createTextNode(n);o.appendChild(a),document.body.appendChild(o);var u=l.offsetLeft,s=l.offsetTop,c=l.clientHeight;return document.body.removeChild(o),{left:Math.abs(u-e.scrollLeft),top:Math.abs(s-e.scrollTop)+c}}return{top:"auto",left:"auto"}}},{key:"invokeElementMethod",value:function(e,t,n){e[t].apply(e,n)}},{key:"isClickable",value:function(e){var t=e.nodeName,n=e.parentElement&&e.parentElement.nodeName;return"INPUT"===t||"TEXTAREA"===t||"BUTTON"===t||"A"===t||"INPUT"===n||"TEXTAREA"===n||"BUTTON"===n||"A"===n||this.hasClass(e,"p-button")||this.hasClass(e.parentElement,"p-button")||this.hasClass(e.parentElement,"p-checkbox")||this.hasClass(e.parentElement,"p-radiobutton")}},{key:"applyStyle",value:function(e,t){if("string"==typeof t)e.style.cssText=this.style;else for(var n in this.style)e.style[n]=t[n]}},{key:"exportCSV",value:function(t,n){var r=new Blob([t],{type:"application/csv;charset=utf-8;"});window.navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(r,n+".csv"):e.saveAs({name:n+".csv",src:URL.createObjectURL(r)})||(t="data:text/csv;charset=utf-8,"+t,window.open(encodeURI(t)))}},{key:"saveAs",value:function(e){if(e){var t=document.createElement("a");if(void 0!==t.download){var n=e.name;return t.setAttribute("href",e.src),t.setAttribute("download",n),t.style.display="none",document.body.appendChild(t),t.click(),document.body.removeChild(t),!0}}return!1}},{key:"createInlineStyle",value:function(e){var t=document.createElement("style");try{e||(e=process.env.REACT_APP_CSS_NONCE)}catch(e){}return e&&t.setAttribute("nonce",e),document.head.appendChild(t),t}},{key:"removeInlineStyle",value:function(e){if(this.isExist(e)){try{document.head.removeChild(e)}catch(e){}e=null}return e}},{key:"getTargetElement",value:function(e){if(!e)return null;if("document"===e)return document;if("window"===e)return window;if("object"===u(e)&&e.hasOwnProperty("current"))return this.isExist(e.current)?e.current:null;var t,n=(t=e)&&t.constructor&&t.call&&t.apply?e():e;return n&&9===n.nodeType||this.isExist(n)?n:null}},{key:"getAttributeNames",value:function(e){var t,n,r;for(n=[],r=e.attributes,t=0;t<r.length;++t)n.push(r[t].nodeName);return n.sort(),n}},{key:"isEqualElement",value:function(t,n){var r,i,o,l,a;if(r=e.getAttributeNames(t),i=e.getAttributeNames(n),r.join(",")!==i.join(","))return!1;for(var u=0;u<r.length;++u)if("style"===(o=r[u]))for(var s=t.style,c=n.style,f=/^\d+$/,d=0,p=Object.keys(s);d<p.length;d++){var g=p[d];if(!f.test(g)&&s[g]!==c[g])return!1}else if(t.getAttribute(o)!==n.getAttribute(o))return!1;for(l=t.firstChild,a=n.firstChild;l&&a;l=l.nextSibling,a=a.nextSibling){if(l.nodeType!==a.nodeType)return!1;if(1===l.nodeType){if(!e.isEqualElement(l,a))return!1}else if(l.nodeValue!==a.nodeValue)return!1}return!l&&!a}}]),e}();y(b,"DATA_PROPS",["data-"]),y(b,"ARIA_PROPS",["aria","focus-target"]);var w=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};c(this,e),this.element=t,this.listener=n}return g(e,[{key:"bindScrollListener",value:function(){this.scrollableParents=b.getScrollableParents(this.element);for(var e=0;e<this.scrollableParents.length;e++)this.scrollableParents[e].addEventListener("scroll",this.listener)}},{key:"unbindScrollListener",value:function(){if(this.scrollableParents)for(var e=0;e<this.scrollableParents.length;e++)this.scrollableParents[e].removeEventListener("scroll",this.listener)}},{key:"destroy",value:function(){this.unbindScrollListener(),this.element=null,this.listener=null,this.scrollableParents=null}}]),e}();function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function x(e){if(Array.isArray(e))return i(e)}function O(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function C(){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 S(e){return x(e)||O(e)||o(e)||C()}var P=function(){function e(){c(this,e)}return g(e,null,[{key:"equals",value:function(e,t,n){return n&&e&&"object"===u(e)&&t&&"object"===u(t)?this.resolveFieldData(e,n)===this.resolveFieldData(t,n):this.deepEquals(e,t)}},{key:"deepEquals",value:function(e,t){if(e===t)return!0;if(e&&t&&"object"==u(e)&&"object"==u(t)){var n,r,i,o=Array.isArray(e),l=Array.isArray(t);if(o&&l){if((r=e.length)!==t.length)return!1;for(n=r;0!=n--;)if(!this.deepEquals(e[n],t[n]))return!1;return!0}if(o!==l)return!1;var a=e instanceof Date,s=t instanceof Date;if(a!==s)return!1;if(a&&s)return e.getTime()===t.getTime();var c=e instanceof RegExp,f=t instanceof RegExp;if(c!==f)return!1;if(c&&f)return e.toString()===t.toString();var d=Object.keys(e);if((r=d.length)!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!Object.prototype.hasOwnProperty.call(t,d[n]))return!1;for(n=r;0!=n--;)if(!this.deepEquals(e[i=d[n]],t[i]))return!1;return!0}return e!=e&&t!=t}},{key:"resolveFieldData",value:function(t,n){if(t&&Object.keys(t).length&&n){if(this.isFunction(n))return n(t);if(e.isNotEmpty(t[n]))return t[n];if(-1===n.indexOf("."))return t[n];for(var r=n.split("."),i=t,o=0,l=r.length;o<l;++o){if(null==i)return null;i=i[r[o]]}return i}return null}},{key:"isFunction",value:function(e){return!!(e&&e.constructor&&e.call&&e.apply)}},{key:"isLetter",value:function(e){return e&&(e.toUpperCase()!=e.toLowerCase()||e.codePointAt(0)>127)}},{key:"findDiffKeys",value:function(e,t){return e&&t?Object.keys(e).filter((function(e){return!t.hasOwnProperty(e)})).reduce((function(t,n){return t[n]=e[n],t}),{}):{}}},{key:"reduceKeys",value:function(e,t){var n={};return e&&t&&0!==t.length?(Object.keys(e).filter((function(e){return t.some((function(t){return e.startsWith(t)}))})).forEach((function(t){n[t]=e[t],delete e[t]})),n):n}},{key:"reorderArray",value:function(e,t,n){e&&t!==n&&(n>=e.length&&(n%=e.length,t%=e.length),e.splice(n,0,e.splice(t,1)[0]))}},{key:"findIndexInList",value:function(e,t,n){var r=this;return t?t.findIndex(n?function(t){return r.equals(t,e,n)}:function(t){return t===e}):-1}},{key:"getJSXElement",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return this.isFunction(e)?e.apply(void 0,n):e}},{key:"getProp",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e?e[t]:void 0;return void 0===r?n[t]:r}},{key:"getMergedProps",value:function(e,t){return Object.assign({},t,e)}},{key:"getDiffProps",value:function(e,t){return this.findDiffKeys(e,t)}},{key:"getPropValue",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=n;return n&&1===n.length&&(i=n[0]),this.isFunction(e)?e.apply(void 0,S(i)):e}},{key:"getComponentProp",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.isNotEmpty(e)?this.getProp(e.props,t,n):void 0}},{key:"getComponentProps",value:function(e,t){return this.isNotEmpty(e)?this.getMergedProps(e.props,t):void 0}},{key:"getComponentDiffProps",value:function(e,t){return this.isNotEmpty(e)?this.getDiffProps(e.props,t):void 0}},{key:"isValidChild",value:function(e,t,n){if(e){var r=(this.getComponentProp(e,"__TYPE")||(e.type?e.type.displayName:void 0))===t;try{0}catch(e){}return r}return!1}},{key:"getRefElement",value:function(e){return e?"object"===u(e)&&e.hasOwnProperty("current")?e.current:e:null}},{key:"combinedRefs",value:function(e,t){e&&t&&("function"==typeof t?t(e.current):t.current=e.current)}},{key:"removeAccents",value:function(e){return e&&e.search(/[\xC0-\xFF]/g)>-1&&(e=e.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")),e}},{key:"isEmpty",value:function(e){return null==e||""===e||Array.isArray(e)&&0===e.length||!(e instanceof Date)&&"object"===u(e)&&0===Object.keys(e).length}},{key:"isNotEmpty",value:function(e){return!this.isEmpty(e)}},{key:"sort",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,l=e.compare(t,n,i,r),a=r;return(e.isEmpty(t)||e.isEmpty(n))&&(a=1===o?r:o),a*l}},{key:"compare",value:function(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=e.isEmpty(t),l=e.isEmpty(n);return o&&l?0:o?i:l?-i:"string"==typeof t&&"string"==typeof n?t.localeCompare(n,r,{numeric:!0}):t<n?-1:t>n?1:0}}]),e}();function j(){return j=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},j.apply(this,arguments)}function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach((function(t){y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var F=function(){function e(){c(this,e)}return g(e,null,[{key:"getJSXIcon",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=null;if(null!==e){var o=u(e),l=s(n.className,"string"===o&&e);if(i=t.createElement("span",j({},n,{className:l})),"string"!==o){var a=T({iconProps:n,element:i},r);return P.getJSXElement(e,a)}}return i}}]),e}(),L=0;var W,D,R,H,N=(W=[],D=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:999,r=H(e,t,n),i=r.value+(r.key===e?0:n)+1;return W.push({key:e,value:i}),i},R=function(e,t){return H(e,t).value},H=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return S(W).reverse().find((function(n){return!!t||n.key===e}))||{key:e,value:n}},{get:function(e){return e&&parseInt(e.style.zIndex,10)||0},set:function(e,t,n,r){t&&(t.style.zIndex=String(D(e,n,r)))},clear:function(e){var t;e&&(t=N.get(e),W=W.filter((function(e){return e.value!==t})),e.style.zIndex="")},getCurrent:function(e,t){return R(e,t)}});exports.ConnectedOverlayScrollHandler=w,exports.DomHandler=b,exports.EventBus=function(){var e=new Map;return{on:function(t,n){var r=e.get(t);r?r.push(n):r=[n],e.set(t,r)},off:function(t,n){var r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)},emit:function(t,n){var r=e.get(t);r&&r.slice().forEach((function(e){return e(n)}))}}},exports.IconUtils=F,exports.ObjectUtils=P,exports.UniqueComponentId=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"pr_id_";return L++,"".concat(e).concat(L)},exports.ZIndexUtils=N,exports.classNames=s,exports.mask=function(e,t){var n,r,i,o,l,a,u,s,c,f,d,p;t=E(E({},{mask:null,slotChar:"_",autoClear:!0,unmask:!1,readOnly:!1,onComplete:null,onChange:null,onFocus:null,onBlur:null}),t);var g=function(t,n){var r,i,o;if(e.offsetParent&&e===document.activeElement)return"number"!=typeof t?(e.setSelectionRange?(i=e.selectionStart,o=e.selectionEnd):document.selection&&document.selection.createRange&&(o=(i=0-(r=document.selection.createRange()).duplicate().moveStart("character",-1e5))+r.text.length),{begin:i,end:o}):(i=t,o="number"==typeof n?n:i,void(e.setSelectionRange?e.setSelectionRange(i,o):e.createTextRange&&((r=e.createTextRange()).collapse(!0),r.moveEnd("character",o),r.moveStart("character",i),r.select())))},y=function(){for(var e=o;e<=u;e++)if(n[e]&&d[e]===v(e))return!1;return!0},v=function(e){return t.slotChar.charAt(e<t.slotChar.length?e:0)},h=function(){return t.unmask?D():e&&e.value},m=function(e){for(;++e<i&&!n[e];);return e},w=function(e){for(;--e>=0&&!n[e];);return e},k=function(e,t){var r,l;if(!(e<0)){for(r=e,l=m(t);r<i;r++)if(n[r]){if(!(l<i&&n[r].test(d[l])))break;d[r]=d[l],d[l]=v(l),l=m(l)}A(),g(Math.max(o,e))}},x=function(e){var t,r,o,l;for(t=e,r=v(e);t<i;t++)if(n[t]){if(o=m(t),l=d[t],d[t]=r,!(o<i&&n[o].test(l)))break;r=l}},O=function(r){var l=e.value,a=g();if(s&&s.length&&s.length>l.length){for(T(!0);a.begin>0&&!n[a.begin-1];)a.begin--;if(0===a.begin)for(;a.begin<o&&!n[a.begin];)a.begin++;g(a.begin,a.begin)}else{for(T(!0);a.begin<i&&!n[a.begin];)a.begin++;g(a.begin,a.begin)}t.onComplete&&y()&&t.onComplete({originalEvent:r,value:h()})},C=function(n){if(T(),t.onBlur&&t.onBlur(n),R(n),e.value!==c){var r=document.createEvent("HTMLEvents");r.initEvent("change",!0,!1),e.dispatchEvent(r)}},S=function(n){if(!t.readOnly){var r,i,o,l=n.which||n.keyCode;s=e.value,8===l||46===l||b.isIOS()&&127===l?((o=(r=g()).end)-(i=r.begin)==0&&(i=46!==l?w(i):o=m(i-1),o=46===l?m(o):o),j(i,o),k(i,o-1),R(n),n.preventDefault()):13===l?(C(n),R(n)):27===l&&(e.value=c,g(0,T()),R(n),n.preventDefault())}},P=function(e){if(!t.readOnly){var r,o,l,a,s=e.which||e.keyCode,c=g();if(!(e.ctrlKey||e.altKey||e.metaKey||s<32)){if(s&&13!==s){if(c.end-c.begin!=0&&(j(c.begin,c.end),k(c.begin,c.end-1)),(r=m(c.begin-1))<i&&(o=String.fromCharCode(s),n[r].test(o))){if(x(r),d[r]=o,A(),l=m(r),b.isAndroid()){setTimeout((function(){g(l)}),0)}else g(l);c.begin<=u&&(a=y())}e.preventDefault()}R(e),t.onComplete&&a&&t.onComplete({originalEvent:e,value:h()})}}},j=function(e,t){var r;for(r=e;r<t&&r<i;r++)n[r]&&(d[r]=v(r))},A=function(){e.value=d.join("")},T=function(l){var a,u,s,c=e.value,f=-1;for(a=0,s=0;a<i;a++)if(n[a]){for(d[a]=v(a);s++<c.length;)if(u=c.charAt(s-1),n[a].test(u)){d[a]=u,f=a;break}if(s>c.length){j(a+1,i);break}}else d[a]===c.charAt(s)&&s++,a<r&&(f=a);return l?A():f+1<r?t.autoClear||d.join("")===p?(e.value&&(e.value=""),j(0,i)):A():(A(),e.value=e.value.substring(0,f+1)),r?a:o},F=function(n){var r;t.readOnly||(clearTimeout(f),c=e.value,r=T(),f=setTimeout((function(){e===document.activeElement&&(A(),r===t.mask.replace("?","").length?g(0,r):g(r))}),10),t.onFocus&&t.onFocus(n))},L=function(e){a?O(e):W(e)},W=function(e){if(!t.readOnly){var n=T(!0);g(n),R(e),t.onComplete&&y()&&t.onComplete({originalEvent:e,value:h()})}},D=function(){for(var e=[],t=0;t<d.length;t++){var r=d[t];n[t]&&r!==v(t)&&e.push(r)}return e.join("")},R=function(e){if(t.onChange){var n=h().replace(t.slotChar,"");t.onChange({originalEvent:e,value:p!==n?n:""})}},H=function(){e.addEventListener("focus",F),e.addEventListener("blur",C),e.addEventListener("keydown",S),e.addEventListener("keypress",P),e.addEventListener("input",L),e.addEventListener("paste",W)},N=function(){n=[],r=t.mask.length,i=t.mask.length,o=null,l={9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},a=b.isChrome()&&b.isAndroid();for(var e=t.mask.split(""),s=0;s<e.length;s++){var c=e[s];"?"===c?(i--,r=s):l[c]?(n.push(new RegExp(l[c])),null===o&&(o=n.length-1),s<r&&(u=n.length-1)):n.push(null)}d=[];for(var f=0;f<e.length;f++){var g=e[f];"?"!==g&&d.push(l[g]?v(f):g)}p=d.join("")};return e&&t.mask&&(N(),H()),{init:N,bindEvents:H,unbindEvents:function(){e.removeEventListener("focus",F),e.removeEventListener("blur",C),e.removeEventListener("keydown",S),e.removeEventListener("keypress",P),e.removeEventListener("input",L),e.removeEventListener("paste",W)},updateModel:R,getValue:h}};
|
package/utils/utils.esm.js
CHANGED
|
@@ -208,7 +208,7 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
208
208
|
key: "getOuterWidth",
|
|
209
209
|
value: function getOuterWidth(el, margin) {
|
|
210
210
|
if (el) {
|
|
211
|
-
var width = el.
|
|
211
|
+
var width = el.getBoundingClientRect().width || el.offsetWidth;
|
|
212
212
|
if (margin) {
|
|
213
213
|
var style = getComputedStyle(el);
|
|
214
214
|
width += parseFloat(style.marginLeft) + parseFloat(style.marginRight);
|
|
@@ -221,7 +221,7 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
221
221
|
key: "getOuterHeight",
|
|
222
222
|
value: function getOuterHeight(el, margin) {
|
|
223
223
|
if (el) {
|
|
224
|
-
var height = el.
|
|
224
|
+
var height = el.getBoundingClientRect().height || el.offsetHeight;
|
|
225
225
|
if (margin) {
|
|
226
226
|
var style = getComputedStyle(el);
|
|
227
227
|
height += parseFloat(style.marginTop) + parseFloat(style.marginBottom);
|
|
@@ -405,7 +405,7 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
405
405
|
}, {
|
|
406
406
|
key: "absolutePosition",
|
|
407
407
|
value: function absolutePosition(element, target) {
|
|
408
|
-
if (element) {
|
|
408
|
+
if (element && target) {
|
|
409
409
|
var elementDimensions = element.offsetParent ? {
|
|
410
410
|
width: element.offsetWidth,
|
|
411
411
|
height: element.offsetHeight
|
|
@@ -437,7 +437,7 @@ var DomHandler = /*#__PURE__*/function () {
|
|
|
437
437
|
}, {
|
|
438
438
|
key: "relativePosition",
|
|
439
439
|
value: function relativePosition(element, target) {
|
|
440
|
-
if (element) {
|
|
440
|
+
if (element && target) {
|
|
441
441
|
var elementDimensions = element.offsetParent ? {
|
|
442
442
|
width: element.offsetWidth,
|
|
443
443
|
height: element.offsetHeight
|
|
@@ -1888,12 +1888,17 @@ var ObjectUtils = /*#__PURE__*/function () {
|
|
|
1888
1888
|
key: "isValidChild",
|
|
1889
1889
|
value: function isValidChild(child, type, validTypes) {
|
|
1890
1890
|
/* eslint-disable */
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1891
|
+
if (child) {
|
|
1892
|
+
var childType = this.getComponentProp(child, '__TYPE') || (child.type ? child.type.displayName : undefined);
|
|
1893
|
+
var isValid = childType === type;
|
|
1894
|
+
try {
|
|
1895
|
+
var messageTypes; if ("production" !== 'production' && !isValid) ;
|
|
1896
|
+
} catch (error) {
|
|
1897
|
+
// NOOP
|
|
1898
|
+
}
|
|
1899
|
+
return isValid;
|
|
1895
1900
|
}
|
|
1896
|
-
return
|
|
1901
|
+
return false;
|
|
1897
1902
|
/* eslint-enable */
|
|
1898
1903
|
}
|
|
1899
1904
|
}, {
|
package/utils/utils.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";function t(e){if(Array.isArray(e))return e}function n(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,l,a=[],u=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);u=!0);}catch(e){s=!0,i=e}finally{try{if(!u&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(s)throw i}}return a}}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function i(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}function o(){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 l(e,r){return t(e)||n(e,r)||i(e,r)||o()}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function u(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t){for(var r=[],i=0;i<t.length;i++){var o=t[i];if(o){var u=a(o);if("string"===u||"number"===u)r.push(o);else if("object"===u){var s=Array.isArray(o)?o:Object.entries(o).map((function(e){var t=l(e,2);return t[1]?t[0]:null}));r=s.length?r.concat(s.filter((function(e){return!!e}))):r}}}return r.join(" ")}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if("object"!==a(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function f(e){var t=c(e,"string");return"symbol"===a(t)?t:String(t)}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,f(r.key),r)}}function g(e,t,n){return t&&d(e.prototype,t),n&&d(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function p(e,t,n){return(t=f(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=v(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){a=!0,o=e},f:function(){try{l||null==n.return||n.return()}finally{if(a)throw o}}}}function v(e,t){if(e){if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var m=function(){function e(){s(this,e)}return g(e,null,[{key:"innerWidth",value:function(e){if(e){var t=e.offsetWidth,n=getComputedStyle(e);return t+=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)}return 0}},{key:"width",value:function(e){if(e){var t=e.offsetWidth,n=getComputedStyle(e);return t-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),t}return 0}},{key:"getBrowserLanguage",value:function(){return navigator.userLanguage||navigator.languages&&navigator.languages.length&&navigator.languages[0]||navigator.language||navigator.browserLanguage||navigator.systemLanguage||"en"}},{key:"getWindowScrollTop",value:function(){var e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)}},{key:"getWindowScrollLeft",value:function(){var e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}},{key:"getOuterWidth",value:function(e,t){if(e){var n=e.offsetWidth||e.getBoundingClientRect().width;if(t){var r=getComputedStyle(e);n+=parseFloat(r.marginLeft)+parseFloat(r.marginRight)}return n}return 0}},{key:"getOuterHeight",value:function(e,t){if(e){var n=e.offsetHeight||e.getBoundingClientRect().height;if(t){var r=getComputedStyle(e);n+=parseFloat(r.marginTop)+parseFloat(r.marginBottom)}return n}return 0}},{key:"getClientHeight",value:function(e,t){if(e){var n=e.clientHeight;if(t){var r=getComputedStyle(e);n+=parseFloat(r.marginTop)+parseFloat(r.marginBottom)}return n}return 0}},{key:"getClientWidth",value:function(e,t){if(e){var n=e.clientWidth;if(t){var r=getComputedStyle(e);n+=parseFloat(r.marginLeft)+parseFloat(r.marginRight)}return n}return 0}},{key:"getViewport",value:function(){var e=window,t=document,n=t.documentElement,r=t.getElementsByTagName("body")[0];return{width:e.innerWidth||n.clientWidth||r.clientWidth,height:e.innerHeight||n.clientHeight||r.clientHeight}}},{key:"getOffset",value:function(e){if(e){var t=e.getBoundingClientRect();return{top:t.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:t.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}return{top:"auto",left:"auto"}}},{key:"index",value:function(e){if(e)for(var t=e.parentNode.childNodes,n=0,r=0;r<t.length;r++){if(t[r]===e)return n;1===t[r].nodeType&&n++}return-1}},{key:"addMultipleClasses",value:function(e,t){if(e&&t)if(e.classList)for(var n=t.split(" "),r=0;r<n.length;r++)e.classList.add(n[r]);else for(var i=t.split(" "),o=0;o<i.length;o++)e.className+=" "+i[o]}},{key:"removeMultipleClasses",value:function(e,t){if(e&&t)if(e.classList)for(var n=t.split(" "),r=0;r<n.length;r++)e.classList.remove(n[r]);else for(var i=t.split(" "),o=0;o<i.length;o++)e.className=e.className.replace(new RegExp("(^|\\b)"+i[o].split(" ").join("|")+"(\\b|$)","gi")," ")}},{key:"addClass",value:function(e,t){e&&t&&(e.classList?e.classList.add(t):e.className+=" "+t)}},{key:"removeClass",value:function(e,t){e&&t&&(e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," "))}},{key:"hasClass",value:function(e,t){return!!e&&(e.classList?e.classList.contains(t):new RegExp("(^| )"+t+"( |$)","gi").test(e.className))}},{key:"find",value:function(e,t){return e?Array.from(e.querySelectorAll(t)):[]}},{key:"findSingle",value:function(e,t){return e?e.querySelector(t):null}},{key:"getHeight",value:function(e){if(e){var t=e.offsetHeight,n=getComputedStyle(e);return t-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)+parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth)}return 0}},{key:"getWidth",value:function(e){if(e){var t=e.offsetWidth,n=getComputedStyle(e);return t-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)+parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth)}return 0}},{key:"alignOverlay",value:function(t,n,r){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];t&&n&&("self"===r?this.relativePosition(t,n):(i&&(t.style.minWidth=e.getOuterWidth(n)+"px"),this.absolutePosition(t,n)))}},{key:"absolutePosition",value:function(e,t){if(e){var n,r,i=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),o=i.height,l=i.width,a=t.offsetHeight,u=t.offsetWidth,s=t.getBoundingClientRect(),c=this.getWindowScrollTop(),f=this.getWindowScrollLeft(),d=this.getViewport();s.top+a+o>d.height?((n=s.top+c-o)<0&&(n=c),e.style.transformOrigin="bottom"):(n=a+s.top+c,e.style.transformOrigin="top"),r=s.left+u+l>d.width?Math.max(0,s.left+f+u-l):s.left+f,e.style.top=n+"px",e.style.left=r+"px"}}},{key:"relativePosition",value:function(e,t){if(e){var n,r,i=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),o=t.offsetHeight,l=t.getBoundingClientRect(),a=this.getViewport();l.top+o+i.height>a.height?(l.top+(n=-1*i.height)<0&&(n=-1*l.top),e.style.transformOrigin="bottom"):(n=o,e.style.transformOrigin="top"),r=i.width>a.width?-1*l.left:l.left+i.width>a.width?-1*(l.left+i.width-a.width):0,e.style.top=n+"px",e.style.left=r+"px"}}},{key:"flipfitCollision",value:function(t,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"left top",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"left bottom",l=arguments.length>4?arguments[4]:void 0;if(t&&n){var a=n.getBoundingClientRect(),u=this.getViewport(),s=i.split(" "),c=o.split(" "),f=function(e,t){return t?+e.substring(e.search(/(\+|-)/g))||0:e.substring(0,e.search(/(\+|-)/g))||e},d={my:{x:f(s[0]),y:f(s[1]||s[0]),offsetX:f(s[0],!0),offsetY:f(s[1]||s[0],!0)},at:{x:f(c[0]),y:f(c[1]||c[0]),offsetX:f(c[0],!0),offsetY:f(c[1]||c[0],!0)}},g={left:function(){return d.my.offsetX+d.at.offsetX+a.left+("left"===d.my.x?0:-1*("center"===d.my.x?r.getOuterWidth(t)/2:r.getOuterWidth(t)))},top:function(){return d.my.offsetY+d.at.offsetY+a.top+("top"===d.my.y?0:-1*("center"===d.my.y?r.getOuterHeight(t)/2:r.getOuterHeight(t)))}},p={count:{x:0,y:0},left:function(){var n=g.left(),r=e.getWindowScrollLeft();t.style.left=n+r+"px",2===this.count.x?(t.style.left=r+"px",this.count.x=0):n<0&&(this.count.x++,d.my.x="left",d.at.x="right",d.my.offsetX*=-1,d.at.offsetX*=-1,this.right())},right:function(){var r=g.left()+e.getOuterWidth(n),i=e.getWindowScrollLeft();t.style.left=r+i+"px",2===this.count.x?(t.style.left=u.width-e.getOuterWidth(t)+i+"px",this.count.x=0):r+e.getOuterWidth(t)>u.width&&(this.count.x++,d.my.x="right",d.at.x="left",d.my.offsetX*=-1,d.at.offsetX*=-1,this.left())},top:function(){var n=g.top(),r=e.getWindowScrollTop();t.style.top=n+r+"px",2===this.count.y?(t.style.left=r+"px",this.count.y=0):n<0&&(this.count.y++,d.my.y="top",d.at.y="bottom",d.my.offsetY*=-1,d.at.offsetY*=-1,this.bottom())},bottom:function(){var r=g.top()+e.getOuterHeight(n),i=e.getWindowScrollTop();t.style.top=r+i+"px",2===this.count.y?(t.style.left=u.height-e.getOuterHeight(t)+i+"px",this.count.y=0):r+e.getOuterHeight(n)>u.height&&(this.count.y++,d.my.y="bottom",d.at.y="top",d.my.offsetY*=-1,d.at.offsetY*=-1,this.top())},center:function(r){if("y"===r){var i=g.top()+e.getOuterHeight(n)/2;t.style.top=i+e.getWindowScrollTop()+"px",i<0?this.bottom():i+e.getOuterHeight(n)>u.height&&this.top()}else{var o=g.left()+e.getOuterWidth(n)/2;t.style.left=o+e.getWindowScrollLeft()+"px",o<0?this.left():o+e.getOuterWidth(t)>u.width&&this.right()}}};p[d.at.x]("x"),p[d.at.y]("y"),this.isFunction(l)&&l(d)}}},{key:"findCollisionPosition",value:function(e){if(e){var t="left"===e?"right":"left";return"top"===e||"bottom"===e?{axis:"y",my:"center ".concat("top"===e?"bottom":"top"),at:"center ".concat(e)}:{axis:"x",my:"".concat(t," center"),at:"".concat(e," center")}}}},{key:"getParents",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return null===e.parentNode?t:this.getParents(e.parentNode,t.concat([e.parentNode]))}},{key:"getScrollableParents",value:function(e){var t=[];if(e){var n,r=this.getParents(e),i=/(auto|scroll)/,o=function(e){var t=e?getComputedStyle(e):null;return t&&(i.test(t.getPropertyValue("overflow"))||i.test(t.getPropertyValue("overflowX"))||i.test(t.getPropertyValue("overflowY")))},l=y(r);try{for(l.s();!(n=l.n()).done;){var a=n.value,u=1===a.nodeType&&a.dataset.scrollselectors;if(u){var s,c=y(u.split(","));try{for(c.s();!(s=c.n()).done;){var f=this.findSingle(a,s.value);f&&o(f)&&t.push(f)}}catch(e){c.e(e)}finally{c.f()}}9!==a.nodeType&&o(a)&&t.push(a)}}catch(e){l.e(e)}finally{l.f()}}return t}},{key:"getHiddenElementOuterHeight",value:function(e){if(e){e.style.visibility="hidden",e.style.display="block";var t=e.offsetHeight;return e.style.display="none",e.style.visibility="visible",t}return 0}},{key:"getHiddenElementOuterWidth",value:function(e){if(e){e.style.visibility="hidden",e.style.display="block";var t=e.offsetWidth;return e.style.display="none",e.style.visibility="visible",t}return 0}},{key:"getHiddenElementDimensions",value:function(e){var t={};return e&&(e.style.visibility="hidden",e.style.display="block",t.width=e.offsetWidth,t.height=e.offsetHeight,e.style.display="none",e.style.visibility="visible"),t}},{key:"fadeIn",value:function(e,t){if(e){e.style.opacity=0;var n=+new Date,r=0;!function i(){r=+e.style.opacity+((new Date).getTime()-n)/t,e.style.opacity=r,n=+new Date,+r<1&&(window.requestAnimationFrame&&requestAnimationFrame(i)||setTimeout(i,16))}()}}},{key:"fadeOut",value:function(e,t){if(e)var n=1,r=50/t,i=setInterval((function(){(n-=r)<=0&&(n=0,clearInterval(i)),e.style.opacity=n}),50)}},{key:"getUserAgent",value:function(){return navigator.userAgent}},{key:"isIOS",value:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream}},{key:"isAndroid",value:function(){return/(android)/i.test(navigator.userAgent)}},{key:"isChrome",value:function(){return/(chrome)/i.test(navigator.userAgent)}},{key:"isTouchDevice",value:function(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}},{key:"isFunction",value:function(e){return!!(e&&e.constructor&&e.call&&e.apply)}},{key:"appendChild",value:function(e,t){if(this.isElement(t))t.appendChild(e);else{if(!t.el||!t.el.nativeElement)throw new Error("Cannot append "+t+" to "+e);t.el.nativeElement.appendChild(e)}}},{key:"removeChild",value:function(e,t){if(this.isElement(t))t.removeChild(e);else{if(!t.el||!t.el.nativeElement)throw new Error("Cannot remove "+e+" from "+t);t.el.nativeElement.removeChild(e)}}},{key:"isElement",value:function(e){return"object"===("undefined"==typeof HTMLElement?"undefined":a(HTMLElement))?e instanceof HTMLElement:e&&"object"===a(e)&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName}},{key:"scrollInView",value:function(e,t){var n=getComputedStyle(e).getPropertyValue("borderTopWidth"),r=n?parseFloat(n):0,i=getComputedStyle(e).getPropertyValue("paddingTop"),o=i?parseFloat(i):0,l=e.getBoundingClientRect(),a=t.getBoundingClientRect().top+document.body.scrollTop-(l.top+document.body.scrollTop)-r-o,u=e.scrollTop,s=e.clientHeight,c=this.getOuterHeight(t);a<0?e.scrollTop=u+a:a+c>s&&(e.scrollTop=u+a-s+c)}},{key:"clearSelection",value: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(e){}}},{key:"calculateScrollbarWidth",value:function(e){if(e){var t=getComputedStyle(e);return e.offsetWidth-e.clientWidth-parseFloat(t.borderLeftWidth)-parseFloat(t.borderRightWidth)}if(null!=this.calculatedScrollbarWidth)return this.calculatedScrollbarWidth;var n=document.createElement("div");n.className="p-scrollbar-measure",document.body.appendChild(n);var r=n.offsetWidth-n.clientWidth;return document.body.removeChild(n),this.calculatedScrollbarWidth=r,r}},{key:"getBrowser",value:function(){if(!this.browser){var e=this.resolveUserAgent();this.browser={},e.browser&&(this.browser[e.browser]=!0,this.browser.version=e.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser}},{key:"resolveUserAgent",value:function(){var e=navigator.userAgent.toLowerCase(),t=/(chrome)[ ]([\w.]+)/.exec(e)||/(webkit)[ ]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ ]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}}},{key:"isVisible",value:function(e){return e&&(0!==e.clientHeight||0!==e.getClientRects().length||"none"!==getComputedStyle(e).display)}},{key:"isExist",value:function(e){return!(null==e||!e.nodeName||!e.parentNode)}},{key:"hasDOM",value:function(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}},{key:"getFocusableElements",value:function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=e.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)),o=[],l=y(i);try{for(l.s();!(n=l.n()).done;){var a=n.value;"none"!==getComputedStyle(a).display&&"hidden"!==getComputedStyle(a).visibility&&o.push(a)}}catch(e){l.e(e)}finally{l.f()}return o}},{key:"getFirstFocusableElement",value:function(t,n){var r=e.getFocusableElements(t,n);return r.length>0?r[0]:null}},{key:"getLastFocusableElement",value:function(t,n){var r=e.getFocusableElements(t,n);return r.length>0?r[r.length-1]:null}},{key:"focus",value:function(e,t){e&&document.activeElement!==e&&e.focus({preventScroll:void 0===t||!t})}},{key:"focusFirstElement",value:function(t,n){if(t){var r=e.getFirstFocusableElement(t);return r&&e.focus(r,n),r}}},{key:"getCursorOffset",value:function(e,t,n,r){if(e){var i=getComputedStyle(e),o=document.createElement("div");o.style.position="absolute",o.style.top="0px",o.style.left="0px",o.style.visibility="hidden",o.style.pointerEvents="none",o.style.overflow=i.overflow,o.style.width=i.width,o.style.height=i.height,o.style.padding=i.padding,o.style.border=i.border,o.style.overflowWrap=i.overflowWrap,o.style.whiteSpace=i.whiteSpace,o.style.lineHeight=i.lineHeight,o.innerHTML=t.replace(/\r\n|\r|\n/g,"<br />");var l=document.createElement("span");l.textContent=r,o.appendChild(l);var a=document.createTextNode(n);o.appendChild(a),document.body.appendChild(o);var u=l.offsetLeft,s=l.offsetTop,c=l.clientHeight;return document.body.removeChild(o),{left:Math.abs(u-e.scrollLeft),top:Math.abs(s-e.scrollTop)+c}}return{top:"auto",left:"auto"}}},{key:"invokeElementMethod",value:function(e,t,n){e[t].apply(e,n)}},{key:"isClickable",value:function(e){var t=e.nodeName,n=e.parentElement&&e.parentElement.nodeName;return"INPUT"===t||"TEXTAREA"===t||"BUTTON"===t||"A"===t||"INPUT"===n||"TEXTAREA"===n||"BUTTON"===n||"A"===n||this.hasClass(e,"p-button")||this.hasClass(e.parentElement,"p-button")||this.hasClass(e.parentElement,"p-checkbox")||this.hasClass(e.parentElement,"p-radiobutton")}},{key:"applyStyle",value:function(e,t){if("string"==typeof t)e.style.cssText=this.style;else for(var n in this.style)e.style[n]=t[n]}},{key:"exportCSV",value:function(t,n){var r=new Blob([t],{type:"application/csv;charset=utf-8;"});window.navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(r,n+".csv"):e.saveAs({name:n+".csv",src:URL.createObjectURL(r)})||(t="data:text/csv;charset=utf-8,"+t,window.open(encodeURI(t)))}},{key:"saveAs",value:function(e){if(e){var t=document.createElement("a");if(void 0!==t.download){var n=e.name;return t.setAttribute("href",e.src),t.setAttribute("download",n),t.style.display="none",document.body.appendChild(t),t.click(),document.body.removeChild(t),!0}}return!1}},{key:"createInlineStyle",value:function(e){var t=document.createElement("style");try{e||(e=process.env.REACT_APP_CSS_NONCE)}catch(e){}return e&&t.setAttribute("nonce",e),document.head.appendChild(t),t}},{key:"removeInlineStyle",value:function(e){if(this.isExist(e)){try{document.head.removeChild(e)}catch(e){}e=null}return e}},{key:"getTargetElement",value:function(e){if(!e)return null;if("document"===e)return document;if("window"===e)return window;if("object"===a(e)&&e.hasOwnProperty("current"))return this.isExist(e.current)?e.current:null;var t,n=(t=e)&&t.constructor&&t.call&&t.apply?e():e;return n&&9===n.nodeType||this.isExist(n)?n:null}},{key:"getAttributeNames",value:function(e){var t,n,r;for(n=[],r=e.attributes,t=0;t<r.length;++t)n.push(r[t].nodeName);return n.sort(),n}},{key:"isEqualElement",value:function(t,n){var r,i,o,l,a;if(r=e.getAttributeNames(t),i=e.getAttributeNames(n),r.join(",")!==i.join(","))return!1;for(var u=0;u<r.length;++u)if("style"===(o=r[u]))for(var s=t.style,c=n.style,f=/^\d+$/,d=0,g=Object.keys(s);d<g.length;d++){var p=g[d];if(!f.test(p)&&s[p]!==c[p])return!1}else if(t.getAttribute(o)!==n.getAttribute(o))return!1;for(l=t.firstChild,a=n.firstChild;l&&a;l=l.nextSibling,a=a.nextSibling){if(l.nodeType!==a.nodeType)return!1;if(1===l.nodeType){if(!e.isEqualElement(l,a))return!1}else if(l.nodeValue!==a.nodeValue)return!1}return!l&&!a}}]),e}();p(m,"DATA_PROPS",["data-"]),p(m,"ARIA_PROPS",["aria","focus-target"]);var b=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};s(this,e),this.element=t,this.listener=n}return g(e,[{key:"bindScrollListener",value:function(){this.scrollableParents=m.getScrollableParents(this.element);for(var e=0;e<this.scrollableParents.length;e++)this.scrollableParents[e].addEventListener("scroll",this.listener)}},{key:"unbindScrollListener",value:function(){if(this.scrollableParents)for(var e=0;e<this.scrollableParents.length;e++)this.scrollableParents[e].removeEventListener("scroll",this.listener)}},{key:"destroy",value:function(){this.unbindScrollListener(),this.element=null,this.listener=null,this.scrollableParents=null}}]),e}();function w(){var e=new Map;return{on:function(t,n){var r=e.get(t);r?r.push(n):r=[n],e.set(t,r)},off:function(t,n){var r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)},emit:function(t,n){var r=e.get(t);r&&r.slice().forEach((function(e){return e(n)}))}}}function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function x(e,t){var n,r,i,o,l,a,u,s,c,f,d,g;t=E(E({},{mask:null,slotChar:"_",autoClear:!0,unmask:!1,readOnly:!1,onComplete:null,onChange:null,onFocus:null,onBlur:null}),t);var p=function(t,n){var r,i,o;if(e.offsetParent&&e===document.activeElement)return"number"!=typeof t?(e.setSelectionRange?(i=e.selectionStart,o=e.selectionEnd):document.selection&&document.selection.createRange&&(o=(i=0-(r=document.selection.createRange()).duplicate().moveStart("character",-1e5))+r.text.length),{begin:i,end:o}):(i=t,o="number"==typeof n?n:i,void(e.setSelectionRange?e.setSelectionRange(i,o):e.createTextRange&&((r=e.createTextRange()).collapse(!0),r.moveEnd("character",o),r.moveStart("character",i),r.select())))},y=function(){for(var e=o;e<=u;e++)if(n[e]&&d[e]===v(e))return!1;return!0},v=function(e){return t.slotChar.charAt(e<t.slotChar.length?e:0)},h=function(){return t.unmask?R():e&&e.value},b=function(e){for(;++e<i&&!n[e];);return e},w=function(e){for(;--e>=0&&!n[e];);return e},k=function(e,t){var r,l;if(!(e<0)){for(r=e,l=b(t);r<i;r++)if(n[r]){if(!(l<i&&n[r].test(d[l])))break;d[r]=d[l],d[l]=v(l),l=b(l)}j(),p(Math.max(o,e))}},x=function(e){var t,r,o,l;for(t=e,r=v(e);t<i;t++)if(n[t]){if(o=b(t),l=d[t],d[t]=r,!(o<i&&n[o].test(l)))break;r=l}},C=function(r){var l=e.value,a=p();if(s&&s.length&&s.length>l.length){for(T(!0);a.begin>0&&!n[a.begin-1];)a.begin--;if(0===a.begin)for(;a.begin<o&&!n[a.begin];)a.begin++;p(a.begin,a.begin)}else{for(T(!0);a.begin<i&&!n[a.begin];)a.begin++;p(a.begin,a.begin)}t.onComplete&&y()&&t.onComplete({originalEvent:r,value:h()})},O=function(n){if(T(),t.onBlur&&t.onBlur(n),D(n),e.value!==c){var r=document.createEvent("HTMLEvents");r.initEvent("change",!0,!1),e.dispatchEvent(r)}},S=function(n){if(!t.readOnly){var r,i,o,l=n.which||n.keyCode;s=e.value,8===l||46===l||m.isIOS()&&127===l?((o=(r=p()).end)-(i=r.begin)==0&&(i=46!==l?w(i):o=b(i-1),o=46===l?b(o):o),A(i,o),k(i,o-1),D(n),n.preventDefault()):13===l?(O(n),D(n)):27===l&&(e.value=c,p(0,T()),D(n),n.preventDefault())}},P=function(e){if(!t.readOnly){var r,o,l,a,s=e.which||e.keyCode,c=p();if(!(e.ctrlKey||e.altKey||e.metaKey||s<32)){if(s&&13!==s){if(c.end-c.begin!=0&&(A(c.begin,c.end),k(c.begin,c.end-1)),(r=b(c.begin-1))<i&&(o=String.fromCharCode(s),n[r].test(o))){if(x(r),d[r]=o,j(),l=b(r),m.isAndroid()){setTimeout((function(){p(l)}),0)}else p(l);c.begin<=u&&(a=y())}e.preventDefault()}D(e),t.onComplete&&a&&t.onComplete({originalEvent:e,value:h()})}}},A=function(e,t){var r;for(r=e;r<t&&r<i;r++)n[r]&&(d[r]=v(r))},j=function(){e.value=d.join("")},T=function(l){var a,u,s,c=e.value,f=-1;for(a=0,s=0;a<i;a++)if(n[a]){for(d[a]=v(a);s++<c.length;)if(u=c.charAt(s-1),n[a].test(u)){d[a]=u,f=a;break}if(s>c.length){A(a+1,i);break}}else d[a]===c.charAt(s)&&s++,a<r&&(f=a);return l?j():f+1<r?t.autoClear||d.join("")===g?(e.value&&(e.value=""),A(0,i)):j():(j(),e.value=e.value.substring(0,f+1)),r?a:o},F=function(n){var r;t.readOnly||(clearTimeout(f),c=e.value,r=T(),f=setTimeout((function(){e===document.activeElement&&(j(),r===t.mask.replace("?","").length?p(0,r):p(r))}),10),t.onFocus&&t.onFocus(n))},L=function(e){a?C(e):W(e)},W=function(e){if(!t.readOnly){var n=T(!0);p(n),D(e),t.onComplete&&y()&&t.onComplete({originalEvent:e,value:h()})}},R=function(){for(var e=[],t=0;t<d.length;t++){var r=d[t];n[t]&&r!==v(t)&&e.push(r)}return e.join("")},D=function(e){if(t.onChange){var n=h().replace(t.slotChar,"");t.onChange({originalEvent:e,value:g!==n?n:""})}},H=function(){e.addEventListener("focus",F),e.addEventListener("blur",O),e.addEventListener("keydown",S),e.addEventListener("keypress",P),e.addEventListener("input",L),e.addEventListener("paste",W)},N=function(){n=[],r=t.mask.length,i=t.mask.length,o=null,l={9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},a=m.isChrome()&&m.isAndroid();for(var e=t.mask.split(""),s=0;s<e.length;s++){var c=e[s];"?"===c?(i--,r=s):l[c]?(n.push(new RegExp(l[c])),null===o&&(o=n.length-1),s<r&&(u=n.length-1)):n.push(null)}d=[];for(var f=0;f<e.length;f++){var p=e[f];"?"!==p&&d.push(l[p]?v(f):p)}g=d.join("")};return e&&t.mask&&(N(),H()),{init:N,bindEvents:H,unbindEvents:function(){e.removeEventListener("focus",F),e.removeEventListener("blur",O),e.removeEventListener("keydown",S),e.removeEventListener("keypress",P),e.removeEventListener("input",L),e.removeEventListener("paste",W)},updateModel:D,getValue:h}}function C(e){if(Array.isArray(e))return r(e)}function O(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function S(){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 P(e){return C(e)||O(e)||i(e)||S()}var A=function(){function e(){s(this,e)}return g(e,null,[{key:"equals",value:function(e,t,n){return n&&e&&"object"===a(e)&&t&&"object"===a(t)?this.resolveFieldData(e,n)===this.resolveFieldData(t,n):this.deepEquals(e,t)}},{key:"deepEquals",value:function(e,t){if(e===t)return!0;if(e&&t&&"object"==a(e)&&"object"==a(t)){var n,r,i,o=Array.isArray(e),l=Array.isArray(t);if(o&&l){if((r=e.length)!==t.length)return!1;for(n=r;0!=n--;)if(!this.deepEquals(e[n],t[n]))return!1;return!0}if(o!==l)return!1;var u=e instanceof Date,s=t instanceof Date;if(u!==s)return!1;if(u&&s)return e.getTime()===t.getTime();var c=e instanceof RegExp,f=t instanceof RegExp;if(c!==f)return!1;if(c&&f)return e.toString()===t.toString();var d=Object.keys(e);if((r=d.length)!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!Object.prototype.hasOwnProperty.call(t,d[n]))return!1;for(n=r;0!=n--;)if(!this.deepEquals(e[i=d[n]],t[i]))return!1;return!0}return e!=e&&t!=t}},{key:"resolveFieldData",value:function(t,n){if(t&&Object.keys(t).length&&n){if(this.isFunction(n))return n(t);if(e.isNotEmpty(t[n]))return t[n];if(-1===n.indexOf("."))return t[n];for(var r=n.split("."),i=t,o=0,l=r.length;o<l;++o){if(null==i)return null;i=i[r[o]]}return i}return null}},{key:"isFunction",value:function(e){return!!(e&&e.constructor&&e.call&&e.apply)}},{key:"isLetter",value:function(e){return e&&(e.toUpperCase()!=e.toLowerCase()||e.codePointAt(0)>127)}},{key:"findDiffKeys",value:function(e,t){return e&&t?Object.keys(e).filter((function(e){return!t.hasOwnProperty(e)})).reduce((function(t,n){return t[n]=e[n],t}),{}):{}}},{key:"reduceKeys",value:function(e,t){var n={};return e&&t&&0!==t.length?(Object.keys(e).filter((function(e){return t.some((function(t){return e.startsWith(t)}))})).forEach((function(t){n[t]=e[t],delete e[t]})),n):n}},{key:"reorderArray",value:function(e,t,n){e&&t!==n&&(n>=e.length&&(n%=e.length,t%=e.length),e.splice(n,0,e.splice(t,1)[0]))}},{key:"findIndexInList",value:function(e,t,n){var r=this;return t?t.findIndex(n?function(t){return r.equals(t,e,n)}:function(t){return t===e}):-1}},{key:"getJSXElement",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return this.isFunction(e)?e.apply(void 0,n):e}},{key:"getProp",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e?e[t]:void 0;return void 0===r?n[t]:r}},{key:"getMergedProps",value:function(e,t){return Object.assign({},t,e)}},{key:"getDiffProps",value:function(e,t){return this.findDiffKeys(e,t)}},{key:"getPropValue",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=n;return n&&1===n.length&&(i=n[0]),this.isFunction(e)?e.apply(void 0,P(i)):e}},{key:"getComponentProp",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.isNotEmpty(e)?this.getProp(e.props,t,n):void 0}},{key:"getComponentProps",value:function(e,t){return this.isNotEmpty(e)?this.getMergedProps(e.props,t):void 0}},{key:"getComponentDiffProps",value:function(e,t){return this.isNotEmpty(e)?this.getDiffProps(e.props,t):void 0}},{key:"isValidChild",value:function(e,t,n){try{0}catch(e){}return!0}},{key:"getRefElement",value:function(e){return e?"object"===a(e)&&e.hasOwnProperty("current")?e.current:e:null}},{key:"combinedRefs",value:function(e,t){e&&t&&("function"==typeof t?t(e.current):t.current=e.current)}},{key:"removeAccents",value:function(e){return e&&e.search(/[\xC0-\xFF]/g)>-1&&(e=e.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")),e}},{key:"isEmpty",value:function(e){return null==e||""===e||Array.isArray(e)&&0===e.length||!(e instanceof Date)&&"object"===a(e)&&0===Object.keys(e).length}},{key:"isNotEmpty",value:function(e){return!this.isEmpty(e)}},{key:"sort",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,l=e.compare(t,n,i,r),a=r;return(e.isEmpty(t)||e.isEmpty(n))&&(a=1===o?r:o),a*l}},{key:"compare",value:function(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=e.isEmpty(t),l=e.isEmpty(n);return o&&l?0:o?i:l?-i:"string"==typeof t&&"string"==typeof n?t.localeCompare(n,r,{numeric:!0}):t<n?-1:t>n?1:0}}]),e}();function j(){return j=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},j.apply(this,arguments)}function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var L=function(){function t(){s(this,t)}return g(t,null,[{key:"getJSXIcon",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=null;if(null!==t){var o=a(t),l=u(n.className,"string"===o&&t);if(i=e.createElement("span",j({},n,{className:l})),"string"!==o){var s=F({iconProps:n,element:i},r);return A.getJSXElement(t,s)}}return i}}]),t}(),W=0;function R(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"pr_id_";return W++,"".concat(e).concat(W)}var D,H,N,I,B=(D=[],H=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:999,r=I(e,t,n),i=r.value+(r.key===e?0:n)+1;return D.push({key:e,value:i}),i},N=function(e,t){return I(e,t).value},I=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return P(D).reverse().find((function(n){return!!t||n.key===e}))||{key:e,value:n}},{get:function(e){return e&&parseInt(e.style.zIndex,10)||0},set:function(e,t,n,r){t&&(t.style.zIndex=String(H(e,n,r)))},clear:function(e){var t;e&&(t=B.get(e),D=D.filter((function(e){return e.value!==t})),e.style.zIndex="")},getCurrent:function(e,t){return N(e,t)}});export{b as ConnectedOverlayScrollHandler,m as DomHandler,w as EventBus,L as IconUtils,A as ObjectUtils,R as UniqueComponentId,B as ZIndexUtils,u as classNames,x as mask};
|
|
1
|
+
import*as e from"react";function t(e){if(Array.isArray(e))return e}function n(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,l,a=[],u=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);u=!0);}catch(e){s=!0,i=e}finally{try{if(!u&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(s)throw i}}return a}}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function i(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}function o(){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 l(e,r){return t(e)||n(e,r)||i(e,r)||o()}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function u(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t){for(var r=[],i=0;i<t.length;i++){var o=t[i];if(o){var u=a(o);if("string"===u||"number"===u)r.push(o);else if("object"===u){var s=Array.isArray(o)?o:Object.entries(o).map((function(e){var t=l(e,2);return t[1]?t[0]:null}));r=s.length?r.concat(s.filter((function(e){return!!e}))):r}}}return r.join(" ")}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if("object"!==a(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function f(e){var t=c(e,"string");return"symbol"===a(t)?t:String(t)}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,f(r.key),r)}}function g(e,t,n){return t&&d(e.prototype,t),n&&d(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function p(e,t,n){return(t=f(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=v(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){a=!0,o=e},f:function(){try{l||null==n.return||n.return()}finally{if(a)throw o}}}}function v(e,t){if(e){if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var m=function(){function e(){s(this,e)}return g(e,null,[{key:"innerWidth",value:function(e){if(e){var t=e.offsetWidth,n=getComputedStyle(e);return t+=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)}return 0}},{key:"width",value:function(e){if(e){var t=e.offsetWidth,n=getComputedStyle(e);return t-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),t}return 0}},{key:"getBrowserLanguage",value:function(){return navigator.userLanguage||navigator.languages&&navigator.languages.length&&navigator.languages[0]||navigator.language||navigator.browserLanguage||navigator.systemLanguage||"en"}},{key:"getWindowScrollTop",value:function(){var e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)}},{key:"getWindowScrollLeft",value:function(){var e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}},{key:"getOuterWidth",value:function(e,t){if(e){var n=e.getBoundingClientRect().width||e.offsetWidth;if(t){var r=getComputedStyle(e);n+=parseFloat(r.marginLeft)+parseFloat(r.marginRight)}return n}return 0}},{key:"getOuterHeight",value:function(e,t){if(e){var n=e.getBoundingClientRect().height||e.offsetHeight;if(t){var r=getComputedStyle(e);n+=parseFloat(r.marginTop)+parseFloat(r.marginBottom)}return n}return 0}},{key:"getClientHeight",value:function(e,t){if(e){var n=e.clientHeight;if(t){var r=getComputedStyle(e);n+=parseFloat(r.marginTop)+parseFloat(r.marginBottom)}return n}return 0}},{key:"getClientWidth",value:function(e,t){if(e){var n=e.clientWidth;if(t){var r=getComputedStyle(e);n+=parseFloat(r.marginLeft)+parseFloat(r.marginRight)}return n}return 0}},{key:"getViewport",value:function(){var e=window,t=document,n=t.documentElement,r=t.getElementsByTagName("body")[0];return{width:e.innerWidth||n.clientWidth||r.clientWidth,height:e.innerHeight||n.clientHeight||r.clientHeight}}},{key:"getOffset",value:function(e){if(e){var t=e.getBoundingClientRect();return{top:t.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:t.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}return{top:"auto",left:"auto"}}},{key:"index",value:function(e){if(e)for(var t=e.parentNode.childNodes,n=0,r=0;r<t.length;r++){if(t[r]===e)return n;1===t[r].nodeType&&n++}return-1}},{key:"addMultipleClasses",value:function(e,t){if(e&&t)if(e.classList)for(var n=t.split(" "),r=0;r<n.length;r++)e.classList.add(n[r]);else for(var i=t.split(" "),o=0;o<i.length;o++)e.className+=" "+i[o]}},{key:"removeMultipleClasses",value:function(e,t){if(e&&t)if(e.classList)for(var n=t.split(" "),r=0;r<n.length;r++)e.classList.remove(n[r]);else for(var i=t.split(" "),o=0;o<i.length;o++)e.className=e.className.replace(new RegExp("(^|\\b)"+i[o].split(" ").join("|")+"(\\b|$)","gi")," ")}},{key:"addClass",value:function(e,t){e&&t&&(e.classList?e.classList.add(t):e.className+=" "+t)}},{key:"removeClass",value:function(e,t){e&&t&&(e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," "))}},{key:"hasClass",value:function(e,t){return!!e&&(e.classList?e.classList.contains(t):new RegExp("(^| )"+t+"( |$)","gi").test(e.className))}},{key:"find",value:function(e,t){return e?Array.from(e.querySelectorAll(t)):[]}},{key:"findSingle",value:function(e,t){return e?e.querySelector(t):null}},{key:"getHeight",value:function(e){if(e){var t=e.offsetHeight,n=getComputedStyle(e);return t-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)+parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth)}return 0}},{key:"getWidth",value:function(e){if(e){var t=e.offsetWidth,n=getComputedStyle(e);return t-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)+parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth)}return 0}},{key:"alignOverlay",value:function(t,n,r){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];t&&n&&("self"===r?this.relativePosition(t,n):(i&&(t.style.minWidth=e.getOuterWidth(n)+"px"),this.absolutePosition(t,n)))}},{key:"absolutePosition",value:function(e,t){if(e&&t){var n,r,i=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),o=i.height,l=i.width,a=t.offsetHeight,u=t.offsetWidth,s=t.getBoundingClientRect(),c=this.getWindowScrollTop(),f=this.getWindowScrollLeft(),d=this.getViewport();s.top+a+o>d.height?((n=s.top+c-o)<0&&(n=c),e.style.transformOrigin="bottom"):(n=a+s.top+c,e.style.transformOrigin="top"),r=s.left+u+l>d.width?Math.max(0,s.left+f+u-l):s.left+f,e.style.top=n+"px",e.style.left=r+"px"}}},{key:"relativePosition",value:function(e,t){if(e&&t){var n,r,i=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),o=t.offsetHeight,l=t.getBoundingClientRect(),a=this.getViewport();l.top+o+i.height>a.height?(l.top+(n=-1*i.height)<0&&(n=-1*l.top),e.style.transformOrigin="bottom"):(n=o,e.style.transformOrigin="top"),r=i.width>a.width?-1*l.left:l.left+i.width>a.width?-1*(l.left+i.width-a.width):0,e.style.top=n+"px",e.style.left=r+"px"}}},{key:"flipfitCollision",value:function(t,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"left top",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"left bottom",l=arguments.length>4?arguments[4]:void 0;if(t&&n){var a=n.getBoundingClientRect(),u=this.getViewport(),s=i.split(" "),c=o.split(" "),f=function(e,t){return t?+e.substring(e.search(/(\+|-)/g))||0:e.substring(0,e.search(/(\+|-)/g))||e},d={my:{x:f(s[0]),y:f(s[1]||s[0]),offsetX:f(s[0],!0),offsetY:f(s[1]||s[0],!0)},at:{x:f(c[0]),y:f(c[1]||c[0]),offsetX:f(c[0],!0),offsetY:f(c[1]||c[0],!0)}},g={left:function(){return d.my.offsetX+d.at.offsetX+a.left+("left"===d.my.x?0:-1*("center"===d.my.x?r.getOuterWidth(t)/2:r.getOuterWidth(t)))},top:function(){return d.my.offsetY+d.at.offsetY+a.top+("top"===d.my.y?0:-1*("center"===d.my.y?r.getOuterHeight(t)/2:r.getOuterHeight(t)))}},p={count:{x:0,y:0},left:function(){var n=g.left(),r=e.getWindowScrollLeft();t.style.left=n+r+"px",2===this.count.x?(t.style.left=r+"px",this.count.x=0):n<0&&(this.count.x++,d.my.x="left",d.at.x="right",d.my.offsetX*=-1,d.at.offsetX*=-1,this.right())},right:function(){var r=g.left()+e.getOuterWidth(n),i=e.getWindowScrollLeft();t.style.left=r+i+"px",2===this.count.x?(t.style.left=u.width-e.getOuterWidth(t)+i+"px",this.count.x=0):r+e.getOuterWidth(t)>u.width&&(this.count.x++,d.my.x="right",d.at.x="left",d.my.offsetX*=-1,d.at.offsetX*=-1,this.left())},top:function(){var n=g.top(),r=e.getWindowScrollTop();t.style.top=n+r+"px",2===this.count.y?(t.style.left=r+"px",this.count.y=0):n<0&&(this.count.y++,d.my.y="top",d.at.y="bottom",d.my.offsetY*=-1,d.at.offsetY*=-1,this.bottom())},bottom:function(){var r=g.top()+e.getOuterHeight(n),i=e.getWindowScrollTop();t.style.top=r+i+"px",2===this.count.y?(t.style.left=u.height-e.getOuterHeight(t)+i+"px",this.count.y=0):r+e.getOuterHeight(n)>u.height&&(this.count.y++,d.my.y="bottom",d.at.y="top",d.my.offsetY*=-1,d.at.offsetY*=-1,this.top())},center:function(r){if("y"===r){var i=g.top()+e.getOuterHeight(n)/2;t.style.top=i+e.getWindowScrollTop()+"px",i<0?this.bottom():i+e.getOuterHeight(n)>u.height&&this.top()}else{var o=g.left()+e.getOuterWidth(n)/2;t.style.left=o+e.getWindowScrollLeft()+"px",o<0?this.left():o+e.getOuterWidth(t)>u.width&&this.right()}}};p[d.at.x]("x"),p[d.at.y]("y"),this.isFunction(l)&&l(d)}}},{key:"findCollisionPosition",value:function(e){if(e){var t="left"===e?"right":"left";return"top"===e||"bottom"===e?{axis:"y",my:"center ".concat("top"===e?"bottom":"top"),at:"center ".concat(e)}:{axis:"x",my:"".concat(t," center"),at:"".concat(e," center")}}}},{key:"getParents",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return null===e.parentNode?t:this.getParents(e.parentNode,t.concat([e.parentNode]))}},{key:"getScrollableParents",value:function(e){var t=[];if(e){var n,r=this.getParents(e),i=/(auto|scroll)/,o=function(e){var t=e?getComputedStyle(e):null;return t&&(i.test(t.getPropertyValue("overflow"))||i.test(t.getPropertyValue("overflowX"))||i.test(t.getPropertyValue("overflowY")))},l=y(r);try{for(l.s();!(n=l.n()).done;){var a=n.value,u=1===a.nodeType&&a.dataset.scrollselectors;if(u){var s,c=y(u.split(","));try{for(c.s();!(s=c.n()).done;){var f=this.findSingle(a,s.value);f&&o(f)&&t.push(f)}}catch(e){c.e(e)}finally{c.f()}}9!==a.nodeType&&o(a)&&t.push(a)}}catch(e){l.e(e)}finally{l.f()}}return t}},{key:"getHiddenElementOuterHeight",value:function(e){if(e){e.style.visibility="hidden",e.style.display="block";var t=e.offsetHeight;return e.style.display="none",e.style.visibility="visible",t}return 0}},{key:"getHiddenElementOuterWidth",value:function(e){if(e){e.style.visibility="hidden",e.style.display="block";var t=e.offsetWidth;return e.style.display="none",e.style.visibility="visible",t}return 0}},{key:"getHiddenElementDimensions",value:function(e){var t={};return e&&(e.style.visibility="hidden",e.style.display="block",t.width=e.offsetWidth,t.height=e.offsetHeight,e.style.display="none",e.style.visibility="visible"),t}},{key:"fadeIn",value:function(e,t){if(e){e.style.opacity=0;var n=+new Date,r=0;!function i(){r=+e.style.opacity+((new Date).getTime()-n)/t,e.style.opacity=r,n=+new Date,+r<1&&(window.requestAnimationFrame&&requestAnimationFrame(i)||setTimeout(i,16))}()}}},{key:"fadeOut",value:function(e,t){if(e)var n=1,r=50/t,i=setInterval((function(){(n-=r)<=0&&(n=0,clearInterval(i)),e.style.opacity=n}),50)}},{key:"getUserAgent",value:function(){return navigator.userAgent}},{key:"isIOS",value:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream}},{key:"isAndroid",value:function(){return/(android)/i.test(navigator.userAgent)}},{key:"isChrome",value:function(){return/(chrome)/i.test(navigator.userAgent)}},{key:"isTouchDevice",value:function(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}},{key:"isFunction",value:function(e){return!!(e&&e.constructor&&e.call&&e.apply)}},{key:"appendChild",value:function(e,t){if(this.isElement(t))t.appendChild(e);else{if(!t.el||!t.el.nativeElement)throw new Error("Cannot append "+t+" to "+e);t.el.nativeElement.appendChild(e)}}},{key:"removeChild",value:function(e,t){if(this.isElement(t))t.removeChild(e);else{if(!t.el||!t.el.nativeElement)throw new Error("Cannot remove "+e+" from "+t);t.el.nativeElement.removeChild(e)}}},{key:"isElement",value:function(e){return"object"===("undefined"==typeof HTMLElement?"undefined":a(HTMLElement))?e instanceof HTMLElement:e&&"object"===a(e)&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName}},{key:"scrollInView",value:function(e,t){var n=getComputedStyle(e).getPropertyValue("borderTopWidth"),r=n?parseFloat(n):0,i=getComputedStyle(e).getPropertyValue("paddingTop"),o=i?parseFloat(i):0,l=e.getBoundingClientRect(),a=t.getBoundingClientRect().top+document.body.scrollTop-(l.top+document.body.scrollTop)-r-o,u=e.scrollTop,s=e.clientHeight,c=this.getOuterHeight(t);a<0?e.scrollTop=u+a:a+c>s&&(e.scrollTop=u+a-s+c)}},{key:"clearSelection",value: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(e){}}},{key:"calculateScrollbarWidth",value:function(e){if(e){var t=getComputedStyle(e);return e.offsetWidth-e.clientWidth-parseFloat(t.borderLeftWidth)-parseFloat(t.borderRightWidth)}if(null!=this.calculatedScrollbarWidth)return this.calculatedScrollbarWidth;var n=document.createElement("div");n.className="p-scrollbar-measure",document.body.appendChild(n);var r=n.offsetWidth-n.clientWidth;return document.body.removeChild(n),this.calculatedScrollbarWidth=r,r}},{key:"getBrowser",value:function(){if(!this.browser){var e=this.resolveUserAgent();this.browser={},e.browser&&(this.browser[e.browser]=!0,this.browser.version=e.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser}},{key:"resolveUserAgent",value:function(){var e=navigator.userAgent.toLowerCase(),t=/(chrome)[ ]([\w.]+)/.exec(e)||/(webkit)[ ]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ ]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}}},{key:"isVisible",value:function(e){return e&&(0!==e.clientHeight||0!==e.getClientRects().length||"none"!==getComputedStyle(e).display)}},{key:"isExist",value:function(e){return!(null==e||!e.nodeName||!e.parentNode)}},{key:"hasDOM",value:function(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}},{key:"getFocusableElements",value:function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=e.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)),o=[],l=y(i);try{for(l.s();!(n=l.n()).done;){var a=n.value;"none"!==getComputedStyle(a).display&&"hidden"!==getComputedStyle(a).visibility&&o.push(a)}}catch(e){l.e(e)}finally{l.f()}return o}},{key:"getFirstFocusableElement",value:function(t,n){var r=e.getFocusableElements(t,n);return r.length>0?r[0]:null}},{key:"getLastFocusableElement",value:function(t,n){var r=e.getFocusableElements(t,n);return r.length>0?r[r.length-1]:null}},{key:"focus",value:function(e,t){e&&document.activeElement!==e&&e.focus({preventScroll:void 0===t||!t})}},{key:"focusFirstElement",value:function(t,n){if(t){var r=e.getFirstFocusableElement(t);return r&&e.focus(r,n),r}}},{key:"getCursorOffset",value:function(e,t,n,r){if(e){var i=getComputedStyle(e),o=document.createElement("div");o.style.position="absolute",o.style.top="0px",o.style.left="0px",o.style.visibility="hidden",o.style.pointerEvents="none",o.style.overflow=i.overflow,o.style.width=i.width,o.style.height=i.height,o.style.padding=i.padding,o.style.border=i.border,o.style.overflowWrap=i.overflowWrap,o.style.whiteSpace=i.whiteSpace,o.style.lineHeight=i.lineHeight,o.innerHTML=t.replace(/\r\n|\r|\n/g,"<br />");var l=document.createElement("span");l.textContent=r,o.appendChild(l);var a=document.createTextNode(n);o.appendChild(a),document.body.appendChild(o);var u=l.offsetLeft,s=l.offsetTop,c=l.clientHeight;return document.body.removeChild(o),{left:Math.abs(u-e.scrollLeft),top:Math.abs(s-e.scrollTop)+c}}return{top:"auto",left:"auto"}}},{key:"invokeElementMethod",value:function(e,t,n){e[t].apply(e,n)}},{key:"isClickable",value:function(e){var t=e.nodeName,n=e.parentElement&&e.parentElement.nodeName;return"INPUT"===t||"TEXTAREA"===t||"BUTTON"===t||"A"===t||"INPUT"===n||"TEXTAREA"===n||"BUTTON"===n||"A"===n||this.hasClass(e,"p-button")||this.hasClass(e.parentElement,"p-button")||this.hasClass(e.parentElement,"p-checkbox")||this.hasClass(e.parentElement,"p-radiobutton")}},{key:"applyStyle",value:function(e,t){if("string"==typeof t)e.style.cssText=this.style;else for(var n in this.style)e.style[n]=t[n]}},{key:"exportCSV",value:function(t,n){var r=new Blob([t],{type:"application/csv;charset=utf-8;"});window.navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(r,n+".csv"):e.saveAs({name:n+".csv",src:URL.createObjectURL(r)})||(t="data:text/csv;charset=utf-8,"+t,window.open(encodeURI(t)))}},{key:"saveAs",value:function(e){if(e){var t=document.createElement("a");if(void 0!==t.download){var n=e.name;return t.setAttribute("href",e.src),t.setAttribute("download",n),t.style.display="none",document.body.appendChild(t),t.click(),document.body.removeChild(t),!0}}return!1}},{key:"createInlineStyle",value:function(e){var t=document.createElement("style");try{e||(e=process.env.REACT_APP_CSS_NONCE)}catch(e){}return e&&t.setAttribute("nonce",e),document.head.appendChild(t),t}},{key:"removeInlineStyle",value:function(e){if(this.isExist(e)){try{document.head.removeChild(e)}catch(e){}e=null}return e}},{key:"getTargetElement",value:function(e){if(!e)return null;if("document"===e)return document;if("window"===e)return window;if("object"===a(e)&&e.hasOwnProperty("current"))return this.isExist(e.current)?e.current:null;var t,n=(t=e)&&t.constructor&&t.call&&t.apply?e():e;return n&&9===n.nodeType||this.isExist(n)?n:null}},{key:"getAttributeNames",value:function(e){var t,n,r;for(n=[],r=e.attributes,t=0;t<r.length;++t)n.push(r[t].nodeName);return n.sort(),n}},{key:"isEqualElement",value:function(t,n){var r,i,o,l,a;if(r=e.getAttributeNames(t),i=e.getAttributeNames(n),r.join(",")!==i.join(","))return!1;for(var u=0;u<r.length;++u)if("style"===(o=r[u]))for(var s=t.style,c=n.style,f=/^\d+$/,d=0,g=Object.keys(s);d<g.length;d++){var p=g[d];if(!f.test(p)&&s[p]!==c[p])return!1}else if(t.getAttribute(o)!==n.getAttribute(o))return!1;for(l=t.firstChild,a=n.firstChild;l&&a;l=l.nextSibling,a=a.nextSibling){if(l.nodeType!==a.nodeType)return!1;if(1===l.nodeType){if(!e.isEqualElement(l,a))return!1}else if(l.nodeValue!==a.nodeValue)return!1}return!l&&!a}}]),e}();p(m,"DATA_PROPS",["data-"]),p(m,"ARIA_PROPS",["aria","focus-target"]);var b=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};s(this,e),this.element=t,this.listener=n}return g(e,[{key:"bindScrollListener",value:function(){this.scrollableParents=m.getScrollableParents(this.element);for(var e=0;e<this.scrollableParents.length;e++)this.scrollableParents[e].addEventListener("scroll",this.listener)}},{key:"unbindScrollListener",value:function(){if(this.scrollableParents)for(var e=0;e<this.scrollableParents.length;e++)this.scrollableParents[e].removeEventListener("scroll",this.listener)}},{key:"destroy",value:function(){this.unbindScrollListener(),this.element=null,this.listener=null,this.scrollableParents=null}}]),e}();function w(){var e=new Map;return{on:function(t,n){var r=e.get(t);r?r.push(n):r=[n],e.set(t,r)},off:function(t,n){var r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)},emit:function(t,n){var r=e.get(t);r&&r.slice().forEach((function(e){return e(n)}))}}}function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function x(e,t){var n,r,i,o,l,a,u,s,c,f,d,g;t=E(E({},{mask:null,slotChar:"_",autoClear:!0,unmask:!1,readOnly:!1,onComplete:null,onChange:null,onFocus:null,onBlur:null}),t);var p=function(t,n){var r,i,o;if(e.offsetParent&&e===document.activeElement)return"number"!=typeof t?(e.setSelectionRange?(i=e.selectionStart,o=e.selectionEnd):document.selection&&document.selection.createRange&&(o=(i=0-(r=document.selection.createRange()).duplicate().moveStart("character",-1e5))+r.text.length),{begin:i,end:o}):(i=t,o="number"==typeof n?n:i,void(e.setSelectionRange?e.setSelectionRange(i,o):e.createTextRange&&((r=e.createTextRange()).collapse(!0),r.moveEnd("character",o),r.moveStart("character",i),r.select())))},y=function(){for(var e=o;e<=u;e++)if(n[e]&&d[e]===v(e))return!1;return!0},v=function(e){return t.slotChar.charAt(e<t.slotChar.length?e:0)},h=function(){return t.unmask?R():e&&e.value},b=function(e){for(;++e<i&&!n[e];);return e},w=function(e){for(;--e>=0&&!n[e];);return e},k=function(e,t){var r,l;if(!(e<0)){for(r=e,l=b(t);r<i;r++)if(n[r]){if(!(l<i&&n[r].test(d[l])))break;d[r]=d[l],d[l]=v(l),l=b(l)}j(),p(Math.max(o,e))}},x=function(e){var t,r,o,l;for(t=e,r=v(e);t<i;t++)if(n[t]){if(o=b(t),l=d[t],d[t]=r,!(o<i&&n[o].test(l)))break;r=l}},C=function(r){var l=e.value,a=p();if(s&&s.length&&s.length>l.length){for(T(!0);a.begin>0&&!n[a.begin-1];)a.begin--;if(0===a.begin)for(;a.begin<o&&!n[a.begin];)a.begin++;p(a.begin,a.begin)}else{for(T(!0);a.begin<i&&!n[a.begin];)a.begin++;p(a.begin,a.begin)}t.onComplete&&y()&&t.onComplete({originalEvent:r,value:h()})},O=function(n){if(T(),t.onBlur&&t.onBlur(n),D(n),e.value!==c){var r=document.createEvent("HTMLEvents");r.initEvent("change",!0,!1),e.dispatchEvent(r)}},S=function(n){if(!t.readOnly){var r,i,o,l=n.which||n.keyCode;s=e.value,8===l||46===l||m.isIOS()&&127===l?((o=(r=p()).end)-(i=r.begin)==0&&(i=46!==l?w(i):o=b(i-1),o=46===l?b(o):o),A(i,o),k(i,o-1),D(n),n.preventDefault()):13===l?(O(n),D(n)):27===l&&(e.value=c,p(0,T()),D(n),n.preventDefault())}},P=function(e){if(!t.readOnly){var r,o,l,a,s=e.which||e.keyCode,c=p();if(!(e.ctrlKey||e.altKey||e.metaKey||s<32)){if(s&&13!==s){if(c.end-c.begin!=0&&(A(c.begin,c.end),k(c.begin,c.end-1)),(r=b(c.begin-1))<i&&(o=String.fromCharCode(s),n[r].test(o))){if(x(r),d[r]=o,j(),l=b(r),m.isAndroid()){setTimeout((function(){p(l)}),0)}else p(l);c.begin<=u&&(a=y())}e.preventDefault()}D(e),t.onComplete&&a&&t.onComplete({originalEvent:e,value:h()})}}},A=function(e,t){var r;for(r=e;r<t&&r<i;r++)n[r]&&(d[r]=v(r))},j=function(){e.value=d.join("")},T=function(l){var a,u,s,c=e.value,f=-1;for(a=0,s=0;a<i;a++)if(n[a]){for(d[a]=v(a);s++<c.length;)if(u=c.charAt(s-1),n[a].test(u)){d[a]=u,f=a;break}if(s>c.length){A(a+1,i);break}}else d[a]===c.charAt(s)&&s++,a<r&&(f=a);return l?j():f+1<r?t.autoClear||d.join("")===g?(e.value&&(e.value=""),A(0,i)):j():(j(),e.value=e.value.substring(0,f+1)),r?a:o},F=function(n){var r;t.readOnly||(clearTimeout(f),c=e.value,r=T(),f=setTimeout((function(){e===document.activeElement&&(j(),r===t.mask.replace("?","").length?p(0,r):p(r))}),10),t.onFocus&&t.onFocus(n))},L=function(e){a?C(e):W(e)},W=function(e){if(!t.readOnly){var n=T(!0);p(n),D(e),t.onComplete&&y()&&t.onComplete({originalEvent:e,value:h()})}},R=function(){for(var e=[],t=0;t<d.length;t++){var r=d[t];n[t]&&r!==v(t)&&e.push(r)}return e.join("")},D=function(e){if(t.onChange){var n=h().replace(t.slotChar,"");t.onChange({originalEvent:e,value:g!==n?n:""})}},H=function(){e.addEventListener("focus",F),e.addEventListener("blur",O),e.addEventListener("keydown",S),e.addEventListener("keypress",P),e.addEventListener("input",L),e.addEventListener("paste",W)},N=function(){n=[],r=t.mask.length,i=t.mask.length,o=null,l={9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},a=m.isChrome()&&m.isAndroid();for(var e=t.mask.split(""),s=0;s<e.length;s++){var c=e[s];"?"===c?(i--,r=s):l[c]?(n.push(new RegExp(l[c])),null===o&&(o=n.length-1),s<r&&(u=n.length-1)):n.push(null)}d=[];for(var f=0;f<e.length;f++){var p=e[f];"?"!==p&&d.push(l[p]?v(f):p)}g=d.join("")};return e&&t.mask&&(N(),H()),{init:N,bindEvents:H,unbindEvents:function(){e.removeEventListener("focus",F),e.removeEventListener("blur",O),e.removeEventListener("keydown",S),e.removeEventListener("keypress",P),e.removeEventListener("input",L),e.removeEventListener("paste",W)},updateModel:D,getValue:h}}function C(e){if(Array.isArray(e))return r(e)}function O(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function S(){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 P(e){return C(e)||O(e)||i(e)||S()}var A=function(){function e(){s(this,e)}return g(e,null,[{key:"equals",value:function(e,t,n){return n&&e&&"object"===a(e)&&t&&"object"===a(t)?this.resolveFieldData(e,n)===this.resolveFieldData(t,n):this.deepEquals(e,t)}},{key:"deepEquals",value:function(e,t){if(e===t)return!0;if(e&&t&&"object"==a(e)&&"object"==a(t)){var n,r,i,o=Array.isArray(e),l=Array.isArray(t);if(o&&l){if((r=e.length)!==t.length)return!1;for(n=r;0!=n--;)if(!this.deepEquals(e[n],t[n]))return!1;return!0}if(o!==l)return!1;var u=e instanceof Date,s=t instanceof Date;if(u!==s)return!1;if(u&&s)return e.getTime()===t.getTime();var c=e instanceof RegExp,f=t instanceof RegExp;if(c!==f)return!1;if(c&&f)return e.toString()===t.toString();var d=Object.keys(e);if((r=d.length)!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!Object.prototype.hasOwnProperty.call(t,d[n]))return!1;for(n=r;0!=n--;)if(!this.deepEquals(e[i=d[n]],t[i]))return!1;return!0}return e!=e&&t!=t}},{key:"resolveFieldData",value:function(t,n){if(t&&Object.keys(t).length&&n){if(this.isFunction(n))return n(t);if(e.isNotEmpty(t[n]))return t[n];if(-1===n.indexOf("."))return t[n];for(var r=n.split("."),i=t,o=0,l=r.length;o<l;++o){if(null==i)return null;i=i[r[o]]}return i}return null}},{key:"isFunction",value:function(e){return!!(e&&e.constructor&&e.call&&e.apply)}},{key:"isLetter",value:function(e){return e&&(e.toUpperCase()!=e.toLowerCase()||e.codePointAt(0)>127)}},{key:"findDiffKeys",value:function(e,t){return e&&t?Object.keys(e).filter((function(e){return!t.hasOwnProperty(e)})).reduce((function(t,n){return t[n]=e[n],t}),{}):{}}},{key:"reduceKeys",value:function(e,t){var n={};return e&&t&&0!==t.length?(Object.keys(e).filter((function(e){return t.some((function(t){return e.startsWith(t)}))})).forEach((function(t){n[t]=e[t],delete e[t]})),n):n}},{key:"reorderArray",value:function(e,t,n){e&&t!==n&&(n>=e.length&&(n%=e.length,t%=e.length),e.splice(n,0,e.splice(t,1)[0]))}},{key:"findIndexInList",value:function(e,t,n){var r=this;return t?t.findIndex(n?function(t){return r.equals(t,e,n)}:function(t){return t===e}):-1}},{key:"getJSXElement",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return this.isFunction(e)?e.apply(void 0,n):e}},{key:"getProp",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e?e[t]:void 0;return void 0===r?n[t]:r}},{key:"getMergedProps",value:function(e,t){return Object.assign({},t,e)}},{key:"getDiffProps",value:function(e,t){return this.findDiffKeys(e,t)}},{key:"getPropValue",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=n;return n&&1===n.length&&(i=n[0]),this.isFunction(e)?e.apply(void 0,P(i)):e}},{key:"getComponentProp",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.isNotEmpty(e)?this.getProp(e.props,t,n):void 0}},{key:"getComponentProps",value:function(e,t){return this.isNotEmpty(e)?this.getMergedProps(e.props,t):void 0}},{key:"getComponentDiffProps",value:function(e,t){return this.isNotEmpty(e)?this.getDiffProps(e.props,t):void 0}},{key:"isValidChild",value:function(e,t,n){if(e){var r=(this.getComponentProp(e,"__TYPE")||(e.type?e.type.displayName:void 0))===t;try{0}catch(e){}return r}return!1}},{key:"getRefElement",value:function(e){return e?"object"===a(e)&&e.hasOwnProperty("current")?e.current:e:null}},{key:"combinedRefs",value:function(e,t){e&&t&&("function"==typeof t?t(e.current):t.current=e.current)}},{key:"removeAccents",value:function(e){return e&&e.search(/[\xC0-\xFF]/g)>-1&&(e=e.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")),e}},{key:"isEmpty",value:function(e){return null==e||""===e||Array.isArray(e)&&0===e.length||!(e instanceof Date)&&"object"===a(e)&&0===Object.keys(e).length}},{key:"isNotEmpty",value:function(e){return!this.isEmpty(e)}},{key:"sort",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,l=e.compare(t,n,i,r),a=r;return(e.isEmpty(t)||e.isEmpty(n))&&(a=1===o?r:o),a*l}},{key:"compare",value:function(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=e.isEmpty(t),l=e.isEmpty(n);return o&&l?0:o?i:l?-i:"string"==typeof t&&"string"==typeof n?t.localeCompare(n,r,{numeric:!0}):t<n?-1:t>n?1:0}}]),e}();function j(){return j=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},j.apply(this,arguments)}function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var L=function(){function t(){s(this,t)}return g(t,null,[{key:"getJSXIcon",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=null;if(null!==t){var o=a(t),l=u(n.className,"string"===o&&t);if(i=e.createElement("span",j({},n,{className:l})),"string"!==o){var s=F({iconProps:n,element:i},r);return A.getJSXElement(t,s)}}return i}}]),t}(),W=0;function R(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"pr_id_";return W++,"".concat(e).concat(W)}var D,H,N,I,B=(D=[],H=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:999,r=I(e,t,n),i=r.value+(r.key===e?0:n)+1;return D.push({key:e,value:i}),i},N=function(e,t){return I(e,t).value},I=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return P(D).reverse().find((function(n){return!!t||n.key===e}))||{key:e,value:n}},{get:function(e){return e&&parseInt(e.style.zIndex,10)||0},set:function(e,t,n,r){t&&(t.style.zIndex=String(H(e,n,r)))},clear:function(e){var t;e&&(t=B.get(e),D=D.filter((function(e){return e.value!==t})),e.style.zIndex="")},getCurrent:function(e,t){return N(e,t)}});export{b as ConnectedOverlayScrollHandler,m as DomHandler,w as EventBus,L as IconUtils,A as ObjectUtils,R as UniqueComponentId,B as ZIndexUtils,u as classNames,x as mask};
|
package/utils/utils.js
CHANGED
|
@@ -230,7 +230,7 @@ this.primereact.utils = (function (exports, React) {
|
|
|
230
230
|
key: "getOuterWidth",
|
|
231
231
|
value: function getOuterWidth(el, margin) {
|
|
232
232
|
if (el) {
|
|
233
|
-
var width = el.
|
|
233
|
+
var width = el.getBoundingClientRect().width || el.offsetWidth;
|
|
234
234
|
if (margin) {
|
|
235
235
|
var style = getComputedStyle(el);
|
|
236
236
|
width += parseFloat(style.marginLeft) + parseFloat(style.marginRight);
|
|
@@ -243,7 +243,7 @@ this.primereact.utils = (function (exports, React) {
|
|
|
243
243
|
key: "getOuterHeight",
|
|
244
244
|
value: function getOuterHeight(el, margin) {
|
|
245
245
|
if (el) {
|
|
246
|
-
var height = el.
|
|
246
|
+
var height = el.getBoundingClientRect().height || el.offsetHeight;
|
|
247
247
|
if (margin) {
|
|
248
248
|
var style = getComputedStyle(el);
|
|
249
249
|
height += parseFloat(style.marginTop) + parseFloat(style.marginBottom);
|
|
@@ -427,7 +427,7 @@ this.primereact.utils = (function (exports, React) {
|
|
|
427
427
|
}, {
|
|
428
428
|
key: "absolutePosition",
|
|
429
429
|
value: function absolutePosition(element, target) {
|
|
430
|
-
if (element) {
|
|
430
|
+
if (element && target) {
|
|
431
431
|
var elementDimensions = element.offsetParent ? {
|
|
432
432
|
width: element.offsetWidth,
|
|
433
433
|
height: element.offsetHeight
|
|
@@ -459,7 +459,7 @@ this.primereact.utils = (function (exports, React) {
|
|
|
459
459
|
}, {
|
|
460
460
|
key: "relativePosition",
|
|
461
461
|
value: function relativePosition(element, target) {
|
|
462
|
-
if (element) {
|
|
462
|
+
if (element && target) {
|
|
463
463
|
var elementDimensions = element.offsetParent ? {
|
|
464
464
|
width: element.offsetWidth,
|
|
465
465
|
height: element.offsetHeight
|
|
@@ -1910,12 +1910,17 @@ this.primereact.utils = (function (exports, React) {
|
|
|
1910
1910
|
key: "isValidChild",
|
|
1911
1911
|
value: function isValidChild(child, type, validTypes) {
|
|
1912
1912
|
/* eslint-disable */
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1913
|
+
if (child) {
|
|
1914
|
+
var childType = this.getComponentProp(child, '__TYPE') || (child.type ? child.type.displayName : undefined);
|
|
1915
|
+
var isValid = childType === type;
|
|
1916
|
+
try {
|
|
1917
|
+
var messageTypes; if ("production" !== 'production' && !isValid) ;
|
|
1918
|
+
} catch (error) {
|
|
1919
|
+
// NOOP
|
|
1920
|
+
}
|
|
1921
|
+
return isValid;
|
|
1917
1922
|
}
|
|
1918
|
-
return
|
|
1923
|
+
return false;
|
|
1919
1924
|
/* eslint-enable */
|
|
1920
1925
|
}
|
|
1921
1926
|
}, {
|