UNPKG

@geoblink/design-system

Version:

Geoblink Design System for Vue.js

1 lines • 25.1 kB
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("lodash")):"function"==typeof define&&define.amd?define(["lodash"],e):"object"==typeof exports?exports["components/GeoTable"]=e(require("lodash")):t["components/GeoTable"]=e(t.lodash)}(window,function(t){return r={},e.m=n={"3Fcl":function(t,e,n){"use strict";var r=n("YLtl"),i=n.n(r);e.a=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:10;return i.a.throttle(t,e,{leading:!0,trailing:!0})}},"3iwg":function(t,e,n){"use strict";function r(){var t=0;return function(){return t++}}n.d(e,"a",function(){return r})},97:function(t,e,n){t.exports=n("g7Cj")},Bnag:function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},"DI/g":function(t,e,n){"use strict";e.a=function(t){return t.componentInstance&&t.componentInstance.$isServer}},EbDI:function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.__esModule=!0,t.exports.default=t.exports},"H+ED":function(t,e,n){"use strict";var r=n("YLtl"),i=n.n(r),o=n("bdgK"),a=n("3Fcl"),s=n("DI/g"),l=n("3iwg"),c=Object(l.a)(),u={};e.a={bind:function(t,e,n){if(function(t){var e=i.a.get(t.value,"callback",t.value);return"function"==typeof e||(console.error("GeoOnResize [directive] :: provided callback ".concat(e," is not a function")),!1)}(e)&&!Object(s.a)(n)){t.__geoOnResizeCallbackId__=c();var r=i.a.get(e.value,"callback",e.value),l=i.a.get(e.value,"target",t),f=new o.a(Object(a.a)(function(t){r(t)}));f.observe(l),u[t.__geoOnResizeCallbackId__]=f}},unbind:function(t){u[t.__geoOnResizeCallbackId__].disconnect(),u=i.a.omit(u,t.__geoOnResizeCallbackId__)}}},Ijbi:function(t,e,n){var r=n("WkPL");t.exports=function(t){if(Array.isArray(t))return r(t)},t.exports.__esModule=!0,t.exports.default=t.exports},"KHd+":function(t,e,n){"use strict";function r(t,e,n,r,i,o,a,s){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),r&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),a?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},c._ssrRegister=l):i&&(l=s?function(){i.call(this,this.$root.$options.shadowRoot)}:i),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var f=c.beforeCreate;c.beforeCreate=f?[].concat(f,l):[l]}return{exports:t,options:c}}n.d(e,"a",function(){return r})},RIqP:function(t,e,n){var r=n("Ijbi"),i=n("EbDI"),o=n("ZhPi"),a=n("Bnag");t.exports=function(t){return r(t)||i(t)||o(t)||a()},t.exports.__esModule=!0,t.exports.default=t.exports},WkPL:function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},t.exports.__esModule=!0,t.exports.default=t.exports},YLtl:function(e,n){e.exports=t},ZhPi:function(t,e,n){var r=n("WkPL");t.exports=function(t,e){if(t){if("string"==typeof t)return r(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)?r(t,e):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports},bdgK:function(t,e,n){"use strict";(function(t){var n=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some(function(t,r){return t[0]===e&&(n=r,!0)}),n}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];t.call(e,i[1],i[0])}},e;function e(){this.__entries__=[]}}(),r="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,i=void 0!==t&&t.Math===Math?t:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),o="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(i):function(t){return setTimeout(function(){return t(Date.now())},1e3/60)},a=2,s=["top","right","bottom","left","width","height","size","weight"],l="undefined"!=typeof MutationObserver,c=(u.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},u.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},u.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},u.prototype.updateObservers_=function(){var t=this.observers_.filter(function(t){return t.gatherActive(),t.hasActive()});return t.forEach(function(t){return t.broadcastActive()}),0<t.length},u.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),l?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},u.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},u.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;s.some(function(t){return!!~n.indexOf(t)})&&this.refresh()},u.getInstance=function(){return this.instance_||(this.instance_=new u),this.instance_},u.instance_=null,u);function u(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var n=!1,r=!1,i=0;function s(){n&&(n=!1,t()),r&&c()}function l(){o(s)}function c(){var t=Date.now();if(n){if(t-i<a)return;r=!0}else r=!(n=!0),setTimeout(l,e);i=t}return c}(this.refresh.bind(this),20)}var f=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},d=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||i},h=v(0,0,0,0);function p(t){return parseFloat(t)||0}function g(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce(function(e,n){return e+p(t["border-"+n+"-width"])},0)}var b="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof d(t).SVGGraphicsElement}:function(t){return t instanceof d(t).SVGElement&&"function"==typeof t.getBBox};function m(t){return r?b(t)?function(t){var e=t.getBBox();return v(0,0,e.width,e.height)}(t):function(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return h;var r=d(t).getComputedStyle(t),i=function(t){for(var e={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var i=r[n],o=t["padding-"+i];e[i]=p(o)}return e}(r),o=i.left+i.right,a=i.top+i.bottom,s=p(r.width),l=p(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==e&&(s-=g(r,"left","right")+o),Math.round(l+a)!==n&&(l-=g(r,"top","bottom")+a)),!function(t){return t===d(t).document.documentElement}(t)){var c=Math.round(s+o)-e,u=Math.round(l+a)-n;1!==Math.abs(c)&&(s-=c),1!==Math.abs(u)&&(l-=u)}return v(i.left,i.top,s,l)}(t):h}function v(t,e,n,r){return{x:t,y:e,width:n,height:r}}var _=(y.prototype.isActive=function(){var t=m(this.target);return(this.contentRect_=t).width!==this.broadcastWidth||t.height!==this.broadcastHeight},y.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},y);function y(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=v(0,0,0,0),this.target=t}var w=function(t,e){var n=function(t){var e=t.x,n=t.y,r=t.width,i=t.height,o="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,a=Object.create(o.prototype);return f(a,{x:e,y:n,width:r,height:i,top:n,right:e+r,bottom:i+n,left:e}),a}(e);f(this,{target:t,contentRect:n})},S=(x.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof d(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new _(t)),this.controller_.addObserver(this),this.controller_.refresh())}},x.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof d(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},x.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},x.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(e){e.isActive()&&t.activeObservations_.push(e)})},x.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map(function(t){return new w(t.target,t.broadcastRect())});this.callback_.call(t,e,t),this.clearActive()}},x.prototype.clearActive=function(){this.activeObservations_.splice(0)},x.prototype.hasActive=function(){return 0<this.activeObservations_.length},x);function x(t,e,r){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=r}var C="undefined"!=typeof WeakMap?new WeakMap:new n,z=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=c.getInstance(),r=new S(e,n,this);C.set(this,r)};["observe","unobserve","disconnect"].forEach(function(t){z.prototype[t]=function(){var e;return(e=C.get(this))[t].apply(e,arguments)}});var P=void 0!==i.ResizeObserver?i.ResizeObserver:z;e.a=P}).call(this,n("yLpj"))},g7Cj:function(t,e,n){"use strict";n.r(e);var r=n("RIqP"),i=n.n(r),o=n("YLtl"),a=n.n(o),s=n("H+ED"),l=n("lSNA"),c=n.n(l),u={isInferringPageSize:"geoblinkDesignSystem_inferPageSizeMixin_isInferringPageSize",internallyForcedCurrentPageStart:"geoblinkDesignSystem_inferPageSizeMixin_internallyForcedCurrentPageStart",inferredPageSize:"geoblinkDesignSystem_inferPageSizeMixin_inferredPageSize",lastInferredPageSize:"geoblinkDesignSystem_inferPageSizeMixin_lastInferredPageSize"},f={data:function(){var t;return t={},c()(t,u.internallyForcedCurrentPageStart,-1),c()(t,u.inferredPageSize,null),t},methods:{inferPageSize:function(t){var e=this;if(e[u.isInferringPageSize])return null;e[u.isInferringPageSize]=!0,e[u.internallyForcedCurrentPageStart]=0,e[u.inferredPageSize]=e[u.lastInferredPageSize]||1;var n=a.a.assign({},t,{pageSizeDelta:1});return e.$nextTick().then(function(){return t&&t.before?t.before():null}).then(function(){return function t(e,n){if(d(e))return n[u.inferredPageSize]-=1,n.$nextTick().then(function(){return function t(e,n){return n[u.inferredPageSize]<=1?(n[u.inferredPageSize]=1,n.$nextTick()):d(e)?(n[u.inferredPageSize]-=1,n.$nextTick().then(function(){return t(e,n)})):void 0}(e,n)});if(!(n[u.inferredPageSize]>=e.sourceDataLength)){n[u.inferredPageSize]=Math.min(n[u.inferredPageSize]+e.pageSizeDelta,e.sourceDataLength);var r=a.a.assign({},e,{pageSizeDelta:Math.min(2*e.pageSizeDelta,e.maxPageSizeDelta)});return n.$nextTick().then(function(){return t(r,n)})}}(n,e)}).then(function(){return t&&t.after?t.after():null}).then(function(){e[u.internallyForcedCurrentPageStart]=-1,e.$nextTick()}).then(function(){e[u.isInferringPageSize]=!1,e[u.lastInferredPageSize]=e[u.inferredPageSize],e.$emit("infer-page-size",e[u.inferredPageSize])})}}};function d(t){return t.getContainerHeight()<t.getContentHeight()}var h=n("3Fcl");function p(t,e){var n=a.a.map(t,function(t,n){return function(t,e,n){var r=t.growingDisabled,i=t.width,o=t.maxWidth,s=t.rawContentWidth,l=t.contentWidth,c=n[e];if(r)return null;var u=a.a.isNil(o)?Number.MAX_VALUE:o-c;if(!(a.a.isNil(i)&&0<u))return null;var f=s<=c;return{index:e,rawContentWidth:s,contentWidth:l,isRawContentEntirelyVisible:f,remainingWidthUntilReachingMaximum:Math.min(u,f?Number.MAX_VALUE:s-c)}}(t,n,e)});return a.a.sortBy(a.a.filter(n),"remainingWidthUntilReachingMaximum")}function g(t,e){var n=e,r=[],i=[],o=a.a.first(t).remainingWidthUntilReachingMaximum,s=Math.min(Math.max(Math.floor(a.a.min([e/t.length,o])),1),e),l=!0,c=!1,u=void 0;try{for(var f,d=t[Symbol.iterator]();!(l=(f=d.next()).done);l=!0){var h=f.value;if(0!==n){var p=h.index,g=h.remainingWidthUntilReachingMaximum-s;0<g&&r.push(a.a.assign({},h,{remainingWidthUntilReachingMaximum:g})),n-=i[p]=s}else r.push(a.a.assign({},h))}}catch(t){c=!0,u=t}finally{try{l||null==d.return||d.return()}finally{if(c)throw u}}return{remainingColumns:r,remainingWidth:n,columnsWidths:i}}function b(t){var e=a.a.groupBy(t.$children,"$vnode.componentOptions.tag"),n=a.a.map(e["geo-table-header-row"],function(t){return m(t)}),r=a.a.map(e["geo-table-body-row"],function(t){return m(t,{overridenIgnoreContentWidth:!1})});return{rowsSizingConfig:[].concat(i()(n),i()(r)),tableContainerElement:t.$el}}function m(t,e){var n=a.a.filter(t.$slots.default,"tag");return a.a.map(n,function(t){return function(t,e,n){var r=2<arguments.length&&void 0!==n?n:{},i=r.overridenIgnoreContentWidth,o=r.overridenGrowingDisabled;return{ignoreContentWidth:a.a.isNil(i)?t.ignoreContentWidth:i,growingDisabled:a.a.isNil(o)?t.growingDisabled:o,columnMinWidth:t.columnMinWidth,columnMaxWidth:t.columnMaxWidth,columnWidth:t.columnWidth,element:e}}(t.componentInstance||t.context,t.elm,e)})}function v(t){var e=window.getComputedStyle(t).getPropertyValue("width").replace("px",""),n=parseFloat(e);return Math.ceil(n)}var _={name:"GeoTable",status:"ready",release:"10.1.0",constants:{DEFAULT_PAGESIZE:10},directives:{OnResize:s.a},mixins:[f],props:{sourceData:{type:Array,required:!0},forcedPageSize:{type:Number,required:!1},automaticPageSize:{type:Boolean,required:!1},currentPage:{type:Number,required:!0}},data:function(){return{}},computed:{isEmpty:function(){return!(this.sourceData&&0<this.sourceData.length)},currentPageStart:function(){return 0<=this[u.internallyForcedCurrentPageStart]?this[u.internallyForcedCurrentPageStart]:this.currentPage*this.pageSize},currentPageData:function(){return this.sourceData.slice(this.currentPageStart,this.currentPageStart+this.pageSize)},isHeaderDisplayed:function(){return!!this.$slots.header},isFooterDisplayed:function(){return!!this.$slots.footer||a.a.size(this.sourceData)>this.pageSize},horizontalScrollCSSClass:function(){return"geo-table__container--requiring-horizontal-scroll"},pageSize:function(){return a.a.isFinite(this.forcedPageSize)?this.forcedPageSize:a.a.isFinite(this[u.inferredPageSize])?this[u.inferredPageSize]:10},layoutHeadersAndShadowsThrottled:function(){return Object(h.a)(this.layoutHeadersAndShadows)},forcedLayoutTableThrottled:function(){return Object(h.a)(this.forcedLayoutTable)}},mounted:function(){this.layoutTableIfPossible()},updated:function(){this[u.isInferringPageSize]||this.layoutTableIfPossible()},methods:{goToPage:function(t){this.$emit("go-to-page",t)},onScroll:function(t){this.layoutHeadersAndShadowsThrottled({yOffset:t.target.scrollTop,xOffset:t.target.scrollLeft})},layoutHeadersAndShadows:function(t){if(!this.isEmpty){var e=[this.$refs.tableHeader,this.$refs.tableContainer,this.$refs.tableShadowVerticalTop,this.$refs.tableShadowVerticalBottom,this.$refs.tableShadowHorizontalLeft,this.$refs.tableShadowHorizontalRight];if(a.a.reduce(e,function(t,e){return t&&!!e},!0)){var n=t.xOffset,r=t.yOffset,i=this.$refs.tableContainer.offsetHeight,o=this.$refs.tableContainer.scrollHeight,s=this.$refs.tableContainer.offsetWidth,l=this.$refs.tableContainer.scrollWidth,c=this.$refs.tableContainer&&this.$refs.tableContainer.classList.contains(this.horizontalScrollCSSClass),u=0===r,f=!c||0===n,d=r+i===o,h=!c||n+s===l,p=this.$refs.tableHeader.offsetHeight;this.$refs.tableHeader.style.transform="translate(0px, ".concat(r,"px)"),this.$refs.tableShadowVerticalTop.style.visibility=u?"hidden":"visible",this.$refs.tableShadowVerticalBottom.style.visibility=d?"hidden":"visible",this.$refs.tableShadowHorizontalLeft.style.visibility=f?"hidden":"visible",this.$refs.tableShadowHorizontalRight.style.visibility=h?"hidden":"visible",this.$refs.tableShadowVerticalTop.style.transform="translate(".concat(n,"px, ").concat(r+p,"px)"),this.$refs.tableShadowVerticalBottom.style.transform="translate(".concat(n,"px, ").concat(r,"px)"),this.$refs.tableShadowHorizontalLeft.style.transform="translate(".concat(n,"px, ").concat(r,"px)"),this.$refs.tableShadowHorizontalRight.style.transform="translate(".concat(n,"px, ").concat(r,"px)")}}},layoutTableIfPossible:function(){this.isEmpty||this.forcedLayoutTableThrottled()},forcedLayoutTable:function(){var t=this,e=[this.$refs.tableHeader,this.$refs.tableBody,this.$refs.tableContainer];if(!a.a.reduce(e,function(t,e){return t&&!!e},!0))return this.$nextTick();var n=!this.automaticPageSize,r=this.forcedPageSize,i=n||r?this.$nextTick():this.inferPageSize({sourceDataLength:this.sourceData.length,maxPageSizeDelta:5,getContainerHeight:function(){return t.$refs.tableContainer&&t.$refs.tableContainer.offsetHeight},getContentHeight:function(){return t.$refs.tableContainer&&t.$refs.tableContainer.scrollHeight},before:function(){return t.applyComputedColumnsWidth()},after:function(){return t.applyComputedColumnsWidth()}});return i?i.then(function(){return t.layoutColumns()}):null},layoutColumns:function(){var t=[this.$refs.tableHeader,this.$refs.tableBody,this.$refs.tableContainer];a.a.reduce(t,function(t,e){return t&&!!e},!0)&&(this.computeColumnsWidth(),this.applyComputedColumnsWidth(),this.layoutHeadersAndShadowsThrottled({yOffset:this.$refs.tableContainer.scrollTop,xOffset:this.$refs.tableContainer.scrollLeft}))},computeColumnsWidth:function(){var t=b(this);a.a.forEach(t.rowsSizingConfig,function(t){return function(t){a.a.forEach(t,function(t,e){return function(t){t.element.style.width=null}(t)})}(t)}),this.columnsWidths=function(t,e){var n=function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var s,l=t[Symbol.iterator]();!(r=(s=l.next()).done);r=!0)for(var c=s.value,u=0;u<c.length;u++){var f=c[u],d=n[u]||{growingDisabled:!1,maxWidth:null,minWidth:null,width:null,rawContentWidth:0,contentWidth:0};if(d.growingDisabled=a.a.defaultTo(f.growingDisabled,d.growingDisabled),d.maxWidth=a.a.defaultTo(a.a.min([f.columnMaxWidth,d.maxWidth]),null),d.minWidth=a.a.defaultTo(a.a.max([f.columnMinWidth,d.minWidth]),null),!a.a.isNil(f.columnWidth)){var h=!a.a.isNil(d.width),p=d.width!==f.columnWidth;h&&p&&console.warn("GeoTable [component] :: different widths have been set for the same column: ".concat(d.width," and ").concat(f.columnWidth,". The last one will used.")),d.width=f.columnWidth}var g=e(f.element);d.rawContentWidth=a.a.defaultTo(a.a.max([d.rawContentWidth,g]),0),f.ignoreContentWidth||(d.contentWidth=a.a.defaultTo(a.a.max([d.contentWidth,g]),0)),n[u]=d}}catch(t){i=!0,o=t}finally{try{r||null==l.return||l.return()}finally{if(i)throw o}}return n}(t.rowsSizingConfig,e),r=function(t){return a.a.map(t,function(t){if(a.a.isFinite(t.width))return t.width;var e=a.a.defaultTo(t.minWidth,Number.NEGATIVE_INFINITY),n=a.a.defaultTo(t.maxWidth,Number.POSITIVE_INFINITY);return a.a.clamp(t.contentWidth,e,n)})}(n),o=e(t.tableContainerElement);return function(t,e,n){var r=n.containerWidth,o=n.contentWidth,s=i()(e),l=r-o;if(l<0)return s;var c=u(a.a.reject(p(t,s),"isRawContentEntirelyVisible"),l);return 0<u(p(t,s),c)&&console.warn("GeoTable [component] :: could not redistribute extra space between table columns without breaking limits on their maximum - or explicit - width"),s;function u(t,e){for(;t.length&&0<e;){for(var n=g(t,e),r=0,i=Object.keys(n.columnsWidths);r<i.length;r++){var o=i[r];s[o]+=n.columnsWidths[o]}e=n.remainingWidth,t=n.remainingColumns}return e}}(n,r,{contentWidth:a.a.sum(r),containerWidth:o})}(t,v)},applyComputedColumnsWidth:function(){var t=this,e=this;if(e.columnsWidths){var n=[e.$refs.tableHeader,e.$refs.tableBody,e.$refs.tableContainer];if(a.a.reduce(n,function(t,e){return t&&!!e},!0)){var r=v(e.$el),i=a.a.sum(e.columnsWidths);0<=r-i?(e.$refs.tableContainer.classList.remove(e.horizontalScrollCSSClass),e.$refs.tableContainer.scrollLeft=0):(e.$refs.tableContainer.classList.add(e.horizontalScrollCSSClass),e.$refs.tableContainer.scrollLeft=a.a.min([e.$refs.tableContainer.scrollLeft,i-r]));var o=b(this);a.a.forEach(o.rowsSizingConfig,function(e){return function(t,e){a.a.forEach(t,function(t,n){return function(t,e,n){var r=n[e];t.element.style.width="".concat(r,"px")}(t,n,e)})}(e,t.columnsWidths)}),e.$refs.tableHeader.style.width="".concat(a.a.max([i,r]),"px"),e.$refs.tableBody.style.width="".concat(a.a.max([i,r]),"px");var s=e.$refs.tableHeader.offsetHeight;e.$refs.tableBody.style["padding-top"]="".concat(s,"px"),this.$emit("column-width-changed",this.columnsWidth)}}}}},y=n("KHd+"),w=Object(y.a)(_,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"on-resize",rawName:"v-on-resize",value:t.layoutTableIfPossible,expression:"layoutTableIfPossible"}],staticClass:"geo-table"},[n("div",{ref:"tableContainer",staticClass:"geo-table__container",on:{"&scroll":function(e){return t.onScroll(e)}}},[t.isHeaderDisplayed?n("div",{ref:"tableHeader",class:{"geo-table__header":!0,"geo-table__header--empty-table":t.isEmpty}},[t._t("header")],2):t._e(),t._v(" "),t.isEmpty?n("div",{staticClass:"geo-table__body-empty"},[t._t("empty")],2):n("div",{staticClass:"geo-table__body"},[n("div",{ref:"tableBody",staticClass:"geo-table__body-content"},[t._l(t.currentPageData,function(e,n){return t._t("body",null,{item:e,index:n})})],2),t._v(" "),n("div",{ref:"tableShadowVerticalTop",staticClass:"geo-table__shadow--vertical-top"}),t._v(" "),n("div",{ref:"tableShadowVerticalBottom",staticClass:"geo-table__shadow--vertical-bottom"}),t._v(" "),n("div",{ref:"tableShadowHorizontalLeft",staticClass:"geo-table__shadow--horizontal-left"}),t._v(" "),n("div",{ref:"tableShadowHorizontalRight",staticClass:"geo-table__shadow--horizontal-right"})])]),t._v(" "),t.isFooterDisplayed?n("div",{ref:"tableFooter",staticClass:"geo-table__footer"},[t._t("footer",[t._t("footerLeadingAccessoryItem"),t._v(" "),n("geo-table-pagination",{attrs:{"page-size":t.pageSize,"current-page":t.currentPage,"source-data-length":t.sourceData.length},on:{"go-to-page":function(e){return t.goToPage(e)}}}),t._v(" "),t._t("footerTrailingAccessoryItem")])],2):t._e()])},[],!1,null,null,null);e.default=w.exports},lSNA:function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.__esModule=!0,t.exports.default=t.exports},yLpj:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n}},e.c=r,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(e){return t[e]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/",e(e.s=97);function e(t){if(r[t])return r[t].exports;var i=r[t]={i:t,l:!1,exports:{}};return n[t].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n,r});