primevue
Version:
[](https://opensource.org/licenses/MIT) [](https://badge.fury.io/js/primevue) [ • 7.13 kB
JavaScript
this.primevue=this.primevue||{},this.primevue.basedirective=function(t,e,n){"use strict";function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t,e){return a(t)||c(t,e)||r(t,e)||l()}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 r(t,e){if(t){if("string"==typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function c(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,o,l,r,u=[],c=!0,a=!1;try{if(l=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(i=l.call(n)).done)&&(u.push(i.value),u.length!==e);c=!0);}catch(t){a=!0,o=t}finally{try{if(!c&&null!=n.return&&(r=n.return(),Object(r)!==r))return}finally{if(a)throw o}}return u}}function a(t){if(Array.isArray(t))return t}function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function d(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach((function(e){v(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function v(t,e,n){return(e=f(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function f(t){var e=b(t,"string");return"symbol"===i(e)?e:String(e)}function b(t,e){if("object"!==i(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e||"default");if("object"!==i(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var p={_getMeta:function(){return[e.ObjectUtils.isObject(arguments.length<=0?void 0:arguments[0])||arguments.length<=0?void 0:arguments[0],e.ObjectUtils.getItemValue(e.ObjectUtils.isObject(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:arguments.length<=1?void 0:arguments[1])]},_getOptionValue:function(t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=e.ObjectUtils.toFlatCase(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"").split("."),o=i.shift();return o?e.ObjectUtils.isObject(t)?p._getOptionValue(e.ObjectUtils.getItemValue(t[Object.keys(t).find((function(t){return e.ObjectUtils.toFlatCase(t)===o}))||""],n),i.join("."),n):void 0:e.ObjectUtils.getItemValue(t,n)},_getPTValue:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},l=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=function(){var t=p._getOptionValue.apply(p,arguments);return e.ObjectUtils.isString(t)||e.ObjectUtils.isArray(t)?{class:t}:t},u="data-pc-",c=r(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i,o),a=l?r(t.defaultPT,i,o):void 0;return n.mergeProps(c,a,d(d({},"root"===i&&v({},"".concat(u,"name"),e.ObjectUtils.toFlatCase(t.$name))),{},v({},"".concat(u,"section"),e.ObjectUtils.toFlatCase(i))))},_hook:function(t,n,i,o,l,r){var u,c,a,s="on".concat(e.ObjectUtils.toCapitalCase(n)),d=null==o||null===(u=o.instance)||void 0===u||null===(u=u.$primevue)||void 0===u?void 0:u.config,v=null==o||null===(c=o.value)||void 0===c||null===(c=c.pt)||void 0===c||null===(c=c.hooks)||void 0===c?void 0:c[s],f=null==d||null===(a=d.pt)||void 0===a||null===(a=a.directives)||void 0===a||null===(a=a[t])||void 0===a||null===(a=a.hooks)||void 0===a?void 0:a[s],b={el:i,binding:o,vnode:l,prevVnode:r};null==v||v(null==i?void 0:i.$instance,b),null==f||f(null==i?void 0:i.$instance,b)},_extend:function(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=function(t,o,l,r,u){var c,a,s,v;o._$instances=o._$instances||{};var f=null==l||null===(c=l.instance)||void 0===c||null===(c=c.$primevue)||void 0===c?void 0:c.config,b=o._$instances[n]||{},g=e.ObjectUtils.isEmpty(b)?d(d({},i),null==i?void 0:i.methods):{};o._$instances[n]=d(d({},b),{},{$name:n,$host:o,$binding:l,$el:b.$el||void 0,$css:d({classes:void 0,inlineStyles:void 0,loadStyle:function(){}},null==i?void 0:i.css),defaultPT:null==f||null===(a=f.pt)||void 0===a||null===(a=a.directives)||void 0===a?void 0:a[n],isUnstyled:void 0!==o.unstyled?o.unstyled:null==f?void 0:f.unstyled,ptm:function(){var t;return p._getPTValue(o.$instance,null===(t=o.$instance)||void 0===t||null===(t=t.$binding)||void 0===t||null===(t=t.value)||void 0===t?void 0:t.pt,arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",d({},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}))},ptmo:function(){return p._getPTValue(o.$instance,arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},!1)},cx:function(){var t,e;return null!==(t=o.$instance)&&void 0!==t&&t.isUnstyled?void 0:p._getOptionValue(null===(e=o.$instance)||void 0===e||null===(e=e.$css)||void 0===e?void 0:e.classes,arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",d({},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}))},sx:function(){var t;return!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?p._getOptionValue(null===(t=o.$instance)||void 0===t||null===(t=t.$css)||void 0===t?void 0:t.inlineStyles,arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",d({},arguments.length>2&&void 0!==arguments[2]?arguments[2]:{})):void 0}},g),o.$instance=o._$instances[n],null===(s=(v=o.$instance)[t])||void 0===s||s.call(v,o,l,r,u),p._hook(n,t,o,l,r,u)};return{created:function(t,e,n,i){o("created",t,e,n,i)},beforeMount:function(e,n,i,l){var r,u;t.loadBaseStyle(),(null===(r=e.$instance)||void 0===r||!r.isUnstyled)&&(null===(u=e.$instance)||void 0===u||null===(u=u.$css)||void 0===u||u.loadStyle()),o("beforeMount",e,n,i,l)},mounted:function(t,e,n,i){o("mounted",t,e,n,i)},beforeUpdate:function(t,e,n,i){o("beforeUpdate",t,e,n,i)},updated:function(t,e,n,i){o("updated",t,e,n,i)},beforeUnmount:function(t,e,n,i){o("beforeUnmount",t,e,n,i)},unmounted:function(t,e,n,i){o("unmounted",t,e,n,i)}}},extend:function(){var t=o(p._getMeta.apply(p,arguments),2),e=t[1];return d({extend:function(){var t=o(p._getMeta.apply(p,arguments),2),n=t[1];return p.extend(t[0],d(d(d({},e),null==e?void 0:e.methods),n))}},p._extend(t[0],e))}};return p}(primevue.base,primevue.utils,Vue);