@schneideress/dashboardframework 0.0.261 → 0.0.263
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/bundles/schneideress-dashboardframework.umd.js +21 -5
- package/bundles/schneideress-dashboardframework.umd.js.map +1 -1
- package/bundles/schneideress-dashboardframework.umd.min.js +1 -1
- package/bundles/schneideress-dashboardframework.umd.min.js.map +1 -1
- package/esm2015/lib/ra-dashboard-area/ra.dashboard.area.js +19 -5
- package/esm2015/lib/ra.event.enum.js +3 -1
- package/esm2015/lib/ra.gridster.config.js +2 -2
- package/esm5/lib/ra-dashboard-area/ra.dashboard.area.js +19 -5
- package/esm5/lib/ra.event.enum.js +3 -1
- package/esm5/lib/ra.gridster.config.js +2 -2
- package/fesm2015/schneideress-dashboardframework.js +21 -5
- package/fesm2015/schneideress-dashboardframework.js.map +1 -1
- package/fesm5/schneideress-dashboardframework.js +21 -5
- package/fesm5/schneideress-dashboardframework.js.map +1 -1
- package/lib/ra-dashboard-area/ra.dashboard.area.d.ts +8 -1
- package/lib/ra.event.enum.d.ts +3 -1
- package/package.json +1 -1
- package/schneideress-dashboardframework.metadata.json +1 -1
|
@@ -12,5 +12,5 @@
|
|
|
12
12
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
13
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
14
|
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */var c=function(t,e){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};var m=function(){return(m=Object.assign||function(t){for(var e,i=1,s=arguments.length;i<s;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function u(t,e,i,s){var r,o=arguments.length,n=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var d=t.length-1;d>=0;d--)(r=t[d])&&(n=(o<3?r(n):o>3?r(e,i,n):r(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n}function f(t,e){return function(i,s){e(i,s,t)}}function y(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function w(t,e,i,s){return new(i||(i=Promise))((function(r,o){function n(t){try{a(s.next(t))}catch(t){o(t)}}function d(t){try{a(s.throw(t))}catch(t){o(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(n,d)}a((s=s.apply(t,e||[])).next())}))}function v(t,e){var i,s,r,o,n={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:d(0),throw:d(1),return:d(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function d(o){return function(d){return function(o){if(i)throw new TypeError("Generator is already executing.");for(;n;)try{if(i=1,s&&(r=2&o[0]?s.return:o[0]?s.throw||((r=s.return)&&r.call(s),0):s.next)&&!(r=r.call(s,o[1])).done)return r;switch(s=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,s=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if(!(r=n.trys,(r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){n=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){n.label=o[1];break}if(6===o[0]&&n.label<r[1]){n.label=r[1],r=o;break}if(r&&n.label<r[2]){n.label=r[2],n.ops.push(o);break}r[2]&&n.ops.pop(),n.trys.pop();continue}o=e.call(t,n)}catch(t){o=[6,t],s=0}finally{i=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,d])}}}var b,I=function(t){function s(e){var i=t.call(this,e,"")||this;return i.loadedScripts=[],i}return function(t,e){function i(){this.constructor=t}c(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}(s,t),s.prototype.loadExternalScript=function(t,e){if(-1==this.loadedScripts.indexOf(t)){var i=document.createElement("script");i.src=t,i.onload=function(){e()},document.body.appendChild(i),this.loadedScripts.push(t)}else e()},s.prototype.getWidgetsByDashboardArea=function(t,e){return this.baseUrl=e.apiBaseUrl,this.post("widget/GetWidgetByArea",t)},s.prototype.updateWidgets=function(t,e){return this.baseUrl=e.apiBaseUrl,this.post("widget/UpdateAreaWidgets",t)},s.prototype.getWidgetConfigInfo=function(t){return i.of()},s.prototype.updateConfig=function(t,e){},s.prototype.addWidget=function(t,e){return this.baseUrl=e.apiBaseUrl,this.post("widget/AddWidgetUser",t)},s.prototype.deleteWidget=function(t,e){return this.baseUrl=e.apiBaseUrl,this.delete("widget/DeleteWidgetUser?widgetInstanceId="+t.widgetInstanceId)},s.prototype.updateWidget=function(t,e){this.baseUrl=e.apiBaseUrl;var i={};return i.widgetConfigInfo=t.widgetConfigInfo,i.widgetInstanceId=t.widgetInstanceId,i.widgetTitle=t.widgetTitle,i.widgetType=t.widgetType,i.widgetId=t.widgetId,this.post("widget/UpdateUserWidget",t)},s.prototype.moveWidget=function(t){},s.prototype.copyWidget=function(t){},s.ctorParameters=function(){return[{type:e.Injector}]},s.ngInjectableDef=e.ɵɵdefineInjectable({factory:function(){return new s(e.ɵɵinject(e.INJECTOR))},token:s,providedIn:"root"}),s=u([e.Injectable({providedIn:"root"}),y("design:paramtypes",[e.Injector])],s)}(s.BaseService),C=function(){function t(){this.eventQueue=new i.Subject}return t.prototype.publish=function(t,e){this.eventQueue.next({eventName:t,data:e})},t.prototype.publishWithKey=function(t,e,i,s){this.eventQueue.next({eventName:t,data:e,key:i,value:s})},t.prototype.subscribe=function(t){return this.eventQueue.asObservable().pipe(r.filter((function(e){return e.eventName==t})),r.map((function(t){return t.data})))},t.prototype.subscribeWithKey=function(t,e,i){return this.eventQueue.asObservable().pipe(r.filter((function(s){return s.eventName==t&&s.key==e&&s.value==i})),r.map((function(t){return t.data})))},t.ngInjectableDef=e.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t=u([e.Injectable({providedIn:"root"})],t)}();(b=t.RAEvent||(t.RAEvent={})).WidgetSelected="widgetSelected",b.WidgetEditClicked="widgetEditClicked",b.ConfigCancelClick="configCancelClick",b.ConfigCloseClick="configCloseClick",b.ConfigAddClick="configAddClick",b.ConfigChanged="configChanged",b.RearrangeClicked="rearrangeClicked",b.DashboardCustomizeClick="dashboardCustomizeClick",b.DashboardChanged="dashboardChanged",b.WidgetLibraryCloseBtnClicked="WidgetLibraryCloseBtnClicked",b.LoadDashboard="LoadDashboard",b.CopyWidget="CopyWidget",b.MoveWidget="MoveWidget",b.WidgetDelete="WidgetDelete",b.AddWidget="AddWidget",b.widgetLibraryDoneClick="widgetLibraryDoneClick",b.favoriteIconRefresh="favoriteIconRefresh",b.QuickLinkRefresh="QuickLinkRefresh",b.WidgetAdded="WidgetAdded",b.UpdateGlobalFilterFromMapWidget="UpdateGlobalFilterFromMapWidget",b.AddWidgetEmptyDashboard="AddWidgetEmptyDashboard",b.AddNewWidgetToDashboard="AddNewWidgetToDashboard",b.HideDashboardBanner="HideDashboardBanner",b.LaunchCustomWidgetFlyout="LaunchCustomWidgetFlyout",b.UpdateAppledFiterForInapplicableFilter="UpdateAppledFiterForInapplicableFilter",b.ShowInapplicableFilterMessage="ShowInapplicableFilterMessage",b.BulkActionClick="BulkActionClick",(t.RAEventKey||(t.RAEventKey={})).WidgetInstanceId="widgetInstanceId";var x,k,$,S={gridType:"scrollVertical",compactType:"none",margin:0,outerMargin:!0,outerMarginTop:10,outerMarginRight:0,outerMarginBottom:30,outerMarginLeft:0,useTransformPositioning:!0,mobileBreakpoint:640,minCols:10,maxCols:10,minRows:1,maxRows:100,maxItemCols:10,minItemCols:1,maxItemRows:1e3,minItemRows:1,maxItemArea:1e3,minItemArea:1,defaultItemCols:1,defaultItemRows:1,keepFixedHeightInMobile:!1,keepFixedWidthInMobile:!1,scrollSensitivity:10,scrollSpeed:20,enableEmptyCellClick:!1,enableEmptyCellContextMenu:!1,enableEmptyCellDrop:!1,enableEmptyCellDrag:!1,emptyCellDragMaxCols:50,emptyCellDragMaxRows:50,ignoreMarginInRow:!0,draggable:{enabled:!0,dragHandleClass:"widget-move",ignoreContent:!0},resizable:{enabled:!0},swap:!0,pushItems:!0,disablePushOnDrag:!1,disablePushOnResize:!1,pushDirections:{north:!0,east:!0,south:!0,west:!0},pushResizeItems:!1,displayGrid:"none",disableWindowResize:!1,disableWarnings:!1,scrollToNewItems:!0,autoResizeonDrag:!1,setGridSize:!1},T=function(){function t(){var t=this;this.resized=new i.Subject,this.maxColsDesktop=8,this.resInfo=[{id:1,start:0,end:767,minCols:1,maxCols:1},{id:2,start:768,end:1024,minCols:1,maxCols:2},{id:3,start:1025,end:1366,minCols:1,maxCols:6},{id:4,start:1367,end:9999999999,minCols:1,maxCols:this.maxColsDesktop}],this.setScreenWidth(),window.addEventListener("resize",(function(){var e=t;t.screenWidthAdjusted&&clearTimeout(t.screenWidthAdjusted),t.screenWidthAdjusted=setTimeout((function(){e.setScreenWidth()}),500)}))}return t.prototype.setScreenWidth=function(){var t=this;if(this.screenWidth=window.outerWidth,this.IsDesktopView)this.currentResInfo=this.resInfo[3],this.resized.next(!0);else{var e=this.resInfo.filter((function(e){return e.end>=t.screenWidth&&e.start<=t.screenWidth}))[0];this.currentResInfo&&this.currentResInfo.id==e.id||(this.currentResInfo=e,this.resized.next())}},Object.defineProperty(t.prototype,"IsDesktopView",{get:function(){var t=navigator.userAgent||navigator.vendor||window.opera;return!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substring(0,4))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"IsMobile",{get:function(){var t=!1,e=navigator.userAgent||navigator.vendor||window.opera;return(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substring(0,4)))&&(t=!0),t},enumerable:!0,configurable:!0}),t.prototype.getGridsterConfig=function(t,e,i){var s=S;return s.minCols=this.currentResInfo.maxCols,s.maxCols=this.currentResInfo.maxCols,s.minRows=this.currentResInfo.minCols,s.maxItemCols=this.currentResInfo.maxCols,s.minItemCols=this.currentResInfo.minCols,s.minItemRows=this.currentResInfo.minCols,s.minItemArea=this.currentResInfo.minCols*this.currentResInfo.minCols,s.defaultItemCols=this.currentResInfo.minCols,s.defaultItemRows=this.currentResInfo.minCols,this.IsDesktopView&&t?(s.resizable.enabled=!0,s.swap=!0,s.draggable.enabled=!0):(s.resizable.enabled=!1,s.swap=!1,s.draggable.enabled=!1),e||(s.resizable.enabled=!1,s.swap=!1),i||(s.draggable.enabled=!1),s},t.prototype.getGridsterItem=function(t){return t.widgetSettings&&(t.settings=JSON.parse(t.widgetSettings)),t.templateSettings&&(t.templateWidgetSettings=JSON.parse(t.templateSettings)),{cols:this.getWidth(t.width),rows:this.getHeight(t.height),x:this.IsDesktopView?t.position_x:0,y:this.IsDesktopView?t.position_y:0,widgetInfo:t,minItemRows:this.getMinItemRows(t),minItemCols:this.getMinItemCols(t)}},t.prototype.getWidth=function(t){return this.IsDesktopView||(t=Math.floor(t/this.maxColsDesktop*this.currentResInfo.maxCols))<this.currentResInfo.minCols&&(t=this.currentResInfo.minCols),t},t.prototype.getMinItemRows=function(t){if(this.IsDesktopView&&t.settings&&t.settings.minRows)return t.settings.minRows},t.prototype.getMinItemCols=function(t){if(this.IsDesktopView&&t.settings&&t.settings.minCols)return t.settings.minCols},t.prototype.getHeight=function(t){return this.IsDesktopView||(t=Math.floor(t/this.maxColsDesktop*this.currentResInfo.maxCols))<this.currentResInfo.minCols&&(t=this.currentResInfo.minCols),t},t.ngInjectableDef=e.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t=u([e.Injectable({providedIn:"root"}),y("design:paramtypes",[])],t)}(),W=function(){function i(t,i,s,r,o,n,d){this.dashboardService=t,this.ngZone=i,this.ngxService=s,this.translateService=r,this.notifier=o,this.responsiveService=n,this.permissionService=d,this.widgetList=Array(),this.gridheight=300,this.gridcellHeight=0,this.userWidgets=[],this.PAMWidgets=[],this.isWidgetLoaded=!1,this.domResized=!1,this.showEmptyDashboard=!1,this.isWidgetMgmnt=!1,this.widgetHeight=2,this.widgetWidth=4,this.hideDashboardBanner=new e.EventEmitter}return i.prototype.ngOnInit=function(){var e=this;this.isWidgetMgmnt=this.permissionService.hasPermission("ra.widgetmanagement"),this.initiateGridsterConfig(),this.lastViewType=this.responsiveService.IsDesktopView?"desktop":"mobile",this.responsiveService.resized.subscribe((function(t){e.lastViewType==(t?"desktop":"mobile")&&t?setTimeout((function(){e.gridcellHeight=e.options.api.getCurrentRowHeight(),e.domResized=!e.domResized,e.setAreaHeight()}),100):(e.lastViewType=t?"desktop":"mobile",e.widgetList=[],setTimeout((function(){e.initiateGridsterConfig(),e.options.api.optionsChanged(),e.userWidgets?(e.widgetList=e.mapObjectListToGridsterItemList(e.userWidgets),setTimeout((function(){e.setAreaHeight()}))):e.loadWidgets(e.userDashboardId,e.areaKey),e.domResized=!e.domResized})))})),setTimeout((function(){e.raDashboardEventBus.subscribe(t.RAEvent.BulkActionClick).subscribe((function(t){e.bulkActionData=JSON.parse(JSON.stringify(t))}))}))},i.prototype.ngOnChanges=function(t){this.isWidgetMgmnt=this.permissionService.hasPermission("ra.widgetmanagement"),this.raDashboardEventBus&&this.appConfig&&!this.isWidgetLoaded&&(this.isWidgetLoaded=!0,this.loadWidgets(this.userDashboardId,this.areaKey)),this.initiateGridsterConfig(),t.raDashboardEventBus&&t.raDashboardEventBus.currentValue!=t.raDashboardEventBus.previousValue&&this.inititateEventBusSubscritions()},i.prototype.initiateGridsterConfig=function(){var t=this;this.dashboardInfo&&(this.options=this.responsiveService.getGridsterConfig(this.isWidgetMgmnt,this.dashboardInfo.templateConfig.widget.canResize,this.dashboardInfo.templateConfig.widget.canMove),this.options.initCallback=function(e){t.options.api&&(t.gridcellHeight=t.options.api.getCurrentRowHeight())},this.options.itemChangeCallback=function(e){t.responsiveService.IsDesktopView&&e.widgetInfo&&e.widgetInfo.widgetInstanceId&&t.updateWidgetPosition(e.widgetInfo.widgetInstanceId),t.setAreaHeight()})},i.prototype.inititateEventBusSubscritions=function(){var e=this;this.widgetDeleteEvent=this.raDashboardEventBus.subscribe(t.RAEvent.WidgetDelete).subscribe((function(t){e.ngZone.run((function(){e.deleteWidget(t,!0)}))})),this.widgetAddEvent=this.raDashboardEventBus.subscribe(t.RAEvent.AddWidget).subscribe((function(t){e.ngZone.run((function(){e.copyWidget(t)}))})),this.conifgAddClick=this.raDashboardEventBus.subscribe(t.RAEvent.ConfigAddClick).subscribe((function(t){e.ngZone.run((function(){e.addWidget(t)}))})),this.rearrangeWidgetClick=this.raDashboardEventBus.subscribe(t.RAEvent.RearrangeClicked).subscribe((function(t){e.ngZone.run((function(){e.rearrangeWidgets()}))})),this.widgetLibraryDoneClick=this.raDashboardEventBus.subscribe(t.RAEvent.widgetLibraryDoneClick).subscribe((function(t){e.ngZone.run((function(){t&&e.addWidgetListToGridster(t,0)}))}))},i.prototype.addWidgetListToGridster=function(t,e){var i=this,s=e+1;e>t.length-1||(0==e?(i.addWidget(t[e]),i.addWidgetListToGridster(t,s)):setTimeout((function(){i.addWidget(t[e]),i.addWidgetListToGridster(t,s)}),1e3))},i.prototype.ngOnDestroy=function(){this.conifgAddClick&&this.conifgAddClick.unsubscribe(),this.widgetAddEvent&&this.widgetAddEvent.unsubscribe(),this.widgetDeleteEvent&&this.widgetDeleteEvent.unsubscribe(),this.widgetLibraryDoneClick&&this.widgetLibraryDoneClick.unsubscribe(),this.rearrangeWidgetClick&&this.rearrangeWidgetClick.unsubscribe()},i.prototype.updateWidgets=function(){return this.dashboardService.updateWidgets(this.formatWidgetDataForPositionDetails(this.mapGridsterListToObject(this.widgetList)),this.appConfig).subscribe((function(t){})),!0},i.prototype.updateWidgetPosition=function(t){var e=[],i=this.widgetList.filter((function(e){return e.widgetInfo&&e.widgetInfo.widgetInstanceId==t}));if(i&&i.length>0){e.push(i[0]);var s=this.mapGridsterListToObject(e);this.dashboardService.updateWidgets(this.formatWidgetDataForPositionDetails(s),this.appConfig).subscribe((function(t){}))}return!0},i.prototype.formatWidgetDataForPositionDetails=function(t){var e=[];return t.forEach((function(t){var i={};i.widgetInstanceId=t.widgetInstanceId,i.position_x=t.position_x,i.position_y=t.position_y,i.width=t.width,i.height=t.height,e.push(i)})),e},i.prototype.loadWidgets=function(e,i){var s=this,r={dashboardId:e.toString(),dashboardAreaKey:i};this.widgetList=[],this.dashboardService.getWidgetsByDashboardArea(r,this.appConfig).subscribe((function(e){s.userWidgets=e,s.PAMWidgets=[],e.forEach((function(t){var e=void 0;t.widgetSettings&&(e=JSON.parse(t.widgetSettings))&&e.isPAMWidget&&s.PAMWidgets.push(t.widgetInstanceId)})),s.checkPAMWidgets(),e&&e.length>0?(s.widgetList=s.mapObjectListToGridsterItemList(e),s.setAreaHeight(),s.raDashboardEventBus.publish(t.RAEvent.HideDashboardBanner,!1)):(s.showEmptyDashboard=!0,s.raDashboardEventBus.publish(t.RAEvent.HideDashboardBanner,s.showEmptyDashboard))}))},i.prototype.setAreaHeight=function(){var t=this;setTimeout((function(){var e=!1;t.options.mobileBreakpoint>t.gridWrapper.nativeElement.clientWidth&&(e=!0);var i=0,s=0,r=0;t.options.api&&(r=t.options.api.getCurrentRowHeight()),t.showEmptyDashboard=!(t.userWidgets.length>0),t.widgetList.forEach((function(e){var s=e.y+e.rows;s>i&&(i=s),0==r&&(s=t.widgetList[0].curRowHeight),e.widgetInfo.rowHeight=r})),t.gridcellHeight=r,t.options.api&&(s=i*t.options.api.getCurrentRowHeight()+100);e&&(s=300*t.widgetList.length+200),s<600&&(s=600),t.gridheight=s}))},i.prototype.deleteWidget=function(e,i){void 0===i&&(i=!1);var s=this.widgetList.filter((function(t){return t.widgetInfo.widgetInstanceId===e}));if(s.length>0){var r=this.userWidgets.filter((function(t){return t.widgetInstanceId===e}));if(r.length>0&&this.userWidgets.splice(this.userWidgets.indexOf(r[0]),1),this.PAMWidgets.length>0){var o=this.PAMWidgets.indexOf(e);o>-1&&this.PAMWidgets.splice(o,1),this.checkPAMWidgets()}this.widgetList.splice(this.widgetList.indexOf(s[0]),1),this.setAreaHeight(),i||this.notifier.notify("success"," "+this.translateService.translate("Common.Widgettext")+" "+s[0].widgetInfo.widgetTitle+" "+this.translateService.translate("Common.deletedSuccesfully")+" ")}this.showEmptyDashboard=!(this.userWidgets.length>0),1==this.showEmptyDashboard&&this.raDashboardEventBus.publish(t.RAEvent.HideDashboardBanner,this.showEmptyDashboard)},i.prototype.rearrangeWidgets=function(){for(var t=this,e=0;e<this.userWidgets.length;e++)this.userWidgets[e].position_x=0,this.userWidgets[e].position_y=0;this.widgetList=this.mapObjectListToGridsterItemList(this.userWidgets),this.widgetList.length>0&&this.updateWidgetPosition(this.widgetList[0].widgetInfo.widgetInstanceId),setTimeout((function(){t.setAreaHeight()}))},i.prototype.addWidget=function(e){var i=this;e.height=this.widgetHeight,e.width=this.widgetWidth,this.raDashboardEventBus.publish(t.RAEvent.HideDashboardBanner,!1),e.widgetSettings&&("string"==typeof e.widgetSettings&&(e.widgetSettings=JSON.parse(e.widgetSettings)),e.widgetSettings.defaultCols&&(e.width=e.widgetSettings.defaultCols),e.widgetSettings.defaultRows&&(e.height=e.widgetSettings.defaultRows),e.widgetSettings=null),(e=this.setPositions(e)).dashboardAreaKey=this.areaKey,e.dashboardId=this.userDashboardId,this.ngxService.start(),this.dashboardService.addWidget(e,this.appConfig).subscribe((function(e){i.userWidgets.push(e);var s=i.responsiveService.getGridsterItem(e);if(i.widgetList.push(s),i.setAreaHeight(),i.options.api){var r=Number(i.options.api.getCurrentRowHeight());r>0&&(e.rowHeight=r,i.gridcellHeight=r)}var o=0;e&&e.widgetInstanceId&&(o=e.widgetInstanceId,i.responsiveService.IsDesktopView&&setTimeout((function(){i.updateWidgetPosition(o)}))),e.settings&&e.settings.isPAMWidget&&(i.PAMWidgets.push(e.widgetInstanceId),i.checkPAMWidgets()),i.raDashboardEventBus.publish(t.RAEvent.WidgetAdded,e)}))},i.prototype.setPositions=function(t){if(t.position_x=0,t.position_y=0,!this.responsiveService.IsDesktopView&&this.userWidgets.length>0){var e=this.userWidgets[this.userWidgets.length-1];e.position_x+e.width>this.responsiveService.maxColsDesktop/2?t.position_y=e.position_y+1:(t.position_y=e.position_y,t.position_x=this.responsiveService.maxColsDesktop-(e.position_x+e.width))}return t},i.prototype.copyWidget=function(t){t=this.setPositions(t),this.responsiveService.IsDesktopView||this.dashboardService.updateWidgets(this.formatWidgetDataForPositionDetails([t]),this.appConfig).subscribe((function(t){})),this.userWidgets.push(t);var e=this.responsiveService.getGridsterItem(t);this.widgetList.push(e),this.setAreaHeight(),t.settings&&t.settings.isPAMWidget&&(this.PAMWidgets.push(t.widgetInstanceId),this.checkPAMWidgets())},i.prototype.mapObjectListToGridsterItemList=function(t){var e=this,i=Array();return t.forEach((function(t){i.push(e.responsiveService.getGridsterItem(t))})),i},i.prototype.mapGridsterItemToObject=function(t){var e;return(e=t.widgetInfo).height=t.rows,e.width=t.cols,e.position_x=t.x,e.position_y=t.y,e.rowHeight=t.curRowHeight,e},i.prototype.mapGridsterListToObject=function(t){var e=this,i=Array();return t.forEach((function(t){i.push(e.mapGridsterItemToObject(t))})),i},i.prototype.addNewWidget=function(){this.raDashboardEventBus.publish(t.RAEvent.AddNewWidgetToDashboard,null)},i.prototype.updateAppliedFilters=function(e){this.raDashboardEventBus.publish(t.RAEvent.UpdateAppledFiterForInapplicableFilter,e)},i.prototype.checkPAMWidgets=function(){this.PAMWidgets.length>0?this.raDashboardEventBus.publish(t.RAEvent.ShowInapplicableFilterMessage,!0):this.raDashboardEventBus.publish(t.RAEvent.ShowInapplicableFilterMessage,!1)},i.ctorParameters=function(){return[{type:I},{type:e.NgZone},{type:o.NgxUiLoaderService},{type:s.RATranslateService},{type:n.NotifierService},{type:T},{type:s.RAPermissionService}]},u([e.Input("user-dashboard-id"),y("design:type",Number)],i.prototype,"userDashboardId",void 0),u([e.Input("area-key"),y("design:type",String)],i.prototype,"areaKey",void 0),u([e.Input("global-filter"),y("design:type",Object)],i.prototype,"globalFilter",void 0),u([e.Input("event-bus"),y("design:type",C)],i.prototype,"raDashboardEventBus",void 0),u([e.Input("widget-height"),y("design:type",Number)],i.prototype,"widgetHeight",void 0),u([e.Input("widget-width"),y("design:type",Number)],i.prototype,"widgetWidth",void 0),u([e.Input("app-config"),y("design:type",Object)],i.prototype,"appConfig",void 0),u([e.Input("dashboard-info"),y("design:type",Object)],i.prototype,"dashboardInfo",void 0),u([e.Output(),y("design:type",Object)],i.prototype,"hideDashboardBanner",void 0),u([e.ViewChild("gridWrapper",{static:!1}),y("design:type",e.ElementRef)],i.prototype,"gridWrapper",void 0),i=u([e.Component({selector:"ra-dashboard-area",template:'<div #gridWrapper class="wrap gridster gridster-mobile" [ngStyle]="{\'height\': userWidgets.length > 0 ? (gridheight + \'px\') : \'unset\'}">\r\n \x3c!-- <div #gridWrapper class="wrap gridster"> --\x3e\r\n <gridster [options]="options" style="height:100%;" *ngIf="userWidgets.length > 0">\r\n <gridster-item [item]="item" *ngFor="let item of widgetList">\r\n <ra-widget-container [bulk-action-data]="bulkActionData" [dashboard-info]="dashboardInfo" [app-config]="appConfig" [event-bus]="raDashboardEventBus"\r\n (widgetDeleted)="deleteWidget($event)" [data]="item" [global-filter]="globalFilter"\r\n [grid-cell-height]="gridcellHeight" *ngIf="gridcellHeight && gridcellHeight > 0" [widget-width]="item.cols"\r\n [widget-height]="item.rows" [widget-instance-id]="item.widgetInstanceId" [dom-resized]="domResized"\r\n (updateAppliedFilters)="updateAppliedFilters($event)">\r\n </ra-widget-container>\r\n </gridster-item>\r\n </gridster>\r\n\r\n <div class="empty-padding kiosk-hide" *ngIf="showEmptyDashboard">\r\n <div class="empty-wrapper">\r\n <div></div>\r\n <div class="m-1 empty-prefix">\r\n <i class="fal fa-edit edit-icon"></i>\r\n <span class="empty-title">{{\'dashboard.emptydashboard\'|translate}}</span>\r\n </div>\r\n <div class="empty-content light">\r\n <div>\r\n <div class="col-sm-12 empty-msg">\r\n {{\'dashboard.emptydashboardmessage\'|translate}} <br />\r\n {{\'dashboard.emptydashboardmessage2\'|translate}}\r\n </div>\r\n <button *ngIf="isWidgetMgmnt" class="btn btnLib btn-sm m-1 dashboard-button light" (click)="addNewWidget()">\r\n <i class="fal fa-plus m-1"></i>{{\'dashboard.addawidgets\'|translate}}</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <notifier-container></notifier-container>\r\n</div>',styles:["gridster{width:inherit;resize:height;display:flex;background-color:#fff;overflow-y:hidden!important}.dvheader{width:100%;height:35px;background:#000;color:#fff;padding:7px 3px 5px 6px;text-transform:uppercase}gridster-item{box-sizing:border-box;z-index:1;position:absolute;overflow:hidden;transition:.3s;display:none;background:#fff;-webkit-user-select:text;-moz-user-select:text;user-select:text;box-shadow:none}gridster-item:hover{box-shadow:0 1px 10px rgba(0,0,0,.15)!important}@media screen and (max-width:685px){.gridster-mobile{height:auto!important;margin-bottom:50px!important}}@media screen and (max-width:350px){.gridster-mobile{min-height:330px!important;margin-bottom:0!important}}.empty-padding{padding:40px 20px 20px;background-color:#fff;display:flex;justify-content:center;align-content:center}.empty-wrapper{display:flex;background-color:#fff;border-radius:8px;min-height:125px;width:72%}.empty-prefix{color:#32ad3c;font-size:18px;display:flex;align-items:center;padding:10px 30px;min-width:-webkit-max-content;min-width:max-content;min-width:-moz-max-content}.empty-content{color:#333;border-left:1px solid #a9afb1;width:100%;display:flex;align-items:center;padding:15px 30px 10px 40px}.empty-msg{padding:0 0 5px;font-size:16px}.dashboard-button{padding:5px 10px 5px 5px!important}.btnLib{background-color:#ededed;color:#333!important}.btn-group-sm>.btn,.btn-sm{padding:5px 20px 5px 5px}.edit-icon{color:#32ad3c;font-size:24px;margin-right:15px}.empty-title{margin-top:10px}@media screen and (max-width:600px){.empty-padding{padding:10px;background-color:#fff;width:100%;display:block}.empty-wrapper{display:flex;background-color:#fff;border-radius:8px;min-height:125px;width:100%}.empty-prefix{color:#32ad3c;font-size:16px;display:flex;height:40px;padding:6px 10px 8px}.empty-content{color:#333;display:flex;padding:5px 10px 10px;margin-top:44px;margin-left:-185px;border-left:none}.empty-msg{padding:12px 10px 10px 5px;font-size:14px;border-top:1px solid #a9afb1}.edit-icon{color:#32ad3c;font-size:20px;margin-right:6px}.empty-title{margin-top:6px}}"]}),y("design:paramtypes",[I,e.NgZone,o.NgxUiLoaderService,s.RATranslateService,n.NotifierService,T,s.RAPermissionService])],i)}(),P=function(){function t(t){this.domService=t}return t.prototype.ngOnInit=function(){this.element&&this.setPopupPosition()},t.prototype.setPopupPosition=function(){var t=this.element.getBoundingClientRect();t.left+250>window.innerWidth?this.containerLeft=t.left-(t.left+270-window.innerWidth)+"px":this.containerLeft=t.left+"px",t.bottom+100<window.innerHeight?(this.containerTop=t.bottom+"px",this.containerBottom=null):(this.containerTop=null,this.containerBottom=window.innerHeight-t.top+"px")},t.prototype.removeMe=function(t){var e=this;setTimeout((function(){e.domService.removeComponent(t)}))},t.ctorParameters=function(){return[{type:s.DomService}]},t=u([e.Component({selector:"ra-lock-tooltip",template:'<div class="lock-popup-content light widget-config-item"\r\n [ngStyle]="{\'top\': containerTop,\'bottom\':containerBottom,\'position\':\'fixed\',\'left\':containerLeft,\'z-index\': \'9999\',\'width\':\'250px\',\'min-height\':\'fit-content\'}">\r\n <div *ngIf="data && !template">\r\n <label style="color: #D9F0FA;">\r\n {{title}}:\r\n </label>\r\n <div style="color: white;">\r\n <label class="bold" style="margin-bottom: 0px;width: 100%;" *ngFor="let item of data">\r\n {{item}}\r\n </label>\r\n </div>\r\n <hr style="background-color: white;">\r\n <div style="color: #D9F0FA;">\r\n <label>{{footer}}</label>\r\n </div>\r\n </div>\r\n <div *ngIf="!data && template">\r\n <ng-container *ngTemplateOutlet="template">\r\n </ng-container>\r\n </div>\r\n</div>',styles:[".lock-popup-content{margin-top:8px;position:absolute;right:0;top:79%;box-shadow:0 8px 16px 8px rgba(0,0,0,.2);z-index:899;font-size:12px;min-width:220px!important;min-height:112px;background-color:#219bfd;opacity:.9;padding:15px;color:#fff}.widget-config-item i{font-size:17px;color:#42b4e6}.widget-config-item span{font-size:12px;font:inherit;padding-left:12px;color:#42b4e6}"]}),y("design:paramtypes",[s.DomService])],t)}(),D=function(){function i(t,i,s,r,o,n,a,h){var l=this;this.dashboardService=t,this.ngxService=i,this.translateService=s,this.ngZone=r,this.notifier=o,this.renderer=n,this.raPermissionService=a,this.domService=h,this.showPanel=!0,this.isWidgetLoaded=!1,this.lockClass="unlocked",this.lockStatus=d.RaWidgetlockStatus.Unlocked,this.isDownloadIconVisible=!1,this.isChartDownloadVisible=!1,this.isGridDownloadVisible=!1,this.enableTitleLine=!1,this.isGlobalFilterApplied=!1,this.toolTipValue=" ",this.toolTipWidth="0px",this.editToolTipValue=" ",this.copyToolTipValue=" ",this.moveToolTipValue=" ",this.excelToolTipValue=" ",this.deleteToolTipValue=" ",this.editText="",this.copyText="",this.moveText="",this.excelText="",this.deleteText="",this.editToolTipWidth="0px",this.copyToolTipWidth="0px",this.moveToolTipWidth="0px",this.excelToolTipWidth="0px",this.deleteToolTipWidth="0px",this.noPadding=!1,this.isMouseHover=!1,this.showSettingsLink=!0,this.isKpiView=!1,this.showExcell=!0,this.hideTitle=!1,this.inapplicableFilters=[],this.widgetDeleted=new e.EventEmitter,this.updateAppliedFilters=new e.EventEmitter,this.isWidgetStateApplicable=!1,this.widgetEmptyState="",this.lockVisible=!1,this.isWidgetMgmnt=!1,this.enableTitleLineActual=!1,this.renderer.listen("window","click",(function(t){t.target.className?"fal fa-ellipsis-v widget-menu-ellipse"!=t.target.className&&l.removeMenu():l.removeMenu()}))}return Object.defineProperty(i.prototype,"setResized",{set:function(t){this.invokeWidgetResizedEvent()},enumerable:!0,configurable:!0}),i.prototype.ngOnInit=function(){this.WidgetDisplayName=this.translateService.translate("Common."+this.data.widgetInfo.widgetTitle,!0),this.lockIconTitle=this.translateService.translate("Common.lockedfields"),this.lockIconFooter=this.translateService.translate("Common.lockedfieldseditinfo"),this.inapplicableIconTitle=this.translateService.translate("Common.InapplicableFilters"),this.inapplicableIconFooter=this.translateService.translate("Common.InapplicableFiltersDesc")},Object.defineProperty(i.prototype,"widgetViewState",{get:function(){return d.WidgetViewState},enumerable:!0,configurable:!0}),i.prototype.ngOnChanges=function(e){var i=this;if(this.isWidgetMgmnt=this.raPermissionService.hasPermission("ra.widgetmanagement"),e.raDashboardEventBus&&e.raDashboardEventBus.currentValue!=e.raDashboardEventBus.previousValue&&(this.configChanged=this.raDashboardEventBus.subscribeWithKey(t.RAEvent.ConfigChanged,t.RAEventKey.WidgetInstanceId,this.data.widgetInfo.widgetInstanceId.toString()).subscribe((function(t){i.ngZone.run((function(){i.configChangeEventHandler(t)}))}))),this.widgetElement){if(e.bulkActionData&&e.bulkActionData.currentValue!=e.bulkActionData.previousValue&&"function"==typeof this.widgetElement.bulkActionClicked&&this.widgetElement.bulkActionClicked(this.bulkActionData),e.globalFilter&&e.globalFilter.currentValue!=e.globalFilter.previousValue){var s=this.getParsedConfig(this.globalFilter);s.WidgetInstanceId?this.data.widgetInfo.widgetInstanceId!=s.WidgetInstanceId&&this.refreshWidget(this.data.widgetInfo):this.refreshWidget(this.data.widgetInfo)}(e.width&&e.width.currentValue!=e.width.previousValue||e.height&&e.height.currentValue!=e.height.previousValue)&&this.invokeWidgetResizedEvent()}},i.prototype.invokeWidgetResizedEvent=function(){if(this.widgetElement&&"function"==typeof this.widgetElement.widgetResized){var t={};t.height=this.height,t.width=this.width,t.cellHeight=this.gridCellHeight,this.widgetElement.widgetResized(t),1==this.height||1==this.width?this.isKpiView=!0:this.isKpiView=!1}},i.prototype.mouseHover=function(t){void 0===t&&(t=!0),this.isMouseHover=t,this.widgetElement&&("function"==typeof this.widgetElement.hoverStatus?this.widgetElement.hoverStatus(t):console.warn("widget framework outdated, please update to version 0.0.96"))},i.prototype.ngAfterViewInit=function(){var t=this;setTimeout((function(){t.loadWidget(t.data.widgetInfo)})),document.addEventListener("scroll",(function(){t.removeMenu(),t.closePopup()})),setTimeout((function(){var e=jQuery(t.wcWrapper.nativeElement).closest("gridster-item");e.bind("mouseenter",(function(){window.gridsterItemEnter=!0})),e.bind("mouseleave",(function(){window.gridsterItemEnter=!1,setTimeout((function(){window.mouseOverWidgetMenu||t.removeMenu()}))}))}))},i.prototype.ngOnDestroy=function(){this.configChanged&&this.configChanged.unsubscribe(),this.widgetElementHandler&&this.data&&this.data.widgetInfo&&this.data.widgetInfo.widgetInstanceId&&document.body.removeEventListener("widgetinitiated"+this.data.widgetInfo.widgetInstanceId,this.widgetElementHandler)},i.prototype.editWidget=function(){var e;if(this.widgetElement&&"function"==typeof this.widgetElement.getConfigFilter){var i=this.widgetElement.getConfigFilter();i&&(e=i)}if(e)this.raDashboardEventBus.publish(t.RAEvent.WidgetEditClicked,e);else{var s=this.generateConfigFilter(!1);this.raDashboardEventBus.publish(t.RAEvent.WidgetEditClicked,s)}},i.prototype.deleteWidget=function(){var t=this,e=this;e.ngxService.start(),e.dashboardService.deleteWidget(this.data.widgetInfo,this.appConfig).subscribe((function(i){e.ngxService.stop(),i?(e.widgetDeleted.emit(t.data.widgetInfo.widgetInstanceId),t.setInapplicableFilters(void 0,t.data.widgetInfo.widgetInstanceId)):e.notifier.notify("error"," "+t.translateService.translate("FailedToRemoveWidget")+" ("+t.translateService.translate("Common."+t.data.widgetInfo.widgetTitle,!0)+")!")}))},i.prototype.moveWidget=function(){this.raDashboardEventBus.publish(t.RAEvent.MoveWidget,this.data.widgetInfo),this.setInapplicableFilters(void 0,this.data.widgetInfo.widgetInstanceId)},i.prototype.copyWidget=function(){this.raDashboardEventBus.publish(t.RAEvent.CopyWidget,this.data.widgetInfo)},i.prototype.visitPage=function(){this.baseUrl=this.getHostUrl();var t=this.baseUrl+this.detailPageUrl;if(this.data.widgetInfo&&this.data.widgetInfo.widgetSettings&&(this.widgetSettings=this.getParsedConfig(this.data.widgetInfo.widgetSettings),this.widgetSettings.customPageParams||this.widgetSettings.customPageURL)){var e=this.widgetElement.getPageParamsClicked();e&&("AV Widget"==this.data.widgetInfo.widgetType||this.widgetSettings.customPageURL?t+=e:t=t+"?"+e)}window.open(t,"_blank")},i.prototype.getHostUrl=function(){return window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")},i.prototype.configChangeEventHandler=function(t){this.data.widgetInfo=t,this.gridCellHeight>0&&(this.data.widgetInfo.rowHeight=this.gridCellHeight),this.widgetElement&&"function"==typeof this.widgetElement.setConfigFilter?this.widgetElement.setConfigFilter(this.generateConfigFilter(!0)):console.warn("widget framework outdated, please update to version 0.0.98"),this.refreshWidget(this.data.widgetInfo,!0)},i.prototype.generateConfigFilter=function(t){return void 0===t&&(t=!1),{appConfig:this.appConfig,globalFilter:this.globalFilter,widgetInfo:this.data.widgetInfo,config:this.data.widgetInfo.widgetConfigInfo.config,configChanges:this.getConfigChanges(t)}},i.prototype.loadWidget=function(t){return w(this,void 0,void 0,(function(){var e,i,s=this;return v(this,(function(r){return t.rowHeight=this.gridCellHeight,e={config:t.widgetConfigInfo.config,globalFilter:this.globalFilter,configChanges:this.getConfigChanges(!1)},t.widgetSettings&&(this.widgetSettings=this.getParsedConfig(t.widgetSettings),this.applayWidgetSettings(this.widgetSettings)),this.detailPageUrl=t.detailPageUrl,i=this,this.dashboardService.loadExternalScript(t.scriptUrl,(function(){s.setNotConfiguredState(t);var r=s.data.widgetInfo.widgetName;s.data.widgetInfo.applicationModule&&s.data.widgetInfo.applicationModule.length>0&&(r=s.data.widgetInfo.applicationModule),s.translateService.loadTranslations(s.appConfig.appManagementBaseUrl,r,!1).then((function(){i.widgetElement=document.createElement(t.customTag),i.widgetElement.setAttribute("widget-instance-id",t.widgetInstanceId);var r=function(s){var r=this;setTimeout((function(){return w(r,void 0,void 0,(function(){var s,r=this;return v(this,(function(o){switch(o.label){case 0:return this.widgetElement.addEventListener("on-widget-respond",(function(e){switch(e.detail.type){case"onDataLoad":e.detail.data?r.showPanel=!0:r.showPanel=!1;break;case"onConfigEditClicked":r.editWidget();break;case"onEnableDefaultState":r.setEmptyState(e.detail.data);break;case"onSetTitleUnderline":1==e.detail.data?r.enableTitleLine=!0:r.enableTitleLine=r.enableTitleLineActual;break;case"onWidgetTitleHidden":1==e.detail.data?r.hideTitle=!0:r.hideTitle=!1;break;case"onUpdateLockData":r.setLock(e.detail.data);break;case"onGlobalFilterApplicableCheck":r.setInapplicableFilters(e.detail.data,t.widgetInstanceId)}})),void 0!==this.widgetElement.titleLineEnabled&&(s=this.widgetElement.titleLineEnabled())&&(this.enableTitleLine=s,this.enableTitleLineActual=s),this.editText=this.translateService.translate("Common.edit"),this.translateService.translate("Common.edit").length>6&&(this.editText=this.translateService.translate("Common.edit").substring(0,6)+"...",this.editToolTipValue=this.translateService.translate("Common.edit"),this.editToolTipWidth="300px"),this.copyText=this.translateService.translate("Common.copy"),this.translateService.translate("Common.copy").length>6&&(this.copyText=this.translateService.translate("Common.copy").substring(0,6)+"...",this.copyToolTipValue=this.translateService.translate("Common.copy"),this.copyToolTipWidth="300px"),this.moveText=this.translateService.translate("Common.move"),this.translateService.translate("Common.move").length>6&&(this.moveText=this.translateService.translate("Common.move").substring(0,6)+"...",this.moveToolTipValue=this.translateService.translate("Common.move"),this.moveToolTipWidth="300px"),this.excelText=this.translateService.translate("Common.excel"),this.translateService.translate("Common.excel").length>6&&(this.excelText=this.translateService.translate("Common.excel").substring(0,6)+"...",this.excelToolTipValue=this.translateService.translate("Common.excel"),this.excelToolTipWidth="300px"),this.deleteText=this.translateService.translate("Common.delete"),this.translateService.translate("Common.delete").length>6&&(this.deleteText=this.translateService.translate("Common.delete").substring(0,6)+"...",this.deleteToolTipValue=this.translateService.translate("Common.delete"),this.deleteToolTipWidth="300px"),this.isWidgetLoaded=!0,e.appConfig=this.appConfig,e.widgetInfo=t,e.configChanges=this.getConfigChanges(!1),e.widgetInfo.widgetName=t.widgetName,e.globalFilter=this.globalFilter,e.dashboardInfo=i.dashboardInfo,this.widgetElement.loadContent(e),[4,this.setLock(e.config)];case 1:return o.sent(),[4,this.setDownloadIcon()];case 2:return o.sent(),[2]}}))}))}))}.bind(s);s.widgetElementHandler=r,document.body.addEventListener("widgetinitiated"+t.widgetInstanceId,r),s.ctlWidget.nativeElement.appendChild(s.widgetElement)}))})),[2]}))}))},i.prototype.setNotConfiguredState=function(t,e){void 0===e&&(e=!1),t.showDefaultState&&(""==t.widgetConfigInfo.config||0==Object.keys(JSON.parse(t.widgetConfigInfo.config)).length)||e?(this.isWidgetStateApplicable=!0,this.widgetEmptyState=d.WidgetViewState.emptyConfig.toString()):(this.widgetEmptyState="",this.isWidgetStateApplicable=!1)},i.prototype.setEmptyState=function(t){switch(1==this.height||1==this.width?this.isKpiView=!0:this.isKpiView=!1,this.widgetEmptyState=t.widgetViewState,this.isGlobalFilterApplied=t.isGlobalFilterApplied,t!=d.WidgetViewState.normal?(this.isWidgetStateApplicable=!0,this.isDownloadIconVisible=!1):this.isWidgetStateApplicable=!1,t){case d.WidgetViewState.emptyConfig:this.setNotConfiguredState(this.data.widgetInfo,!0);break;case d.WidgetViewState.emptyData:case d.WidgetViewState.error:}},i.prototype.getConfigChanges=function(t){return void 0===t&&(t=!1),{isConfigUpdated:t,updatedConfigProperty:[]}},i.prototype.refreshWidget=function(t,e){return void 0===e&&(e=!1),w(this,void 0,void 0,(function(){var i,s;return v(this,(function(r){switch(r.label){case 0:return this.WidgetDisplayName=this.translateService.translate("Common."+this.data.widgetInfo.widgetTitle,!0),t.rowHeight=this.gridCellHeight,this.setNotConfiguredState(t),i=this,s={config:t.widgetConfigInfo.config,globalFilter:this.globalFilter,appConfig:this.appConfig,widgetInfo:t,configChanges:this.getConfigChanges(e)},i.isWidgetLoaded?(this.widgetElement&&"function"==typeof this.widgetElement.setConfigFilter&&i.widgetElement.setConfigFilter(s),i.widgetElement.loadContent(s),[4,this.setLock(s.config)]):[3,3];case 1:return r.sent(),[4,this.setDownloadIcon()];case 2:r.sent(),r.label=3;case 3:return[2]}}))}))},i.prototype.mouseOver=function(t){this.toolTipValue=" ",this.toolTipWidth="0px";var e=this.searchInput.nativeElement;e.offsetWidth<e.scrollWidth?(this.toolTipValue=e.innerHTML,this.toolTipWidth="300px"):this.toolTipWidth="0px"},i.prototype.setLock=function(t){return w(this,void 0,void 0,(function(){var e;return v(this,(function(i){return this.lockTemplateInfo=this.widgetElement.loadLockInfo(),t&&((e=JSON.parse(t))&&null!=e.Locks&&(e.Locks.IsDateLocked||e.Locks.IsDatesLocked||e.Locks.IsParticipantLocked||e.Locks.IsSourceLocked)?(this.lockDetails=[],(e.Locks.IsDateLocked||e.Locks.IsDatesLocked)&&this.lockDetails.push(this.translateService.translate("Common.DateRange")),e.Locks.IsParticipantLocked&&this.lockDetails.push(this.translateService.translate("Common.DivisionOrGrouporSite")),e.Locks.IsSourceLocked&&this.lockDetails.push(this.translateService.translate("Common.DataStream"))):this.lockDetails=void 0),[2]}))}))},i.prototype.setDownloadIcon=function(){return w(this,void 0,void 0,(function(){var t;return v(this,(function(e){switch(e.label){case 0:return[4,this.widgetElement.getDownloadType()];case 1:return t=e.sent(),this.downloadIconType=t,this.isDownloadIconVisible=!1,this.isChartDownloadVisible=!1,this.isGridDownloadVisible=!1,this.showExcell=!0,t!=d.RADownloadType.None?this.isDownloadIconVisible=!0:this.isWidgetMgmnt||this.detailPageUrl||(this.showSettingsLink=!1),t==d.RADownloadType.Chart&&(this.isChartDownloadVisible=!0),t==d.RADownloadType.Grid&&(this.isGridDownloadVisible=!0),t==d.RADownloadType.Statistics&&(this.isGridDownloadVisible=!0,this.showExcell=!1),[2]}}))}))},i.prototype.downloadIconClicked=function(t){switch(t){case"CSV":this.widgetElement.downloadClicked(this.downloadIconType,d.RADownloadOption.CSV);break;case"PNG":this.widgetElement.downloadClicked(this.downloadIconType,d.RADownloadOption.PNG);break;case"PDF":this.widgetElement.downloadClicked(this.downloadIconType,d.RADownloadOption.PDF);break;case"SVG":this.widgetElement.downloadClicked(this.downloadIconType,d.RADownloadOption.SVG);break;case"JPEG":this.widgetElement.downloadClicked(this.downloadIconType,d.RADownloadOption.JPEG)}},i.prototype.removeMenu=function(){jQuery("#ra-db-widget-menu").remove()},i.prototype.checkVisitLinkVisiblity=function(){var t=!0;return this.widgetElement&&"function"==typeof this.widgetElement.getVisitLinkVisibilityStatus&&(t=this.widgetElement.getVisitLinkVisibilityStatus()),t},i.prototype.showDropDown=function(t){var e=this;this.setDownloadIcon(),this.removeMenu(),setTimeout((function(){var i="position:fixed;top:"+(t.target.getBoundingClientRect().y+15)+"px;left:"+(t.pageX-122)+"px;z-index:1000;",s=e.getContenxtHtml(i);jQuery(s).appendTo("body"),e.isWidgetMgmnt&&(e.addEventListener("wcEditWidget",e.editWidget),e.addEventListener("wcCopyWidget",e.copyWidget),e.addEventListener("wcMoveWidget",e.moveWidget),e.addEventListener("wcWidgetDelete",e.deleteWidget));var r=!1;e.data.widgetInfo&&e.data.widgetInfo.widgetSettings&&(e.widgetSettings=e.getParsedConfig(e.data.widgetInfo.widgetSettings),(e.widgetSettings.customPageParams||e.widgetSettings.customPageURL)&&(r=!0)),(e.detailPageUrl||r)&&e.checkVisitLinkVisiblity()&&e.addEventListener("wcVisitWidget",e.visitPage),e.isChartDownloadVisible&&(e.addEventListener("wcDownloadPng",e.downloadIconClicked,"PNG"),e.addEventListener("wcDownloadJpg",e.downloadIconClicked,"JPEG"),e.addEventListener("wcDownloadPdf",e.downloadIconClicked,"PDF"),e.addEventListener("wcDownloadSvg",e.downloadIconClicked,"SVG")),e.isGridDownloadVisible&&e.showExcell&&e.addEventListener("wcDownloadExcel",e.downloadIconClicked,"CSV"),document.getElementById("ra-db-widget-menu").addEventListener("mouseenter",(function(){window.mouseOverWidgetMenu=!0})),document.getElementById("ra-db-widget-menu").addEventListener("mouseleave",(function(){window.mouseOverWidgetMenu=!1,setTimeout((function(){window.gridsterItemEnter||e.removeMenu()}))}))}))},i.prototype.addEventListener=function(t,e,i){var s=this,r=document.getElementById(t);r&&r.addEventListener("click",(function(){e.call(s,i)}))},i.prototype.getContenxtHtml=function(t){var e='<div id="ra-db-widget-menu"style="'+t+'" class="download-content dropdown-content widget-config-item dropdown-click" style="z-index: 1002;">',i="";this.isWidgetMgmnt&&(this.data.widgetInfo.templateWidgetSettings&&this.data.widgetInfo.templateWidgetSettings.hideEdit||(i+=this.getHtmlForButton("wcEditWidget","fal fa-edit",this.editText)),this.data.widgetInfo.templateWidgetSettings&&this.data.widgetInfo.templateWidgetSettings.hideCopy||(i+=this.getHtmlForButton("wcCopyWidget","fal fa-copy",this.copyText)),this.data.widgetInfo.templateWidgetSettings&&this.data.widgetInfo.templateWidgetSettings.hideMove||(i+=this.getHtmlForButton("wcMoveWidget","fal fa-arrows-alt",this.moveText)));var s=!1;return this.data.widgetInfo&&this.data.widgetInfo.widgetSettings&&(this.widgetSettings=this.getParsedConfig(this.data.widgetInfo.widgetSettings),(this.widgetSettings.customPageParams||this.widgetSettings.customPageURL)&&(s=!0)),(!this.data.widgetInfo.templateWidgetSettings||!this.data.widgetInfo.templateWidgetSettings.hideVisitPage&&(this.detailPageUrl||s)&&this.checkVisitLinkVisiblity())&&(i+='<a style="max-height: 30px;align-items: center;align-content: center; display: flex;" id="wcVisitWidget">',i+='<i style="padding-left: 4px;font-size: 27px !important;" class="fal fa-angle-right"></i> ',i+='<span style="padding-left: 11px;margin-top: 2px;" style="padding-left: 6px;">',i+=this.translateService.translate("Common.visitpage"),i+="</span></a>"),(!this.data.widgetInfo.templateWidgetSettings||!this.data.widgetInfo.templateWidgetSettings.hideVisitPage&&this.detailPageUrl&&this.checkVisitLinkVisiblity()||this.isWidgetMgmnt)&&(e+='<div style="color: #9FA0A4;font-size: 12px;padding-top: 8px;padding-left: 12px;">',e+=this.translateService.translate("Common.settings")+"</div>",e+=i,e+=this.getHr()),this.isDownloadIconVisible&&(this.showExcell&&(this.detailPageUrl||this.isWidgetMgmnt?e+='<span style="color: #9FA0A4;font-size: 12px;">':e+='<span style="color: #9FA0A4;font-size: 12px;padding-top:5px;display:block;">',e+=this.translateService.translate("Common.downloads"),e+="</span>"),this.isChartDownloadVisible&&(e+='<div style="padding-top: 10px;" class="chartDownload">',e+=this.getHtmlForButton("wcDownloadPng","fal fa-file-image",this.translateService.translate("Common.png")),e+=this.getHtmlForButton("wcDownloadJpg","fal fa-file-image",this.translateService.translate("Common.jpeg")),e+=this.getHtmlForButton("wcDownloadPdf","fal fa-file-pdf",this.translateService.translate("Common.pdf")),e+=this.getHtmlForButton("wcDownloadSvg","fal fa-file-alt",this.translateService.translate("Common.svg")),e+="</div>"),this.isGridDownloadVisible&&this.showExcell&&(e+='<div class="gridDownload">',e+=this.getHtmlForButton("wcDownloadExcel","fal fa-download",this.excelText),e+="</div>")),this.isDownloadIconVisible&&this.isWidgetMgmnt&&this.showExcell&&(e+=this.getHr()),(this.isWidgetMgmnt&&!this.data.widgetInfo.templateWidgetSettings||!this.data.widgetInfo.templateWidgetSettings.hideDelete)&&(e+='<a id="wcWidgetDelete"><i class="fal fa-times" style="padding-left: 3px;color: red;"></i><span>',e+=this.deleteText,e+="</span></a>"),e+="</div>"},i.prototype.getHr=function(){return'<hr class="hr" style="margin-top: 5px;margin-bottom: 5px;">'},i.prototype.getHtmlForButton=function(t,e,i){var s='<a id="'+t+'"><i style="width:16px" class="'+e+'"></i> <span style="padding-left: 6px;">';return s+=i,s+="</span></a>"},i.prototype.getParsedConfig=function(t){var e;if(t&&"string"==typeof t){try{e=JSON.parse(t)}catch(t){e={}}return e}return t},i.prototype.applayWidgetSettings=function(t){t.NoPadding?this.noPadding=!0:this.noPadding=!1},i.prototype.setInapplicableFilters=function(t,e){var i=this,s={};this.inapplicableFilters=[],s.instanceId=e,t&&t.length>0?(t.forEach((function(t){"dateRange"==t?i.inapplicableFilters.push(i.translateService.translate("Common.DateRange")):"participant"==t?i.inapplicableFilters.push(i.translateService.translate("Common.DivisionGroup")):"source"==t?i.inapplicableFilters.push(i.translateService.translate("Common.DataStream")):i.inapplicableFilters.push(t)})),s.data=t):s.data=void 0,this.updateAppliedFilters.emit(s)},i.prototype.openPopup=function(t,e,i,s,r){void 0===r&&(r=void 0);var o={};"innaplicable"==s&&this.banPopupDiv&&(o.element=this.banPopupDiv.nativeElement),"lock"==s&&this.lockPopupDiv&&(o.element=this.lockPopupDiv.nativeElement),o.title=t,o.data=e,o.footer=i,r&&(o.template=r),this.currentComponent=this.domService.appendComponent(P,document.body,o),this.popupInstance=this.currentComponent.instance},i.prototype.closePopup=function(){this.currentComponent&&this.popupInstance.removeMe(this.currentComponent)},i.ctorParameters=function(){return[{type:I},{type:o.NgxUiLoaderService},{type:s.RATranslateService},{type:e.NgZone},{type:n.NotifierService},{type:e.Renderer2},{type:s.RAPermissionService},{type:s.DomService}]},u([e.ViewChild("ctlWidget",{static:!1}),y("design:type",e.ElementRef)],i.prototype,"ctlWidget",void 0),u([e.ViewChild("widgetDropdown",{static:!1}),y("design:type",e.ElementRef)],i.prototype,"widgetDropdown",void 0),u([e.ViewChild("searchInput",{static:!1}),y("design:type",e.ElementRef)],i.prototype,"searchInput",void 0),u([e.ViewChild("wcWrapper",{static:!1}),y("design:type",e.ElementRef)],i.prototype,"wcWrapper",void 0),u([e.ViewChild("banPopupDiv",{static:!1}),y("design:type",e.ElementRef)],i.prototype,"banPopupDiv",void 0),u([e.ViewChild("lockPopupDiv",{static:!1}),y("design:type",e.ElementRef)],i.prototype,"lockPopupDiv",void 0),u([e.Input("widget-instance-id"),y("design:type",Number)],i.prototype,"widgetInstanceId",void 0),u([e.Input("global-filter"),y("design:type",Object)],i.prototype,"globalFilter",void 0),u([e.Input("dashboard-info"),y("design:type",Object)],i.prototype,"dashboardInfo",void 0),u([e.Input("data"),y("design:type",Object)],i.prototype,"data",void 0),u([e.Input("event-bus"),y("design:type",C)],i.prototype,"raDashboardEventBus",void 0),u([e.Input("app-config"),y("design:type",Object)],i.prototype,"appConfig",void 0),u([e.Input("widget-width"),y("design:type",Number)],i.prototype,"width",void 0),u([e.Input("widget-height"),y("design:type",Number)],i.prototype,"height",void 0),u([e.Input("grid-cell-height"),y("design:type",Number)],i.prototype,"gridCellHeight",void 0),u([e.Input("bulk-action-data"),y("design:type",Object)],i.prototype,"bulkActionData",void 0),u([e.Output(),y("design:type",Object)],i.prototype,"widgetDeleted",void 0),u([e.Output(),y("design:type",Object)],i.prototype,"updateAppliedFilters",void 0),u([e.Input("dom-resized"),y("design:type",Boolean),y("design:paramtypes",[Boolean])],i.prototype,"setResized",null),i=u([e.Component({selector:"ra-widget-container",template:'<div #wcWrapper class="wc-wrapper" (mouseenter)="mouseHover(true)" (mouseleave)="mouseHover(false)"\r\n [ngStyle]="{\'margin-left\': noPadding?\'0px\':\'15px\',\'margin-right\': noPadding?\'0px\':\'15px\'}">\r\n <div class="wcheader widget-move" *ngIf="!hideTitle"\r\n [ngClass]="{\'underLine\': enableTitleLine || isWidgetStateApplicable}">\r\n <div class="col-md-12 wc-mover" style="padding-left: 0px;height:inherit;padding-right: 0px;">\r\n <div style="display:flex;margin-top:10px;"\r\n [ngStyle]="{\'margin-left\': noPadding?\'15px\':\'0px\',\'margin-right\': noPadding?\'15px\':\'0px\'}">\r\n <div class="col-9 float-left title-label">\r\n <ra-tooltip [value]="toolTipValue" [width]="toolTipWidth">\r\n <div [hidden]="hideTitle" style="text-overflow: ellipsis;white-space: nowrap;overflow: hidden;"\r\n (mouseover)="mouseOver($event)" #searchInput>{{WidgetDisplayName}}</div>\r\n </ra-tooltip>\r\n </div>\r\n <div class="col-3" style="cursor:default;padding-right: 0px;"> \r\n <div class="float-right" style="display: flex;">\r\n <div #banPopupDiv (mouseover)="openPopup(inapplicableIconTitle,inapplicableFilters,inapplicableIconFooter,\'innaplicable\')" (mouseout)="closePopup()" class="title-bar-lock-icon lock-dropdown" [hidden]="!inapplicableFilters || inapplicableFilters.length == 0 || !globalFilter || globalFilter == \'{}\'">\r\n <i class="fal fa-ban lock"></i> \r\n </div>\r\n <div #lockPopupDiv (mouseover)="openPopup(lockIconTitle,lockDetails,lockIconFooter,\'lock\',lockTemplateInfo)" (mouseout)="closePopup()" class="title-bar-lock-icon lock-dropdown" [hidden]="!lockDetails && !lockTemplateInfo">\r\n <i class="fal fa-lock lock"></i> \r\n </div>\r\n <div class="widget-menu" style="width:10px;"\r\n [ngClass]="{\'widget-menu-show\': isMouseHover && showSettingsLink}">\r\n <div class="dropbtn title-bar-icon">\r\n <i (click)="showDropDown($event)" #widgetDropdown class="fal fa-ellipsis-v widget-menu-ellipse"></i>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf="hideTitle" class="wcheader widget-move"\r\n style="height: 45px;width: 95%;cursor: move;z-index: 99;opacity: 0;">\r\n </div>\r\n <div *ngIf="hideTitle" class="widget-menu widget-menu-title-hidden" [ngClass]="{\'widget-menu-show\': isMouseHover && showSettingsLink}">\r\n <div class="dropbtn title-bar-icon">\r\n <i (click)="showDropDown($event)" class="fal fa-ellipsis-v" style="text-align: center;"></i>\r\n </div>\r\n </div>\r\n <div class="wcBody" [ngStyle]="{\'bottom\': noPadding?\'0px\':\'10px\',\'top\':hideTitle?\'10px\':\'46px\'}">\r\n <div [hidden]="isWidgetStateApplicable" class="m-fadeOut widget-overlay" [ngClass]="{\'m-fadeIn\': showPanel}">\r\n <div class="lds-roller">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n </div>\r\n </div>\r\n <div class="wc" [hidden]="isWidgetStateApplicable">\r\n <div #ctlWidget></div>\r\n </div>\r\n <div *ngIf="isWidgetStateApplicable" class="defaultConfig">\r\n <ra-widget-state style="width: 100%;height: 100%;" [isWidgetStateApplicable]="isWidgetStateApplicable"\r\n [isGlobalFilterApplied]="isGlobalFilterApplied" [widgetEmptyState]="widgetEmptyState"\r\n (editWidgetClicked)=editWidget() [widthCol]="width" [heightCol]="height">\r\n </ra-widget-state>\r\n </div>\r\n <div>\r\n </div>\r\n </div>\r\n</div>'}),y("design:paramtypes",[I,o.NgxUiLoaderService,s.RATranslateService,e.NgZone,n.NotifierService,e.Renderer2,s.RAPermissionService,s.DomService])],i)}(),E={position:{horizontal:{position:"right",distance:12},vertical:{position:"top",distance:12,gap:10}},theme:"material",behaviour:{autoHide:5e3,onClick:"hide",onMouseover:"pauseAutoHide",showDismissButton:!0,stacking:4},animations:{enabled:!0,show:{preset:"slide",speed:300,easing:"ease"},hide:{preset:"fade",speed:300,easing:"ease",offset:50},shift:{speed:300,easing:"ease"},overlap:150}};!function(t){t.Fit="fit",t.ScrollVertical="scrollVertical",t.ScrollHorizontal="scrollHorizontal",t.Fixed="fixed",t.VerticalFixed="verticalFixed",t.HorizontalFixed="horizontalFixed"}(x||(x={})),function(t){t.Always="always",t.OnDragAndResize="onDrag&Resize",t.None="none"}(k||(k={})),function(t){t.None="none",t.CompactUp="compactUp",t.CompactLeft="compactLeft",t.CompactUpAndLeft="compactUp&Left",t.CompactLeftAndUp="compactLeft&Up",t.CompactRight="compactRight",t.CompactUpAndRight="compactUp&Right",t.CompactRightAndUp="compactRight&Up"}($||($={}));var R,z,M,A,F,L,O,H,B,V={gridType:x.Fit,fixedColWidth:250,fixedRowHeight:250,keepFixedHeightInMobile:!1,keepFixedWidthInMobile:!1,setGridSize:!1,compactType:$.None,mobileBreakpoint:640,minCols:1,maxCols:100,minRows:1,maxRows:100,defaultItemCols:1,defaultItemRows:1,maxItemCols:50,maxItemRows:50,minItemCols:1,minItemRows:1,minItemArea:1,maxItemArea:2500,margin:10,outerMargin:!0,outerMarginTop:null,outerMarginRight:null,outerMarginBottom:null,outerMarginLeft:null,useTransformPositioning:!0,scrollSensitivity:10,scrollSpeed:20,initCallback:void 0,destroyCallback:void 0,gridSizeChangedCallback:void 0,itemChangeCallback:void 0,itemResizeCallback:void 0,itemInitCallback:void 0,itemRemovedCallback:void 0,itemValidateCallback:void 0,enableEmptyCellClick:!1,enableEmptyCellContextMenu:!1,enableEmptyCellDrop:!1,enableEmptyCellDrag:!1,emptyCellClickCallback:void 0,emptyCellContextMenuCallback:void 0,emptyCellDropCallback:void 0,emptyCellDragCallback:void 0,emptyCellDragMaxCols:50,emptyCellDragMaxRows:50,ignoreMarginInRow:!1,draggable:{delayStart:0,enabled:!1,ignoreContentClass:"gridster-item-content",ignoreContent:!1,dragHandleClass:"drag-handler",stop:void 0,start:void 0,dropOverItems:!1,dropOverItemsCallback:void 0},resizable:{delayStart:0,enabled:!1,handles:{s:!0,e:!0,n:!0,w:!0,se:!0,ne:!0,sw:!0,nw:!0},stop:void 0,start:void 0},swap:!0,pushItems:!1,disablePushOnDrag:!1,disablePushOnResize:!1,pushDirections:{north:!0,east:!0,south:!0,west:!0},pushResizeItems:!1,displayGrid:k.OnDragAndResize,disableWindowResize:!1,disableWarnings:!1,scrollToNewItems:!1,disableAutoPositionOnConflict:!1},N=function(){function t(){}var i;return i=t,t.merge=function(t,e,s){for(var r in e)void 0!==e[r]&&s.hasOwnProperty(r)&&("object"==typeof e[r]?t[r]=i.merge(t[r],e[r],s[r]):t[r]=e[r]);return t},t.debounce=function(t,e){var i;return function(){var s=this,r=arguments,o=function(){i=null,t.apply(s,r)};clearTimeout(i),i=setTimeout(o,e)}},t.checkTouchEvent=function(t){void 0===t.clientX&&t.touches&&(t.touches&&t.touches.length?(t.clientX=t.touches[0].clientX,t.clientY=t.touches[0].clientY):t.changedTouches&&t.changedTouches.length&&(t.clientX=t.changedTouches[0].clientX,t.clientY=t.changedTouches[0].clientY))},t.checkContentClassForEvent=function(t,e){if(t.$options.draggable.ignoreContent){if(!i.checkContentClass(e.target,e.currentTarget,t.$options.draggable.dragHandleClass))return!0}else if(i.checkContentClass(e.target,e.currentTarget,t.$options.draggable.ignoreContentClass))return!0;return!1},t.checkContentClassForEmptyCellClickEvent=function(t,e){return i.checkContentClass(e.target,e.currentTarget,t.$options.draggable.ignoreContentClass)||i.checkContentClass(e.target,e.currentTarget,t.$options.draggable.dragHandleClass)},t.checkContentClass=function(t,e,s){return!(!t||t===e)&&(!!(t.hasAttribute("class")&&t.getAttribute("class").split(" ").indexOf(s)>-1)||i.checkContentClass(t.parentNode,e,s))},t.compareItems=function(t,e){return t.y>e.y?-1:t.y<e.y?1:t.x>e.x?-1:1},t=i=u([e.Injectable()],t)}(),j=function(){},G=function(){function t(t){this.gridster=t}return t.prototype.destroy=function(){delete this.initialItem,delete this.gridster.movingItem,this.gridster.previewStyle&&this.gridster.previewStyle(),delete this.gridster,this.emptyCellExit&&(this.emptyCellExit(),this.emptyCellExit=null)},t.prototype.updateOptions=function(){var t=this;this.gridster.$options.enableEmptyCellClick&&!this.emptyCellClick&&this.gridster.options.emptyCellClickCallback?(this.emptyCellClick=this.gridster.renderer.listen(this.gridster.el,"click",this.emptyCellClickCb.bind(this)),this.emptyCellClickTouch=this.gridster.renderer.listen(this.gridster.el,"touchend",this.emptyCellClickCb.bind(this))):!this.gridster.$options.enableEmptyCellClick&&this.emptyCellClick&&this.emptyCellClickTouch&&(this.emptyCellClick(),this.emptyCellClickTouch(),this.emptyCellClick=null,this.emptyCellClickTouch=null),this.gridster.$options.enableEmptyCellContextMenu&&!this.emptyCellContextMenu&&this.gridster.options.emptyCellContextMenuCallback?this.emptyCellContextMenu=this.gridster.renderer.listen(this.gridster.el,"contextmenu",this.emptyCellContextMenuCb.bind(this)):!this.gridster.$options.enableEmptyCellContextMenu&&this.emptyCellContextMenu&&(this.emptyCellContextMenu(),this.emptyCellContextMenu=null),this.gridster.$options.enableEmptyCellDrop&&!this.emptyCellDrop&&this.gridster.options.emptyCellDropCallback?(this.emptyCellDrop=this.gridster.renderer.listen(this.gridster.el,"drop",this.emptyCellDragDrop.bind(this)),this.gridster.zone.runOutsideAngular((function(){t.emptyCellMove=t.gridster.renderer.listen(t.gridster.el,"dragover",t.emptyCellDragOver.bind(t))})),this.emptyCellExit=this.gridster.renderer.listen("document","dragend",(function(){t.gridster.movingItem=null,t.gridster.previewStyle()}))):!this.gridster.$options.enableEmptyCellDrop&&this.emptyCellDrop&&this.emptyCellMove&&this.emptyCellExit&&(this.emptyCellDrop(),this.emptyCellMove(),this.emptyCellExit(),this.emptyCellMove=null,this.emptyCellDrop=null,this.emptyCellExit=null),this.gridster.$options.enableEmptyCellDrag&&!this.emptyCellDrag&&this.gridster.options.emptyCellDragCallback?(this.emptyCellDrag=this.gridster.renderer.listen(this.gridster.el,"mousedown",this.emptyCellMouseDown.bind(this)),this.emptyCellDragTouch=this.gridster.renderer.listen(this.gridster.el,"touchstart",this.emptyCellMouseDown.bind(this))):!this.gridster.$options.enableEmptyCellDrag&&this.emptyCellDrag&&this.emptyCellDragTouch&&(this.emptyCellDrag(),this.emptyCellDragTouch(),this.emptyCellDrag=null,this.emptyCellDragTouch=null)},t.prototype.emptyCellClickCb=function(t){if(!this.gridster.movingItem&&!N.checkContentClassForEmptyCellClickEvent(this.gridster,t)){var e=this.getValidItemFromEvent(t);e&&(this.gridster.options.emptyCellClickCallback&&this.gridster.options.emptyCellClickCallback(t,e),this.gridster.cdRef.markForCheck())}},t.prototype.emptyCellContextMenuCb=function(t){if(!this.gridster.movingItem&&!N.checkContentClassForEmptyCellClickEvent(this.gridster,t)){t.preventDefault(),t.stopPropagation();var e=this.getValidItemFromEvent(t);e&&(this.gridster.options.emptyCellContextMenuCallback&&this.gridster.options.emptyCellContextMenuCallback(t,e),this.gridster.cdRef.markForCheck())}},t.prototype.emptyCellDragDrop=function(t){var e=this.getValidItemFromEvent(t);e&&(this.gridster.options.emptyCellDropCallback&&this.gridster.options.emptyCellDropCallback(t,e),this.gridster.cdRef.markForCheck())},t.prototype.emptyCellDragOver=function(t){t.preventDefault(),t.stopPropagation();var e=this.getValidItemFromEvent(t);e?(t.dataTransfer.dropEffect="move",this.gridster.movingItem=e):(t.dataTransfer.dropEffect="none",this.gridster.movingItem=null),this.gridster.previewStyle()},t.prototype.emptyCellMouseDown=function(t){var e=this;if(!N.checkContentClassForEmptyCellClickEvent(this.gridster,t)){t.preventDefault(),t.stopPropagation();var i=this.getValidItemFromEvent(t);i&&1===t.buttons&&(this.initialItem=i,this.gridster.movingItem=i,this.gridster.previewStyle(),this.gridster.zone.runOutsideAngular((function(){e.emptyCellMMove=e.gridster.renderer.listen("window","mousemove",e.emptyCellMouseMove.bind(e)),e.emptyCellMMoveTouch=e.gridster.renderer.listen("window","touchmove",e.emptyCellMouseMove.bind(e))})),this.emptyCellUp=this.gridster.renderer.listen("window","mouseup",this.emptyCellMouseUp.bind(this)),this.emptyCellUpTouch=this.gridster.renderer.listen("window","touchend",this.emptyCellMouseUp.bind(this)))}},t.prototype.emptyCellMouseMove=function(t){t.preventDefault(),t.stopPropagation();var e=this.getValidItemFromEvent(t,this.initialItem);e&&(this.gridster.movingItem=e,this.gridster.previewStyle())},t.prototype.emptyCellMouseUp=function(t){var e=this;this.emptyCellMMove(),this.emptyCellMMoveTouch(),this.emptyCellUp(),this.emptyCellUpTouch();var i=this.getValidItemFromEvent(t,this.initialItem);i&&(this.gridster.movingItem=i),this.gridster.options.emptyCellDragCallback&&this.gridster.movingItem&&this.gridster.options.emptyCellDragCallback(t,this.gridster.movingItem),setTimeout((function(){e.initialItem=null,e.gridster&&(e.gridster.movingItem=null,e.gridster.previewStyle())})),this.gridster.cdRef.markForCheck()},t.prototype.getValidItemFromEvent=function(t,e){t.preventDefault(),t.stopPropagation(),N.checkTouchEvent(t);var i=this.gridster.el.getBoundingClientRect(),s=t.clientX+this.gridster.el.scrollLeft-i.left-this.gridster.$options.margin,r=t.clientY+this.gridster.el.scrollTop-i.top-this.gridster.$options.margin,o={x:this.gridster.pixelsToPositionX(s,Math.floor,!0),y:this.gridster.pixelsToPositionY(r,Math.floor,!0),cols:this.gridster.$options.defaultItemCols,rows:this.gridster.$options.defaultItemRows};if(e&&(o.cols=Math.min(Math.abs(e.x-o.x)+1,this.gridster.$options.emptyCellDragMaxCols),o.rows=Math.min(Math.abs(e.y-o.y)+1,this.gridster.$options.emptyCellDragMaxRows),e.x<o.x?o.x=e.x:e.x-o.x>this.gridster.$options.emptyCellDragMaxCols-1&&(o.x=this.gridster.movingItem?this.gridster.movingItem.x:0),e.y<o.y?o.y=e.y:e.y-o.y>this.gridster.$options.emptyCellDragMaxRows-1&&(o.y=this.gridster.movingItem?this.gridster.movingItem.y:0)),!this.gridster.checkCollision(o))return o},t.ctorParameters=function(){return[{type:j}]},t=u([e.Injectable(),y("design:paramtypes",[j])],t)}(),U=function(){function t(t){this.gridster=t}return t.prototype.destroy=function(){delete this.gridster},t.prototype.checkCompact=function(){this.gridster.$options.compactType!==$.None&&(this.gridster.$options.compactType===$.CompactUp?this.checkCompactUp():this.gridster.$options.compactType===$.CompactLeft?this.checkCompactLeft():this.gridster.$options.compactType===$.CompactUpAndLeft?(this.checkCompactUp(),this.checkCompactLeft()):this.gridster.$options.compactType===$.CompactLeftAndUp?(this.checkCompactLeft(),this.checkCompactUp()):this.gridster.$options.compactType===$.CompactRight?this.checkCompactRight():this.gridster.$options.compactType===$.CompactUpAndRight?(this.checkCompactUp(),this.checkCompactRight()):this.gridster.$options.compactType===$.CompactRightAndUp&&(this.checkCompactRight(),this.checkCompactUp()))},t.prototype.checkCompactItem=function(t){this.gridster.$options.compactType!==$.None&&(this.gridster.$options.compactType===$.CompactUp?this.moveUpTillCollision(t):this.gridster.$options.compactType===$.CompactLeft?this.moveLeftTillCollision(t):this.gridster.$options.compactType===$.CompactUpAndLeft?(this.moveUpTillCollision(t),this.moveLeftTillCollision(t)):this.gridster.$options.compactType===$.CompactLeftAndUp?(this.moveLeftTillCollision(t),this.moveUpTillCollision(t)):this.gridster.$options.compactType===$.CompactUpAndRight&&(this.moveUpTillCollision(t),this.moveRightTillCollision(t)))},t.prototype.checkCompactUp=function(){for(var t,e=!1,i=this.gridster.grid.length,s=0;s<i;s++)!1!==(t=this.gridster.grid[s]).$item.compactEnabled&&this.moveUpTillCollision(t.$item)&&(e=!0,t.item.y=t.$item.y,t.itemChanged());e&&this.checkCompact()},t.prototype.moveUpTillCollision=function(t){return t.y-=1,this.gridster.checkCollision(t)?(t.y+=1,!1):(this.moveUpTillCollision(t),!0)},t.prototype.checkCompactLeft=function(){for(var t,e=!1,i=this.gridster.grid.length,s=0;s<i;s++)!1!==(t=this.gridster.grid[s]).$item.compactEnabled&&this.moveLeftTillCollision(t.$item)&&(e=!0,t.item.x=t.$item.x,t.itemChanged());e&&this.checkCompact()},t.prototype.checkCompactRight=function(){for(var t,e=!1,i=this.gridster.grid.length,s=0;s<i;s++)!1!==(t=this.gridster.grid[s]).$item.compactEnabled&&this.moveRightTillCollision(t.$item)&&(e=!0,t.item.x=t.$item.x,t.itemChanged());e&&this.checkCompact()},t.prototype.moveLeftTillCollision=function(t){return t.x-=1,this.gridster.checkCollision(t)?(t.x+=1,!1):(this.moveLeftTillCollision(t),!0)},t.prototype.moveRightTillCollision=function(t){return t.x+=1,this.gridster.checkCollision(t)?(t.x-=1,!1):(this.moveRightTillCollision(t),!0)},t.ctorParameters=function(){return[{type:j}]},t=u([e.Injectable(),y("design:paramtypes",[j])],t)}(),X=function(){function t(t){this.gridster=t}return t.prototype.destroy=function(){delete this.gridster},t.prototype.updateItem=function(t,e,i){if(this.gridster.mobile)this.clearCellPosition(i,t),this.gridster.$options.keepFixedHeightInMobile?i.setStyle(t,"height",e.rows*this.gridster.$options.fixedRowHeight+"px"):i.setStyle(t,"height",this.gridster.curWidth/2*e.rows+"px"),this.gridster.$options.keepFixedWidthInMobile?i.setStyle(t,"width",this.gridster.$options.fixedColWidth+"px"):i.setStyle(t,"width",""),i.setStyle(t,"margin-bottom",this.gridster.$options.margin+"px"),i.setStyle(t,"margin-right","");else{var s=Math.round(this.gridster.curColWidth*e.x),r=Math.round(this.gridster.curRowHeight*e.y),o=this.gridster.curColWidth*e.cols-this.gridster.$options.margin,n=this.gridster.curRowHeight*e.rows-this.gridster.$options.margin;this.setCellPosition(i,t,s,r),i.setStyle(t,"width",o+"px"),i.setStyle(t,"height",n+"px");var d=null,a=null;this.gridster.$options.outerMargin&&(this.gridster.rows===e.rows+e.y&&(d=null!==this.gridster.$options.outerMarginBottom?this.gridster.$options.outerMarginBottom+"px":this.gridster.$options.margin+"px"),this.gridster.columns===e.cols+e.x&&(a=null!==this.gridster.$options.outerMarginBottom?this.gridster.$options.outerMarginRight+"px":this.gridster.$options.margin+"px")),i.setStyle(t,"margin-bottom",d),i.setStyle(t,"margin-right",a)}},t.prototype.updateGridster=function(){var t="",e="",i="",s="";this.gridster.$options.gridType===x.Fit?(t=x.Fit,e=x.ScrollVertical,i=x.ScrollHorizontal,s=x.Fixed):this.gridster.$options.gridType===x.ScrollVertical?(this.gridster.curRowHeight=this.gridster.curColWidth,t=x.ScrollVertical,e=x.Fit,i=x.ScrollHorizontal,s=x.Fixed):this.gridster.$options.gridType===x.ScrollHorizontal?(this.gridster.curColWidth=this.gridster.curRowHeight,t=x.ScrollHorizontal,e=x.Fit,i=x.ScrollVertical,s=x.Fixed):this.gridster.$options.gridType===x.Fixed?(this.gridster.curColWidth=this.gridster.$options.fixedColWidth+(this.gridster.$options.ignoreMarginInRow?0:this.gridster.$options.margin),this.gridster.curRowHeight=this.gridster.$options.fixedRowHeight+(this.gridster.$options.ignoreMarginInRow?0:this.gridster.$options.margin),t=x.Fixed,e=x.Fit,i=x.ScrollVertical,s=x.ScrollHorizontal):this.gridster.$options.gridType===x.VerticalFixed?(this.gridster.curRowHeight=this.gridster.$options.fixedRowHeight+(this.gridster.$options.ignoreMarginInRow?0:this.gridster.$options.margin),t=x.ScrollVertical,e=x.Fit,i=x.ScrollHorizontal,s=x.Fixed):this.gridster.$options.gridType===x.HorizontalFixed&&(this.gridster.curColWidth=this.gridster.$options.fixedColWidth+(this.gridster.$options.ignoreMarginInRow?0:this.gridster.$options.margin),t=x.ScrollHorizontal,e=x.Fit,i=x.ScrollVertical,s=x.Fixed),this.gridster.mobile?this.gridster.renderer.removeClass(this.gridster.el,t):this.gridster.renderer.addClass(this.gridster.el,t),this.gridster.renderer.removeClass(this.gridster.el,e),this.gridster.renderer.removeClass(this.gridster.el,i),this.gridster.renderer.removeClass(this.gridster.el,s)},t.prototype.getGridColumnStyle=function(t){return m({},this.getLeftPosition(this.gridster.curColWidth*t),{width:this.gridster.curColWidth-this.gridster.$options.margin+"px",height:this.gridster.gridRows.length*this.gridster.curRowHeight-this.gridster.$options.margin+"px"})},t.prototype.getGridRowStyle=function(t){return m({},this.getTopPosition(this.gridster.curRowHeight*t),{width:this.gridster.gridColumns.length*this.gridster.curColWidth-this.gridster.$options.margin+"px",height:this.gridster.curRowHeight-this.gridster.$options.margin+"px"})},t.prototype.getLeftPosition=function(t){return this.gridster.$options.useTransformPositioning?{transform:"translateX("+t+"px)"}:{left:this.getLeftMargin()+t+"px"}},t.prototype.getTopPosition=function(t){return this.gridster.$options.useTransformPositioning?{transform:"translateY("+t+"px)"}:{top:this.getTopMargin()+t+"px"}},t.prototype.clearCellPosition=function(t,e){this.gridster.$options.useTransformPositioning?t.setStyle(e,"transform",""):(t.setStyle(e,"top",""),t.setStyle(e,"left",""))},t.prototype.setCellPosition=function(t,e,i,s){if(this.gridster.$options.useTransformPositioning){var r="translate3d("+i+"px, "+s+"px, 0)";t.setStyle(e,"transform",r)}else t.setStyle(e,"left",this.getLeftMargin()+i+"px"),t.setStyle(e,"top",this.getTopMargin()+s+"px")},t.prototype.getLeftMargin=function(){return this.gridster.$options.outerMargin?null!==this.gridster.$options.outerMarginLeft?this.gridster.$options.outerMarginLeft:this.gridster.$options.margin:0},t.prototype.getTopMargin=function(){return this.gridster.$options.outerMargin?null!==this.gridster.$options.outerMarginTop?this.gridster.$options.outerMarginTop:this.gridster.$options.margin:0},t.ctorParameters=function(){return[{type:j}]},t=u([e.Injectable(),y("design:paramtypes",[j])],t)}(),Y=function(){function t(t,e,i,s){this.renderer=e,this.cdRef=i,this.zone=s,this.gridColumns=[],this.gridRows=[],this.el=t.nativeElement,this.$options=JSON.parse(JSON.stringify(V)),this.calculateLayoutDebounce=N.debounce(this.calculateLayout.bind(this),0),this.mobile=!1,this.curWidth=0,this.curHeight=0,this.grid=[],this.curColWidth=0,this.curRowHeight=0,this.dragInProgress=!1,this.emptyCell=new G(this),this.compact=new U(this),this.gridRenderer=new X(this)}var i;return i=t,t.checkCollisionTwoItems=function(t,e){return t.x<e.x+e.cols&&t.x+t.cols>e.x&&t.y<e.y+e.rows&&t.y+t.rows>e.y},t.prototype.ngOnInit=function(){this.options.initCallback&&this.options.initCallback(this)},t.prototype.ngOnChanges=function(t){t.options&&(this.setOptions(),this.options.api={optionsChanged:this.optionsChanged.bind(this),resize:this.onResize.bind(this),getNextPossiblePosition:this.getNextPossiblePosition.bind(this),getFirstPossiblePosition:this.getFirstPossiblePosition.bind(this),getLastPossiblePosition:this.getLastPossiblePosition.bind(this),getCurrentRowHeight:this.getCurrentRowHeight.bind(this)},this.columns=this.$options.minCols,this.rows=this.$options.minRows,this.setGridSize(),this.calculateLayout())},t.prototype.getCurrentRowHeight=function(){return this.curRowHeight},t.prototype.resize=function(){var t,e;"fit"!==this.$options.gridType||this.mobile?(e=this.el.clientWidth,t=this.el.clientHeight):(e=this.el.offsetWidth,t=this.el.offsetHeight),e===this.curWidth&&t===this.curHeight||!this.checkIfToResize()||this.onResize()},t.prototype.setOptions=function(){this.$options=N.merge(this.$options,this.options,this.$options),this.$options.disableWindowResize||this.windowResize?this.$options.disableWindowResize&&this.windowResize&&(this.windowResize(),this.windowResize=null):this.windowResize=this.renderer.listen("window","resize",this.onResize.bind(this)),this.emptyCell.updateOptions()},t.prototype.optionsChanged=function(){this.setOptions();for(var t=this.grid.length-1;t>=0;t--)this.grid[t].updateOptions();this.calculateLayout()},t.prototype.ngOnDestroy=function(){this.windowResize&&this.windowResize(),this.options.destroyCallback&&this.options.destroyCallback(this),this.emptyCell.destroy(),delete this.emptyCell,this.compact.destroy(),delete this.compact},t.prototype.onResize=function(){this.setGridSize(),this.calculateLayout()},t.prototype.checkIfToResize=function(){var t=this.el.clientWidth,e=this.el.offsetWidth,i=this.el.scrollWidth,s=this.el.clientHeight,r=this.el.offsetHeight,o=this.el.scrollHeight;return!(t<e&&o>r&&o-r<e-t)&&!(s<r&&i>e&&i-e<r-s)},t.prototype.setGridSize=function(){var t=this.el,e=t.clientWidth,i=t.clientHeight;this.$options.setGridSize||"fit"===this.$options.gridType&&!this.mobile?(e=t.offsetWidth,i=t.offsetHeight):(e=t.clientWidth,i=t.clientHeight),this.curWidth=e,this.curHeight=i},t.prototype.setGridDimensions=function(){this.setGridSize(),!this.mobile&&this.$options.mobileBreakpoint>this.curWidth?(this.mobile=!this.mobile,this.renderer.addClass(this.el,"mobile")):this.mobile&&this.$options.mobileBreakpoint<this.curWidth&&(this.mobile=!this.mobile,this.renderer.removeClass(this.el,"mobile"));for(var t,e=this.$options.minRows,i=this.$options.minCols,s=this.grid.length-1;s>=0;s--)(t=this.grid[s]).notPlaced||(e=Math.max(e,t.$item.y+t.$item.rows),i=Math.max(i,t.$item.x+t.$item.cols));this.columns===i&&this.rows===e||(this.columns=i,this.rows=e,this.options.gridSizeChangedCallback&&this.options.gridSizeChangedCallback(this))},t.prototype.calculateLayout=function(){if(this.compact&&this.compact.checkCompact(),this.setGridDimensions(),this.$options.outerMargin){var t=-this.$options.margin;null!==this.$options.outerMarginLeft?(t+=this.$options.outerMarginLeft,this.renderer.setStyle(this.el,"padding-left",this.$options.outerMarginLeft+"px")):(t+=this.$options.margin,this.renderer.setStyle(this.el,"padding-left",this.$options.margin+"px")),null!==this.$options.outerMarginRight?(t+=this.$options.outerMarginRight,this.renderer.setStyle(this.el,"padding-right",this.$options.outerMarginRight+"px")):(t+=this.$options.margin,this.renderer.setStyle(this.el,"padding-right",this.$options.margin+"px")),this.curColWidth=(this.curWidth-t)/this.columns;var e=-this.$options.margin;null!==this.$options.outerMarginTop?(e+=this.$options.outerMarginTop,this.renderer.setStyle(this.el,"padding-top",this.$options.outerMarginTop+"px")):(e+=this.$options.margin,this.renderer.setStyle(this.el,"padding-top",this.$options.margin+"px")),null!==this.$options.outerMarginBottom?(e+=this.$options.outerMarginBottom,this.renderer.setStyle(this.el,"padding-bottom",this.$options.outerMarginBottom+"px")):(e+=this.$options.margin,this.renderer.setStyle(this.el,"padding-bottom",this.$options.margin+"px")),this.curRowHeight=(this.curHeight-e)/this.rows}else this.curColWidth=(this.curWidth+this.$options.margin)/this.columns,this.curRowHeight=(this.curHeight+this.$options.margin)/this.rows,this.renderer.setStyle(this.el,"padding-left","0px"),this.renderer.setStyle(this.el,"padding-right","0px"),this.renderer.setStyle(this.el,"padding-top","0px"),this.renderer.setStyle(this.el,"padding-bottom","0px");this.gridRenderer.updateGridster(),this.updateGrid(),this.$options.setGridSize?(this.renderer.setStyle(this.el,"width",this.columns*this.curColWidth+this.$options.margin+"px"),this.renderer.setStyle(this.el,"height",this.rows*this.curRowHeight+this.$options.margin+"px")):(this.renderer.setStyle(this.el,"width",""),this.renderer.setStyle(this.el,"height",""));for(var i,s=this.grid.length-1;s>=0;s--)(i=this.grid[s]).setSize(),i.drag.toggle(),i.resize.toggle();setTimeout(this.resize.bind(this),100)},t.prototype.updateGrid=function(){"always"!==this.$options.displayGrid||this.mobile?"onDrag&Resize"===this.$options.displayGrid&&this.dragInProgress?this.renderer.addClass(this.el,"display-grid"):"none"!==this.$options.displayGrid&&this.dragInProgress&&!this.mobile||this.renderer.removeClass(this.el,"display-grid"):this.renderer.addClass(this.el,"display-grid"),this.setGridDimensions(),this.gridColumns.length=Math.max(this.columns,Math.floor(this.curWidth/this.curColWidth))||0,this.gridRows.length=Math.max(this.rows,Math.floor(this.curHeight/this.curRowHeight))||0,this.cdRef.markForCheck()},t.prototype.addItem=function(t){void 0===t.$item.cols&&(t.$item.cols=this.$options.defaultItemCols,t.item.cols=t.$item.cols,t.itemChanged()),void 0===t.$item.rows&&(t.$item.rows=this.$options.defaultItemRows,t.item.rows=t.$item.rows,t.itemChanged()),-1===t.$item.x||-1===t.$item.y?this.autoPositionItem(t):this.checkCollision(t.$item)&&(this.$options.disableWarnings||(t.notPlaced=!0,console.warn("Can't be placed in the bounds of the dashboard, trying to auto position!/n"+JSON.stringify(t.item,["cols","rows","x","y"]))),this.$options.disableAutoPositionOnConflict?t.notPlaced=!0:this.autoPositionItem(t)),this.grid.push(t),this.calculateLayoutDebounce()},t.prototype.removeItem=function(t){this.grid.splice(this.grid.indexOf(t),1),this.calculateLayoutDebounce(),this.options.itemRemovedCallback&&this.options.itemRemovedCallback(t.item,t)},t.prototype.checkCollision=function(t){var e=!1;if(this.options.itemValidateCallback&&(e=!this.options.itemValidateCallback(t)),!e&&this.checkGridCollision(t)&&(e=!0),!e){var i=this.findItemWithItem(t);i&&(e=i)}return e},t.prototype.checkGridCollision=function(t){var e=t.y>-1&&t.x>-1,i=t.cols+t.x<=this.$options.maxCols,s=t.rows+t.y<=this.$options.maxRows,r=void 0===t.maxItemCols?this.$options.maxItemCols:t.maxItemCols,o=void 0===t.minItemCols?this.$options.minItemCols:t.minItemCols,n=void 0===t.maxItemRows?this.$options.maxItemRows:t.maxItemRows,d=void 0===t.minItemRows?this.$options.minItemRows:t.minItemRows,a=t.cols<=r&&t.cols>=o,h=t.rows<=n&&t.rows>=d,l=void 0===t.minItemArea?this.$options.minItemArea:t.minItemArea,p=void 0===t.maxItemArea?this.$options.maxItemArea:t.maxItemArea,g=t.cols*t.rows;return!(e&&i&&s&&a&&h&&l<=g&&p>=g)},t.prototype.findItemWithItem=function(t){for(var e,s=this.grid.length-1;s>-1;s--)if((e=this.grid[s]).$item!==t&&i.checkCollisionTwoItems(e.$item,t))return e;return!1},t.prototype.findItemsWithItem=function(t){for(var e,s=[],r=this.grid.length-1;r>-1;r--)(e=this.grid[r]).$item!==t&&i.checkCollisionTwoItems(e.$item,t)&&s.push(e);return s},t.prototype.autoPositionItem=function(t){this.getNextPossiblePosition(t.$item)?(t.notPlaced=!1,t.item.x=t.$item.x,t.item.y=t.$item.y,t.itemChanged()):(t.notPlaced=!0,this.$options.disableWarnings||console.warn("Can't be placed in the bounds of the dashboard!/n"+JSON.stringify(t.item,["cols","rows","x","y"])))},t.prototype.getNextPossiblePosition=function(t,e){void 0===e&&(e={}),-1===t.cols&&(t.cols=this.$options.defaultItemCols),-1===t.rows&&(t.rows=this.$options.defaultItemRows),this.setGridDimensions();for(var i,s=e.y||0;s<this.rows;s++)for(t.y=s,i=e.x||0;i<this.columns;i++)if(t.x=i,!this.checkCollision(t))return!0;var r=this.$options.maxRows>=this.rows+t.rows,o=this.$options.maxCols>=this.columns+t.cols;return!(this.rows<=this.columns&&r)&&o?(t.x=this.columns,t.y=0,!0):!!r&&(t.y=this.rows,t.x=0,!0)},t.prototype.getFirstPossiblePosition=function(t){var e=Object.assign({},t);return this.getNextPossiblePosition(e),e},t.prototype.getLastPossiblePosition=function(t){var e={y:0,x:0};e=this.grid.reduce((function(t,e){var i={y:e.$item.y+e.$item.rows-1,x:e.$item.x+e.$item.cols-1};return 1===N.compareItems(t,i)?i:t}),e);var i=Object.assign({},t);return this.getNextPossiblePosition(i,e),i},t.prototype.pixelsToPositionX=function(t,e,i){var s=e(t/this.curColWidth);return i?s:Math.max(s,0)},t.prototype.pixelsToPositionY=function(t,e,i){var s=e(t/this.curRowHeight);return i?s:Math.max(s,0)},t.prototype.positionXToPixels=function(t){return t*this.curColWidth},t.prototype.positionYToPixels=function(t){return t*this.curRowHeight},t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2},{type:e.ChangeDetectorRef},{type:e.NgZone}]},u([e.Input(),y("design:type",Object)],t.prototype,"options",void 0),t=i=u([e.Component({selector:"gridster",template:'<div class="gridster-column" *ngFor="let column of gridColumns; let i = index;"\r\n [ngStyle]="gridRenderer.getGridColumnStyle(i)"></div>\r\n<div class="gridster-row" *ngFor="let row of gridRows; let i = index;"\r\n [ngStyle]="gridRenderer.getGridRowStyle(i)"></div>\r\n<ng-content></ng-content>\r\n<gridster-preview class="gridster-preview"></gridster-preview>\r\n',encapsulation:e.ViewEncapsulation.None,styles:["gridster{clear:both;position:relative;box-sizing:border-box;background:#fff;width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;display:block;overflow:auto}gridster.fit{overflow-x:hidden;overflow-y:hidden}gridster.scrollVertical{overflow-x:hidden;overflow-y:auto}gridster.scrollHorizontal{overflow-x:auto;overflow-y:hidden}gridster.fixed{overflow:auto}gridster.mobile{overflow-x:hidden;overflow-y:auto;flex-flow:column}gridster.mobile gridster-item{position:relative;width:100%!important;min-height:300px!important}gridster .gridster-column,gridster .gridster-row{position:absolute;display:none;transition:.3s;box-sizing:border-box}gridster.display-grid .gridster-column,gridster.display-grid .gridster-row{display:block}gridster .gridster-column{border-left:1px solid #ccc;border-right:1px solid #ccc}gridster .gridster-row{border-top:1px solid #ccc;border-bottom:1px solid #ccc}"]}),y("design:paramtypes",[e.ElementRef,e.Renderer2,e.ChangeDetectorRef,e.NgZone])],t)}(),_=function(){},q=function(){function t(t){this.gridsterItem=t,this.gridster=t.gridster}return t.prototype.destroy=function(){delete this.gridster,delete this.gridsterItem,delete this.swapedItem},t.prototype.swapItems=function(){this.gridster.$options.swap&&(this.checkSwapBack(),this.checkSwap(this.gridsterItem))},t.prototype.checkSwapBack=function(){if(this.swapedItem){var t=this.swapedItem.$item.x,e=this.swapedItem.$item.y;this.swapedItem.$item.x=this.swapedItem.item.x||0,this.swapedItem.$item.y=this.swapedItem.item.y||0,this.gridster.checkCollision(this.swapedItem.$item)?(this.swapedItem.$item.x=t,this.swapedItem.$item.y=e):(this.swapedItem.setSize(),this.gridsterItem.$item.x=this.gridsterItem.item.x||0,this.gridsterItem.$item.y=this.gridsterItem.item.y||0,this.swapedItem=void 0)}},t.prototype.restoreSwapItem=function(){this.swapedItem&&(this.swapedItem.$item.x=this.swapedItem.item.x||0,this.swapedItem.$item.y=this.swapedItem.item.y||0,this.swapedItem.setSize(),this.swapedItem=void 0)},t.prototype.setSwapItem=function(){this.swapedItem&&(this.swapedItem.checkItemChanges(this.swapedItem.$item,this.swapedItem.item),this.swapedItem=void 0)},t.prototype.checkSwap=function(t){var e=this.gridster.checkCollision(t.$item);if(e&&!0!==e&&e.canBeDragged()){var i=e,s=i.$item.x,r=i.$item.y,o=t.$item.x,n=t.$item.y;i.$item.x=t.item.x||0,i.$item.y=t.item.y||0,t.$item.x=i.item.x||0,t.$item.y=i.item.y||0,this.gridster.checkCollision(i.$item)||this.gridster.checkCollision(t.$item)?(t.$item.x=o,t.$item.y=n,i.$item.x=s,i.$item.y=r):(i.setSize(),this.swapedItem=i)}},t.ctorParameters=function(){return[{type:_}]},t=u([e.Injectable(),y("design:paramtypes",[_])],t)}();function Z(t,e,i,s,r,o,n,d,a,h){R=t.$options.scrollSensitivity,z=t.$options.scrollSpeed,M=t.el,A=a,F=h;var l=M.offsetWidth,p=M.offsetHeight,g=M.scrollLeft,c=M.scrollTop,m=i-c,u=p+c-i-r;if(n.clientY<o.clientY&&u<R){if(ot(),A&&F&&!F.s||B)return;B=J(1,d,n)}else if(n.clientY>o.clientY&&c>0&&m<R){if(rt(),A&&F&&!F.n||H)return;H=J(-1,d,n)}else n.clientY!==o.clientY&&et();var f=g+l-e-s,y=e-g;if(n.clientX<o.clientX&&f<=R){if(st(),A&&F&&!F.e||L)return;L=K(1,d,n)}else if(n.clientX>o.clientX&&g>0&&y<R){if(it(),A&&F&&!F.w||O)return;O=K(-1,d,n)}else n.clientX!==o.clientX&&tt()}function J(t,e,i){var s=i.clientY;return setInterval((function(){(!M||-1===t&&M.scrollTop-z<0)&&et(),M.scrollTop+=t*z,s+=t*z,e({clientX:i.clientX,clientY:s})}),50)}function K(t,e,i){var s=i.clientX;return setInterval((function(){(!M||-1===t&&M.scrollLeft-z<0)&&tt(),M.scrollLeft+=t*z,e({clientX:s+=t*z,clientY:i.clientY})}),50)}function Q(){tt(),et(),M=void 0}function tt(){it(),st()}function et(){ot(),rt()}function it(){L&&(clearInterval(L),L=0)}function st(){O&&(clearInterval(O),O=0)}function rt(){B&&(clearInterval(B),B=0)}function ot(){H&&(clearInterval(H),H=0)}var nt=function(){function t(t){this.pushedItems=[],this.pushedItemsTemp=[],this.pushedItemsTempPath=[],this.pushedItemsPath=[],this.gridsterItem=t,this.gridster=t.gridster,this.tryPattern={fromEast:[this.tryWest,this.trySouth,this.tryNorth,this.tryEast],fromWest:[this.tryEast,this.trySouth,this.tryNorth,this.tryWest],fromNorth:[this.trySouth,this.tryEast,this.tryWest,this.tryNorth],fromSouth:[this.tryNorth,this.tryEast,this.tryWest,this.trySouth]},this.fromSouth="fromSouth",this.fromNorth="fromNorth",this.fromEast="fromEast",this.fromWest="fromWest"}return t.prototype.destroy=function(){delete this.gridster,delete this.gridsterItem},t.prototype.pushItems=function(t,e){if(this.gridster.$options.pushItems&&!e){this.pushedItemsOrder=[];var i=this.push(this.gridsterItem,t);return i||this.restoreTempItems(),this.pushedItemsOrder=[],this.pushedItemsTemp=[],this.pushedItemsTempPath=[],i}return!1},t.prototype.restoreTempItems=function(){for(var t=this.pushedItemsTemp.length-1;t>-1;t--)this.removeFromTempPushed(this.pushedItemsTemp[t])},t.prototype.restoreItems=function(){for(var t,e=0,i=this.pushedItems.length;e<i;e++)(t=this.pushedItems[e]).$item.x=t.item.x||0,t.$item.y=t.item.y||0,t.setSize();this.pushedItems=[],this.pushedItemsPath=[]},t.prototype.setPushedItems=function(){for(var t,e=0,i=this.pushedItems.length;e<i;e++)(t=this.pushedItems[e]).checkItemChanges(t.$item,t.item);this.pushedItems=[],this.pushedItemsPath=[]},t.prototype.checkPushBack=function(){for(var t=this.pushedItems.length-1,e=!1;t>-1;t--)this.checkPushedItem(this.pushedItems[t],t)&&(e=!0);e&&this.checkPushBack()},t.prototype.push=function(t,e){if(this.gridster.checkGridCollision(t.$item))return!1;if(""===e)return!1;for(var i,s=this.gridster.findItemsWithItem(t.$item),r=s.length-1,o=!0,n=[];r>-1;r--){if((i=s[r])===this.gridsterItem){o=!1;break}if(!i.canBeDragged()){o=!1;break}if(this.pushedItemsTemp.find((function(t){return t.$item.x===i.$item.x&&t.$item.y===i.$item.y}))){o=!1;break}if(this.tryPattern[e][0].call(this,i,t))this.pushedItemsOrder.push(i),n.push(i);else if(this.tryPattern[e][1].call(this,i,t))this.pushedItemsOrder.push(i),n.push(i);else if(this.tryPattern[e][2].call(this,i,t))this.pushedItemsOrder.push(i),n.push(i);else{if(!this.tryPattern[e][3].call(this,i,t)){o=!1;break}this.pushedItemsOrder.push(i),n.push(i)}}if(!o&&(r=this.pushedItemsOrder.lastIndexOf(n[0]))>-1)for(var d=this.pushedItemsOrder.length-1;d>=r;d--)i=this.pushedItemsOrder[d],this.pushedItemsOrder.pop(),this.removeFromTempPushed(i),this.removeFromPushedItem(i);return o},t.prototype.trySouth=function(t,e){return!!this.gridster.$options.pushDirections.south&&(this.addToTempPushed(t),t.$item.y=e.$item.y+e.$item.rows,this.push(t,this.fromNorth)?(t.setSize(),this.addToPushed(t),!0):(this.removeFromTempPushed(t),!1))},t.prototype.tryNorth=function(t,e){return!!this.gridster.$options.pushDirections.north&&(this.addToTempPushed(t),t.$item.y=e.$item.y-t.$item.rows,this.push(t,this.fromSouth)?(t.setSize(),this.addToPushed(t),!0):(this.removeFromTempPushed(t),!1))},t.prototype.tryEast=function(t,e){return!!this.gridster.$options.pushDirections.east&&(this.addToTempPushed(t),t.$item.x=e.$item.x+e.$item.cols,this.push(t,this.fromWest)?(t.setSize(),this.addToPushed(t),!0):(this.removeFromTempPushed(t),!1))},t.prototype.tryWest=function(t,e){return!!this.gridster.$options.pushDirections.west&&(this.addToTempPushed(t),t.$item.x=e.$item.x-t.$item.cols,this.push(t,this.fromEast)?(t.setSize(),this.addToPushed(t),!0):(this.removeFromTempPushed(t),!1))},t.prototype.addToTempPushed=function(t){var e=this.pushedItemsTemp.indexOf(t);-1===e&&(e=this.pushedItemsTemp.push(t)-1,this.pushedItemsTempPath[e]=[]),this.pushedItemsTempPath[e].push({x:t.$item.x,y:t.$item.y})},t.prototype.removeFromTempPushed=function(t){var e=this.pushedItemsTemp.indexOf(t),i=this.pushedItemsTempPath[e].pop();i&&(t.$item.x=i.x,t.$item.y=i.y,t.setSize(),this.pushedItemsTempPath[e].length||(this.pushedItemsTemp.splice(e,1),this.pushedItemsTempPath.splice(e,1)))},t.prototype.addToPushed=function(t){if(this.pushedItems.indexOf(t)<0)this.pushedItems.push(t),this.pushedItemsPath.push([{x:t.item.x||0,y:t.item.y||0},{x:t.$item.x,y:t.$item.y}]);else{var e=this.pushedItems.indexOf(t);this.pushedItemsPath[e].push({x:t.$item.x,y:t.$item.y})}},t.prototype.removeFromPushed=function(t){t>-1&&(this.pushedItems.splice(t,1),this.pushedItemsPath.splice(t,1))},t.prototype.removeFromPushedItem=function(t){var e=this.pushedItems.indexOf(t);e>-1&&(this.pushedItemsPath[e].pop(),this.pushedItemsPath.length||(this.pushedItems.splice(e,1),this.pushedItemsPath.splice(e,1)))},t.prototype.checkPushedItem=function(t,e){for(var i,s,r,o=this.pushedItemsPath[e],n=o.length-2,d=!1;n>-1;n--)i=o[n],s=t.$item.x,r=t.$item.y,t.$item.x=i.x,t.$item.y=i.y,this.gridster.findItemWithItem(t.$item)?(t.$item.x=s,t.$item.y=r):(t.setSize(),o.splice(n+1,o.length-n-1),d=!0);return o.length<2&&this.removeFromPushed(e),d},t.ctorParameters=function(){return[{type:_}]},t=u([e.Injectable(),y("design:paramtypes",[_])],t)}(),dt=function(){function t(t,e,i){this.zone=i,this.collision=!1,this.gridsterItem=t,this.gridster=e,this.lastMouse={clientX:0,clientY:0},this.path=[]}return t.prototype.destroy=function(){this.gridster.previewStyle&&this.gridster.previewStyle(!0),delete this.gridsterItem,delete this.gridster,delete this.collision,this.mousedown&&(this.mousedown(),this.touchstart())},t.prototype.dragStart=function(t){var e=this;switch(t.which){case 1:break;case 2:case 3:return}this.gridster.options.draggable&&this.gridster.options.draggable.start&&this.gridster.options.draggable.start(this.gridsterItem.item,this.gridsterItem,t),t.stopPropagation(),t.preventDefault(),this.dragFunction=this.dragMove.bind(this),this.dragStopFunction=this.dragStop.bind(this),this.zone.runOutsideAngular((function(){e.mousemove=e.gridsterItem.renderer.listen("document","mousemove",e.dragFunction),e.touchmove=e.gridster.renderer.listen(e.gridster.el,"touchmove",e.dragFunction)})),this.mouseup=this.gridsterItem.renderer.listen("document","mouseup",this.dragStopFunction),this.mouseleave=this.gridsterItem.renderer.listen("document","mouseleave",this.dragStopFunction),this.cancelOnBlur=this.gridsterItem.renderer.listen("window","blur",this.dragStopFunction),this.touchend=this.gridsterItem.renderer.listen("document","touchend",this.dragStopFunction),this.touchcancel=this.gridsterItem.renderer.listen("document","touchcancel",this.dragStopFunction),this.gridsterItem.renderer.addClass(this.gridsterItem.el,"gridster-item-moving"),this.margin=this.gridster.$options.margin,this.offsetLeft=this.gridster.el.scrollLeft-this.gridster.el.offsetLeft,this.offsetTop=this.gridster.el.scrollTop-this.gridster.el.offsetTop,this.left=this.gridsterItem.left-this.margin,this.top=this.gridsterItem.top-this.margin,this.width=this.gridsterItem.width,this.height=this.gridsterItem.height,this.diffLeft=t.clientX+this.offsetLeft-this.margin-this.left,this.diffTop=t.clientY+this.offsetTop-this.margin-this.top,this.gridster.movingItem=this.gridsterItem.$item,this.gridster.previewStyle(!0),this.push=new nt(this.gridsterItem),this.swap=new q(this.gridsterItem),this.gridster.dragInProgress=!0,this.gridster.updateGrid(),this.path.push({x:this.gridsterItem.item.x||0,y:this.gridsterItem.item.y||0})},t.prototype.dragMove=function(t){t.stopPropagation(),t.preventDefault(),N.checkTouchEvent(t),this.offsetLeft=this.gridster.el.scrollLeft-this.gridster.el.offsetLeft,this.offsetTop=this.gridster.el.scrollTop-this.gridster.el.offsetTop,Z(this.gridster,this.left,this.top,this.width,this.height,t,this.lastMouse,this.calculateItemPositionFromMousePosition.bind(this)),this.calculateItemPositionFromMousePosition(t)},t.prototype.calculateItemPositionFromMousePosition=function(t){var e=this;this.left=t.clientX+this.offsetLeft-this.diffLeft,this.top=t.clientY+this.offsetTop-this.diffTop,this.calculateItemPosition(),this.lastMouse.clientX=t.clientX,this.lastMouse.clientY=t.clientY,this.zone.run((function(){e.gridster.updateGrid()}))},t.prototype.dragStop=function(t){var e=this;t.stopPropagation(),t.preventDefault(),Q(),this.cancelOnBlur(),this.mousemove(),this.mouseup(),this.mouseleave(),this.touchmove(),this.touchend(),this.touchcancel(),this.gridsterItem.renderer.removeClass(this.gridsterItem.el,"gridster-item-moving"),this.gridster.dragInProgress=!1,this.gridster.updateGrid(),this.path=[],this.gridster.options.draggable&&this.gridster.options.draggable.stop?Promise.resolve(this.gridster.options.draggable.stop(this.gridsterItem.item,this.gridsterItem,t)).then(this.makeDrag.bind(this),this.cancelDrag.bind(this)):this.makeDrag(),setTimeout((function(){e.gridster&&(e.gridster.movingItem=null,e.gridster.previewStyle(!0))}))},t.prototype.cancelDrag=function(){this.gridsterItem.$item.x=this.gridsterItem.item.x||0,this.gridsterItem.$item.y=this.gridsterItem.item.y||0,this.gridsterItem.setSize(),this.push&&this.push.restoreItems(),this.swap&&this.swap.restoreSwapItem(),this.push&&(this.push.destroy(),delete this.push),this.swap&&(this.swap.destroy(),delete this.swap)},t.prototype.makeDrag=function(){this.gridster.$options.draggable.dropOverItems&&this.gridster.options.draggable&&this.gridster.options.draggable.dropOverItemsCallback&&this.collision&&!0!==this.collision&&this.collision.$item&&this.gridster.options.draggable.dropOverItemsCallback(this.gridsterItem.item,this.collision.item,this.gridster),this.collision=!1,this.gridsterItem.setSize(),this.gridsterItem.checkItemChanges(this.gridsterItem.$item,this.gridsterItem.item),this.push&&this.push.setPushedItems(),this.swap&&this.swap.setSwapItem(),this.push&&(this.push.destroy(),delete this.push),this.swap&&(this.swap.destroy(),delete this.swap)},t.prototype.checkforavailableSpaceintheArea=function(){var t=this.gridsterItem.$item.rows,e=this.gridsterItem.$item.cols;this.gridsterItem.$item.x=this.positionX,this.gridsterItem.$item.y=this.positionY;var i=1;do{this.gridsterItem.$item.rows=t;for(var s=this.gridsterItem.$item.rows;s>=15;s--){if(!this.gridster.checkCollision(this.gridsterItem.$item)){i=2;break}var r=this.gridsterItem.$item.x,o=this.gridsterItem.$item.x;do{if(this.gridsterItem.$item.x=this.gridsterItem.$item.x-1,this.gridster.checkCollision(this.gridsterItem.$item)){this.gridsterItem.$item.x=o;var n=this.gridsterItem.$item.cols,d=this.gridsterItem.$item.cols;do{if(this.gridsterItem.$item.cols=this.gridsterItem.$item.cols+1,this.gridster.checkCollision(this.gridsterItem.$item)){this.gridsterItem.$item.cols=d;break}d=this.gridsterItem.$item.cols}while(this.gridsterItem.$item.cols-n<15);break}o=this.gridsterItem.$item.x}while(this.gridsterItem.$item.x>0);if(!this.gridster.checkCollision(this.gridsterItem.$item)){i=2;break}this.gridsterItem.$item.rows=this.gridsterItem.$item.rows-1,this.gridsterItem.$item.x=r}if(2==i)break;this.gridsterItem.$item.cols=this.gridsterItem.$item.cols-1}while(this.gridsterItem.$item.cols>=15);return 1==i&&(this.gridsterItem.$item.x=this.positionXBackup,this.gridsterItem.$item.y=this.positionYBackup,this.gridsterItem.$item.cols=e,this.gridsterItem.$item.rows=t),this.gridsterItem.$item},t.prototype.calculateItemPosition=function(){if(this.gridster.movingItem=this.gridsterItem.$item,this.positionX=this.gridster.pixelsToPositionX(this.left,Math.round),this.positionY=this.gridster.pixelsToPositionY(this.top,Math.round),this.positionXBackup=this.gridsterItem.$item.x,this.positionYBackup=this.gridsterItem.$item.y,this.gridsterItem.$item.x=this.positionX,this.gridster.checkGridCollision(this.gridsterItem.$item)&&(this.gridsterItem.$item.x=this.positionXBackup),this.gridsterItem.$item.y=this.positionY,this.gridster.checkGridCollision(this.gridsterItem.$item)&&(this.gridsterItem.$item.y=this.positionYBackup),this.gridster.options.autoResizeonDrag&&(this.gridsterItem.$item=this.checkforavailableSpaceintheArea(),this.gridsterItem.setSize()),this.gridster.gridRenderer.setCellPosition(this.gridsterItem.renderer,this.gridsterItem.el,this.left,this.top),this.positionXBackup!==this.gridsterItem.$item.x||this.positionYBackup!==this.gridsterItem.$item.y){var t=this.path[this.path.length-1],e="";t.x<this.gridsterItem.$item.x?e=this.push.fromWest:t.x>this.gridsterItem.$item.x?e=this.push.fromEast:t.y<this.gridsterItem.$item.y?e=this.push.fromNorth:t.y>this.gridsterItem.$item.y&&(e=this.push.fromSouth),this.push.pushItems(e,this.gridster.$options.disablePushOnDrag),this.swap.swapItems(),this.collision=this.gridster.checkCollision(this.gridsterItem.$item),this.collision?(this.gridsterItem.$item.x=this.positionXBackup,this.gridsterItem.$item.y=this.positionYBackup,this.gridster.$options.draggable.dropOverItems&&!0!==this.collision&&this.collision.$item&&(this.gridster.movingItem=null)):this.path.push({x:this.gridsterItem.$item.x,y:this.gridsterItem.$item.y}),this.push.checkPushBack()}this.gridster.previewStyle(!0)},t.prototype.toggle=function(){var t=this.gridsterItem.canBeDragged();!this.enabled&&t?(this.enabled=!this.enabled,this.dragStartFunction=this.dragStartDelay.bind(this),this.mousedown=this.gridsterItem.renderer.listen(this.gridsterItem.el,"mousedown",this.dragStartFunction),this.touchstart=this.gridsterItem.renderer.listen(this.gridsterItem.el,"touchstart",this.dragStartFunction)):this.enabled&&!t&&(this.enabled=!this.enabled,this.mousedown(),this.touchstart())},t.prototype.dragStartDelay=function(t){var e=this;if(!(t.target.hasAttribute("class")&&t.target.getAttribute("class").split(" ").indexOf("gridster-item-resizable-handler")>-1||N.checkContentClassForEvent(this.gridster,t)))if(N.checkTouchEvent(t),this.gridster.$options.draggable.delayStart)var i=setTimeout((function(){e.dragStart(t),h()}),this.gridster.$options.draggable.delayStart),s=this.gridsterItem.renderer.listen("document","mouseup",h),r=this.gridsterItem.renderer.listen("document","mouseleave",h),o=this.gridsterItem.renderer.listen("window","blur",h),n=this.gridsterItem.renderer.listen("document","touchmove",(function(e){N.checkTouchEvent(e),(Math.abs(e.clientX-t.clientX)>9||Math.abs(e.clientY-t.clientY)>9)&&h()})),d=this.gridsterItem.renderer.listen("document","touchend",h),a=this.gridsterItem.renderer.listen("document","touchcancel",h);else this.dragStart(t);function h(){clearTimeout(i),o(),s(),r(),n(),d(),a()}},t.ctorParameters=function(){return[{type:_},{type:j},{type:e.NgZone}]},t=u([e.Injectable(),y("design:paramtypes",[_,j,e.NgZone])],t)}(),at=function(){function t(t){this.pushedItems=[],this.pushedItemsPath=[],this.gridsterItem=t,this.gridster=t.gridster,this.tryPattern={fromEast:this.tryWest,fromWest:this.tryEast,fromNorth:this.trySouth,fromSouth:this.tryNorth},this.fromSouth="fromSouth",this.fromNorth="fromNorth",this.fromEast="fromEast",this.fromWest="fromWest"}return t.prototype.destroy=function(){delete this.gridster,delete this.gridsterItem},t.prototype.pushItems=function(t){return!!this.gridster.$options.pushResizeItems&&this.push(this.gridsterItem,t)},t.prototype.restoreItems=function(){for(var t,e=0,i=this.pushedItems.length;e<i;e++)(t=this.pushedItems[e]).$item.x=t.item.x||0,t.$item.y=t.item.y||0,t.$item.cols=t.item.cols||1,t.$item.row=t.item.row||1,t.setSize();this.pushedItems=[],this.pushedItemsPath=[]},t.prototype.setPushedItems=function(){for(var t,e=0,i=this.pushedItems.length;e<i;e++)(t=this.pushedItems[e]).checkItemChanges(t.$item,t.item);this.pushedItems=[],this.pushedItemsPath=[]},t.prototype.checkPushBack=function(){for(var t=this.pushedItems.length-1,e=!1;t>-1;t--)this.checkPushedItem(this.pushedItems[t],t)&&(e=!0);e&&this.checkPushBack()},t.prototype.push=function(t,e){var i=this.gridster.checkCollision(t.$item);if(i&&!0!==i&&i!==this.gridsterItem&&i.canBeResized()){if(this.tryPattern[e].call(this,i,t,e))return!0}else if(!1===i)return!0;return!1},t.prototype.trySouth=function(t,e,i){var s=t.$item.y,r=t.$item.rows;return t.$item.y=e.$item.y+e.$item.rows,t.$item.rows=r+s-t.$item.y,Y.checkCollisionTwoItems(t.$item,e.$item)||this.gridster.checkGridCollision(t.$item)?(t.$item.y=s,t.$item.rows=r,!1):(t.setSize(),this.addToPushed(t),this.push(e,i),!0)},t.prototype.tryNorth=function(t,e,i){var s=t.$item.rows;return t.$item.rows=e.$item.y-t.$item.y,Y.checkCollisionTwoItems(t.$item,e.$item)||this.gridster.checkGridCollision(t.$item)?(t.$item.rows=s,!1):(t.setSize(),this.addToPushed(t),this.push(e,i),!0)},t.prototype.tryEast=function(t,e,i){var s=t.$item.x,r=t.$item.cols;return t.$item.x=e.$item.x+e.$item.cols,t.$item.cols=r+s-t.$item.x,Y.checkCollisionTwoItems(t.$item,e.$item)||this.gridster.checkGridCollision(t.$item)?(t.$item.x=s,t.$item.cols=r,!1):(t.setSize(),this.addToPushed(t),this.push(e,i),!0)},t.prototype.tryWest=function(t,e,i){var s=t.$item.cols;return t.$item.cols=e.$item.x-t.$item.x,Y.checkCollisionTwoItems(t.$item,e.$item)||this.gridster.checkGridCollision(t.$item)?(t.$item.cols=s,!1):(t.setSize(),this.addToPushed(t),this.push(e,i),!0)},t.prototype.addToPushed=function(t){if(this.pushedItems.indexOf(t)<0)this.pushedItems.push(t),this.pushedItemsPath.push([{x:t.item.x||0,y:t.item.y||0,cols:t.item.cols||0,rows:t.item.rows||0},{x:t.$item.x,y:t.$item.y,cols:t.$item.cols,rows:t.$item.rows}]);else{var e=this.pushedItems.indexOf(t);this.pushedItemsPath[e].push({x:t.$item.x,y:t.$item.y,cols:t.$item.cols,rows:t.$item.rows})}},t.prototype.removeFromPushed=function(t){t>-1&&(this.pushedItems.splice(t,1),this.pushedItemsPath.splice(t,1))},t.prototype.checkPushedItem=function(t,e){for(var i,s,r,o,n,d=this.pushedItemsPath[e],a=d.length-2;a>-1;a--)i=d[a],s=t.$item.x,r=t.$item.y,o=t.$item.cols,n=t.$item.rows,t.$item.x=i.x,t.$item.y=i.y,t.$item.cols=i.cols,t.$item.rows=i.rows,this.gridster.findItemWithItem(t.$item)?(t.$item.x=s,t.$item.y=r,t.$item.cols=o,t.$item.rows=n):(t.setSize(),d.splice(a+1,d.length-1-a));return d.length<2&&(this.removeFromPushed(e),!0)},t.ctorParameters=function(){return[{type:_}]},t=u([e.Injectable(),y("design:paramtypes",[_])],t)}(),ht=function(){function t(t,e,i){this.zone=i,this.gridsterItem=t,this.gridster=e,this.lastMouse={clientX:0,clientY:0},this.itemBackup=[0,0,0,0],this.resizeEventScrollType={w:!1,e:!1,n:!1,s:!1}}return t.prototype.destroy=function(){this.gridster.previewStyle&&this.gridster.previewStyle(),delete this.gridsterItem,delete this.gridster},t.prototype.dragStart=function(t){var e=this;switch(t.which){case 1:break;case 2:case 3:return}this.gridster.options.resizable&&this.gridster.options.resizable.start&&this.gridster.options.resizable.start(this.gridsterItem.item,this.gridsterItem,t),t.stopPropagation(),t.preventDefault(),this.dragFunction=this.dragMove.bind(this),this.dragStopFunction=this.dragStop.bind(this),this.zone.runOutsideAngular((function(){e.mousemove=e.gridsterItem.renderer.listen("document","mousemove",e.dragFunction),e.touchmove=e.gridster.renderer.listen(e.gridster.el,"touchmove",e.dragFunction)})),this.mouseup=this.gridsterItem.renderer.listen("document","mouseup",this.dragStopFunction),this.mouseleave=this.gridsterItem.renderer.listen("document","mouseleave",this.dragStopFunction),this.cancelOnBlur=this.gridsterItem.renderer.listen("window","blur",this.dragStopFunction),this.touchend=this.gridsterItem.renderer.listen("document","touchend",this.dragStopFunction),this.touchcancel=this.gridsterItem.renderer.listen("document","touchcancel",this.dragStopFunction),this.gridsterItem.renderer.addClass(this.gridsterItem.el,"gridster-item-resizing"),this.lastMouse.clientX=t.clientX,this.lastMouse.clientY=t.clientY,this.left=this.gridsterItem.left,this.top=this.gridsterItem.top,this.width=this.gridsterItem.width,this.height=this.gridsterItem.height,this.bottom=this.gridsterItem.top+this.gridsterItem.height,this.right=this.gridsterItem.left+this.gridsterItem.width,this.margin=this.gridster.$options.margin,this.offsetLeft=this.gridster.el.scrollLeft-this.gridster.el.offsetLeft,this.offsetTop=this.gridster.el.scrollTop-this.gridster.el.offsetTop,this.diffLeft=t.clientX+this.offsetLeft-this.left,this.diffRight=t.clientX+this.offsetLeft-this.right,this.diffTop=t.clientY+this.offsetTop-this.top,this.diffBottom=t.clientY+this.offsetTop-this.bottom,this.minHeight=this.gridster.positionYToPixels(this.gridsterItem.$item.minItemRows||this.gridster.$options.minItemRows)-this.margin,this.minWidth=this.gridster.positionXToPixels(this.gridsterItem.$item.minItemCols||this.gridster.$options.minItemCols)-this.margin,this.gridster.movingItem=this.gridsterItem.$item,this.gridster.previewStyle(),this.push=new nt(this.gridsterItem),this.pushResize=new at(this.gridsterItem),this.gridster.dragInProgress=!0,this.gridster.updateGrid(),t.target.hasAttribute("class")&&t.target.getAttribute("class").split(" ").indexOf("handle-n")>-1?(this.resizeEventScrollType.n=!0,this.directionFunction=this.handleN):t.target.hasAttribute("class")&&t.target.getAttribute("class").split(" ").indexOf("handle-w")>-1?(this.resizeEventScrollType.w=!0,this.directionFunction=this.handleW):t.target.hasAttribute("class")&&t.target.getAttribute("class").split(" ").indexOf("handle-s")>-1?(this.resizeEventScrollType.s=!0,this.directionFunction=this.handleS):t.target.hasAttribute("class")&&t.target.getAttribute("class").split(" ").indexOf("handle-e")>-1?(this.resizeEventScrollType.e=!0,this.directionFunction=this.handleE):t.target.hasAttribute("class")&&t.target.getAttribute("class").split(" ").indexOf("handle-nw")>-1?(this.resizeEventScrollType.n=!0,this.resizeEventScrollType.w=!0,this.directionFunction=this.handleNW):t.target.hasAttribute("class")&&t.target.getAttribute("class").split(" ").indexOf("handle-ne")>-1?(this.resizeEventScrollType.n=!0,this.resizeEventScrollType.e=!0,this.directionFunction=this.handleNE):t.target.hasAttribute("class")&&t.target.getAttribute("class").split(" ").indexOf("handle-sw")>-1?(this.resizeEventScrollType.s=!0,this.resizeEventScrollType.w=!0,this.directionFunction=this.handleSW):t.target.hasAttribute("class")&&t.target.getAttribute("class").split(" ").indexOf("handle-se")>-1&&(this.resizeEventScrollType.s=!0,this.resizeEventScrollType.e=!0,this.directionFunction=this.handleSE)},t.prototype.dragMove=function(t){var e=this;t.stopPropagation(),t.preventDefault(),N.checkTouchEvent(t),this.offsetTop=this.gridster.el.scrollTop-this.gridster.el.offsetTop,this.offsetLeft=this.gridster.el.scrollLeft-this.gridster.el.offsetLeft,Z(this.gridster,this.left,this.top,this.width,this.height,t,this.lastMouse,this.directionFunction.bind(this),!0,this.resizeEventScrollType),this.directionFunction(t),this.lastMouse.clientX=t.clientX,this.lastMouse.clientY=t.clientY,this.zone.run((function(){e.gridster.updateGrid()}))},t.prototype.dragStop=function(t){var e=this;t.stopPropagation(),t.preventDefault(),Q(),this.mousemove(),this.mouseup(),this.mouseleave(),this.cancelOnBlur(),this.touchmove(),this.touchend(),this.touchcancel(),this.gridster.dragInProgress=!1,this.gridster.updateGrid(),this.gridster.options.resizable&&this.gridster.options.resizable.stop?Promise.resolve(this.gridster.options.resizable.stop(this.gridsterItem.item,this.gridsterItem,t)).then(this.makeResize.bind(this),this.cancelResize.bind(this)):this.makeResize(),setTimeout((function(){e.gridsterItem.renderer.removeClass(e.gridsterItem.el,"gridster-item-resizing"),e.gridster&&(e.gridster.movingItem=null,e.gridster.previewStyle())}))},t.prototype.cancelResize=function(){this.gridsterItem.$item.cols=this.gridsterItem.item.cols||1,this.gridsterItem.$item.rows=this.gridsterItem.item.rows||1,this.gridsterItem.$item.x=this.gridsterItem.item.x||0,this.gridsterItem.$item.y=this.gridsterItem.item.y||0,this.gridsterItem.setSize(),this.push.restoreItems(),this.pushResize.restoreItems(),this.push.destroy(),delete this.push,this.pushResize.destroy(),delete this.pushResize},t.prototype.makeResize=function(){this.gridsterItem.setSize(),this.gridsterItem.checkItemChanges(this.gridsterItem.$item,this.gridsterItem.item),this.push.setPushedItems(),this.pushResize.setPushedItems(),this.push.destroy(),delete this.push,this.pushResize.destroy(),delete this.pushResize},t.prototype.handleN=function(t){if(this.top=t.clientY+this.offsetTop-this.diffTop,this.height=this.bottom-this.top,this.minHeight>this.height&&(this.height=this.minHeight,this.top=this.bottom-this.minHeight),this.newPosition=this.gridster.pixelsToPositionY(this.top+this.margin,Math.floor),this.gridsterItem.$item.y!==this.newPosition){if(this.itemBackup[1]=this.gridsterItem.$item.y,this.itemBackup[3]=this.gridsterItem.$item.rows,this.gridsterItem.$item.rows+=this.gridsterItem.$item.y-this.newPosition,this.gridsterItem.$item.y=this.newPosition,this.pushResize.pushItems(this.pushResize.fromSouth),this.push.pushItems(this.push.fromSouth,this.gridster.$options.disablePushOnResize),this.gridster.checkCollision(this.gridsterItem.$item))return this.gridsterItem.$item.y=this.itemBackup[1],this.gridsterItem.$item.rows=this.itemBackup[3],this.setItemTop(this.gridster.positionYToPixels(this.gridsterItem.$item.y)),void this.setItemHeight(this.gridster.positionYToPixels(this.gridsterItem.$item.rows)-this.margin);this.gridster.previewStyle(),this.pushResize.checkPushBack(),this.push.checkPushBack()}this.setItemTop(this.top),this.setItemHeight(this.height)},t.prototype.handleW=function(t){if(this.left=t.clientX+this.offsetLeft-this.diffLeft,this.width=this.right-this.left,this.minWidth>this.width&&(this.width=this.minWidth,this.left=this.right-this.minWidth),this.newPosition=this.gridster.pixelsToPositionX(this.left+this.margin,Math.floor),this.gridsterItem.$item.x!==this.newPosition){if(this.itemBackup[0]=this.gridsterItem.$item.x,this.itemBackup[2]=this.gridsterItem.$item.cols,this.gridsterItem.$item.cols+=this.gridsterItem.$item.x-this.newPosition,this.gridsterItem.$item.x=this.newPosition,this.pushResize.pushItems(this.pushResize.fromEast),this.push.pushItems(this.push.fromEast,this.gridster.$options.disablePushOnResize),this.gridster.checkCollision(this.gridsterItem.$item))return this.gridsterItem.$item.x=this.itemBackup[0],this.gridsterItem.$item.cols=this.itemBackup[2],this.setItemLeft(this.gridster.positionXToPixels(this.gridsterItem.$item.x)),void this.setItemWidth(this.gridster.positionXToPixels(this.gridsterItem.$item.cols)-this.margin);this.gridster.previewStyle(),this.pushResize.checkPushBack(),this.push.checkPushBack()}this.setItemLeft(this.left),this.setItemWidth(this.width)},t.prototype.handleS=function(t){if(this.height=t.clientY+this.offsetTop-this.diffBottom-this.top,this.minHeight>this.height&&(this.height=this.minHeight),this.bottom=this.top+this.height,this.newPosition=this.gridster.pixelsToPositionY(this.bottom,Math.ceil),this.gridsterItem.$item.y+this.gridsterItem.$item.rows!==this.newPosition){if(this.itemBackup[3]=this.gridsterItem.$item.rows,this.gridsterItem.$item.rows=this.newPosition-this.gridsterItem.$item.y,this.pushResize.pushItems(this.pushResize.fromNorth),this.push.pushItems(this.push.fromNorth,this.gridster.$options.disablePushOnResize),this.gridster.checkCollision(this.gridsterItem.$item))return this.gridsterItem.$item.rows=this.itemBackup[3],void this.setItemHeight(this.gridster.positionYToPixels(this.gridsterItem.$item.rows)-this.margin);this.gridster.previewStyle(),this.pushResize.checkPushBack(),this.push.checkPushBack()}this.setItemHeight(this.height)},t.prototype.handleE=function(t){if(this.width=t.clientX+this.offsetLeft-this.diffRight-this.left,this.minWidth>this.width&&(this.width=this.minWidth),this.right=this.left+this.width,this.newPosition=this.gridster.pixelsToPositionX(this.right,Math.ceil),this.gridsterItem.$item.x+this.gridsterItem.$item.cols!==this.newPosition){if(this.itemBackup[2]=this.gridsterItem.$item.cols,this.gridsterItem.$item.cols=this.newPosition-this.gridsterItem.$item.x,this.pushResize.pushItems(this.pushResize.fromWest),this.push.pushItems(this.push.fromWest,this.gridster.$options.disablePushOnResize),this.gridster.checkCollision(this.gridsterItem.$item))return this.gridsterItem.$item.cols=this.itemBackup[2],void this.setItemWidth(this.gridster.positionXToPixels(this.gridsterItem.$item.cols)-this.margin);this.gridster.previewStyle(),this.pushResize.checkPushBack(),this.push.checkPushBack()}this.setItemWidth(this.width)},t.prototype.handleNW=function(t){this.handleN(t),this.handleW(t)},t.prototype.handleNE=function(t){this.handleN(t),this.handleE(t)},t.prototype.handleSW=function(t){this.handleS(t),this.handleW(t)},t.prototype.handleSE=function(t){this.handleS(t),this.handleE(t)},t.prototype.toggle=function(){this.resizeEnabled=this.gridsterItem.canBeResized()},t.prototype.dragStartDelay=function(t){var e=this;if(N.checkTouchEvent(t),this.gridster.$options.resizable.delayStart)var i=setTimeout((function(){e.dragStart(t),h()}),this.gridster.$options.resizable.delayStart),s=this.gridsterItem.renderer.listen("document","mouseup",h),r=this.gridsterItem.renderer.listen("document","mouseleave",h),o=this.gridsterItem.renderer.listen("window","blur",h),n=this.gridsterItem.renderer.listen("document","touchmove",(function(e){N.checkTouchEvent(e),(Math.abs(e.clientX-t.clientX)>9||Math.abs(e.clientY-t.clientY)>9)&&h()})),d=this.gridsterItem.renderer.listen("document","touchend",h),a=this.gridsterItem.renderer.listen("document","touchcancel",h);else this.dragStart(t);function h(){clearTimeout(i),o(),s(),r(),n(),d(),a()}},t.prototype.setItemTop=function(t){this.gridster.gridRenderer.setCellPosition(this.gridsterItem.renderer,this.gridsterItem.el,this.left,t)},t.prototype.setItemLeft=function(t){this.gridster.gridRenderer.setCellPosition(this.gridsterItem.renderer,this.gridsterItem.el,t,this.top)},t.prototype.setItemHeight=function(t){this.gridsterItem.renderer.setStyle(this.gridsterItem.el,"height",t+"px")},t.prototype.setItemWidth=function(t){this.gridsterItem.renderer.setStyle(this.gridsterItem.el,"width",t+"px")},t.ctorParameters=function(){return[{type:_},{type:j},{type:e.NgZone}]},t=u([e.Injectable(),y("design:paramtypes",[_,j,e.NgZone])],t)}(),lt=function(){function t(t,e,i,s){this.renderer=i,this.zone=s,this.el=t.nativeElement,this.$item={cols:-1,rows:-1,x:-1,y:-1},this.gridster=e,this.drag=new dt(this,e,this.zone),this.resize=new ht(this,e,this.zone)}return t.prototype.ngOnInit=function(){this.updateOptions(),this.gridster.addItem(this)},t.prototype.updateOptions=function(){this.$item=N.merge(this.$item,this.item,{cols:void 0,rows:void 0,x:void 0,y:void 0,dragEnabled:void 0,resizeEnabled:void 0,compactEnabled:void 0,maxItemRows:void 0,minItemRows:void 0,maxItemCols:void 0,minItemCols:void 0,maxItemArea:void 0,minItemArea:void 0})},t.prototype.ngOnDestroy=function(){this.gridster.removeItem(this),this.gridster.movingItem=null,delete this.gridster,this.drag.destroy(),delete this.drag,this.resize.destroy(),delete this.resize},t.prototype.setSize=function(){this.renderer.setStyle(this.el,"display",this.notPlaced?"":"block"),this.gridster.gridRenderer.updateItem(this.el,this.$item,this.renderer),this.updateItemSize()},t.prototype.updateItemSize=function(){var t=this.$item.y*this.gridster.curRowHeight,e=this.$item.x*this.gridster.curColWidth,i=this.$item.cols*this.gridster.curColWidth-this.gridster.$options.margin,s=this.$item.rows*this.gridster.curRowHeight-this.gridster.$options.margin;!this.init&&i>0&&s>0&&(this.init=!0,this.item.initCallback&&this.item.initCallback(this.item,this),this.gridster.options.itemInitCallback&&(this.item.curRowHeight=this.gridster.curRowHeight,this.gridster.options.itemInitCallback(this.item,this)),this.gridster.$options.scrollToNewItems&&this.el.scrollIntoView(!1)),i===this.width&&s===this.height||(this.width=i,this.height=s,this.gridster.options.itemResizeCallback&&this.gridster.options.itemResizeCallback(this.item,this)),this.top=t,this.left=e},t.prototype.itemChanged=function(){this.gridster.options.itemChangeCallback&&(this.item.curRowHeight=this.gridster.curRowHeight,this.gridster.options.itemChangeCallback(this.item,this))},t.prototype.checkItemChanges=function(t,e){t.rows===e.rows&&t.cols===e.cols&&t.x===e.x&&t.y===e.y||(this.gridster.checkCollision(this.$item)?(this.$item.x=e.x||0,this.$item.y=e.y||0,this.$item.cols=e.cols||1,this.$item.rows=e.rows||1,this.setSize()):(this.item.cols=this.$item.cols,this.item.rows=this.$item.rows,this.item.x=this.$item.x,this.item.y=this.$item.y,this.gridster.calculateLayoutDebounce(),this.itemChanged()))},t.prototype.canBeDragged=function(){return!this.gridster.mobile&&(void 0===this.$item.dragEnabled?this.gridster.$options.draggable.enabled:this.$item.dragEnabled)},t.prototype.canBeResized=function(){return!this.gridster.mobile&&(void 0===this.$item.resizeEnabled?this.gridster.$options.resizable.enabled:this.$item.resizeEnabled)},t.ctorParameters=function(){return[{type:e.ElementRef},{type:Y,decorators:[{type:e.Host}]},{type:e.Renderer2},{type:e.NgZone}]},u([e.Input(),y("design:type",Object)],t.prototype,"item",void 0),t=u([e.Component({selector:"gridster-item",template:'<ng-content></ng-content>\r\n<div (mousedown)="resize.dragStartDelay($event)" (touchstart)="resize.dragStartDelay($event)"\r\n [hidden]="!gridster.$options.resizable.handles.s || !resize.resizeEnabled"\r\n class="gridster-item-resizable-handler handle-s"></div>\r\n<div (mousedown)="resize.dragStartDelay($event)" (touchstart)="resize.dragStartDelay($event)"\r\n [hidden]="!gridster.$options.resizable.handles.e || !resize.resizeEnabled"\r\n class="gridster-item-resizable-handler handle-e"></div>\r\n<div (mousedown)="resize.dragStartDelay($event)" (touchstart)="resize.dragStartDelay($event)"\r\n [hidden]="!gridster.$options.resizable.handles.n || !resize.resizeEnabled"\r\n class="gridster-item-resizable-handler handle-n"></div>\r\n<div (mousedown)="resize.dragStartDelay($event)" (touchstart)="resize.dragStartDelay($event)"\r\n [hidden]="!gridster.$options.resizable.handles.w || !resize.resizeEnabled"\r\n class="gridster-item-resizable-handler handle-w"></div>\r\n<div (mousedown)="resize.dragStartDelay($event)" (touchstart)="resize.dragStartDelay($event)"\r\n [hidden]="!gridster.$options.resizable.handles.se || !resize.resizeEnabled"\r\n class="gridster-item-resizable-handler handle-se"></div>\r\n<div (mousedown)="resize.dragStartDelay($event)" (touchstart)="resize.dragStartDelay($event)"\r\n [hidden]="!gridster.$options.resizable.handles.ne || !resize.resizeEnabled"\r\n class="gridster-item-resizable-handler handle-ne"></div>\r\n<div (mousedown)="resize.dragStartDelay($event)" (touchstart)="resize.dragStartDelay($event)"\r\n [hidden]="!gridster.$options.resizable.handles.sw || !resize.resizeEnabled"\r\n class="gridster-item-resizable-handler handle-sw"></div>\r\n<div (mousedown)="resize.dragStartDelay($event)" (touchstart)="resize.dragStartDelay($event)"\r\n [hidden]="!gridster.$options.resizable.handles.nw || !resize.resizeEnabled"\r\n class="gridster-item-resizable-handler handle-nw"></div>\r\n',encapsulation:e.ViewEncapsulation.None,styles:["gridster-item{box-sizing:border-box;z-index:1;position:absolute;overflow:hidden;transition:.3s;display:none;background:#fff;-webkit-user-select:text;-moz-user-select:text;user-select:text}gridster-item.gridster-item-moving{cursor:move}gridster-item.gridster-item-moving,gridster-item.gridster-item-resizing{transition:none;z-index:2;box-shadow:0 0 5px 5px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12)}.gridster-item-resizable-handler{position:absolute;z-index:2}.gridster-item-resizable-handler.handle-n{cursor:n-resize;height:10px;right:0;top:0;left:0}.gridster-item-resizable-handler.handle-e{cursor:e-resize;width:10px;bottom:0;right:0;top:0}.gridster-item-resizable-handler.handle-s{cursor:s-resize;height:10px;right:0;bottom:0;left:0}.gridster-item-resizable-handler.handle-w{cursor:w-resize;width:10px;left:0;top:0;bottom:0}.gridster-item-resizable-handler.handle-ne{cursor:ne-resize;width:10px;height:10px;right:0;top:0}.gridster-item-resizable-handler.handle-nw{cursor:nw-resize;width:10px;height:10px;left:0;top:0}.gridster-item-resizable-handler.handle-se{cursor:se-resize;width:0;height:0;right:0;bottom:0;border-style:solid;border-width:0 0 10px 10px;border-color:transparent}.gridster-item-resizable-handler.handle-sw{cursor:sw-resize;width:10px;height:10px;left:0;bottom:0}gridster-item:hover .gridster-item-resizable-handler.handle-se{border-color:transparent transparent #ccc}"]}),f(1,e.Host()),y("design:paramtypes",[e.ElementRef,Y,e.Renderer2,e.NgZone])],t)}(),pt=function(){function t(t,e,i){this.renderer=i,this.el=t.nativeElement,this.gridster=e,this.gridster.previewStyle=this.previewStyle.bind(this)}return t.prototype.ngOnDestroy=function(){delete this.el,delete this.gridster.previewStyle,delete this.gridster},t.prototype.previewStyle=function(t){this.gridster.movingItem?(this.gridster.compact&&t&&this.gridster.compact.checkCompactItem(this.gridster.movingItem),this.renderer.setStyle(this.el,"display","block"),this.gridster.gridRenderer.updateItem(this.el,this.gridster.movingItem,this.renderer)):this.renderer.setStyle(this.el,"display","")},t.ctorParameters=function(){return[{type:e.ElementRef},{type:Y,decorators:[{type:e.Host}]},{type:e.Renderer2}]},t=u([e.Component({selector:"gridster-preview",template:"",encapsulation:e.ViewEncapsulation.None,styles:["gridster-preview{position:absolute;display:none;background:#42b4e6}"]}),f(1,e.Host()),y("design:paramtypes",[e.ElementRef,Y,e.Renderer2])],t)}(),gt=function(){function t(){}return t=u([e.NgModule({declarations:[Y,lt,pt],imports:[l.CommonModule],exports:[Y,lt],providers:[],bootstrap:[]})],t)}(),ct=function(){function t(){}return t=u([e.NgModule({declarations:[W,D,P],imports:[a.BrowserModule,gt,h.HttpClientModule,o.NgxUiLoaderModule,n.NotifierModule.withConfig(E),s.RACommonModule,p.RAUserControlModule,g.RACommonControlsModule],exports:[W],bootstrap:[W],entryComponents:[P]})],t)}(),mt=function(){function t(t){var e=this;this.ngZone=t,this.initialize=function(t,i,s,r){e.ngZone.run((function(){e.userDashboardId=i,e.appConfig=s,e.raDashboardEventBus=t,e.dashboardInfo=r})),e.init()}}return t.prototype.ngOnInit=function(){var t=new CustomEvent("event-template-initiated");document.body.dispatchEvent(t)},u([e.Input("dashboard-id"),y("design:type",Number)],t.prototype,"dashboardId",void 0),u([e.Input("global-filter"),y("design:type",Object)],t.prototype,"globalFilter",void 0),u([e.Input(),y("design:type",Object)],t.prototype,"initialize",void 0),t}(),ut=function(){function t(){var t=this;this.getAllFilterConfig=function(e){return t.getFilterConfig()},this.setInapplicableFilterMsg=function(e){t.showHideInapplicableMsg(e)},this.isValidEntry=function(){return t.isValid()},this.clearAllData=function(){t.clearData()},this.setAllFilterConfig=function(e,i){t.setFilterConfig(e,i)}}return t.prototype.ngOnInit=function(){var t=new CustomEvent("global-filter-initiated");document.body.dispatchEvent(t)},u([e.Input(),y("design:type",Object)],t.prototype,"getAllFilterConfig",void 0),u([e.Input(),y("design:type",Object)],t.prototype,"setInapplicableFilterMsg",void 0),u([e.Input(),y("design:type",Object)],t.prototype,"isValidEntry",void 0),u([e.Input(),y("design:type",Object)],t.prototype,"clearAllData",void 0),u([e.Input(),y("design:type",Object)],t.prototype,"setAllFilterConfig",void 0),t}();t.DashboardFrameworkModule=ct,t.RADashboardArea=W,t.RADashboardEventBus=C,t.RADashboardResponsiveService=T,t.RAWidgetContainer=D,t.RaBaseDashboardFilter=ut,t.RaBaseDashboardTemplate=mt,t.RaDashboardService=I,t.ɵa=P,t.ɵb=gt,t.ɵc=Y,t.ɵd=lt,t.ɵe=pt,t.ɵf=E,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
15
|
+
***************************************************************************** */var c=function(t,e){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};var m=function(){return(m=Object.assign||function(t){for(var e,i=1,s=arguments.length;i<s;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function u(t,e,i,s){var r,o=arguments.length,n=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var d=t.length-1;d>=0;d--)(r=t[d])&&(n=(o<3?r(n):o>3?r(e,i,n):r(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n}function f(t,e){return function(i,s){e(i,s,t)}}function y(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function w(t,e,i,s){return new(i||(i=Promise))((function(r,o){function n(t){try{a(s.next(t))}catch(t){o(t)}}function d(t){try{a(s.throw(t))}catch(t){o(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(n,d)}a((s=s.apply(t,e||[])).next())}))}function v(t,e){var i,s,r,o,n={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:d(0),throw:d(1),return:d(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function d(o){return function(d){return function(o){if(i)throw new TypeError("Generator is already executing.");for(;n;)try{if(i=1,s&&(r=2&o[0]?s.return:o[0]?s.throw||((r=s.return)&&r.call(s),0):s.next)&&!(r=r.call(s,o[1])).done)return r;switch(s=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,s=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if(!(r=n.trys,(r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){n=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){n.label=o[1];break}if(6===o[0]&&n.label<r[1]){n.label=r[1],r=o;break}if(r&&n.label<r[2]){n.label=r[2],n.ops.push(o);break}r[2]&&n.ops.pop(),n.trys.pop();continue}o=e.call(t,n)}catch(t){o=[6,t],s=0}finally{i=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,d])}}}var b,I=function(t){function s(e){var i=t.call(this,e,"")||this;return i.loadedScripts=[],i}return function(t,e){function i(){this.constructor=t}c(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}(s,t),s.prototype.loadExternalScript=function(t,e){if(-1==this.loadedScripts.indexOf(t)){var i=document.createElement("script");i.src=t,i.onload=function(){e()},document.body.appendChild(i),this.loadedScripts.push(t)}else e()},s.prototype.getWidgetsByDashboardArea=function(t,e){return this.baseUrl=e.apiBaseUrl,this.post("widget/GetWidgetByArea",t)},s.prototype.updateWidgets=function(t,e){return this.baseUrl=e.apiBaseUrl,this.post("widget/UpdateAreaWidgets",t)},s.prototype.getWidgetConfigInfo=function(t){return i.of()},s.prototype.updateConfig=function(t,e){},s.prototype.addWidget=function(t,e){return this.baseUrl=e.apiBaseUrl,this.post("widget/AddWidgetUser",t)},s.prototype.deleteWidget=function(t,e){return this.baseUrl=e.apiBaseUrl,this.delete("widget/DeleteWidgetUser?widgetInstanceId="+t.widgetInstanceId)},s.prototype.updateWidget=function(t,e){this.baseUrl=e.apiBaseUrl;var i={};return i.widgetConfigInfo=t.widgetConfigInfo,i.widgetInstanceId=t.widgetInstanceId,i.widgetTitle=t.widgetTitle,i.widgetType=t.widgetType,i.widgetId=t.widgetId,this.post("widget/UpdateUserWidget",t)},s.prototype.moveWidget=function(t){},s.prototype.copyWidget=function(t){},s.ctorParameters=function(){return[{type:e.Injector}]},s.ngInjectableDef=e.ɵɵdefineInjectable({factory:function(){return new s(e.ɵɵinject(e.INJECTOR))},token:s,providedIn:"root"}),s=u([e.Injectable({providedIn:"root"}),y("design:paramtypes",[e.Injector])],s)}(s.BaseService),C=function(){function t(){this.eventQueue=new i.Subject}return t.prototype.publish=function(t,e){this.eventQueue.next({eventName:t,data:e})},t.prototype.publishWithKey=function(t,e,i,s){this.eventQueue.next({eventName:t,data:e,key:i,value:s})},t.prototype.subscribe=function(t){return this.eventQueue.asObservable().pipe(r.filter((function(e){return e.eventName==t})),r.map((function(t){return t.data})))},t.prototype.subscribeWithKey=function(t,e,i){return this.eventQueue.asObservable().pipe(r.filter((function(s){return s.eventName==t&&s.key==e&&s.value==i})),r.map((function(t){return t.data})))},t.ngInjectableDef=e.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t=u([e.Injectable({providedIn:"root"})],t)}();(b=t.RAEvent||(t.RAEvent={})).WidgetSelected="widgetSelected",b.WidgetEditClicked="widgetEditClicked",b.ConfigCancelClick="configCancelClick",b.ConfigCloseClick="configCloseClick",b.ConfigAddClick="configAddClick",b.ConfigChanged="configChanged",b.RearrangeClicked="rearrangeClicked",b.DashboardCustomizeClick="dashboardCustomizeClick",b.DashboardChanged="dashboardChanged",b.WidgetLibraryCloseBtnClicked="WidgetLibraryCloseBtnClicked",b.LoadDashboard="LoadDashboard",b.CopyWidget="CopyWidget",b.MoveWidget="MoveWidget",b.WidgetDelete="WidgetDelete",b.AddWidget="AddWidget",b.widgetLibraryDoneClick="widgetLibraryDoneClick",b.favoriteIconRefresh="favoriteIconRefresh",b.QuickLinkRefresh="QuickLinkRefresh",b.WidgetAdded="WidgetAdded",b.UpdateGlobalFilterFromMapWidget="UpdateGlobalFilterFromMapWidget",b.AddWidgetEmptyDashboard="AddWidgetEmptyDashboard",b.AddNewWidgetToDashboard="AddNewWidgetToDashboard",b.HideDashboardBanner="HideDashboardBanner",b.LaunchCustomWidgetFlyout="LaunchCustomWidgetFlyout",b.UpdateAppledFiterForInapplicableFilter="UpdateAppledFiterForInapplicableFilter",b.ShowInapplicableFilterMessage="ShowInapplicableFilterMessage",b.BulkActionClick="BulkActionClick",b.GlobalFilterClick="GlobalFilterClick",(t.RAEventKey||(t.RAEventKey={})).WidgetInstanceId="widgetInstanceId";var x,k,$,S={gridType:"scrollVertical",compactType:"none",margin:10,outerMargin:!0,outerMarginTop:10,outerMarginRight:0,outerMarginBottom:30,outerMarginLeft:0,useTransformPositioning:!0,mobileBreakpoint:640,minCols:10,maxCols:10,minRows:1,maxRows:100,maxItemCols:10,minItemCols:1,maxItemRows:1e3,minItemRows:1,maxItemArea:1e3,minItemArea:1,defaultItemCols:1,defaultItemRows:1,keepFixedHeightInMobile:!1,keepFixedWidthInMobile:!1,scrollSensitivity:10,scrollSpeed:20,enableEmptyCellClick:!1,enableEmptyCellContextMenu:!1,enableEmptyCellDrop:!1,enableEmptyCellDrag:!1,emptyCellDragMaxCols:50,emptyCellDragMaxRows:50,ignoreMarginInRow:!0,draggable:{enabled:!0,dragHandleClass:"widget-move",ignoreContent:!0},resizable:{enabled:!0},swap:!0,pushItems:!0,disablePushOnDrag:!1,disablePushOnResize:!1,pushDirections:{north:!0,east:!0,south:!0,west:!0},pushResizeItems:!1,displayGrid:"none",disableWindowResize:!1,disableWarnings:!1,scrollToNewItems:!0,autoResizeonDrag:!1,setGridSize:!1},T=function(){function t(){var t=this;this.resized=new i.Subject,this.maxColsDesktop=8,this.resInfo=[{id:1,start:0,end:767,minCols:1,maxCols:1},{id:2,start:768,end:1024,minCols:1,maxCols:2},{id:3,start:1025,end:1366,minCols:1,maxCols:6},{id:4,start:1367,end:9999999999,minCols:1,maxCols:this.maxColsDesktop}],this.setScreenWidth(),window.addEventListener("resize",(function(){var e=t;t.screenWidthAdjusted&&clearTimeout(t.screenWidthAdjusted),t.screenWidthAdjusted=setTimeout((function(){e.setScreenWidth()}),500)}))}return t.prototype.setScreenWidth=function(){var t=this;if(this.screenWidth=window.outerWidth,this.IsDesktopView)this.currentResInfo=this.resInfo[3],this.resized.next(!0);else{var e=this.resInfo.filter((function(e){return e.end>=t.screenWidth&&e.start<=t.screenWidth}))[0];this.currentResInfo&&this.currentResInfo.id==e.id||(this.currentResInfo=e,this.resized.next())}},Object.defineProperty(t.prototype,"IsDesktopView",{get:function(){var t=navigator.userAgent||navigator.vendor||window.opera;return!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substring(0,4))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"IsMobile",{get:function(){var t=!1,e=navigator.userAgent||navigator.vendor||window.opera;return(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substring(0,4)))&&(t=!0),t},enumerable:!0,configurable:!0}),t.prototype.getGridsterConfig=function(t,e,i){var s=S;return s.minCols=this.currentResInfo.maxCols,s.maxCols=this.currentResInfo.maxCols,s.minRows=this.currentResInfo.minCols,s.maxItemCols=this.currentResInfo.maxCols,s.minItemCols=this.currentResInfo.minCols,s.minItemRows=this.currentResInfo.minCols,s.minItemArea=this.currentResInfo.minCols*this.currentResInfo.minCols,s.defaultItemCols=this.currentResInfo.minCols,s.defaultItemRows=this.currentResInfo.minCols,this.IsDesktopView&&t?(s.resizable.enabled=!0,s.swap=!0,s.draggable.enabled=!0):(s.resizable.enabled=!1,s.swap=!1,s.draggable.enabled=!1),e||(s.resizable.enabled=!1,s.swap=!1),i||(s.draggable.enabled=!1),s},t.prototype.getGridsterItem=function(t){return t.widgetSettings&&(t.settings=JSON.parse(t.widgetSettings)),t.templateSettings&&(t.templateWidgetSettings=JSON.parse(t.templateSettings)),{cols:this.getWidth(t.width),rows:this.getHeight(t.height),x:this.IsDesktopView?t.position_x:0,y:this.IsDesktopView?t.position_y:0,widgetInfo:t,minItemRows:this.getMinItemRows(t),minItemCols:this.getMinItemCols(t)}},t.prototype.getWidth=function(t){return this.IsDesktopView||(t=Math.floor(t/this.maxColsDesktop*this.currentResInfo.maxCols))<this.currentResInfo.minCols&&(t=this.currentResInfo.minCols),t},t.prototype.getMinItemRows=function(t){if(this.IsDesktopView&&t.settings&&t.settings.minRows)return t.settings.minRows},t.prototype.getMinItemCols=function(t){if(this.IsDesktopView&&t.settings&&t.settings.minCols)return t.settings.minCols},t.prototype.getHeight=function(t){return this.IsDesktopView||(t=Math.floor(t/this.maxColsDesktop*this.currentResInfo.maxCols))<this.currentResInfo.minCols&&(t=this.currentResInfo.minCols),t},t.ngInjectableDef=e.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t=u([e.Injectable({providedIn:"root"}),y("design:paramtypes",[])],t)}(),D=function(){function i(t,i,s,r,o,n,d){this.dashboardService=t,this.ngZone=i,this.ngxService=s,this.translateService=r,this.notifier=o,this.responsiveService=n,this.permissionService=d,this.widgetList=Array(),this.gridheight=300,this.gridcellHeight=0,this.userWidgets=[],this.PAMWidgets=[],this.isWidgetLoaded=!1,this.domResized=!1,this.showEmptyDashboard=!1,this.isWidgetMgmnt=!1,this.widgetHeight=2,this.widgetWidth=4,this.hideDashboardBanner=new e.EventEmitter}return i.prototype.ngOnInit=function(){var e=this;this.isWidgetMgmnt=this.permissionService.hasPermission("ra.widgetmanagement"),this.initiateGridsterConfig(),this.setEmptyDashboardConfig(),this.lastViewType=this.responsiveService.IsDesktopView?"desktop":"mobile",this.responsiveService.resized.subscribe((function(t){e.lastViewType==(t?"desktop":"mobile")&&t?setTimeout((function(){e.gridcellHeight=e.options.api.getCurrentRowHeight(),e.domResized=!e.domResized,e.setAreaHeight()}),100):(e.lastViewType=t?"desktop":"mobile",e.widgetList=[],setTimeout((function(){e.initiateGridsterConfig(),e.options.api.optionsChanged(),e.userWidgets?(e.widgetList=e.mapObjectListToGridsterItemList(e.userWidgets),setTimeout((function(){e.setAreaHeight()}))):e.loadWidgets(e.userDashboardId,e.areaKey),e.domResized=!e.domResized})))})),setTimeout((function(){e.raDashboardEventBus.subscribe(t.RAEvent.BulkActionClick).subscribe((function(t){e.bulkActionData=JSON.parse(JSON.stringify(t))}))}))},i.prototype.ngOnChanges=function(t){this.isWidgetMgmnt=this.permissionService.hasPermission("ra.widgetmanagement"),this.raDashboardEventBus&&this.appConfig&&!this.isWidgetLoaded&&(this.isWidgetLoaded=!0,this.loadWidgets(this.userDashboardId,this.areaKey)),this.initiateGridsterConfig(),t.raDashboardEventBus&&t.raDashboardEventBus.currentValue!=t.raDashboardEventBus.previousValue&&this.inititateEventBusSubscritions()},i.prototype.setEmptyDashboardConfig=function(){this.dashboardInfo&&this.dashboardInfo.templateConfig.emptyDashboardHeader&&(this.emptyDashboardTitle=this.translateService.translate("dashboard."+this.dashboardInfo.templateConfig.emptyDashboardHeader.titleKey),this.emptyDashboardMsg1=this.translateService.translate("dashboard."+this.dashboardInfo.templateConfig.emptyDashboardHeader.descriptionKey1),this.emptyDashboardMsg2=this.dashboardInfo.templateConfig.emptyDashboardHeader.descriptionKey2?this.translateService.translate("dashboard."+this.dashboardInfo.templateConfig.emptyDashboardHeader.descriptionKey2):"",this.emptyDashboardButtonText=this.translateService.translate("dashboard."+this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonTextKey),this.emptyDashboardButtonIcon=this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonIcon?this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonIcon:"",this.emptyDashboardButtonAction=this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonAction?this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonAction:"")},i.prototype.initiateGridsterConfig=function(){var t=this;this.dashboardInfo&&(this.options=this.responsiveService.getGridsterConfig(this.isWidgetMgmnt,this.dashboardInfo.templateConfig.widget.canResize,this.dashboardInfo.templateConfig.widget.canMove),this.options.initCallback=function(e){t.options.api&&(t.gridcellHeight=t.options.api.getCurrentRowHeight())},this.options.itemChangeCallback=function(e){t.responsiveService.IsDesktopView&&e.widgetInfo&&e.widgetInfo.widgetInstanceId&&t.updateWidgetPosition(e.widgetInfo.widgetInstanceId),t.setAreaHeight()})},i.prototype.inititateEventBusSubscritions=function(){var e=this;this.widgetDeleteEvent=this.raDashboardEventBus.subscribe(t.RAEvent.WidgetDelete).subscribe((function(t){e.ngZone.run((function(){e.deleteWidget(t,!0)}))})),this.widgetAddEvent=this.raDashboardEventBus.subscribe(t.RAEvent.AddWidget).subscribe((function(t){e.ngZone.run((function(){e.copyWidget(t)}))})),this.conifgAddClick=this.raDashboardEventBus.subscribe(t.RAEvent.ConfigAddClick).subscribe((function(t){e.ngZone.run((function(){e.addWidget(t)}))})),this.rearrangeWidgetClick=this.raDashboardEventBus.subscribe(t.RAEvent.RearrangeClicked).subscribe((function(t){e.ngZone.run((function(){e.rearrangeWidgets()}))})),this.widgetLibraryDoneClick=this.raDashboardEventBus.subscribe(t.RAEvent.widgetLibraryDoneClick).subscribe((function(t){e.ngZone.run((function(){t&&e.addWidgetListToGridster(t,0)}))}))},i.prototype.addWidgetListToGridster=function(t,e){var i=this,s=e+1;e>t.length-1||(0==e?(i.addWidget(t[e]),i.addWidgetListToGridster(t,s)):setTimeout((function(){i.addWidget(t[e]),i.addWidgetListToGridster(t,s)}),1e3))},i.prototype.ngOnDestroy=function(){this.conifgAddClick&&this.conifgAddClick.unsubscribe(),this.widgetAddEvent&&this.widgetAddEvent.unsubscribe(),this.widgetDeleteEvent&&this.widgetDeleteEvent.unsubscribe(),this.widgetLibraryDoneClick&&this.widgetLibraryDoneClick.unsubscribe(),this.rearrangeWidgetClick&&this.rearrangeWidgetClick.unsubscribe()},i.prototype.updateWidgets=function(){return this.dashboardService.updateWidgets(this.formatWidgetDataForPositionDetails(this.mapGridsterListToObject(this.widgetList)),this.appConfig).subscribe((function(t){})),!0},i.prototype.updateWidgetPosition=function(t){var e=[],i=this.widgetList.filter((function(e){return e.widgetInfo&&e.widgetInfo.widgetInstanceId==t}));if(i&&i.length>0){e.push(i[0]);var s=this.mapGridsterListToObject(e);this.dashboardService.updateWidgets(this.formatWidgetDataForPositionDetails(s),this.appConfig).subscribe((function(t){}))}return!0},i.prototype.formatWidgetDataForPositionDetails=function(t){var e=[];return t.forEach((function(t){var i={};i.widgetInstanceId=t.widgetInstanceId,i.position_x=t.position_x,i.position_y=t.position_y,i.width=t.width,i.height=t.height,e.push(i)})),e},i.prototype.loadWidgets=function(e,i){var s=this,r={dashboardId:e.toString(),dashboardAreaKey:i};this.widgetList=[],this.dashboardService.getWidgetsByDashboardArea(r,this.appConfig).subscribe((function(e){s.userWidgets=e,s.PAMWidgets=[],e.forEach((function(t){var e=void 0;t.widgetSettings&&(e=JSON.parse(t.widgetSettings))&&e.isPAMWidget&&s.PAMWidgets.push(t.widgetInstanceId)})),s.checkPAMWidgets(),e&&e.length>0?(s.widgetList=s.mapObjectListToGridsterItemList(e),s.setAreaHeight(),s.raDashboardEventBus.publish(t.RAEvent.HideDashboardBanner,!1)):(s.showEmptyDashboard=!0,s.raDashboardEventBus.publish(t.RAEvent.HideDashboardBanner,s.showEmptyDashboard))}))},i.prototype.setAreaHeight=function(){var t=this;setTimeout((function(){var e=!1;t.options.mobileBreakpoint>t.gridWrapper.nativeElement.clientWidth&&(e=!0);var i=0,s=0,r=0;t.options.api&&(r=t.options.api.getCurrentRowHeight()),t.showEmptyDashboard=!(t.userWidgets.length>0),t.widgetList.forEach((function(e){var s=e.y+e.rows;s>i&&(i=s),0==r&&(s=t.widgetList[0].curRowHeight),e.widgetInfo.rowHeight=r})),t.gridcellHeight=r,t.options.api&&(s=i*t.options.api.getCurrentRowHeight()+100);e&&(s=300*t.widgetList.length+200),s<600&&(s=600),t.gridheight=s}))},i.prototype.deleteWidget=function(e,i){void 0===i&&(i=!1);var s=this.widgetList.filter((function(t){return t.widgetInfo.widgetInstanceId===e}));if(s.length>0){var r=this.userWidgets.filter((function(t){return t.widgetInstanceId===e}));if(r.length>0&&this.userWidgets.splice(this.userWidgets.indexOf(r[0]),1),this.PAMWidgets.length>0){var o=this.PAMWidgets.indexOf(e);o>-1&&this.PAMWidgets.splice(o,1),this.checkPAMWidgets()}this.widgetList.splice(this.widgetList.indexOf(s[0]),1),this.setAreaHeight(),i||this.notifier.notify("success"," "+this.translateService.translate("Common.Widgettext")+" "+s[0].widgetInfo.widgetTitle+" "+this.translateService.translate("Common.deletedSuccesfully")+" ")}this.showEmptyDashboard=!(this.userWidgets.length>0),1==this.showEmptyDashboard&&this.raDashboardEventBus.publish(t.RAEvent.HideDashboardBanner,this.showEmptyDashboard)},i.prototype.rearrangeWidgets=function(){for(var t=this,e=0;e<this.userWidgets.length;e++)this.userWidgets[e].position_x=0,this.userWidgets[e].position_y=0;this.widgetList=this.mapObjectListToGridsterItemList(this.userWidgets),this.widgetList.length>0&&this.updateWidgetPosition(this.widgetList[0].widgetInfo.widgetInstanceId),setTimeout((function(){t.setAreaHeight()}))},i.prototype.addWidget=function(e){var i=this;e.height=this.widgetHeight,e.width=this.widgetWidth,this.raDashboardEventBus.publish(t.RAEvent.HideDashboardBanner,!1),e.widgetSettings&&("string"==typeof e.widgetSettings&&(e.widgetSettings=JSON.parse(e.widgetSettings)),e.widgetSettings.defaultCols&&(e.width=e.widgetSettings.defaultCols),e.widgetSettings.defaultRows&&(e.height=e.widgetSettings.defaultRows),e.widgetSettings=null),(e=this.setPositions(e)).dashboardAreaKey=this.areaKey,e.dashboardId=this.userDashboardId,this.ngxService.start(),this.dashboardService.addWidget(e,this.appConfig).subscribe((function(e){i.userWidgets.push(e);var s=i.responsiveService.getGridsterItem(e);if(i.widgetList.push(s),i.setAreaHeight(),i.options.api){var r=Number(i.options.api.getCurrentRowHeight());r>0&&(e.rowHeight=r,i.gridcellHeight=r)}var o=0;e&&e.widgetInstanceId&&(o=e.widgetInstanceId,i.responsiveService.IsDesktopView&&setTimeout((function(){i.updateWidgetPosition(o)}))),e.settings&&e.settings.isPAMWidget&&(i.PAMWidgets.push(e.widgetInstanceId),i.checkPAMWidgets()),i.raDashboardEventBus.publish(t.RAEvent.WidgetAdded,e)}))},i.prototype.setPositions=function(t){if(t.position_x=0,t.position_y=0,!this.responsiveService.IsDesktopView&&this.userWidgets.length>0){var e=this.userWidgets[this.userWidgets.length-1];e.position_x+e.width>this.responsiveService.maxColsDesktop/2?t.position_y=e.position_y+1:(t.position_y=e.position_y,t.position_x=this.responsiveService.maxColsDesktop-(e.position_x+e.width))}return t},i.prototype.copyWidget=function(t){t=this.setPositions(t),this.responsiveService.IsDesktopView||this.dashboardService.updateWidgets(this.formatWidgetDataForPositionDetails([t]),this.appConfig).subscribe((function(t){})),this.userWidgets.push(t);var e=this.responsiveService.getGridsterItem(t);this.widgetList.push(e),this.setAreaHeight(),t.settings&&t.settings.isPAMWidget&&(this.PAMWidgets.push(t.widgetInstanceId),this.checkPAMWidgets())},i.prototype.mapObjectListToGridsterItemList=function(t){var e=this,i=Array();return t.forEach((function(t){i.push(e.responsiveService.getGridsterItem(t))})),i},i.prototype.mapGridsterItemToObject=function(t){var e;return(e=t.widgetInfo).height=t.rows,e.width=t.cols,e.position_x=t.x,e.position_y=t.y,e.rowHeight=t.curRowHeight,e},i.prototype.mapGridsterListToObject=function(t){var e=this,i=Array();return t.forEach((function(t){i.push(e.mapGridsterItemToObject(t))})),i},i.prototype.buttonClick=function(){"widgets"==this.emptyDashboardButtonAction?this.raDashboardEventBus.publish(t.RAEvent.AddNewWidgetToDashboard,null):"filter"==this.emptyDashboardButtonAction&&this.raDashboardEventBus.publish(t.RAEvent.GlobalFilterClick,null)},i.prototype.updateAppliedFilters=function(e){this.raDashboardEventBus.publish(t.RAEvent.UpdateAppledFiterForInapplicableFilter,e)},i.prototype.checkPAMWidgets=function(){this.PAMWidgets.length>0?this.raDashboardEventBus.publish(t.RAEvent.ShowInapplicableFilterMessage,!0):this.raDashboardEventBus.publish(t.RAEvent.ShowInapplicableFilterMessage,!1)},i.ctorParameters=function(){return[{type:I},{type:e.NgZone},{type:o.NgxUiLoaderService},{type:s.RATranslateService},{type:n.NotifierService},{type:T},{type:s.RAPermissionService}]},u([e.Input("user-dashboard-id"),y("design:type",Number)],i.prototype,"userDashboardId",void 0),u([e.Input("area-key"),y("design:type",String)],i.prototype,"areaKey",void 0),u([e.Input("global-filter"),y("design:type",Object)],i.prototype,"globalFilter",void 0),u([e.Input("event-bus"),y("design:type",C)],i.prototype,"raDashboardEventBus",void 0),u([e.Input("widget-height"),y("design:type",Number)],i.prototype,"widgetHeight",void 0),u([e.Input("widget-width"),y("design:type",Number)],i.prototype,"widgetWidth",void 0),u([e.Input("app-config"),y("design:type",Object)],i.prototype,"appConfig",void 0),u([e.Input("dashboard-info"),y("design:type",Object)],i.prototype,"dashboardInfo",void 0),u([e.Output(),y("design:type",Object)],i.prototype,"hideDashboardBanner",void 0),u([e.ViewChild("gridWrapper",{static:!1}),y("design:type",e.ElementRef)],i.prototype,"gridWrapper",void 0),i=u([e.Component({selector:"ra-dashboard-area",template:'<div #gridWrapper class="wrap gridster gridster-mobile" [ngStyle]="{\'height\': userWidgets.length > 0 ? (gridheight + \'px\') : \'unset\'}">\r\n \x3c!-- <div #gridWrapper class="wrap gridster"> --\x3e\r\n <gridster [options]="options" style="height:100%;" *ngIf="userWidgets.length > 0">\r\n <gridster-item [item]="item" *ngFor="let item of widgetList">\r\n <ra-widget-container [bulk-action-data]="bulkActionData" [dashboard-info]="dashboardInfo" [app-config]="appConfig" [event-bus]="raDashboardEventBus"\r\n (widgetDeleted)="deleteWidget($event)" [data]="item" [global-filter]="globalFilter"\r\n [grid-cell-height]="gridcellHeight" *ngIf="gridcellHeight && gridcellHeight > 0" [widget-width]="item.cols"\r\n [widget-height]="item.rows" [widget-instance-id]="item.widgetInstanceId" [dom-resized]="domResized"\r\n (updateAppliedFilters)="updateAppliedFilters($event)">\r\n </ra-widget-container>\r\n </gridster-item>\r\n </gridster>\r\n\r\n <div class="empty-padding kiosk-hide" *ngIf="showEmptyDashboard">\r\n <div class="empty-wrapper">\r\n <div></div>\r\n <div class="empty-prefix">\r\n \x3c!-- <i class="fal fa-edit edit-icon"></i> --\x3e\r\n <span>{{emptyDashboardTitle}}</span>\r\n </div>\r\n <hr class="horizontalLine-solid" />\r\n <div class="empty-content light">\r\n <div>\r\n <div class="col-sm-12 empty-msg">\r\n {{emptyDashboardMsg1}} <br />\r\n {{emptyDashboardMsg2}}\r\n </div>\r\n <button *ngIf="isWidgetMgmnt" class="btn btnLib btn-sm dashboard-button light" (click)="buttonClick()">\r\n <i class="{{emptyDashboardButtonIcon}}"></i>{{emptyDashboardButtonText}}</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <notifier-container></notifier-container>\r\n</div>',styles:["gridster{width:inherit;resize:height;display:flex;background-color:#fff;overflow-y:hidden!important}.dvheader{width:100%;height:35px;background:#000;color:#fff;padding:7px 3px 5px 6px;text-transform:uppercase}gridster-item{box-sizing:border-box;z-index:1;position:absolute;overflow:hidden;transition:.3s;display:none;background:#fff;-webkit-user-select:text;-moz-user-select:text;user-select:text;box-shadow:none}gridster-item:hover{box-shadow:0 1px 10px rgba(0,0,0,.15)!important}@media screen and (max-width:685px){.gridster-mobile{height:auto!important;margin-bottom:50px!important}}@media screen and (max-width:350px){.gridster-mobile{min-height:330px!important;margin-bottom:0!important}}.empty-padding{padding:15px 0;background-color:#fff;display:flex}.empty-wrapper{background-color:#fff;border:1px solid #9fa0a4;min-height:125px;width:100%}.empty-prefix{color:#32ad3c;font-size:18px;padding:15px}.empty-content{color:#626469;width:100%;padding:15px}.empty-msg{padding:0 0 15px;font-size:16px}.horizontalLine-solid{border-top:1px solid #cbcbcb;margin:0 15px}.dashboard-button{padding:5px 10px 5px 5px!important}.btnLib{background-color:#ededed;color:#333!important}.btn-group-sm>.btn,.btn-sm{padding:5px 20px 5px 5px}.edit-icon{color:#32ad3c;font-size:24px;margin-right:15px}.empty-title{margin-top:10px}@media screen and (max-width:600px){.empty-padding{padding:15px 0;background-color:#fff;width:100%;display:block}.empty-wrapper{display:flex;background-color:#fff;border:1px solid #9fa0a4;min-height:125px;width:100%}.empty-prefix{color:#32ad3c;font-size:16px;display:flex;height:40px;padding:15px}.empty-content{color:#333;display:flex;padding:15px}.empty-msg{padding:0 0 15px;font-size:14px}.edit-icon{color:#32ad3c;font-size:20px;margin-right:6px}.empty-title{margin-top:6px}}"]}),y("design:paramtypes",[I,e.NgZone,o.NgxUiLoaderService,s.RATranslateService,n.NotifierService,T,s.RAPermissionService])],i)}(),W=function(){function t(t){this.domService=t}return t.prototype.ngOnInit=function(){this.element&&this.setPopupPosition()},t.prototype.setPopupPosition=function(){var t=this.element.getBoundingClientRect();t.left+250>window.innerWidth?this.containerLeft=t.left-(t.left+270-window.innerWidth)+"px":this.containerLeft=t.left+"px",t.bottom+100<window.innerHeight?(this.containerTop=t.bottom+"px",this.containerBottom=null):(this.containerTop=null,this.containerBottom=window.innerHeight-t.top+"px")},t.prototype.removeMe=function(t){var e=this;setTimeout((function(){e.domService.removeComponent(t)}))},t.ctorParameters=function(){return[{type:s.DomService}]},t=u([e.Component({selector:"ra-lock-tooltip",template:'<div class="lock-popup-content light widget-config-item"\r\n [ngStyle]="{\'top\': containerTop,\'bottom\':containerBottom,\'position\':\'fixed\',\'left\':containerLeft,\'z-index\': \'9999\',\'width\':\'250px\',\'min-height\':\'fit-content\'}">\r\n <div *ngIf="data && !template">\r\n <label style="color: #D9F0FA;">\r\n {{title}}:\r\n </label>\r\n <div style="color: white;">\r\n <label class="bold" style="margin-bottom: 0px;width: 100%;" *ngFor="let item of data">\r\n {{item}}\r\n </label>\r\n </div>\r\n <hr style="background-color: white;">\r\n <div style="color: #D9F0FA;">\r\n <label>{{footer}}</label>\r\n </div>\r\n </div>\r\n <div *ngIf="!data && template">\r\n <ng-container *ngTemplateOutlet="template">\r\n </ng-container>\r\n </div>\r\n</div>',styles:[".lock-popup-content{margin-top:8px;position:absolute;right:0;top:79%;box-shadow:0 8px 16px 8px rgba(0,0,0,.2);z-index:899;font-size:12px;min-width:220px!important;min-height:112px;background-color:#219bfd;opacity:.9;padding:15px;color:#fff}.widget-config-item i{font-size:17px;color:#42b4e6}.widget-config-item span{font-size:12px;font:inherit;padding-left:12px;color:#42b4e6}"]}),y("design:paramtypes",[s.DomService])],t)}(),P=function(){function i(t,i,s,r,o,n,a,h){var l=this;this.dashboardService=t,this.ngxService=i,this.translateService=s,this.ngZone=r,this.notifier=o,this.renderer=n,this.raPermissionService=a,this.domService=h,this.showPanel=!0,this.isWidgetLoaded=!1,this.lockClass="unlocked",this.lockStatus=d.RaWidgetlockStatus.Unlocked,this.isDownloadIconVisible=!1,this.isChartDownloadVisible=!1,this.isGridDownloadVisible=!1,this.enableTitleLine=!1,this.isGlobalFilterApplied=!1,this.toolTipValue=" ",this.toolTipWidth="0px",this.editToolTipValue=" ",this.copyToolTipValue=" ",this.moveToolTipValue=" ",this.excelToolTipValue=" ",this.deleteToolTipValue=" ",this.editText="",this.copyText="",this.moveText="",this.excelText="",this.deleteText="",this.editToolTipWidth="0px",this.copyToolTipWidth="0px",this.moveToolTipWidth="0px",this.excelToolTipWidth="0px",this.deleteToolTipWidth="0px",this.noPadding=!1,this.isMouseHover=!1,this.showSettingsLink=!0,this.isKpiView=!1,this.showExcell=!0,this.hideTitle=!1,this.inapplicableFilters=[],this.widgetDeleted=new e.EventEmitter,this.updateAppliedFilters=new e.EventEmitter,this.isWidgetStateApplicable=!1,this.widgetEmptyState="",this.lockVisible=!1,this.isWidgetMgmnt=!1,this.enableTitleLineActual=!1,this.renderer.listen("window","click",(function(t){t.target.className?"fal fa-ellipsis-v widget-menu-ellipse"!=t.target.className&&l.removeMenu():l.removeMenu()}))}return Object.defineProperty(i.prototype,"setResized",{set:function(t){this.invokeWidgetResizedEvent()},enumerable:!0,configurable:!0}),i.prototype.ngOnInit=function(){this.WidgetDisplayName=this.translateService.translate("Common."+this.data.widgetInfo.widgetTitle,!0),this.lockIconTitle=this.translateService.translate("Common.lockedfields"),this.lockIconFooter=this.translateService.translate("Common.lockedfieldseditinfo"),this.inapplicableIconTitle=this.translateService.translate("Common.InapplicableFilters"),this.inapplicableIconFooter=this.translateService.translate("Common.InapplicableFiltersDesc")},Object.defineProperty(i.prototype,"widgetViewState",{get:function(){return d.WidgetViewState},enumerable:!0,configurable:!0}),i.prototype.ngOnChanges=function(e){var i=this;if(this.isWidgetMgmnt=this.raPermissionService.hasPermission("ra.widgetmanagement"),e.raDashboardEventBus&&e.raDashboardEventBus.currentValue!=e.raDashboardEventBus.previousValue&&(this.configChanged=this.raDashboardEventBus.subscribeWithKey(t.RAEvent.ConfigChanged,t.RAEventKey.WidgetInstanceId,this.data.widgetInfo.widgetInstanceId.toString()).subscribe((function(t){i.ngZone.run((function(){i.configChangeEventHandler(t)}))}))),this.widgetElement){if(e.bulkActionData&&e.bulkActionData.currentValue!=e.bulkActionData.previousValue&&"function"==typeof this.widgetElement.bulkActionClicked&&this.widgetElement.bulkActionClicked(this.bulkActionData),e.globalFilter&&e.globalFilter.currentValue!=e.globalFilter.previousValue){var s=this.getParsedConfig(this.globalFilter);s.WidgetInstanceId?this.data.widgetInfo.widgetInstanceId!=s.WidgetInstanceId&&this.refreshWidget(this.data.widgetInfo):this.refreshWidget(this.data.widgetInfo)}(e.width&&e.width.currentValue!=e.width.previousValue||e.height&&e.height.currentValue!=e.height.previousValue)&&this.invokeWidgetResizedEvent()}},i.prototype.invokeWidgetResizedEvent=function(){if(this.widgetElement&&"function"==typeof this.widgetElement.widgetResized){var t={};t.height=this.height,t.width=this.width,t.cellHeight=this.gridCellHeight,this.widgetElement.widgetResized(t),1==this.height||1==this.width?this.isKpiView=!0:this.isKpiView=!1}},i.prototype.mouseHover=function(t){void 0===t&&(t=!0),this.isMouseHover=t,this.widgetElement&&("function"==typeof this.widgetElement.hoverStatus?this.widgetElement.hoverStatus(t):console.warn("widget framework outdated, please update to version 0.0.96"))},i.prototype.ngAfterViewInit=function(){var t=this;setTimeout((function(){t.loadWidget(t.data.widgetInfo)})),document.addEventListener("scroll",(function(){t.removeMenu(),t.closePopup()})),setTimeout((function(){var e=jQuery(t.wcWrapper.nativeElement).closest("gridster-item");e.bind("mouseenter",(function(){window.gridsterItemEnter=!0})),e.bind("mouseleave",(function(){window.gridsterItemEnter=!1,setTimeout((function(){window.mouseOverWidgetMenu||t.removeMenu()}))}))}))},i.prototype.ngOnDestroy=function(){this.configChanged&&this.configChanged.unsubscribe(),this.widgetElementHandler&&this.data&&this.data.widgetInfo&&this.data.widgetInfo.widgetInstanceId&&document.body.removeEventListener("widgetinitiated"+this.data.widgetInfo.widgetInstanceId,this.widgetElementHandler)},i.prototype.editWidget=function(){var e;if(this.widgetElement&&"function"==typeof this.widgetElement.getConfigFilter){var i=this.widgetElement.getConfigFilter();i&&(e=i)}if(e)this.raDashboardEventBus.publish(t.RAEvent.WidgetEditClicked,e);else{var s=this.generateConfigFilter(!1);this.raDashboardEventBus.publish(t.RAEvent.WidgetEditClicked,s)}},i.prototype.deleteWidget=function(){var t=this,e=this;e.ngxService.start(),e.dashboardService.deleteWidget(this.data.widgetInfo,this.appConfig).subscribe((function(i){e.ngxService.stop(),i?(e.widgetDeleted.emit(t.data.widgetInfo.widgetInstanceId),t.setInapplicableFilters(void 0,t.data.widgetInfo.widgetInstanceId)):e.notifier.notify("error"," "+t.translateService.translate("FailedToRemoveWidget")+" ("+t.translateService.translate("Common."+t.data.widgetInfo.widgetTitle,!0)+")!")}))},i.prototype.moveWidget=function(){this.raDashboardEventBus.publish(t.RAEvent.MoveWidget,this.data.widgetInfo),this.setInapplicableFilters(void 0,this.data.widgetInfo.widgetInstanceId)},i.prototype.copyWidget=function(){this.raDashboardEventBus.publish(t.RAEvent.CopyWidget,this.data.widgetInfo)},i.prototype.visitPage=function(){this.baseUrl=this.getHostUrl();var t=this.baseUrl+this.detailPageUrl;if(this.data.widgetInfo&&this.data.widgetInfo.widgetSettings&&(this.widgetSettings=this.getParsedConfig(this.data.widgetInfo.widgetSettings),this.widgetSettings.customPageParams||this.widgetSettings.customPageURL)){var e=this.widgetElement.getPageParamsClicked();e&&("AV Widget"==this.data.widgetInfo.widgetType||this.widgetSettings.customPageURL?t+=e:t=t+"?"+e)}window.open(t,"_blank")},i.prototype.getHostUrl=function(){return window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")},i.prototype.configChangeEventHandler=function(t){this.data.widgetInfo=t,this.gridCellHeight>0&&(this.data.widgetInfo.rowHeight=this.gridCellHeight),this.widgetElement&&"function"==typeof this.widgetElement.setConfigFilter?this.widgetElement.setConfigFilter(this.generateConfigFilter(!0)):console.warn("widget framework outdated, please update to version 0.0.98"),this.refreshWidget(this.data.widgetInfo,!0)},i.prototype.generateConfigFilter=function(t){return void 0===t&&(t=!1),{appConfig:this.appConfig,globalFilter:this.globalFilter,widgetInfo:this.data.widgetInfo,config:this.data.widgetInfo.widgetConfigInfo.config,configChanges:this.getConfigChanges(t)}},i.prototype.loadWidget=function(t){return w(this,void 0,void 0,(function(){var e,i,s=this;return v(this,(function(r){return t.rowHeight=this.gridCellHeight,e={config:t.widgetConfigInfo.config,globalFilter:this.globalFilter,configChanges:this.getConfigChanges(!1)},t.widgetSettings&&(this.widgetSettings=this.getParsedConfig(t.widgetSettings),this.applayWidgetSettings(this.widgetSettings)),this.detailPageUrl=t.detailPageUrl,i=this,this.dashboardService.loadExternalScript(t.scriptUrl,(function(){s.setNotConfiguredState(t);var r=s.data.widgetInfo.widgetName;s.data.widgetInfo.applicationModule&&s.data.widgetInfo.applicationModule.length>0&&(r=s.data.widgetInfo.applicationModule),s.translateService.loadTranslations(s.appConfig.appManagementBaseUrl,r,!1).then((function(){i.widgetElement=document.createElement(t.customTag),i.widgetElement.setAttribute("widget-instance-id",t.widgetInstanceId);var r=function(s){var r=this;setTimeout((function(){return w(r,void 0,void 0,(function(){var s,r=this;return v(this,(function(o){switch(o.label){case 0:return this.widgetElement.addEventListener("on-widget-respond",(function(e){switch(e.detail.type){case"onDataLoad":e.detail.data?r.showPanel=!0:r.showPanel=!1;break;case"onConfigEditClicked":r.editWidget();break;case"onEnableDefaultState":r.setEmptyState(e.detail.data);break;case"onSetTitleUnderline":1==e.detail.data?r.enableTitleLine=!0:r.enableTitleLine=r.enableTitleLineActual;break;case"onWidgetTitleHidden":1==e.detail.data?r.hideTitle=!0:r.hideTitle=!1;break;case"onUpdateLockData":r.setLock(e.detail.data);break;case"onGlobalFilterApplicableCheck":r.setInapplicableFilters(e.detail.data,t.widgetInstanceId)}})),void 0!==this.widgetElement.titleLineEnabled&&(s=this.widgetElement.titleLineEnabled())&&(this.enableTitleLine=s,this.enableTitleLineActual=s),this.editText=this.translateService.translate("Common.edit"),this.translateService.translate("Common.edit").length>6&&(this.editText=this.translateService.translate("Common.edit").substring(0,6)+"...",this.editToolTipValue=this.translateService.translate("Common.edit"),this.editToolTipWidth="300px"),this.copyText=this.translateService.translate("Common.copy"),this.translateService.translate("Common.copy").length>6&&(this.copyText=this.translateService.translate("Common.copy").substring(0,6)+"...",this.copyToolTipValue=this.translateService.translate("Common.copy"),this.copyToolTipWidth="300px"),this.moveText=this.translateService.translate("Common.move"),this.translateService.translate("Common.move").length>6&&(this.moveText=this.translateService.translate("Common.move").substring(0,6)+"...",this.moveToolTipValue=this.translateService.translate("Common.move"),this.moveToolTipWidth="300px"),this.excelText=this.translateService.translate("Common.excel"),this.translateService.translate("Common.excel").length>6&&(this.excelText=this.translateService.translate("Common.excel").substring(0,6)+"...",this.excelToolTipValue=this.translateService.translate("Common.excel"),this.excelToolTipWidth="300px"),this.deleteText=this.translateService.translate("Common.delete"),this.translateService.translate("Common.delete").length>6&&(this.deleteText=this.translateService.translate("Common.delete").substring(0,6)+"...",this.deleteToolTipValue=this.translateService.translate("Common.delete"),this.deleteToolTipWidth="300px"),this.isWidgetLoaded=!0,e.appConfig=this.appConfig,e.widgetInfo=t,e.configChanges=this.getConfigChanges(!1),e.widgetInfo.widgetName=t.widgetName,e.globalFilter=this.globalFilter,e.dashboardInfo=i.dashboardInfo,this.widgetElement.loadContent(e),[4,this.setLock(e.config)];case 1:return o.sent(),[4,this.setDownloadIcon()];case 2:return o.sent(),[2]}}))}))}))}.bind(s);s.widgetElementHandler=r,document.body.addEventListener("widgetinitiated"+t.widgetInstanceId,r),s.ctlWidget.nativeElement.appendChild(s.widgetElement)}))})),[2]}))}))},i.prototype.setNotConfiguredState=function(t,e){void 0===e&&(e=!1),t.showDefaultState&&(""==t.widgetConfigInfo.config||0==Object.keys(JSON.parse(t.widgetConfigInfo.config)).length)||e?(this.isWidgetStateApplicable=!0,this.widgetEmptyState=d.WidgetViewState.emptyConfig.toString()):(this.widgetEmptyState="",this.isWidgetStateApplicable=!1)},i.prototype.setEmptyState=function(t){switch(1==this.height||1==this.width?this.isKpiView=!0:this.isKpiView=!1,this.widgetEmptyState=t.widgetViewState,this.isGlobalFilterApplied=t.isGlobalFilterApplied,t!=d.WidgetViewState.normal?(this.isWidgetStateApplicable=!0,this.isDownloadIconVisible=!1):this.isWidgetStateApplicable=!1,t){case d.WidgetViewState.emptyConfig:this.setNotConfiguredState(this.data.widgetInfo,!0);break;case d.WidgetViewState.emptyData:case d.WidgetViewState.error:}},i.prototype.getConfigChanges=function(t){return void 0===t&&(t=!1),{isConfigUpdated:t,updatedConfigProperty:[]}},i.prototype.refreshWidget=function(t,e){return void 0===e&&(e=!1),w(this,void 0,void 0,(function(){var i,s;return v(this,(function(r){switch(r.label){case 0:return this.WidgetDisplayName=this.translateService.translate("Common."+this.data.widgetInfo.widgetTitle,!0),t.rowHeight=this.gridCellHeight,this.setNotConfiguredState(t),i=this,s={config:t.widgetConfigInfo.config,globalFilter:this.globalFilter,appConfig:this.appConfig,widgetInfo:t,configChanges:this.getConfigChanges(e)},i.isWidgetLoaded?(this.widgetElement&&"function"==typeof this.widgetElement.setConfigFilter&&i.widgetElement.setConfigFilter(s),i.widgetElement.loadContent(s),[4,this.setLock(s.config)]):[3,3];case 1:return r.sent(),[4,this.setDownloadIcon()];case 2:r.sent(),r.label=3;case 3:return[2]}}))}))},i.prototype.mouseOver=function(t){this.toolTipValue=" ",this.toolTipWidth="0px";var e=this.searchInput.nativeElement;e.offsetWidth<e.scrollWidth?(this.toolTipValue=e.innerHTML,this.toolTipWidth="300px"):this.toolTipWidth="0px"},i.prototype.setLock=function(t){return w(this,void 0,void 0,(function(){var e;return v(this,(function(i){return this.lockTemplateInfo=this.widgetElement.loadLockInfo(),t&&((e=JSON.parse(t))&&null!=e.Locks&&(e.Locks.IsDateLocked||e.Locks.IsDatesLocked||e.Locks.IsParticipantLocked||e.Locks.IsSourceLocked)?(this.lockDetails=[],(e.Locks.IsDateLocked||e.Locks.IsDatesLocked)&&this.lockDetails.push(this.translateService.translate("Common.DateRange")),e.Locks.IsParticipantLocked&&this.lockDetails.push(this.translateService.translate("Common.DivisionOrGrouporSite")),e.Locks.IsSourceLocked&&this.lockDetails.push(this.translateService.translate("Common.DataStream"))):this.lockDetails=void 0),[2]}))}))},i.prototype.setDownloadIcon=function(){return w(this,void 0,void 0,(function(){var t;return v(this,(function(e){switch(e.label){case 0:return[4,this.widgetElement.getDownloadType()];case 1:return t=e.sent(),this.downloadIconType=t,this.isDownloadIconVisible=!1,this.isChartDownloadVisible=!1,this.isGridDownloadVisible=!1,this.showExcell=!0,t!=d.RADownloadType.None?this.isDownloadIconVisible=!0:this.isWidgetMgmnt||this.detailPageUrl||(this.showSettingsLink=!1),t==d.RADownloadType.Chart&&(this.isChartDownloadVisible=!0),t==d.RADownloadType.Grid&&(this.isGridDownloadVisible=!0),t==d.RADownloadType.Statistics&&(this.isGridDownloadVisible=!0,this.showExcell=!1),[2]}}))}))},i.prototype.downloadIconClicked=function(t){switch(t){case"CSV":this.widgetElement.downloadClicked(this.downloadIconType,d.RADownloadOption.CSV);break;case"PNG":this.widgetElement.downloadClicked(this.downloadIconType,d.RADownloadOption.PNG);break;case"PDF":this.widgetElement.downloadClicked(this.downloadIconType,d.RADownloadOption.PDF);break;case"SVG":this.widgetElement.downloadClicked(this.downloadIconType,d.RADownloadOption.SVG);break;case"JPEG":this.widgetElement.downloadClicked(this.downloadIconType,d.RADownloadOption.JPEG)}},i.prototype.removeMenu=function(){jQuery("#ra-db-widget-menu").remove()},i.prototype.checkVisitLinkVisiblity=function(){var t=!0;return this.widgetElement&&"function"==typeof this.widgetElement.getVisitLinkVisibilityStatus&&(t=this.widgetElement.getVisitLinkVisibilityStatus()),t},i.prototype.showDropDown=function(t){var e=this;this.setDownloadIcon(),this.removeMenu(),setTimeout((function(){var i="position:fixed;top:"+(t.target.getBoundingClientRect().y+15)+"px;left:"+(t.pageX-122)+"px;z-index:1000;",s=e.getContenxtHtml(i);jQuery(s).appendTo("body"),e.isWidgetMgmnt&&(e.addEventListener("wcEditWidget",e.editWidget),e.addEventListener("wcCopyWidget",e.copyWidget),e.addEventListener("wcMoveWidget",e.moveWidget),e.addEventListener("wcWidgetDelete",e.deleteWidget));var r=!1;e.data.widgetInfo&&e.data.widgetInfo.widgetSettings&&(e.widgetSettings=e.getParsedConfig(e.data.widgetInfo.widgetSettings),(e.widgetSettings.customPageParams||e.widgetSettings.customPageURL)&&(r=!0)),(e.detailPageUrl||r)&&e.checkVisitLinkVisiblity()&&e.addEventListener("wcVisitWidget",e.visitPage),e.isChartDownloadVisible&&(e.addEventListener("wcDownloadPng",e.downloadIconClicked,"PNG"),e.addEventListener("wcDownloadJpg",e.downloadIconClicked,"JPEG"),e.addEventListener("wcDownloadPdf",e.downloadIconClicked,"PDF"),e.addEventListener("wcDownloadSvg",e.downloadIconClicked,"SVG")),e.isGridDownloadVisible&&e.showExcell&&e.addEventListener("wcDownloadExcel",e.downloadIconClicked,"CSV"),document.getElementById("ra-db-widget-menu").addEventListener("mouseenter",(function(){window.mouseOverWidgetMenu=!0})),document.getElementById("ra-db-widget-menu").addEventListener("mouseleave",(function(){window.mouseOverWidgetMenu=!1,setTimeout((function(){window.gridsterItemEnter||e.removeMenu()}))}))}))},i.prototype.addEventListener=function(t,e,i){var s=this,r=document.getElementById(t);r&&r.addEventListener("click",(function(){e.call(s,i)}))},i.prototype.getContenxtHtml=function(t){var e='<div id="ra-db-widget-menu"style="'+t+'" class="download-content dropdown-content widget-config-item dropdown-click" style="z-index: 1002;">',i="";this.isWidgetMgmnt&&(this.data.widgetInfo.templateWidgetSettings&&this.data.widgetInfo.templateWidgetSettings.hideEdit||(i+=this.getHtmlForButton("wcEditWidget","fal fa-edit",this.editText)),this.data.widgetInfo.templateWidgetSettings&&this.data.widgetInfo.templateWidgetSettings.hideCopy||(i+=this.getHtmlForButton("wcCopyWidget","fal fa-copy",this.copyText)),this.data.widgetInfo.templateWidgetSettings&&this.data.widgetInfo.templateWidgetSettings.hideMove||(i+=this.getHtmlForButton("wcMoveWidget","fal fa-arrows-alt",this.moveText)));var s=!1;return this.data.widgetInfo&&this.data.widgetInfo.widgetSettings&&(this.widgetSettings=this.getParsedConfig(this.data.widgetInfo.widgetSettings),(this.widgetSettings.customPageParams||this.widgetSettings.customPageURL)&&(s=!0)),(!this.data.widgetInfo.templateWidgetSettings||!this.data.widgetInfo.templateWidgetSettings.hideVisitPage&&(this.detailPageUrl||s)&&this.checkVisitLinkVisiblity())&&(i+='<a style="max-height: 30px;align-items: center;align-content: center; display: flex;" id="wcVisitWidget">',i+='<i style="padding-left: 4px;font-size: 27px !important;" class="fal fa-angle-right"></i> ',i+='<span style="padding-left: 11px;margin-top: 2px;" style="padding-left: 6px;">',i+=this.translateService.translate("Common.visitpage"),i+="</span></a>"),(!this.data.widgetInfo.templateWidgetSettings||!this.data.widgetInfo.templateWidgetSettings.hideVisitPage&&this.detailPageUrl&&this.checkVisitLinkVisiblity()||this.isWidgetMgmnt)&&(e+='<div style="color: #9FA0A4;font-size: 12px;padding-top: 8px;padding-left: 12px;">',e+=this.translateService.translate("Common.settings")+"</div>",e+=i,e+=this.getHr()),this.isDownloadIconVisible&&(this.showExcell&&(this.detailPageUrl||this.isWidgetMgmnt?e+='<span style="color: #9FA0A4;font-size: 12px;">':e+='<span style="color: #9FA0A4;font-size: 12px;padding-top:5px;display:block;">',e+=this.translateService.translate("Common.downloads"),e+="</span>"),this.isChartDownloadVisible&&(e+='<div style="padding-top: 10px;" class="chartDownload">',e+=this.getHtmlForButton("wcDownloadPng","fal fa-file-image",this.translateService.translate("Common.png")),e+=this.getHtmlForButton("wcDownloadJpg","fal fa-file-image",this.translateService.translate("Common.jpeg")),e+=this.getHtmlForButton("wcDownloadPdf","fal fa-file-pdf",this.translateService.translate("Common.pdf")),e+=this.getHtmlForButton("wcDownloadSvg","fal fa-file-alt",this.translateService.translate("Common.svg")),e+="</div>"),this.isGridDownloadVisible&&this.showExcell&&(e+='<div class="gridDownload">',e+=this.getHtmlForButton("wcDownloadExcel","fal fa-download",this.excelText),e+="</div>")),this.isDownloadIconVisible&&this.isWidgetMgmnt&&this.showExcell&&(e+=this.getHr()),(this.isWidgetMgmnt&&!this.data.widgetInfo.templateWidgetSettings||!this.data.widgetInfo.templateWidgetSettings.hideDelete)&&(e+='<a id="wcWidgetDelete"><i class="fal fa-times" style="padding-left: 3px;color: red;"></i><span>',e+=this.deleteText,e+="</span></a>"),e+="</div>"},i.prototype.getHr=function(){return'<hr class="hr" style="margin-top: 5px;margin-bottom: 5px;">'},i.prototype.getHtmlForButton=function(t,e,i){var s='<a id="'+t+'"><i style="width:16px" class="'+e+'"></i> <span style="padding-left: 6px;">';return s+=i,s+="</span></a>"},i.prototype.getParsedConfig=function(t){var e;if(t&&"string"==typeof t){try{e=JSON.parse(t)}catch(t){e={}}return e}return t},i.prototype.applayWidgetSettings=function(t){t.NoPadding?this.noPadding=!0:this.noPadding=!1},i.prototype.setInapplicableFilters=function(t,e){var i=this,s={};this.inapplicableFilters=[],s.instanceId=e,t&&t.length>0?(t.forEach((function(t){"dateRange"==t?i.inapplicableFilters.push(i.translateService.translate("Common.DateRange")):"participant"==t?i.inapplicableFilters.push(i.translateService.translate("Common.DivisionGroup")):"source"==t?i.inapplicableFilters.push(i.translateService.translate("Common.DataStream")):i.inapplicableFilters.push(t)})),s.data=t):s.data=void 0,this.updateAppliedFilters.emit(s)},i.prototype.openPopup=function(t,e,i,s,r){void 0===r&&(r=void 0);var o={};"innaplicable"==s&&this.banPopupDiv&&(o.element=this.banPopupDiv.nativeElement),"lock"==s&&this.lockPopupDiv&&(o.element=this.lockPopupDiv.nativeElement),o.title=t,o.data=e,o.footer=i,r&&(o.template=r),this.currentComponent=this.domService.appendComponent(W,document.body,o),this.popupInstance=this.currentComponent.instance},i.prototype.closePopup=function(){this.currentComponent&&this.popupInstance.removeMe(this.currentComponent)},i.ctorParameters=function(){return[{type:I},{type:o.NgxUiLoaderService},{type:s.RATranslateService},{type:e.NgZone},{type:n.NotifierService},{type:e.Renderer2},{type:s.RAPermissionService},{type:s.DomService}]},u([e.ViewChild("ctlWidget",{static:!1}),y("design:type",e.ElementRef)],i.prototype,"ctlWidget",void 0),u([e.ViewChild("widgetDropdown",{static:!1}),y("design:type",e.ElementRef)],i.prototype,"widgetDropdown",void 0),u([e.ViewChild("searchInput",{static:!1}),y("design:type",e.ElementRef)],i.prototype,"searchInput",void 0),u([e.ViewChild("wcWrapper",{static:!1}),y("design:type",e.ElementRef)],i.prototype,"wcWrapper",void 0),u([e.ViewChild("banPopupDiv",{static:!1}),y("design:type",e.ElementRef)],i.prototype,"banPopupDiv",void 0),u([e.ViewChild("lockPopupDiv",{static:!1}),y("design:type",e.ElementRef)],i.prototype,"lockPopupDiv",void 0),u([e.Input("widget-instance-id"),y("design:type",Number)],i.prototype,"widgetInstanceId",void 0),u([e.Input("global-filter"),y("design:type",Object)],i.prototype,"globalFilter",void 0),u([e.Input("dashboard-info"),y("design:type",Object)],i.prototype,"dashboardInfo",void 0),u([e.Input("data"),y("design:type",Object)],i.prototype,"data",void 0),u([e.Input("event-bus"),y("design:type",C)],i.prototype,"raDashboardEventBus",void 0),u([e.Input("app-config"),y("design:type",Object)],i.prototype,"appConfig",void 0),u([e.Input("widget-width"),y("design:type",Number)],i.prototype,"width",void 0),u([e.Input("widget-height"),y("design:type",Number)],i.prototype,"height",void 0),u([e.Input("grid-cell-height"),y("design:type",Number)],i.prototype,"gridCellHeight",void 0),u([e.Input("bulk-action-data"),y("design:type",Object)],i.prototype,"bulkActionData",void 0),u([e.Output(),y("design:type",Object)],i.prototype,"widgetDeleted",void 0),u([e.Output(),y("design:type",Object)],i.prototype,"updateAppliedFilters",void 0),u([e.Input("dom-resized"),y("design:type",Boolean),y("design:paramtypes",[Boolean])],i.prototype,"setResized",null),i=u([e.Component({selector:"ra-widget-container",template:'<div #wcWrapper class="wc-wrapper" (mouseenter)="mouseHover(true)" (mouseleave)="mouseHover(false)"\r\n [ngStyle]="{\'margin-left\': noPadding?\'0px\':\'15px\',\'margin-right\': noPadding?\'0px\':\'15px\'}">\r\n <div class="wcheader widget-move" *ngIf="!hideTitle"\r\n [ngClass]="{\'underLine\': enableTitleLine || isWidgetStateApplicable}">\r\n <div class="col-md-12 wc-mover" style="padding-left: 0px;height:inherit;padding-right: 0px;">\r\n <div style="display:flex;margin-top:10px;"\r\n [ngStyle]="{\'margin-left\': noPadding?\'15px\':\'0px\',\'margin-right\': noPadding?\'15px\':\'0px\'}">\r\n <div class="col-9 float-left title-label">\r\n <ra-tooltip [value]="toolTipValue" [width]="toolTipWidth">\r\n <div [hidden]="hideTitle" style="text-overflow: ellipsis;white-space: nowrap;overflow: hidden;"\r\n (mouseover)="mouseOver($event)" #searchInput>{{WidgetDisplayName}}</div>\r\n </ra-tooltip>\r\n </div>\r\n <div class="col-3" style="cursor:default;padding-right: 0px;"> \r\n <div class="float-right" style="display: flex;">\r\n <div #banPopupDiv (mouseover)="openPopup(inapplicableIconTitle,inapplicableFilters,inapplicableIconFooter,\'innaplicable\')" (mouseout)="closePopup()" class="title-bar-lock-icon lock-dropdown" [hidden]="!inapplicableFilters || inapplicableFilters.length == 0 || !globalFilter || globalFilter == \'{}\'">\r\n <i class="fal fa-ban lock"></i> \r\n </div>\r\n <div #lockPopupDiv (mouseover)="openPopup(lockIconTitle,lockDetails,lockIconFooter,\'lock\',lockTemplateInfo)" (mouseout)="closePopup()" class="title-bar-lock-icon lock-dropdown" [hidden]="!lockDetails && !lockTemplateInfo">\r\n <i class="fal fa-lock lock"></i> \r\n </div>\r\n <div class="widget-menu" style="width:10px;"\r\n [ngClass]="{\'widget-menu-show\': isMouseHover && showSettingsLink}">\r\n <div class="dropbtn title-bar-icon">\r\n <i (click)="showDropDown($event)" #widgetDropdown class="fal fa-ellipsis-v widget-menu-ellipse"></i>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf="hideTitle" class="wcheader widget-move"\r\n style="height: 45px;width: 95%;cursor: move;z-index: 99;opacity: 0;">\r\n </div>\r\n <div *ngIf="hideTitle" class="widget-menu widget-menu-title-hidden" [ngClass]="{\'widget-menu-show\': isMouseHover && showSettingsLink}">\r\n <div class="dropbtn title-bar-icon">\r\n <i (click)="showDropDown($event)" class="fal fa-ellipsis-v" style="text-align: center;"></i>\r\n </div>\r\n </div>\r\n <div class="wcBody" [ngStyle]="{\'bottom\': noPadding?\'0px\':\'10px\',\'top\':hideTitle?\'10px\':\'46px\'}">\r\n <div [hidden]="isWidgetStateApplicable" class="m-fadeOut widget-overlay" [ngClass]="{\'m-fadeIn\': showPanel}">\r\n <div class="lds-roller">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n </div>\r\n </div>\r\n <div class="wc" [hidden]="isWidgetStateApplicable">\r\n <div #ctlWidget></div>\r\n </div>\r\n <div *ngIf="isWidgetStateApplicable" class="defaultConfig">\r\n <ra-widget-state style="width: 100%;height: 100%;" [isWidgetStateApplicable]="isWidgetStateApplicable"\r\n [isGlobalFilterApplied]="isGlobalFilterApplied" [widgetEmptyState]="widgetEmptyState"\r\n (editWidgetClicked)=editWidget() [widthCol]="width" [heightCol]="height">\r\n </ra-widget-state>\r\n </div>\r\n <div>\r\n </div>\r\n </div>\r\n</div>'}),y("design:paramtypes",[I,o.NgxUiLoaderService,s.RATranslateService,e.NgZone,n.NotifierService,e.Renderer2,s.RAPermissionService,s.DomService])],i)}(),E={position:{horizontal:{position:"right",distance:12},vertical:{position:"top",distance:12,gap:10}},theme:"material",behaviour:{autoHide:5e3,onClick:"hide",onMouseover:"pauseAutoHide",showDismissButton:!0,stacking:4},animations:{enabled:!0,show:{preset:"slide",speed:300,easing:"ease"},hide:{preset:"fade",speed:300,easing:"ease",offset:50},shift:{speed:300,easing:"ease"},overlap:150}};!function(t){t.Fit="fit",t.ScrollVertical="scrollVertical",t.ScrollHorizontal="scrollHorizontal",t.Fixed="fixed",t.VerticalFixed="verticalFixed",t.HorizontalFixed="horizontalFixed"}(x||(x={})),function(t){t.Always="always",t.OnDragAndResize="onDrag&Resize",t.None="none"}(k||(k={})),function(t){t.None="none",t.CompactUp="compactUp",t.CompactLeft="compactLeft",t.CompactUpAndLeft="compactUp&Left",t.CompactLeftAndUp="compactLeft&Up",t.CompactRight="compactRight",t.CompactUpAndRight="compactUp&Right",t.CompactRightAndUp="compactRight&Up"}($||($={}));var R,z,M,A,F,L,H,O,B,V={gridType:x.Fit,fixedColWidth:250,fixedRowHeight:250,keepFixedHeightInMobile:!1,keepFixedWidthInMobile:!1,setGridSize:!1,compactType:$.None,mobileBreakpoint:640,minCols:1,maxCols:100,minRows:1,maxRows:100,defaultItemCols:1,defaultItemRows:1,maxItemCols:50,maxItemRows:50,minItemCols:1,minItemRows:1,minItemArea:1,maxItemArea:2500,margin:10,outerMargin:!0,outerMarginTop:null,outerMarginRight:null,outerMarginBottom:null,outerMarginLeft:null,useTransformPositioning:!0,scrollSensitivity:10,scrollSpeed:20,initCallback:void 0,destroyCallback:void 0,gridSizeChangedCallback:void 0,itemChangeCallback:void 0,itemResizeCallback:void 0,itemInitCallback:void 0,itemRemovedCallback:void 0,itemValidateCallback:void 0,enableEmptyCellClick:!1,enableEmptyCellContextMenu:!1,enableEmptyCellDrop:!1,enableEmptyCellDrag:!1,emptyCellClickCallback:void 0,emptyCellContextMenuCallback:void 0,emptyCellDropCallback:void 0,emptyCellDragCallback:void 0,emptyCellDragMaxCols:50,emptyCellDragMaxRows:50,ignoreMarginInRow:!1,draggable:{delayStart:0,enabled:!1,ignoreContentClass:"gridster-item-content",ignoreContent:!1,dragHandleClass:"drag-handler",stop:void 0,start:void 0,dropOverItems:!1,dropOverItemsCallback:void 0},resizable:{delayStart:0,enabled:!1,handles:{s:!0,e:!0,n:!0,w:!0,se:!0,ne:!0,sw:!0,nw:!0},stop:void 0,start:void 0},swap:!0,pushItems:!1,disablePushOnDrag:!1,disablePushOnResize:!1,pushDirections:{north:!0,east:!0,south:!0,west:!0},pushResizeItems:!1,displayGrid:k.OnDragAndResize,disableWindowResize:!1,disableWarnings:!1,scrollToNewItems:!1,disableAutoPositionOnConflict:!1},N=function(){function t(){}var i;return i=t,t.merge=function(t,e,s){for(var r in e)void 0!==e[r]&&s.hasOwnProperty(r)&&("object"==typeof e[r]?t[r]=i.merge(t[r],e[r],s[r]):t[r]=e[r]);return t},t.debounce=function(t,e){var i;return function(){var s=this,r=arguments,o=function(){i=null,t.apply(s,r)};clearTimeout(i),i=setTimeout(o,e)}},t.checkTouchEvent=function(t){void 0===t.clientX&&t.touches&&(t.touches&&t.touches.length?(t.clientX=t.touches[0].clientX,t.clientY=t.touches[0].clientY):t.changedTouches&&t.changedTouches.length&&(t.clientX=t.changedTouches[0].clientX,t.clientY=t.changedTouches[0].clientY))},t.checkContentClassForEvent=function(t,e){if(t.$options.draggable.ignoreContent){if(!i.checkContentClass(e.target,e.currentTarget,t.$options.draggable.dragHandleClass))return!0}else if(i.checkContentClass(e.target,e.currentTarget,t.$options.draggable.ignoreContentClass))return!0;return!1},t.checkContentClassForEmptyCellClickEvent=function(t,e){return i.checkContentClass(e.target,e.currentTarget,t.$options.draggable.ignoreContentClass)||i.checkContentClass(e.target,e.currentTarget,t.$options.draggable.dragHandleClass)},t.checkContentClass=function(t,e,s){return!(!t||t===e)&&(!!(t.hasAttribute("class")&&t.getAttribute("class").split(" ").indexOf(s)>-1)||i.checkContentClass(t.parentNode,e,s))},t.compareItems=function(t,e){return t.y>e.y?-1:t.y<e.y?1:t.x>e.x?-1:1},t=i=u([e.Injectable()],t)}(),G=function(){},j=function(){function t(t){this.gridster=t}return t.prototype.destroy=function(){delete this.initialItem,delete this.gridster.movingItem,this.gridster.previewStyle&&this.gridster.previewStyle(),delete this.gridster,this.emptyCellExit&&(this.emptyCellExit(),this.emptyCellExit=null)},t.prototype.updateOptions=function(){var t=this;this.gridster.$options.enableEmptyCellClick&&!this.emptyCellClick&&this.gridster.options.emptyCellClickCallback?(this.emptyCellClick=this.gridster.renderer.listen(this.gridster.el,"click",this.emptyCellClickCb.bind(this)),this.emptyCellClickTouch=this.gridster.renderer.listen(this.gridster.el,"touchend",this.emptyCellClickCb.bind(this))):!this.gridster.$options.enableEmptyCellClick&&this.emptyCellClick&&this.emptyCellClickTouch&&(this.emptyCellClick(),this.emptyCellClickTouch(),this.emptyCellClick=null,this.emptyCellClickTouch=null),this.gridster.$options.enableEmptyCellContextMenu&&!this.emptyCellContextMenu&&this.gridster.options.emptyCellContextMenuCallback?this.emptyCellContextMenu=this.gridster.renderer.listen(this.gridster.el,"contextmenu",this.emptyCellContextMenuCb.bind(this)):!this.gridster.$options.enableEmptyCellContextMenu&&this.emptyCellContextMenu&&(this.emptyCellContextMenu(),this.emptyCellContextMenu=null),this.gridster.$options.enableEmptyCellDrop&&!this.emptyCellDrop&&this.gridster.options.emptyCellDropCallback?(this.emptyCellDrop=this.gridster.renderer.listen(this.gridster.el,"drop",this.emptyCellDragDrop.bind(this)),this.gridster.zone.runOutsideAngular((function(){t.emptyCellMove=t.gridster.renderer.listen(t.gridster.el,"dragover",t.emptyCellDragOver.bind(t))})),this.emptyCellExit=this.gridster.renderer.listen("document","dragend",(function(){t.gridster.movingItem=null,t.gridster.previewStyle()}))):!this.gridster.$options.enableEmptyCellDrop&&this.emptyCellDrop&&this.emptyCellMove&&this.emptyCellExit&&(this.emptyCellDrop(),this.emptyCellMove(),this.emptyCellExit(),this.emptyCellMove=null,this.emptyCellDrop=null,this.emptyCellExit=null),this.gridster.$options.enableEmptyCellDrag&&!this.emptyCellDrag&&this.gridster.options.emptyCellDragCallback?(this.emptyCellDrag=this.gridster.renderer.listen(this.gridster.el,"mousedown",this.emptyCellMouseDown.bind(this)),this.emptyCellDragTouch=this.gridster.renderer.listen(this.gridster.el,"touchstart",this.emptyCellMouseDown.bind(this))):!this.gridster.$options.enableEmptyCellDrag&&this.emptyCellDrag&&this.emptyCellDragTouch&&(this.emptyCellDrag(),this.emptyCellDragTouch(),this.emptyCellDrag=null,this.emptyCellDragTouch=null)},t.prototype.emptyCellClickCb=function(t){if(!this.gridster.movingItem&&!N.checkContentClassForEmptyCellClickEvent(this.gridster,t)){var e=this.getValidItemFromEvent(t);e&&(this.gridster.options.emptyCellClickCallback&&this.gridster.options.emptyCellClickCallback(t,e),this.gridster.cdRef.markForCheck())}},t.prototype.emptyCellContextMenuCb=function(t){if(!this.gridster.movingItem&&!N.checkContentClassForEmptyCellClickEvent(this.gridster,t)){t.preventDefault(),t.stopPropagation();var e=this.getValidItemFromEvent(t);e&&(this.gridster.options.emptyCellContextMenuCallback&&this.gridster.options.emptyCellContextMenuCallback(t,e),this.gridster.cdRef.markForCheck())}},t.prototype.emptyCellDragDrop=function(t){var e=this.getValidItemFromEvent(t);e&&(this.gridster.options.emptyCellDropCallback&&this.gridster.options.emptyCellDropCallback(t,e),this.gridster.cdRef.markForCheck())},t.prototype.emptyCellDragOver=function(t){t.preventDefault(),t.stopPropagation();var e=this.getValidItemFromEvent(t);e?(t.dataTransfer.dropEffect="move",this.gridster.movingItem=e):(t.dataTransfer.dropEffect="none",this.gridster.movingItem=null),this.gridster.previewStyle()},t.prototype.emptyCellMouseDown=function(t){var e=this;if(!N.checkContentClassForEmptyCellClickEvent(this.gridster,t)){t.preventDefault(),t.stopPropagation();var i=this.getValidItemFromEvent(t);i&&1===t.buttons&&(this.initialItem=i,this.gridster.movingItem=i,this.gridster.previewStyle(),this.gridster.zone.runOutsideAngular((function(){e.emptyCellMMove=e.gridster.renderer.listen("window","mousemove",e.emptyCellMouseMove.bind(e)),e.emptyCellMMoveTouch=e.gridster.renderer.listen("window","touchmove",e.emptyCellMouseMove.bind(e))})),this.emptyCellUp=this.gridster.renderer.listen("window","mouseup",this.emptyCellMouseUp.bind(this)),this.emptyCellUpTouch=this.gridster.renderer.listen("window","touchend",this.emptyCellMouseUp.bind(this)))}},t.prototype.emptyCellMouseMove=function(t){t.preventDefault(),t.stopPropagation();var e=this.getValidItemFromEvent(t,this.initialItem);e&&(this.gridster.movingItem=e,this.gridster.previewStyle())},t.prototype.emptyCellMouseUp=function(t){var e=this;this.emptyCellMMove(),this.emptyCellMMoveTouch(),this.emptyCellUp(),this.emptyCellUpTouch();var i=this.getValidItemFromEvent(t,this.initialItem);i&&(this.gridster.movingItem=i),this.gridster.options.emptyCellDragCallback&&this.gridster.movingItem&&this.gridster.options.emptyCellDragCallback(t,this.gridster.movingItem),setTimeout((function(){e.initialItem=null,e.gridster&&(e.gridster.movingItem=null,e.gridster.previewStyle())})),this.gridster.cdRef.markForCheck()},t.prototype.getValidItemFromEvent=function(t,e){t.preventDefault(),t.stopPropagation(),N.checkTouchEvent(t);var i=this.gridster.el.getBoundingClientRect(),s=t.clientX+this.gridster.el.scrollLeft-i.left-this.gridster.$options.margin,r=t.clientY+this.gridster.el.scrollTop-i.top-this.gridster.$options.margin,o={x:this.gridster.pixelsToPositionX(s,Math.floor,!0),y:this.gridster.pixelsToPositionY(r,Math.floor,!0),cols:this.gridster.$options.defaultItemCols,rows:this.gridster.$options.defaultItemRows};if(e&&(o.cols=Math.min(Math.abs(e.x-o.x)+1,this.gridster.$options.emptyCellDragMaxCols),o.rows=Math.min(Math.abs(e.y-o.y)+1,this.gridster.$options.emptyCellDragMaxRows),e.x<o.x?o.x=e.x:e.x-o.x>this.gridster.$options.emptyCellDragMaxCols-1&&(o.x=this.gridster.movingItem?this.gridster.movingItem.x:0),e.y<o.y?o.y=e.y:e.y-o.y>this.gridster.$options.emptyCellDragMaxRows-1&&(o.y=this.gridster.movingItem?this.gridster.movingItem.y:0)),!this.gridster.checkCollision(o))return o},t.ctorParameters=function(){return[{type:G}]},t=u([e.Injectable(),y("design:paramtypes",[G])],t)}(),U=function(){function t(t){this.gridster=t}return t.prototype.destroy=function(){delete this.gridster},t.prototype.checkCompact=function(){this.gridster.$options.compactType!==$.None&&(this.gridster.$options.compactType===$.CompactUp?this.checkCompactUp():this.gridster.$options.compactType===$.CompactLeft?this.checkCompactLeft():this.gridster.$options.compactType===$.CompactUpAndLeft?(this.checkCompactUp(),this.checkCompactLeft()):this.gridster.$options.compactType===$.CompactLeftAndUp?(this.checkCompactLeft(),this.checkCompactUp()):this.gridster.$options.compactType===$.CompactRight?this.checkCompactRight():this.gridster.$options.compactType===$.CompactUpAndRight?(this.checkCompactUp(),this.checkCompactRight()):this.gridster.$options.compactType===$.CompactRightAndUp&&(this.checkCompactRight(),this.checkCompactUp()))},t.prototype.checkCompactItem=function(t){this.gridster.$options.compactType!==$.None&&(this.gridster.$options.compactType===$.CompactUp?this.moveUpTillCollision(t):this.gridster.$options.compactType===$.CompactLeft?this.moveLeftTillCollision(t):this.gridster.$options.compactType===$.CompactUpAndLeft?(this.moveUpTillCollision(t),this.moveLeftTillCollision(t)):this.gridster.$options.compactType===$.CompactLeftAndUp?(this.moveLeftTillCollision(t),this.moveUpTillCollision(t)):this.gridster.$options.compactType===$.CompactUpAndRight&&(this.moveUpTillCollision(t),this.moveRightTillCollision(t)))},t.prototype.checkCompactUp=function(){for(var t,e=!1,i=this.gridster.grid.length,s=0;s<i;s++)!1!==(t=this.gridster.grid[s]).$item.compactEnabled&&this.moveUpTillCollision(t.$item)&&(e=!0,t.item.y=t.$item.y,t.itemChanged());e&&this.checkCompact()},t.prototype.moveUpTillCollision=function(t){return t.y-=1,this.gridster.checkCollision(t)?(t.y+=1,!1):(this.moveUpTillCollision(t),!0)},t.prototype.checkCompactLeft=function(){for(var t,e=!1,i=this.gridster.grid.length,s=0;s<i;s++)!1!==(t=this.gridster.grid[s]).$item.compactEnabled&&this.moveLeftTillCollision(t.$item)&&(e=!0,t.item.x=t.$item.x,t.itemChanged());e&&this.checkCompact()},t.prototype.checkCompactRight=function(){for(var t,e=!1,i=this.gridster.grid.length,s=0;s<i;s++)!1!==(t=this.gridster.grid[s]).$item.compactEnabled&&this.moveRightTillCollision(t.$item)&&(e=!0,t.item.x=t.$item.x,t.itemChanged());e&&this.checkCompact()},t.prototype.moveLeftTillCollision=function(t){return t.x-=1,this.gridster.checkCollision(t)?(t.x+=1,!1):(this.moveLeftTillCollision(t),!0)},t.prototype.moveRightTillCollision=function(t){return t.x+=1,this.gridster.checkCollision(t)?(t.x-=1,!1):(this.moveRightTillCollision(t),!0)},t.ctorParameters=function(){return[{type:G}]},t=u([e.Injectable(),y("design:paramtypes",[G])],t)}(),X=function(){function t(t){this.gridster=t}return t.prototype.destroy=function(){delete this.gridster},t.prototype.updateItem=function(t,e,i){if(this.gridster.mobile)this.clearCellPosition(i,t),this.gridster.$options.keepFixedHeightInMobile?i.setStyle(t,"height",e.rows*this.gridster.$options.fixedRowHeight+"px"):i.setStyle(t,"height",this.gridster.curWidth/2*e.rows+"px"),this.gridster.$options.keepFixedWidthInMobile?i.setStyle(t,"width",this.gridster.$options.fixedColWidth+"px"):i.setStyle(t,"width",""),i.setStyle(t,"margin-bottom",this.gridster.$options.margin+"px"),i.setStyle(t,"margin-right","");else{var s=Math.round(this.gridster.curColWidth*e.x),r=Math.round(this.gridster.curRowHeight*e.y),o=this.gridster.curColWidth*e.cols-this.gridster.$options.margin,n=this.gridster.curRowHeight*e.rows-this.gridster.$options.margin;this.setCellPosition(i,t,s,r),i.setStyle(t,"width",o+"px"),i.setStyle(t,"height",n+"px");var d=null,a=null;this.gridster.$options.outerMargin&&(this.gridster.rows===e.rows+e.y&&(d=null!==this.gridster.$options.outerMarginBottom?this.gridster.$options.outerMarginBottom+"px":this.gridster.$options.margin+"px"),this.gridster.columns===e.cols+e.x&&(a=null!==this.gridster.$options.outerMarginBottom?this.gridster.$options.outerMarginRight+"px":this.gridster.$options.margin+"px")),i.setStyle(t,"margin-bottom",d),i.setStyle(t,"margin-right",a)}},t.prototype.updateGridster=function(){var t="",e="",i="",s="";this.gridster.$options.gridType===x.Fit?(t=x.Fit,e=x.ScrollVertical,i=x.ScrollHorizontal,s=x.Fixed):this.gridster.$options.gridType===x.ScrollVertical?(this.gridster.curRowHeight=this.gridster.curColWidth,t=x.ScrollVertical,e=x.Fit,i=x.ScrollHorizontal,s=x.Fixed):this.gridster.$options.gridType===x.ScrollHorizontal?(this.gridster.curColWidth=this.gridster.curRowHeight,t=x.ScrollHorizontal,e=x.Fit,i=x.ScrollVertical,s=x.Fixed):this.gridster.$options.gridType===x.Fixed?(this.gridster.curColWidth=this.gridster.$options.fixedColWidth+(this.gridster.$options.ignoreMarginInRow?0:this.gridster.$options.margin),this.gridster.curRowHeight=this.gridster.$options.fixedRowHeight+(this.gridster.$options.ignoreMarginInRow?0:this.gridster.$options.margin),t=x.Fixed,e=x.Fit,i=x.ScrollVertical,s=x.ScrollHorizontal):this.gridster.$options.gridType===x.VerticalFixed?(this.gridster.curRowHeight=this.gridster.$options.fixedRowHeight+(this.gridster.$options.ignoreMarginInRow?0:this.gridster.$options.margin),t=x.ScrollVertical,e=x.Fit,i=x.ScrollHorizontal,s=x.Fixed):this.gridster.$options.gridType===x.HorizontalFixed&&(this.gridster.curColWidth=this.gridster.$options.fixedColWidth+(this.gridster.$options.ignoreMarginInRow?0:this.gridster.$options.margin),t=x.ScrollHorizontal,e=x.Fit,i=x.ScrollVertical,s=x.Fixed),this.gridster.mobile?this.gridster.renderer.removeClass(this.gridster.el,t):this.gridster.renderer.addClass(this.gridster.el,t),this.gridster.renderer.removeClass(this.gridster.el,e),this.gridster.renderer.removeClass(this.gridster.el,i),this.gridster.renderer.removeClass(this.gridster.el,s)},t.prototype.getGridColumnStyle=function(t){return m({},this.getLeftPosition(this.gridster.curColWidth*t),{width:this.gridster.curColWidth-this.gridster.$options.margin+"px",height:this.gridster.gridRows.length*this.gridster.curRowHeight-this.gridster.$options.margin+"px"})},t.prototype.getGridRowStyle=function(t){return m({},this.getTopPosition(this.gridster.curRowHeight*t),{width:this.gridster.gridColumns.length*this.gridster.curColWidth-this.gridster.$options.margin+"px",height:this.gridster.curRowHeight-this.gridster.$options.margin+"px"})},t.prototype.getLeftPosition=function(t){return this.gridster.$options.useTransformPositioning?{transform:"translateX("+t+"px)"}:{left:this.getLeftMargin()+t+"px"}},t.prototype.getTopPosition=function(t){return this.gridster.$options.useTransformPositioning?{transform:"translateY("+t+"px)"}:{top:this.getTopMargin()+t+"px"}},t.prototype.clearCellPosition=function(t,e){this.gridster.$options.useTransformPositioning?t.setStyle(e,"transform",""):(t.setStyle(e,"top",""),t.setStyle(e,"left",""))},t.prototype.setCellPosition=function(t,e,i,s){if(this.gridster.$options.useTransformPositioning){var r="translate3d("+i+"px, "+s+"px, 0)";t.setStyle(e,"transform",r)}else t.setStyle(e,"left",this.getLeftMargin()+i+"px"),t.setStyle(e,"top",this.getTopMargin()+s+"px")},t.prototype.getLeftMargin=function(){return this.gridster.$options.outerMargin?null!==this.gridster.$options.outerMarginLeft?this.gridster.$options.outerMarginLeft:this.gridster.$options.margin:0},t.prototype.getTopMargin=function(){return this.gridster.$options.outerMargin?null!==this.gridster.$options.outerMarginTop?this.gridster.$options.outerMarginTop:this.gridster.$options.margin:0},t.ctorParameters=function(){return[{type:G}]},t=u([e.Injectable(),y("design:paramtypes",[G])],t)}(),Y=function(){function t(t,e,i,s){this.renderer=e,this.cdRef=i,this.zone=s,this.gridColumns=[],this.gridRows=[],this.el=t.nativeElement,this.$options=JSON.parse(JSON.stringify(V)),this.calculateLayoutDebounce=N.debounce(this.calculateLayout.bind(this),0),this.mobile=!1,this.curWidth=0,this.curHeight=0,this.grid=[],this.curColWidth=0,this.curRowHeight=0,this.dragInProgress=!1,this.emptyCell=new j(this),this.compact=new U(this),this.gridRenderer=new X(this)}var i;return i=t,t.checkCollisionTwoItems=function(t,e){return t.x<e.x+e.cols&&t.x+t.cols>e.x&&t.y<e.y+e.rows&&t.y+t.rows>e.y},t.prototype.ngOnInit=function(){this.options.initCallback&&this.options.initCallback(this)},t.prototype.ngOnChanges=function(t){t.options&&(this.setOptions(),this.options.api={optionsChanged:this.optionsChanged.bind(this),resize:this.onResize.bind(this),getNextPossiblePosition:this.getNextPossiblePosition.bind(this),getFirstPossiblePosition:this.getFirstPossiblePosition.bind(this),getLastPossiblePosition:this.getLastPossiblePosition.bind(this),getCurrentRowHeight:this.getCurrentRowHeight.bind(this)},this.columns=this.$options.minCols,this.rows=this.$options.minRows,this.setGridSize(),this.calculateLayout())},t.prototype.getCurrentRowHeight=function(){return this.curRowHeight},t.prototype.resize=function(){var t,e;"fit"!==this.$options.gridType||this.mobile?(e=this.el.clientWidth,t=this.el.clientHeight):(e=this.el.offsetWidth,t=this.el.offsetHeight),e===this.curWidth&&t===this.curHeight||!this.checkIfToResize()||this.onResize()},t.prototype.setOptions=function(){this.$options=N.merge(this.$options,this.options,this.$options),this.$options.disableWindowResize||this.windowResize?this.$options.disableWindowResize&&this.windowResize&&(this.windowResize(),this.windowResize=null):this.windowResize=this.renderer.listen("window","resize",this.onResize.bind(this)),this.emptyCell.updateOptions()},t.prototype.optionsChanged=function(){this.setOptions();for(var t=this.grid.length-1;t>=0;t--)this.grid[t].updateOptions();this.calculateLayout()},t.prototype.ngOnDestroy=function(){this.windowResize&&this.windowResize(),this.options.destroyCallback&&this.options.destroyCallback(this),this.emptyCell.destroy(),delete this.emptyCell,this.compact.destroy(),delete this.compact},t.prototype.onResize=function(){this.setGridSize(),this.calculateLayout()},t.prototype.checkIfToResize=function(){var t=this.el.clientWidth,e=this.el.offsetWidth,i=this.el.scrollWidth,s=this.el.clientHeight,r=this.el.offsetHeight,o=this.el.scrollHeight;return!(t<e&&o>r&&o-r<e-t)&&!(s<r&&i>e&&i-e<r-s)},t.prototype.setGridSize=function(){var t=this.el,e=t.clientWidth,i=t.clientHeight;this.$options.setGridSize||"fit"===this.$options.gridType&&!this.mobile?(e=t.offsetWidth,i=t.offsetHeight):(e=t.clientWidth,i=t.clientHeight),this.curWidth=e,this.curHeight=i},t.prototype.setGridDimensions=function(){this.setGridSize(),!this.mobile&&this.$options.mobileBreakpoint>this.curWidth?(this.mobile=!this.mobile,this.renderer.addClass(this.el,"mobile")):this.mobile&&this.$options.mobileBreakpoint<this.curWidth&&(this.mobile=!this.mobile,this.renderer.removeClass(this.el,"mobile"));for(var t,e=this.$options.minRows,i=this.$options.minCols,s=this.grid.length-1;s>=0;s--)(t=this.grid[s]).notPlaced||(e=Math.max(e,t.$item.y+t.$item.rows),i=Math.max(i,t.$item.x+t.$item.cols));this.columns===i&&this.rows===e||(this.columns=i,this.rows=e,this.options.gridSizeChangedCallback&&this.options.gridSizeChangedCallback(this))},t.prototype.calculateLayout=function(){if(this.compact&&this.compact.checkCompact(),this.setGridDimensions(),this.$options.outerMargin){var t=-this.$options.margin;null!==this.$options.outerMarginLeft?(t+=this.$options.outerMarginLeft,this.renderer.setStyle(this.el,"padding-left",this.$options.outerMarginLeft+"px")):(t+=this.$options.margin,this.renderer.setStyle(this.el,"padding-left",this.$options.margin+"px")),null!==this.$options.outerMarginRight?(t+=this.$options.outerMarginRight,this.renderer.setStyle(this.el,"padding-right",this.$options.outerMarginRight+"px")):(t+=this.$options.margin,this.renderer.setStyle(this.el,"padding-right",this.$options.margin+"px")),this.curColWidth=(this.curWidth-t)/this.columns;var e=-this.$options.margin;null!==this.$options.outerMarginTop?(e+=this.$options.outerMarginTop,this.renderer.setStyle(this.el,"padding-top",this.$options.outerMarginTop+"px")):(e+=this.$options.margin,this.renderer.setStyle(this.el,"padding-top",this.$options.margin+"px")),null!==this.$options.outerMarginBottom?(e+=this.$options.outerMarginBottom,this.renderer.setStyle(this.el,"padding-bottom",this.$options.outerMarginBottom+"px")):(e+=this.$options.margin,this.renderer.setStyle(this.el,"padding-bottom",this.$options.margin+"px")),this.curRowHeight=(this.curHeight-e)/this.rows}else this.curColWidth=(this.curWidth+this.$options.margin)/this.columns,this.curRowHeight=(this.curHeight+this.$options.margin)/this.rows,this.renderer.setStyle(this.el,"padding-left","0px"),this.renderer.setStyle(this.el,"padding-right","0px"),this.renderer.setStyle(this.el,"padding-top","0px"),this.renderer.setStyle(this.el,"padding-bottom","0px");this.gridRenderer.updateGridster(),this.updateGrid(),this.$options.setGridSize?(this.renderer.setStyle(this.el,"width",this.columns*this.curColWidth+this.$options.margin+"px"),this.renderer.setStyle(this.el,"height",this.rows*this.curRowHeight+this.$options.margin+"px")):(this.renderer.setStyle(this.el,"width",""),this.renderer.setStyle(this.el,"height",""));for(var i,s=this.grid.length-1;s>=0;s--)(i=this.grid[s]).setSize(),i.drag.toggle(),i.resize.toggle();setTimeout(this.resize.bind(this),100)},t.prototype.updateGrid=function(){"always"!==this.$options.displayGrid||this.mobile?"onDrag&Resize"===this.$options.displayGrid&&this.dragInProgress?this.renderer.addClass(this.el,"display-grid"):"none"!==this.$options.displayGrid&&this.dragInProgress&&!this.mobile||this.renderer.removeClass(this.el,"display-grid"):this.renderer.addClass(this.el,"display-grid"),this.setGridDimensions(),this.gridColumns.length=Math.max(this.columns,Math.floor(this.curWidth/this.curColWidth))||0,this.gridRows.length=Math.max(this.rows,Math.floor(this.curHeight/this.curRowHeight))||0,this.cdRef.markForCheck()},t.prototype.addItem=function(t){void 0===t.$item.cols&&(t.$item.cols=this.$options.defaultItemCols,t.item.cols=t.$item.cols,t.itemChanged()),void 0===t.$item.rows&&(t.$item.rows=this.$options.defaultItemRows,t.item.rows=t.$item.rows,t.itemChanged()),-1===t.$item.x||-1===t.$item.y?this.autoPositionItem(t):this.checkCollision(t.$item)&&(this.$options.disableWarnings||(t.notPlaced=!0,console.warn("Can't be placed in the bounds of the dashboard, trying to auto position!/n"+JSON.stringify(t.item,["cols","rows","x","y"]))),this.$options.disableAutoPositionOnConflict?t.notPlaced=!0:this.autoPositionItem(t)),this.grid.push(t),this.calculateLayoutDebounce()},t.prototype.removeItem=function(t){this.grid.splice(this.grid.indexOf(t),1),this.calculateLayoutDebounce(),this.options.itemRemovedCallback&&this.options.itemRemovedCallback(t.item,t)},t.prototype.checkCollision=function(t){var e=!1;if(this.options.itemValidateCallback&&(e=!this.options.itemValidateCallback(t)),!e&&this.checkGridCollision(t)&&(e=!0),!e){var i=this.findItemWithItem(t);i&&(e=i)}return e},t.prototype.checkGridCollision=function(t){var e=t.y>-1&&t.x>-1,i=t.cols+t.x<=this.$options.maxCols,s=t.rows+t.y<=this.$options.maxRows,r=void 0===t.maxItemCols?this.$options.maxItemCols:t.maxItemCols,o=void 0===t.minItemCols?this.$options.minItemCols:t.minItemCols,n=void 0===t.maxItemRows?this.$options.maxItemRows:t.maxItemRows,d=void 0===t.minItemRows?this.$options.minItemRows:t.minItemRows,a=t.cols<=r&&t.cols>=o,h=t.rows<=n&&t.rows>=d,l=void 0===t.minItemArea?this.$options.minItemArea:t.minItemArea,p=void 0===t.maxItemArea?this.$options.maxItemArea:t.maxItemArea,g=t.cols*t.rows;return!(e&&i&&s&&a&&h&&l<=g&&p>=g)},t.prototype.findItemWithItem=function(t){for(var e,s=this.grid.length-1;s>-1;s--)if((e=this.grid[s]).$item!==t&&i.checkCollisionTwoItems(e.$item,t))return e;return!1},t.prototype.findItemsWithItem=function(t){for(var e,s=[],r=this.grid.length-1;r>-1;r--)(e=this.grid[r]).$item!==t&&i.checkCollisionTwoItems(e.$item,t)&&s.push(e);return s},t.prototype.autoPositionItem=function(t){this.getNextPossiblePosition(t.$item)?(t.notPlaced=!1,t.item.x=t.$item.x,t.item.y=t.$item.y,t.itemChanged()):(t.notPlaced=!0,this.$options.disableWarnings||console.warn("Can't be placed in the bounds of the dashboard!/n"+JSON.stringify(t.item,["cols","rows","x","y"])))},t.prototype.getNextPossiblePosition=function(t,e){void 0===e&&(e={}),-1===t.cols&&(t.cols=this.$options.defaultItemCols),-1===t.rows&&(t.rows=this.$options.defaultItemRows),this.setGridDimensions();for(var i,s=e.y||0;s<this.rows;s++)for(t.y=s,i=e.x||0;i<this.columns;i++)if(t.x=i,!this.checkCollision(t))return!0;var r=this.$options.maxRows>=this.rows+t.rows,o=this.$options.maxCols>=this.columns+t.cols;return!(this.rows<=this.columns&&r)&&o?(t.x=this.columns,t.y=0,!0):!!r&&(t.y=this.rows,t.x=0,!0)},t.prototype.getFirstPossiblePosition=function(t){var e=Object.assign({},t);return this.getNextPossiblePosition(e),e},t.prototype.getLastPossiblePosition=function(t){var e={y:0,x:0};e=this.grid.reduce((function(t,e){var i={y:e.$item.y+e.$item.rows-1,x:e.$item.x+e.$item.cols-1};return 1===N.compareItems(t,i)?i:t}),e);var i=Object.assign({},t);return this.getNextPossiblePosition(i,e),i},t.prototype.pixelsToPositionX=function(t,e,i){var s=e(t/this.curColWidth);return i?s:Math.max(s,0)},t.prototype.pixelsToPositionY=function(t,e,i){var s=e(t/this.curRowHeight);return i?s:Math.max(s,0)},t.prototype.positionXToPixels=function(t){return t*this.curColWidth},t.prototype.positionYToPixels=function(t){return t*this.curRowHeight},t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2},{type:e.ChangeDetectorRef},{type:e.NgZone}]},u([e.Input(),y("design:type",Object)],t.prototype,"options",void 0),t=i=u([e.Component({selector:"gridster",template:'<div class="gridster-column" *ngFor="let column of gridColumns; let i = index;"\r\n [ngStyle]="gridRenderer.getGridColumnStyle(i)"></div>\r\n<div class="gridster-row" *ngFor="let row of gridRows; let i = index;"\r\n [ngStyle]="gridRenderer.getGridRowStyle(i)"></div>\r\n<ng-content></ng-content>\r\n<gridster-preview class="gridster-preview"></gridster-preview>\r\n',encapsulation:e.ViewEncapsulation.None,styles:["gridster{clear:both;position:relative;box-sizing:border-box;background:#fff;width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;display:block;overflow:auto}gridster.fit{overflow-x:hidden;overflow-y:hidden}gridster.scrollVertical{overflow-x:hidden;overflow-y:auto}gridster.scrollHorizontal{overflow-x:auto;overflow-y:hidden}gridster.fixed{overflow:auto}gridster.mobile{overflow-x:hidden;overflow-y:auto;flex-flow:column}gridster.mobile gridster-item{position:relative;width:100%!important;min-height:300px!important}gridster .gridster-column,gridster .gridster-row{position:absolute;display:none;transition:.3s;box-sizing:border-box}gridster.display-grid .gridster-column,gridster.display-grid .gridster-row{display:block}gridster .gridster-column{border-left:1px solid #ccc;border-right:1px solid #ccc}gridster .gridster-row{border-top:1px solid #ccc;border-bottom:1px solid #ccc}"]}),y("design:paramtypes",[e.ElementRef,e.Renderer2,e.ChangeDetectorRef,e.NgZone])],t)}(),_=function(){},q=function(){function t(t){this.gridsterItem=t,this.gridster=t.gridster}return t.prototype.destroy=function(){delete this.gridster,delete this.gridsterItem,delete this.swapedItem},t.prototype.swapItems=function(){this.gridster.$options.swap&&(this.checkSwapBack(),this.checkSwap(this.gridsterItem))},t.prototype.checkSwapBack=function(){if(this.swapedItem){var t=this.swapedItem.$item.x,e=this.swapedItem.$item.y;this.swapedItem.$item.x=this.swapedItem.item.x||0,this.swapedItem.$item.y=this.swapedItem.item.y||0,this.gridster.checkCollision(this.swapedItem.$item)?(this.swapedItem.$item.x=t,this.swapedItem.$item.y=e):(this.swapedItem.setSize(),this.gridsterItem.$item.x=this.gridsterItem.item.x||0,this.gridsterItem.$item.y=this.gridsterItem.item.y||0,this.swapedItem=void 0)}},t.prototype.restoreSwapItem=function(){this.swapedItem&&(this.swapedItem.$item.x=this.swapedItem.item.x||0,this.swapedItem.$item.y=this.swapedItem.item.y||0,this.swapedItem.setSize(),this.swapedItem=void 0)},t.prototype.setSwapItem=function(){this.swapedItem&&(this.swapedItem.checkItemChanges(this.swapedItem.$item,this.swapedItem.item),this.swapedItem=void 0)},t.prototype.checkSwap=function(t){var e=this.gridster.checkCollision(t.$item);if(e&&!0!==e&&e.canBeDragged()){var i=e,s=i.$item.x,r=i.$item.y,o=t.$item.x,n=t.$item.y;i.$item.x=t.item.x||0,i.$item.y=t.item.y||0,t.$item.x=i.item.x||0,t.$item.y=i.item.y||0,this.gridster.checkCollision(i.$item)||this.gridster.checkCollision(t.$item)?(t.$item.x=o,t.$item.y=n,i.$item.x=s,i.$item.y=r):(i.setSize(),this.swapedItem=i)}},t.ctorParameters=function(){return[{type:_}]},t=u([e.Injectable(),y("design:paramtypes",[_])],t)}();function K(t,e,i,s,r,o,n,d,a,h){R=t.$options.scrollSensitivity,z=t.$options.scrollSpeed,M=t.el,A=a,F=h;var l=M.offsetWidth,p=M.offsetHeight,g=M.scrollLeft,c=M.scrollTop,m=i-c,u=p+c-i-r;if(n.clientY<o.clientY&&u<R){if(ot(),A&&F&&!F.s||B)return;B=Z(1,d,n)}else if(n.clientY>o.clientY&&c>0&&m<R){if(rt(),A&&F&&!F.n||O)return;O=Z(-1,d,n)}else n.clientY!==o.clientY&&et();var f=g+l-e-s,y=e-g;if(n.clientX<o.clientX&&f<=R){if(st(),A&&F&&!F.e||L)return;L=J(1,d,n)}else if(n.clientX>o.clientX&&g>0&&y<R){if(it(),A&&F&&!F.w||H)return;H=J(-1,d,n)}else n.clientX!==o.clientX&&tt()}function Z(t,e,i){var s=i.clientY;return setInterval((function(){(!M||-1===t&&M.scrollTop-z<0)&&et(),M.scrollTop+=t*z,s+=t*z,e({clientX:i.clientX,clientY:s})}),50)}function J(t,e,i){var s=i.clientX;return setInterval((function(){(!M||-1===t&&M.scrollLeft-z<0)&&tt(),M.scrollLeft+=t*z,e({clientX:s+=t*z,clientY:i.clientY})}),50)}function Q(){tt(),et(),M=void 0}function tt(){it(),st()}function et(){ot(),rt()}function it(){L&&(clearInterval(L),L=0)}function st(){H&&(clearInterval(H),H=0)}function rt(){B&&(clearInterval(B),B=0)}function ot(){O&&(clearInterval(O),O=0)}var nt=function(){function t(t){this.pushedItems=[],this.pushedItemsTemp=[],this.pushedItemsTempPath=[],this.pushedItemsPath=[],this.gridsterItem=t,this.gridster=t.gridster,this.tryPattern={fromEast:[this.tryWest,this.trySouth,this.tryNorth,this.tryEast],fromWest:[this.tryEast,this.trySouth,this.tryNorth,this.tryWest],fromNorth:[this.trySouth,this.tryEast,this.tryWest,this.tryNorth],fromSouth:[this.tryNorth,this.tryEast,this.tryWest,this.trySouth]},this.fromSouth="fromSouth",this.fromNorth="fromNorth",this.fromEast="fromEast",this.fromWest="fromWest"}return t.prototype.destroy=function(){delete this.gridster,delete this.gridsterItem},t.prototype.pushItems=function(t,e){if(this.gridster.$options.pushItems&&!e){this.pushedItemsOrder=[];var i=this.push(this.gridsterItem,t);return i||this.restoreTempItems(),this.pushedItemsOrder=[],this.pushedItemsTemp=[],this.pushedItemsTempPath=[],i}return!1},t.prototype.restoreTempItems=function(){for(var t=this.pushedItemsTemp.length-1;t>-1;t--)this.removeFromTempPushed(this.pushedItemsTemp[t])},t.prototype.restoreItems=function(){for(var t,e=0,i=this.pushedItems.length;e<i;e++)(t=this.pushedItems[e]).$item.x=t.item.x||0,t.$item.y=t.item.y||0,t.setSize();this.pushedItems=[],this.pushedItemsPath=[]},t.prototype.setPushedItems=function(){for(var t,e=0,i=this.pushedItems.length;e<i;e++)(t=this.pushedItems[e]).checkItemChanges(t.$item,t.item);this.pushedItems=[],this.pushedItemsPath=[]},t.prototype.checkPushBack=function(){for(var t=this.pushedItems.length-1,e=!1;t>-1;t--)this.checkPushedItem(this.pushedItems[t],t)&&(e=!0);e&&this.checkPushBack()},t.prototype.push=function(t,e){if(this.gridster.checkGridCollision(t.$item))return!1;if(""===e)return!1;for(var i,s=this.gridster.findItemsWithItem(t.$item),r=s.length-1,o=!0,n=[];r>-1;r--){if((i=s[r])===this.gridsterItem){o=!1;break}if(!i.canBeDragged()){o=!1;break}if(this.pushedItemsTemp.find((function(t){return t.$item.x===i.$item.x&&t.$item.y===i.$item.y}))){o=!1;break}if(this.tryPattern[e][0].call(this,i,t))this.pushedItemsOrder.push(i),n.push(i);else if(this.tryPattern[e][1].call(this,i,t))this.pushedItemsOrder.push(i),n.push(i);else if(this.tryPattern[e][2].call(this,i,t))this.pushedItemsOrder.push(i),n.push(i);else{if(!this.tryPattern[e][3].call(this,i,t)){o=!1;break}this.pushedItemsOrder.push(i),n.push(i)}}if(!o&&(r=this.pushedItemsOrder.lastIndexOf(n[0]))>-1)for(var d=this.pushedItemsOrder.length-1;d>=r;d--)i=this.pushedItemsOrder[d],this.pushedItemsOrder.pop(),this.removeFromTempPushed(i),this.removeFromPushedItem(i);return o},t.prototype.trySouth=function(t,e){return!!this.gridster.$options.pushDirections.south&&(this.addToTempPushed(t),t.$item.y=e.$item.y+e.$item.rows,this.push(t,this.fromNorth)?(t.setSize(),this.addToPushed(t),!0):(this.removeFromTempPushed(t),!1))},t.prototype.tryNorth=function(t,e){return!!this.gridster.$options.pushDirections.north&&(this.addToTempPushed(t),t.$item.y=e.$item.y-t.$item.rows,this.push(t,this.fromSouth)?(t.setSize(),this.addToPushed(t),!0):(this.removeFromTempPushed(t),!1))},t.prototype.tryEast=function(t,e){return!!this.gridster.$options.pushDirections.east&&(this.addToTempPushed(t),t.$item.x=e.$item.x+e.$item.cols,this.push(t,this.fromWest)?(t.setSize(),this.addToPushed(t),!0):(this.removeFromTempPushed(t),!1))},t.prototype.tryWest=function(t,e){return!!this.gridster.$options.pushDirections.west&&(this.addToTempPushed(t),t.$item.x=e.$item.x-t.$item.cols,this.push(t,this.fromEast)?(t.setSize(),this.addToPushed(t),!0):(this.removeFromTempPushed(t),!1))},t.prototype.addToTempPushed=function(t){var e=this.pushedItemsTemp.indexOf(t);-1===e&&(e=this.pushedItemsTemp.push(t)-1,this.pushedItemsTempPath[e]=[]),this.pushedItemsTempPath[e].push({x:t.$item.x,y:t.$item.y})},t.prototype.removeFromTempPushed=function(t){var e=this.pushedItemsTemp.indexOf(t),i=this.pushedItemsTempPath[e].pop();i&&(t.$item.x=i.x,t.$item.y=i.y,t.setSize(),this.pushedItemsTempPath[e].length||(this.pushedItemsTemp.splice(e,1),this.pushedItemsTempPath.splice(e,1)))},t.prototype.addToPushed=function(t){if(this.pushedItems.indexOf(t)<0)this.pushedItems.push(t),this.pushedItemsPath.push([{x:t.item.x||0,y:t.item.y||0},{x:t.$item.x,y:t.$item.y}]);else{var e=this.pushedItems.indexOf(t);this.pushedItemsPath[e].push({x:t.$item.x,y:t.$item.y})}},t.prototype.removeFromPushed=function(t){t>-1&&(this.pushedItems.splice(t,1),this.pushedItemsPath.splice(t,1))},t.prototype.removeFromPushedItem=function(t){var e=this.pushedItems.indexOf(t);e>-1&&(this.pushedItemsPath[e].pop(),this.pushedItemsPath.length||(this.pushedItems.splice(e,1),this.pushedItemsPath.splice(e,1)))},t.prototype.checkPushedItem=function(t,e){for(var i,s,r,o=this.pushedItemsPath[e],n=o.length-2,d=!1;n>-1;n--)i=o[n],s=t.$item.x,r=t.$item.y,t.$item.x=i.x,t.$item.y=i.y,this.gridster.findItemWithItem(t.$item)?(t.$item.x=s,t.$item.y=r):(t.setSize(),o.splice(n+1,o.length-n-1),d=!0);return o.length<2&&this.removeFromPushed(e),d},t.ctorParameters=function(){return[{type:_}]},t=u([e.Injectable(),y("design:paramtypes",[_])],t)}(),dt=function(){function t(t,e,i){this.zone=i,this.collision=!1,this.gridsterItem=t,this.gridster=e,this.lastMouse={clientX:0,clientY:0},this.path=[]}return t.prototype.destroy=function(){this.gridster.previewStyle&&this.gridster.previewStyle(!0),delete this.gridsterItem,delete this.gridster,delete this.collision,this.mousedown&&(this.mousedown(),this.touchstart())},t.prototype.dragStart=function(t){var e=this;switch(t.which){case 1:break;case 2:case 3:return}this.gridster.options.draggable&&this.gridster.options.draggable.start&&this.gridster.options.draggable.start(this.gridsterItem.item,this.gridsterItem,t),t.stopPropagation(),t.preventDefault(),this.dragFunction=this.dragMove.bind(this),this.dragStopFunction=this.dragStop.bind(this),this.zone.runOutsideAngular((function(){e.mousemove=e.gridsterItem.renderer.listen("document","mousemove",e.dragFunction),e.touchmove=e.gridster.renderer.listen(e.gridster.el,"touchmove",e.dragFunction)})),this.mouseup=this.gridsterItem.renderer.listen("document","mouseup",this.dragStopFunction),this.mouseleave=this.gridsterItem.renderer.listen("document","mouseleave",this.dragStopFunction),this.cancelOnBlur=this.gridsterItem.renderer.listen("window","blur",this.dragStopFunction),this.touchend=this.gridsterItem.renderer.listen("document","touchend",this.dragStopFunction),this.touchcancel=this.gridsterItem.renderer.listen("document","touchcancel",this.dragStopFunction),this.gridsterItem.renderer.addClass(this.gridsterItem.el,"gridster-item-moving"),this.margin=this.gridster.$options.margin,this.offsetLeft=this.gridster.el.scrollLeft-this.gridster.el.offsetLeft,this.offsetTop=this.gridster.el.scrollTop-this.gridster.el.offsetTop,this.left=this.gridsterItem.left-this.margin,this.top=this.gridsterItem.top-this.margin,this.width=this.gridsterItem.width,this.height=this.gridsterItem.height,this.diffLeft=t.clientX+this.offsetLeft-this.margin-this.left,this.diffTop=t.clientY+this.offsetTop-this.margin-this.top,this.gridster.movingItem=this.gridsterItem.$item,this.gridster.previewStyle(!0),this.push=new nt(this.gridsterItem),this.swap=new q(this.gridsterItem),this.gridster.dragInProgress=!0,this.gridster.updateGrid(),this.path.push({x:this.gridsterItem.item.x||0,y:this.gridsterItem.item.y||0})},t.prototype.dragMove=function(t){t.stopPropagation(),t.preventDefault(),N.checkTouchEvent(t),this.offsetLeft=this.gridster.el.scrollLeft-this.gridster.el.offsetLeft,this.offsetTop=this.gridster.el.scrollTop-this.gridster.el.offsetTop,K(this.gridster,this.left,this.top,this.width,this.height,t,this.lastMouse,this.calculateItemPositionFromMousePosition.bind(this)),this.calculateItemPositionFromMousePosition(t)},t.prototype.calculateItemPositionFromMousePosition=function(t){var e=this;this.left=t.clientX+this.offsetLeft-this.diffLeft,this.top=t.clientY+this.offsetTop-this.diffTop,this.calculateItemPosition(),this.lastMouse.clientX=t.clientX,this.lastMouse.clientY=t.clientY,this.zone.run((function(){e.gridster.updateGrid()}))},t.prototype.dragStop=function(t){var e=this;t.stopPropagation(),t.preventDefault(),Q(),this.cancelOnBlur(),this.mousemove(),this.mouseup(),this.mouseleave(),this.touchmove(),this.touchend(),this.touchcancel(),this.gridsterItem.renderer.removeClass(this.gridsterItem.el,"gridster-item-moving"),this.gridster.dragInProgress=!1,this.gridster.updateGrid(),this.path=[],this.gridster.options.draggable&&this.gridster.options.draggable.stop?Promise.resolve(this.gridster.options.draggable.stop(this.gridsterItem.item,this.gridsterItem,t)).then(this.makeDrag.bind(this),this.cancelDrag.bind(this)):this.makeDrag(),setTimeout((function(){e.gridster&&(e.gridster.movingItem=null,e.gridster.previewStyle(!0))}))},t.prototype.cancelDrag=function(){this.gridsterItem.$item.x=this.gridsterItem.item.x||0,this.gridsterItem.$item.y=this.gridsterItem.item.y||0,this.gridsterItem.setSize(),this.push&&this.push.restoreItems(),this.swap&&this.swap.restoreSwapItem(),this.push&&(this.push.destroy(),delete this.push),this.swap&&(this.swap.destroy(),delete this.swap)},t.prototype.makeDrag=function(){this.gridster.$options.draggable.dropOverItems&&this.gridster.options.draggable&&this.gridster.options.draggable.dropOverItemsCallback&&this.collision&&!0!==this.collision&&this.collision.$item&&this.gridster.options.draggable.dropOverItemsCallback(this.gridsterItem.item,this.collision.item,this.gridster),this.collision=!1,this.gridsterItem.setSize(),this.gridsterItem.checkItemChanges(this.gridsterItem.$item,this.gridsterItem.item),this.push&&this.push.setPushedItems(),this.swap&&this.swap.setSwapItem(),this.push&&(this.push.destroy(),delete this.push),this.swap&&(this.swap.destroy(),delete this.swap)},t.prototype.checkforavailableSpaceintheArea=function(){var t=this.gridsterItem.$item.rows,e=this.gridsterItem.$item.cols;this.gridsterItem.$item.x=this.positionX,this.gridsterItem.$item.y=this.positionY;var i=1;do{this.gridsterItem.$item.rows=t;for(var s=this.gridsterItem.$item.rows;s>=15;s--){if(!this.gridster.checkCollision(this.gridsterItem.$item)){i=2;break}var r=this.gridsterItem.$item.x,o=this.gridsterItem.$item.x;do{if(this.gridsterItem.$item.x=this.gridsterItem.$item.x-1,this.gridster.checkCollision(this.gridsterItem.$item)){this.gridsterItem.$item.x=o;var n=this.gridsterItem.$item.cols,d=this.gridsterItem.$item.cols;do{if(this.gridsterItem.$item.cols=this.gridsterItem.$item.cols+1,this.gridster.checkCollision(this.gridsterItem.$item)){this.gridsterItem.$item.cols=d;break}d=this.gridsterItem.$item.cols}while(this.gridsterItem.$item.cols-n<15);break}o=this.gridsterItem.$item.x}while(this.gridsterItem.$item.x>0);if(!this.gridster.checkCollision(this.gridsterItem.$item)){i=2;break}this.gridsterItem.$item.rows=this.gridsterItem.$item.rows-1,this.gridsterItem.$item.x=r}if(2==i)break;this.gridsterItem.$item.cols=this.gridsterItem.$item.cols-1}while(this.gridsterItem.$item.cols>=15);return 1==i&&(this.gridsterItem.$item.x=this.positionXBackup,this.gridsterItem.$item.y=this.positionYBackup,this.gridsterItem.$item.cols=e,this.gridsterItem.$item.rows=t),this.gridsterItem.$item},t.prototype.calculateItemPosition=function(){if(this.gridster.movingItem=this.gridsterItem.$item,this.positionX=this.gridster.pixelsToPositionX(this.left,Math.round),this.positionY=this.gridster.pixelsToPositionY(this.top,Math.round),this.positionXBackup=this.gridsterItem.$item.x,this.positionYBackup=this.gridsterItem.$item.y,this.gridsterItem.$item.x=this.positionX,this.gridster.checkGridCollision(this.gridsterItem.$item)&&(this.gridsterItem.$item.x=this.positionXBackup),this.gridsterItem.$item.y=this.positionY,this.gridster.checkGridCollision(this.gridsterItem.$item)&&(this.gridsterItem.$item.y=this.positionYBackup),this.gridster.options.autoResizeonDrag&&(this.gridsterItem.$item=this.checkforavailableSpaceintheArea(),this.gridsterItem.setSize()),this.gridster.gridRenderer.setCellPosition(this.gridsterItem.renderer,this.gridsterItem.el,this.left,this.top),this.positionXBackup!==this.gridsterItem.$item.x||this.positionYBackup!==this.gridsterItem.$item.y){var t=this.path[this.path.length-1],e="";t.x<this.gridsterItem.$item.x?e=this.push.fromWest:t.x>this.gridsterItem.$item.x?e=this.push.fromEast:t.y<this.gridsterItem.$item.y?e=this.push.fromNorth:t.y>this.gridsterItem.$item.y&&(e=this.push.fromSouth),this.push.pushItems(e,this.gridster.$options.disablePushOnDrag),this.swap.swapItems(),this.collision=this.gridster.checkCollision(this.gridsterItem.$item),this.collision?(this.gridsterItem.$item.x=this.positionXBackup,this.gridsterItem.$item.y=this.positionYBackup,this.gridster.$options.draggable.dropOverItems&&!0!==this.collision&&this.collision.$item&&(this.gridster.movingItem=null)):this.path.push({x:this.gridsterItem.$item.x,y:this.gridsterItem.$item.y}),this.push.checkPushBack()}this.gridster.previewStyle(!0)},t.prototype.toggle=function(){var t=this.gridsterItem.canBeDragged();!this.enabled&&t?(this.enabled=!this.enabled,this.dragStartFunction=this.dragStartDelay.bind(this),this.mousedown=this.gridsterItem.renderer.listen(this.gridsterItem.el,"mousedown",this.dragStartFunction),this.touchstart=this.gridsterItem.renderer.listen(this.gridsterItem.el,"touchstart",this.dragStartFunction)):this.enabled&&!t&&(this.enabled=!this.enabled,this.mousedown(),this.touchstart())},t.prototype.dragStartDelay=function(t){var e=this;if(!(t.target.hasAttribute("class")&&t.target.getAttribute("class").split(" ").indexOf("gridster-item-resizable-handler")>-1||N.checkContentClassForEvent(this.gridster,t)))if(N.checkTouchEvent(t),this.gridster.$options.draggable.delayStart)var i=setTimeout((function(){e.dragStart(t),h()}),this.gridster.$options.draggable.delayStart),s=this.gridsterItem.renderer.listen("document","mouseup",h),r=this.gridsterItem.renderer.listen("document","mouseleave",h),o=this.gridsterItem.renderer.listen("window","blur",h),n=this.gridsterItem.renderer.listen("document","touchmove",(function(e){N.checkTouchEvent(e),(Math.abs(e.clientX-t.clientX)>9||Math.abs(e.clientY-t.clientY)>9)&&h()})),d=this.gridsterItem.renderer.listen("document","touchend",h),a=this.gridsterItem.renderer.listen("document","touchcancel",h);else this.dragStart(t);function h(){clearTimeout(i),o(),s(),r(),n(),d(),a()}},t.ctorParameters=function(){return[{type:_},{type:G},{type:e.NgZone}]},t=u([e.Injectable(),y("design:paramtypes",[_,G,e.NgZone])],t)}(),at=function(){function t(t){this.pushedItems=[],this.pushedItemsPath=[],this.gridsterItem=t,this.gridster=t.gridster,this.tryPattern={fromEast:this.tryWest,fromWest:this.tryEast,fromNorth:this.trySouth,fromSouth:this.tryNorth},this.fromSouth="fromSouth",this.fromNorth="fromNorth",this.fromEast="fromEast",this.fromWest="fromWest"}return t.prototype.destroy=function(){delete this.gridster,delete this.gridsterItem},t.prototype.pushItems=function(t){return!!this.gridster.$options.pushResizeItems&&this.push(this.gridsterItem,t)},t.prototype.restoreItems=function(){for(var t,e=0,i=this.pushedItems.length;e<i;e++)(t=this.pushedItems[e]).$item.x=t.item.x||0,t.$item.y=t.item.y||0,t.$item.cols=t.item.cols||1,t.$item.row=t.item.row||1,t.setSize();this.pushedItems=[],this.pushedItemsPath=[]},t.prototype.setPushedItems=function(){for(var t,e=0,i=this.pushedItems.length;e<i;e++)(t=this.pushedItems[e]).checkItemChanges(t.$item,t.item);this.pushedItems=[],this.pushedItemsPath=[]},t.prototype.checkPushBack=function(){for(var t=this.pushedItems.length-1,e=!1;t>-1;t--)this.checkPushedItem(this.pushedItems[t],t)&&(e=!0);e&&this.checkPushBack()},t.prototype.push=function(t,e){var i=this.gridster.checkCollision(t.$item);if(i&&!0!==i&&i!==this.gridsterItem&&i.canBeResized()){if(this.tryPattern[e].call(this,i,t,e))return!0}else if(!1===i)return!0;return!1},t.prototype.trySouth=function(t,e,i){var s=t.$item.y,r=t.$item.rows;return t.$item.y=e.$item.y+e.$item.rows,t.$item.rows=r+s-t.$item.y,Y.checkCollisionTwoItems(t.$item,e.$item)||this.gridster.checkGridCollision(t.$item)?(t.$item.y=s,t.$item.rows=r,!1):(t.setSize(),this.addToPushed(t),this.push(e,i),!0)},t.prototype.tryNorth=function(t,e,i){var s=t.$item.rows;return t.$item.rows=e.$item.y-t.$item.y,Y.checkCollisionTwoItems(t.$item,e.$item)||this.gridster.checkGridCollision(t.$item)?(t.$item.rows=s,!1):(t.setSize(),this.addToPushed(t),this.push(e,i),!0)},t.prototype.tryEast=function(t,e,i){var s=t.$item.x,r=t.$item.cols;return t.$item.x=e.$item.x+e.$item.cols,t.$item.cols=r+s-t.$item.x,Y.checkCollisionTwoItems(t.$item,e.$item)||this.gridster.checkGridCollision(t.$item)?(t.$item.x=s,t.$item.cols=r,!1):(t.setSize(),this.addToPushed(t),this.push(e,i),!0)},t.prototype.tryWest=function(t,e,i){var s=t.$item.cols;return t.$item.cols=e.$item.x-t.$item.x,Y.checkCollisionTwoItems(t.$item,e.$item)||this.gridster.checkGridCollision(t.$item)?(t.$item.cols=s,!1):(t.setSize(),this.addToPushed(t),this.push(e,i),!0)},t.prototype.addToPushed=function(t){if(this.pushedItems.indexOf(t)<0)this.pushedItems.push(t),this.pushedItemsPath.push([{x:t.item.x||0,y:t.item.y||0,cols:t.item.cols||0,rows:t.item.rows||0},{x:t.$item.x,y:t.$item.y,cols:t.$item.cols,rows:t.$item.rows}]);else{var e=this.pushedItems.indexOf(t);this.pushedItemsPath[e].push({x:t.$item.x,y:t.$item.y,cols:t.$item.cols,rows:t.$item.rows})}},t.prototype.removeFromPushed=function(t){t>-1&&(this.pushedItems.splice(t,1),this.pushedItemsPath.splice(t,1))},t.prototype.checkPushedItem=function(t,e){for(var i,s,r,o,n,d=this.pushedItemsPath[e],a=d.length-2;a>-1;a--)i=d[a],s=t.$item.x,r=t.$item.y,o=t.$item.cols,n=t.$item.rows,t.$item.x=i.x,t.$item.y=i.y,t.$item.cols=i.cols,t.$item.rows=i.rows,this.gridster.findItemWithItem(t.$item)?(t.$item.x=s,t.$item.y=r,t.$item.cols=o,t.$item.rows=n):(t.setSize(),d.splice(a+1,d.length-1-a));return d.length<2&&(this.removeFromPushed(e),!0)},t.ctorParameters=function(){return[{type:_}]},t=u([e.Injectable(),y("design:paramtypes",[_])],t)}(),ht=function(){function t(t,e,i){this.zone=i,this.gridsterItem=t,this.gridster=e,this.lastMouse={clientX:0,clientY:0},this.itemBackup=[0,0,0,0],this.resizeEventScrollType={w:!1,e:!1,n:!1,s:!1}}return t.prototype.destroy=function(){this.gridster.previewStyle&&this.gridster.previewStyle(),delete this.gridsterItem,delete this.gridster},t.prototype.dragStart=function(t){var e=this;switch(t.which){case 1:break;case 2:case 3:return}this.gridster.options.resizable&&this.gridster.options.resizable.start&&this.gridster.options.resizable.start(this.gridsterItem.item,this.gridsterItem,t),t.stopPropagation(),t.preventDefault(),this.dragFunction=this.dragMove.bind(this),this.dragStopFunction=this.dragStop.bind(this),this.zone.runOutsideAngular((function(){e.mousemove=e.gridsterItem.renderer.listen("document","mousemove",e.dragFunction),e.touchmove=e.gridster.renderer.listen(e.gridster.el,"touchmove",e.dragFunction)})),this.mouseup=this.gridsterItem.renderer.listen("document","mouseup",this.dragStopFunction),this.mouseleave=this.gridsterItem.renderer.listen("document","mouseleave",this.dragStopFunction),this.cancelOnBlur=this.gridsterItem.renderer.listen("window","blur",this.dragStopFunction),this.touchend=this.gridsterItem.renderer.listen("document","touchend",this.dragStopFunction),this.touchcancel=this.gridsterItem.renderer.listen("document","touchcancel",this.dragStopFunction),this.gridsterItem.renderer.addClass(this.gridsterItem.el,"gridster-item-resizing"),this.lastMouse.clientX=t.clientX,this.lastMouse.clientY=t.clientY,this.left=this.gridsterItem.left,this.top=this.gridsterItem.top,this.width=this.gridsterItem.width,this.height=this.gridsterItem.height,this.bottom=this.gridsterItem.top+this.gridsterItem.height,this.right=this.gridsterItem.left+this.gridsterItem.width,this.margin=this.gridster.$options.margin,this.offsetLeft=this.gridster.el.scrollLeft-this.gridster.el.offsetLeft,this.offsetTop=this.gridster.el.scrollTop-this.gridster.el.offsetTop,this.diffLeft=t.clientX+this.offsetLeft-this.left,this.diffRight=t.clientX+this.offsetLeft-this.right,this.diffTop=t.clientY+this.offsetTop-this.top,this.diffBottom=t.clientY+this.offsetTop-this.bottom,this.minHeight=this.gridster.positionYToPixels(this.gridsterItem.$item.minItemRows||this.gridster.$options.minItemRows)-this.margin,this.minWidth=this.gridster.positionXToPixels(this.gridsterItem.$item.minItemCols||this.gridster.$options.minItemCols)-this.margin,this.gridster.movingItem=this.gridsterItem.$item,this.gridster.previewStyle(),this.push=new nt(this.gridsterItem),this.pushResize=new at(this.gridsterItem),this.gridster.dragInProgress=!0,this.gridster.updateGrid(),t.target.hasAttribute("class")&&t.target.getAttribute("class").split(" ").indexOf("handle-n")>-1?(this.resizeEventScrollType.n=!0,this.directionFunction=this.handleN):t.target.hasAttribute("class")&&t.target.getAttribute("class").split(" ").indexOf("handle-w")>-1?(this.resizeEventScrollType.w=!0,this.directionFunction=this.handleW):t.target.hasAttribute("class")&&t.target.getAttribute("class").split(" ").indexOf("handle-s")>-1?(this.resizeEventScrollType.s=!0,this.directionFunction=this.handleS):t.target.hasAttribute("class")&&t.target.getAttribute("class").split(" ").indexOf("handle-e")>-1?(this.resizeEventScrollType.e=!0,this.directionFunction=this.handleE):t.target.hasAttribute("class")&&t.target.getAttribute("class").split(" ").indexOf("handle-nw")>-1?(this.resizeEventScrollType.n=!0,this.resizeEventScrollType.w=!0,this.directionFunction=this.handleNW):t.target.hasAttribute("class")&&t.target.getAttribute("class").split(" ").indexOf("handle-ne")>-1?(this.resizeEventScrollType.n=!0,this.resizeEventScrollType.e=!0,this.directionFunction=this.handleNE):t.target.hasAttribute("class")&&t.target.getAttribute("class").split(" ").indexOf("handle-sw")>-1?(this.resizeEventScrollType.s=!0,this.resizeEventScrollType.w=!0,this.directionFunction=this.handleSW):t.target.hasAttribute("class")&&t.target.getAttribute("class").split(" ").indexOf("handle-se")>-1&&(this.resizeEventScrollType.s=!0,this.resizeEventScrollType.e=!0,this.directionFunction=this.handleSE)},t.prototype.dragMove=function(t){var e=this;t.stopPropagation(),t.preventDefault(),N.checkTouchEvent(t),this.offsetTop=this.gridster.el.scrollTop-this.gridster.el.offsetTop,this.offsetLeft=this.gridster.el.scrollLeft-this.gridster.el.offsetLeft,K(this.gridster,this.left,this.top,this.width,this.height,t,this.lastMouse,this.directionFunction.bind(this),!0,this.resizeEventScrollType),this.directionFunction(t),this.lastMouse.clientX=t.clientX,this.lastMouse.clientY=t.clientY,this.zone.run((function(){e.gridster.updateGrid()}))},t.prototype.dragStop=function(t){var e=this;t.stopPropagation(),t.preventDefault(),Q(),this.mousemove(),this.mouseup(),this.mouseleave(),this.cancelOnBlur(),this.touchmove(),this.touchend(),this.touchcancel(),this.gridster.dragInProgress=!1,this.gridster.updateGrid(),this.gridster.options.resizable&&this.gridster.options.resizable.stop?Promise.resolve(this.gridster.options.resizable.stop(this.gridsterItem.item,this.gridsterItem,t)).then(this.makeResize.bind(this),this.cancelResize.bind(this)):this.makeResize(),setTimeout((function(){e.gridsterItem.renderer.removeClass(e.gridsterItem.el,"gridster-item-resizing"),e.gridster&&(e.gridster.movingItem=null,e.gridster.previewStyle())}))},t.prototype.cancelResize=function(){this.gridsterItem.$item.cols=this.gridsterItem.item.cols||1,this.gridsterItem.$item.rows=this.gridsterItem.item.rows||1,this.gridsterItem.$item.x=this.gridsterItem.item.x||0,this.gridsterItem.$item.y=this.gridsterItem.item.y||0,this.gridsterItem.setSize(),this.push.restoreItems(),this.pushResize.restoreItems(),this.push.destroy(),delete this.push,this.pushResize.destroy(),delete this.pushResize},t.prototype.makeResize=function(){this.gridsterItem.setSize(),this.gridsterItem.checkItemChanges(this.gridsterItem.$item,this.gridsterItem.item),this.push.setPushedItems(),this.pushResize.setPushedItems(),this.push.destroy(),delete this.push,this.pushResize.destroy(),delete this.pushResize},t.prototype.handleN=function(t){if(this.top=t.clientY+this.offsetTop-this.diffTop,this.height=this.bottom-this.top,this.minHeight>this.height&&(this.height=this.minHeight,this.top=this.bottom-this.minHeight),this.newPosition=this.gridster.pixelsToPositionY(this.top+this.margin,Math.floor),this.gridsterItem.$item.y!==this.newPosition){if(this.itemBackup[1]=this.gridsterItem.$item.y,this.itemBackup[3]=this.gridsterItem.$item.rows,this.gridsterItem.$item.rows+=this.gridsterItem.$item.y-this.newPosition,this.gridsterItem.$item.y=this.newPosition,this.pushResize.pushItems(this.pushResize.fromSouth),this.push.pushItems(this.push.fromSouth,this.gridster.$options.disablePushOnResize),this.gridster.checkCollision(this.gridsterItem.$item))return this.gridsterItem.$item.y=this.itemBackup[1],this.gridsterItem.$item.rows=this.itemBackup[3],this.setItemTop(this.gridster.positionYToPixels(this.gridsterItem.$item.y)),void this.setItemHeight(this.gridster.positionYToPixels(this.gridsterItem.$item.rows)-this.margin);this.gridster.previewStyle(),this.pushResize.checkPushBack(),this.push.checkPushBack()}this.setItemTop(this.top),this.setItemHeight(this.height)},t.prototype.handleW=function(t){if(this.left=t.clientX+this.offsetLeft-this.diffLeft,this.width=this.right-this.left,this.minWidth>this.width&&(this.width=this.minWidth,this.left=this.right-this.minWidth),this.newPosition=this.gridster.pixelsToPositionX(this.left+this.margin,Math.floor),this.gridsterItem.$item.x!==this.newPosition){if(this.itemBackup[0]=this.gridsterItem.$item.x,this.itemBackup[2]=this.gridsterItem.$item.cols,this.gridsterItem.$item.cols+=this.gridsterItem.$item.x-this.newPosition,this.gridsterItem.$item.x=this.newPosition,this.pushResize.pushItems(this.pushResize.fromEast),this.push.pushItems(this.push.fromEast,this.gridster.$options.disablePushOnResize),this.gridster.checkCollision(this.gridsterItem.$item))return this.gridsterItem.$item.x=this.itemBackup[0],this.gridsterItem.$item.cols=this.itemBackup[2],this.setItemLeft(this.gridster.positionXToPixels(this.gridsterItem.$item.x)),void this.setItemWidth(this.gridster.positionXToPixels(this.gridsterItem.$item.cols)-this.margin);this.gridster.previewStyle(),this.pushResize.checkPushBack(),this.push.checkPushBack()}this.setItemLeft(this.left),this.setItemWidth(this.width)},t.prototype.handleS=function(t){if(this.height=t.clientY+this.offsetTop-this.diffBottom-this.top,this.minHeight>this.height&&(this.height=this.minHeight),this.bottom=this.top+this.height,this.newPosition=this.gridster.pixelsToPositionY(this.bottom,Math.ceil),this.gridsterItem.$item.y+this.gridsterItem.$item.rows!==this.newPosition){if(this.itemBackup[3]=this.gridsterItem.$item.rows,this.gridsterItem.$item.rows=this.newPosition-this.gridsterItem.$item.y,this.pushResize.pushItems(this.pushResize.fromNorth),this.push.pushItems(this.push.fromNorth,this.gridster.$options.disablePushOnResize),this.gridster.checkCollision(this.gridsterItem.$item))return this.gridsterItem.$item.rows=this.itemBackup[3],void this.setItemHeight(this.gridster.positionYToPixels(this.gridsterItem.$item.rows)-this.margin);this.gridster.previewStyle(),this.pushResize.checkPushBack(),this.push.checkPushBack()}this.setItemHeight(this.height)},t.prototype.handleE=function(t){if(this.width=t.clientX+this.offsetLeft-this.diffRight-this.left,this.minWidth>this.width&&(this.width=this.minWidth),this.right=this.left+this.width,this.newPosition=this.gridster.pixelsToPositionX(this.right,Math.ceil),this.gridsterItem.$item.x+this.gridsterItem.$item.cols!==this.newPosition){if(this.itemBackup[2]=this.gridsterItem.$item.cols,this.gridsterItem.$item.cols=this.newPosition-this.gridsterItem.$item.x,this.pushResize.pushItems(this.pushResize.fromWest),this.push.pushItems(this.push.fromWest,this.gridster.$options.disablePushOnResize),this.gridster.checkCollision(this.gridsterItem.$item))return this.gridsterItem.$item.cols=this.itemBackup[2],void this.setItemWidth(this.gridster.positionXToPixels(this.gridsterItem.$item.cols)-this.margin);this.gridster.previewStyle(),this.pushResize.checkPushBack(),this.push.checkPushBack()}this.setItemWidth(this.width)},t.prototype.handleNW=function(t){this.handleN(t),this.handleW(t)},t.prototype.handleNE=function(t){this.handleN(t),this.handleE(t)},t.prototype.handleSW=function(t){this.handleS(t),this.handleW(t)},t.prototype.handleSE=function(t){this.handleS(t),this.handleE(t)},t.prototype.toggle=function(){this.resizeEnabled=this.gridsterItem.canBeResized()},t.prototype.dragStartDelay=function(t){var e=this;if(N.checkTouchEvent(t),this.gridster.$options.resizable.delayStart)var i=setTimeout((function(){e.dragStart(t),h()}),this.gridster.$options.resizable.delayStart),s=this.gridsterItem.renderer.listen("document","mouseup",h),r=this.gridsterItem.renderer.listen("document","mouseleave",h),o=this.gridsterItem.renderer.listen("window","blur",h),n=this.gridsterItem.renderer.listen("document","touchmove",(function(e){N.checkTouchEvent(e),(Math.abs(e.clientX-t.clientX)>9||Math.abs(e.clientY-t.clientY)>9)&&h()})),d=this.gridsterItem.renderer.listen("document","touchend",h),a=this.gridsterItem.renderer.listen("document","touchcancel",h);else this.dragStart(t);function h(){clearTimeout(i),o(),s(),r(),n(),d(),a()}},t.prototype.setItemTop=function(t){this.gridster.gridRenderer.setCellPosition(this.gridsterItem.renderer,this.gridsterItem.el,this.left,t)},t.prototype.setItemLeft=function(t){this.gridster.gridRenderer.setCellPosition(this.gridsterItem.renderer,this.gridsterItem.el,t,this.top)},t.prototype.setItemHeight=function(t){this.gridsterItem.renderer.setStyle(this.gridsterItem.el,"height",t+"px")},t.prototype.setItemWidth=function(t){this.gridsterItem.renderer.setStyle(this.gridsterItem.el,"width",t+"px")},t.ctorParameters=function(){return[{type:_},{type:G},{type:e.NgZone}]},t=u([e.Injectable(),y("design:paramtypes",[_,G,e.NgZone])],t)}(),lt=function(){function t(t,e,i,s){this.renderer=i,this.zone=s,this.el=t.nativeElement,this.$item={cols:-1,rows:-1,x:-1,y:-1},this.gridster=e,this.drag=new dt(this,e,this.zone),this.resize=new ht(this,e,this.zone)}return t.prototype.ngOnInit=function(){this.updateOptions(),this.gridster.addItem(this)},t.prototype.updateOptions=function(){this.$item=N.merge(this.$item,this.item,{cols:void 0,rows:void 0,x:void 0,y:void 0,dragEnabled:void 0,resizeEnabled:void 0,compactEnabled:void 0,maxItemRows:void 0,minItemRows:void 0,maxItemCols:void 0,minItemCols:void 0,maxItemArea:void 0,minItemArea:void 0})},t.prototype.ngOnDestroy=function(){this.gridster.removeItem(this),this.gridster.movingItem=null,delete this.gridster,this.drag.destroy(),delete this.drag,this.resize.destroy(),delete this.resize},t.prototype.setSize=function(){this.renderer.setStyle(this.el,"display",this.notPlaced?"":"block"),this.gridster.gridRenderer.updateItem(this.el,this.$item,this.renderer),this.updateItemSize()},t.prototype.updateItemSize=function(){var t=this.$item.y*this.gridster.curRowHeight,e=this.$item.x*this.gridster.curColWidth,i=this.$item.cols*this.gridster.curColWidth-this.gridster.$options.margin,s=this.$item.rows*this.gridster.curRowHeight-this.gridster.$options.margin;!this.init&&i>0&&s>0&&(this.init=!0,this.item.initCallback&&this.item.initCallback(this.item,this),this.gridster.options.itemInitCallback&&(this.item.curRowHeight=this.gridster.curRowHeight,this.gridster.options.itemInitCallback(this.item,this)),this.gridster.$options.scrollToNewItems&&this.el.scrollIntoView(!1)),i===this.width&&s===this.height||(this.width=i,this.height=s,this.gridster.options.itemResizeCallback&&this.gridster.options.itemResizeCallback(this.item,this)),this.top=t,this.left=e},t.prototype.itemChanged=function(){this.gridster.options.itemChangeCallback&&(this.item.curRowHeight=this.gridster.curRowHeight,this.gridster.options.itemChangeCallback(this.item,this))},t.prototype.checkItemChanges=function(t,e){t.rows===e.rows&&t.cols===e.cols&&t.x===e.x&&t.y===e.y||(this.gridster.checkCollision(this.$item)?(this.$item.x=e.x||0,this.$item.y=e.y||0,this.$item.cols=e.cols||1,this.$item.rows=e.rows||1,this.setSize()):(this.item.cols=this.$item.cols,this.item.rows=this.$item.rows,this.item.x=this.$item.x,this.item.y=this.$item.y,this.gridster.calculateLayoutDebounce(),this.itemChanged()))},t.prototype.canBeDragged=function(){return!this.gridster.mobile&&(void 0===this.$item.dragEnabled?this.gridster.$options.draggable.enabled:this.$item.dragEnabled)},t.prototype.canBeResized=function(){return!this.gridster.mobile&&(void 0===this.$item.resizeEnabled?this.gridster.$options.resizable.enabled:this.$item.resizeEnabled)},t.ctorParameters=function(){return[{type:e.ElementRef},{type:Y,decorators:[{type:e.Host}]},{type:e.Renderer2},{type:e.NgZone}]},u([e.Input(),y("design:type",Object)],t.prototype,"item",void 0),t=u([e.Component({selector:"gridster-item",template:'<ng-content></ng-content>\r\n<div (mousedown)="resize.dragStartDelay($event)" (touchstart)="resize.dragStartDelay($event)"\r\n [hidden]="!gridster.$options.resizable.handles.s || !resize.resizeEnabled"\r\n class="gridster-item-resizable-handler handle-s"></div>\r\n<div (mousedown)="resize.dragStartDelay($event)" (touchstart)="resize.dragStartDelay($event)"\r\n [hidden]="!gridster.$options.resizable.handles.e || !resize.resizeEnabled"\r\n class="gridster-item-resizable-handler handle-e"></div>\r\n<div (mousedown)="resize.dragStartDelay($event)" (touchstart)="resize.dragStartDelay($event)"\r\n [hidden]="!gridster.$options.resizable.handles.n || !resize.resizeEnabled"\r\n class="gridster-item-resizable-handler handle-n"></div>\r\n<div (mousedown)="resize.dragStartDelay($event)" (touchstart)="resize.dragStartDelay($event)"\r\n [hidden]="!gridster.$options.resizable.handles.w || !resize.resizeEnabled"\r\n class="gridster-item-resizable-handler handle-w"></div>\r\n<div (mousedown)="resize.dragStartDelay($event)" (touchstart)="resize.dragStartDelay($event)"\r\n [hidden]="!gridster.$options.resizable.handles.se || !resize.resizeEnabled"\r\n class="gridster-item-resizable-handler handle-se"></div>\r\n<div (mousedown)="resize.dragStartDelay($event)" (touchstart)="resize.dragStartDelay($event)"\r\n [hidden]="!gridster.$options.resizable.handles.ne || !resize.resizeEnabled"\r\n class="gridster-item-resizable-handler handle-ne"></div>\r\n<div (mousedown)="resize.dragStartDelay($event)" (touchstart)="resize.dragStartDelay($event)"\r\n [hidden]="!gridster.$options.resizable.handles.sw || !resize.resizeEnabled"\r\n class="gridster-item-resizable-handler handle-sw"></div>\r\n<div (mousedown)="resize.dragStartDelay($event)" (touchstart)="resize.dragStartDelay($event)"\r\n [hidden]="!gridster.$options.resizable.handles.nw || !resize.resizeEnabled"\r\n class="gridster-item-resizable-handler handle-nw"></div>\r\n',encapsulation:e.ViewEncapsulation.None,styles:["gridster-item{box-sizing:border-box;z-index:1;position:absolute;overflow:hidden;transition:.3s;display:none;background:#fff;-webkit-user-select:text;-moz-user-select:text;user-select:text}gridster-item.gridster-item-moving{cursor:move}gridster-item.gridster-item-moving,gridster-item.gridster-item-resizing{transition:none;z-index:2;box-shadow:0 0 5px 5px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12)}.gridster-item-resizable-handler{position:absolute;z-index:2}.gridster-item-resizable-handler.handle-n{cursor:n-resize;height:10px;right:0;top:0;left:0}.gridster-item-resizable-handler.handle-e{cursor:e-resize;width:10px;bottom:0;right:0;top:0}.gridster-item-resizable-handler.handle-s{cursor:s-resize;height:10px;right:0;bottom:0;left:0}.gridster-item-resizable-handler.handle-w{cursor:w-resize;width:10px;left:0;top:0;bottom:0}.gridster-item-resizable-handler.handle-ne{cursor:ne-resize;width:10px;height:10px;right:0;top:0}.gridster-item-resizable-handler.handle-nw{cursor:nw-resize;width:10px;height:10px;left:0;top:0}.gridster-item-resizable-handler.handle-se{cursor:se-resize;width:0;height:0;right:0;bottom:0;border-style:solid;border-width:0 0 10px 10px;border-color:transparent}.gridster-item-resizable-handler.handle-sw{cursor:sw-resize;width:10px;height:10px;left:0;bottom:0}gridster-item:hover .gridster-item-resizable-handler.handle-se{border-color:transparent transparent #ccc}"]}),f(1,e.Host()),y("design:paramtypes",[e.ElementRef,Y,e.Renderer2,e.NgZone])],t)}(),pt=function(){function t(t,e,i){this.renderer=i,this.el=t.nativeElement,this.gridster=e,this.gridster.previewStyle=this.previewStyle.bind(this)}return t.prototype.ngOnDestroy=function(){delete this.el,delete this.gridster.previewStyle,delete this.gridster},t.prototype.previewStyle=function(t){this.gridster.movingItem?(this.gridster.compact&&t&&this.gridster.compact.checkCompactItem(this.gridster.movingItem),this.renderer.setStyle(this.el,"display","block"),this.gridster.gridRenderer.updateItem(this.el,this.gridster.movingItem,this.renderer)):this.renderer.setStyle(this.el,"display","")},t.ctorParameters=function(){return[{type:e.ElementRef},{type:Y,decorators:[{type:e.Host}]},{type:e.Renderer2}]},t=u([e.Component({selector:"gridster-preview",template:"",encapsulation:e.ViewEncapsulation.None,styles:["gridster-preview{position:absolute;display:none;background:#42b4e6}"]}),f(1,e.Host()),y("design:paramtypes",[e.ElementRef,Y,e.Renderer2])],t)}(),gt=function(){function t(){}return t=u([e.NgModule({declarations:[Y,lt,pt],imports:[l.CommonModule],exports:[Y,lt],providers:[],bootstrap:[]})],t)}(),ct=function(){function t(){}return t=u([e.NgModule({declarations:[D,P,W],imports:[a.BrowserModule,gt,h.HttpClientModule,o.NgxUiLoaderModule,n.NotifierModule.withConfig(E),s.RACommonModule,p.RAUserControlModule,g.RACommonControlsModule],exports:[D],bootstrap:[D],entryComponents:[W]})],t)}(),mt=function(){function t(t){var e=this;this.ngZone=t,this.initialize=function(t,i,s,r){e.ngZone.run((function(){e.userDashboardId=i,e.appConfig=s,e.raDashboardEventBus=t,e.dashboardInfo=r})),e.init()}}return t.prototype.ngOnInit=function(){var t=new CustomEvent("event-template-initiated");document.body.dispatchEvent(t)},u([e.Input("dashboard-id"),y("design:type",Number)],t.prototype,"dashboardId",void 0),u([e.Input("global-filter"),y("design:type",Object)],t.prototype,"globalFilter",void 0),u([e.Input(),y("design:type",Object)],t.prototype,"initialize",void 0),t}(),ut=function(){function t(){var t=this;this.getAllFilterConfig=function(e){return t.getFilterConfig()},this.setInapplicableFilterMsg=function(e){t.showHideInapplicableMsg(e)},this.isValidEntry=function(){return t.isValid()},this.clearAllData=function(){t.clearData()},this.setAllFilterConfig=function(e,i){t.setFilterConfig(e,i)}}return t.prototype.ngOnInit=function(){var t=new CustomEvent("global-filter-initiated");document.body.dispatchEvent(t)},u([e.Input(),y("design:type",Object)],t.prototype,"getAllFilterConfig",void 0),u([e.Input(),y("design:type",Object)],t.prototype,"setInapplicableFilterMsg",void 0),u([e.Input(),y("design:type",Object)],t.prototype,"isValidEntry",void 0),u([e.Input(),y("design:type",Object)],t.prototype,"clearAllData",void 0),u([e.Input(),y("design:type",Object)],t.prototype,"setAllFilterConfig",void 0),t}();t.DashboardFrameworkModule=ct,t.RADashboardArea=D,t.RADashboardEventBus=C,t.RADashboardResponsiveService=T,t.RAWidgetContainer=P,t.RaBaseDashboardFilter=ut,t.RaBaseDashboardTemplate=mt,t.RaDashboardService=I,t.ɵa=W,t.ɵb=gt,t.ɵc=Y,t.ɵd=lt,t.ɵe=pt,t.ɵf=E,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
16
16
|
//# sourceMappingURL=schneideress-dashboardframework.umd.min.js.map
|